<style>p { margin: 0; }span.fr-emoticon.fr-emoticon-img { background-repeat: no-repeat !important; font-size: inherit; height: 1em; width: 1em; min-height: 20px; min-width: 20px; display: inline-block; margin: -0.1em 0.1em 0.1em; line-height: 1; vertical-align: middle; } span.fr-emoticon { font-weight: normal; font-family: "Apple Color Emoji", "Segoe UI Emoji", "NotoColorEmoji", "Segoe UI Symbol", "Android Emoji", "EmojiSymbols"; display: inline; line-height: 0; } blockquote { border-left: solid 2px #5e35b1; color: #5e35b1; margin-left:0; padding-left:5px;}blockquote blockquote{ border-color: #00bcd4; color: #00bcd4;}blockquote blockquote blockquote{ border-color: #43a047; color: #43a047;} table.grid{ border-collapse: collapse;} table.grid td, table.grid th { border: 1px solid #ddd;} .fr-fic.fr-dib{ display: block; margin: 5px auto;}.fr-fic.fr-dib.fr-fir{ text-align: right; margin: 5px 0 5px auto;}.fr-fic.fr-dib.fr-fil{ text-align: left; margin: 5px auto 5px 0;}.fr-fic.fr-dii{ float: none; margin: 5px auto;}.fr-fic.fr-dii.fr-fil{ float: left; margin: 5px auto;}.fr-fic.fr-dii.fr-fir{ float: right; margin: 5px auto;}img.fr-dib.fr-fir { margin-right: 0; text-align: right;}img.fr-dib.fr-fil { margin-left: 0; text-align: left;}img.fr-dib { margin: 5px auto; display: block; float: none;}img.fr-bordered { box-sizing: content-box; border: solid 5px #CCC;}img.fr-shadow { box-shadow: 10px 10px 5px 0px #cccccc;}img.fr-rounded { border-radius: 10px; -moz-border-radius: 10px; -webkit-border-radius: 10px; -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box;}</style><style>
p {
margin: 0;
}
span.fr-emoticon.fr-emoticon-img {
background-repeat: no-repeat !important; font-size: inherit; height: 1em; width: 1em; min-height: 20px; min-width: 20px; display: inline-block; margin: -0.1em 0.1em 0.1em; line-height: 1; vertical-align: middle;
}
span.fr-emoticon {
font-weight: normal; font-family: "Apple Color Emoji", "Segoe UI Emoji", "NotoColorEmoji", "Segoe UI Symbol", "Android Emoji", "EmojiSymbols"; display: inline; line-height: 0;
}
blockquote {
border-left: solid 2px #5e35b1; color: #5e35b1; margin-left: 0; padding-left: 5px;
}
blockquote blockquote {
border-color: #00bcd4; color: #00bcd4;
}
blockquote blockquote blockquote {
border-color: #43a047; color: #43a047;
}
table.grid {
border-collapse: collapse;
}
table.grid td,
table.grid th {
border: 1px solid #ddd;
}
.fr-fic.fr-dib {
display: block; margin: 5px auto;
}
.fr-fic.fr-dib.fr-fir {
text-align: right; margin: 5px 0 5px auto;
}
.fr-fic.fr-dib.fr-fil {
text-align: left; margin: 5px auto 5px 0;
}
.fr-fic.fr-dii {
float: none; margin: 5px auto;
}
.fr-fic.fr-dii.fr-fil {
float: left; margin: 5px auto;
}
.fr-fic.fr-dii.fr-fir {
float: right; margin: 5px auto;
}
img.fr-dib.fr-fir {
margin-right: 0; text-align: right;
}
img.fr-dib.fr-fil {
margin-left: 0; text-align: left;
}
img.fr-dib {
margin: 5px auto; display: block; float: none;
}
img.fr-bordered {
box-sizing: content-box; border: solid 5px #CCC;
}
img.fr-shadow {
box-shadow: 10px 10px 5px 0px #cccccc;
}
img.fr-rounded {
border-radius: 10px; -moz-border-radius: 10px; -webkit-border-radius: 10px; -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box;
}
.styled-table thead tr th:first-child {
width: 28em; min-width: 28em; max-width: 28em; word-break: break-word;
}
.styled-table thead tr th:nth-child(2) {
width: 8em; min-width: 8em; max-width: 8em; word-break: break-word;
}
.styled-table thead tr th:nth-child(3) {
width: 8em; min-width: 8em; max-width: 8em; word-break: break-word;
}
.styled-table thead tr th:nth-child(4) {
width: 8em; min-width: 8em; max-width: 8em; word-break: break-word;
}
.styled-table thead tr th:nth-child(5) {
width: 8em; min-width: 8em; max-width: 8em; word-break: break-word;
}
.styled-table {
border-radius: 5px;border-collapse: collapse; margin: 25px 0; font-size: 1rem; font-family: "Poppins", sans-serif, "Roboto"; width: 100%; box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}
.styled-table thead tr {
text-align: left;border-radius: 5px;
}
.styled-table th {
border-radius: 5px; padding: 12px 15px;
}
.styled-table td {
padding: 12px 15px;
}
.styled-table tbody tr {
border-bottom: 1px solid #dddddd;
}
.styled-table tbody tr:nth-of-type(even) {
background-color: #fafafa;
}
.styled-table tbody tr:last-of-type {
border-bottom: 2px solid $orcolor;
}
</style><p><strong>In this guide we will cover:</strong></p><p><strong>- Using the 'datesearch' Query Parameter</strong></p><p><strong>- Relevant Endpoints</strong></p><p><strong>- Example</strong></p><p><br></p><p><br></p><p><strong id="isPasted"><span style="font-size: 14pt;">Using the 'datesearch' Query Parameter</span></strong></p><p>When querying the API, the response can return a filtered list of entities based on a date range. This can be done via the application of 3 query parameters: datesearch, start_date and end_date. start_date and end_date define the date window you wish to filter your response by, and the datesearch parameter allows you to specify the datetime value you wish to apply the filter to.</p><p><br></p><p><strong id="isPasted"><span style="font-size: 14pt;">Relevant Endpoints</span></strong></p><p>Below lists relevant information relating to the endpoints where these query parameters can be applied to.</p><table class="styled-table noborder" style="width: 100%;"><tbody><tr><td style="width: 33.3333%; text-align: left; background-color: rgb(0, 204, 248);"><strong><span style="color: rgb(255, 255, 255); font-size: 12pt;">Endpoint</span></strong></td><td style="width: 33.2768%; text-align: left; background-color: rgb(0, 204, 248);"><strong><span style="color: rgb(255, 255, 255); font-size: 12pt;">Values</span></strong></td><td style="width: 33.2767%; text-align: center; background-color: rgb(0, 204, 248);"><div style="text-align: left;"><strong><span style="color: rgb(255, 255, 255); font-size: 12pt;">Comments</span></strong></div></td></tr><tr><td style="width: 33.3333%;">Actions</td><td style="width: 33.2768%;">whe_</td><td style="width: 33.2767%; text-align: left;">instead of start_date and end_date, use startdateand enddate. 'whe_' defines when the Action was completed.</td></tr><tr><td style="width: 33.3333%;">Appointments</td><td style="width: 33.2768%;">start_date, last_modified, end_date</td><td style="width: 33.2767%; text-align: left;">start_date and end_date define the start/end date for the appointment(s). Last_modified looks at when the appointment was last modified</td></tr><tr><td style="width: 33.3333%;">Client</td><td style="width: 33.2768%;">last_modified</td><td style="width: 33.2767%; text-align: left;"><br></td></tr><tr><td style="width: 33.3333%;">Supplier</td><td style="width: 33.2768%;">datecreated, last_modified<br></td><td style="width: 33.2767%;"><br></td></tr><tr><td style="width: 33.3333%;">ContractHeader</td><td style="width: 33.2768%;">last_modified<br></td><td style="width: 33.2767%;"><br></td></tr><tr><td style="width: 33.3333%;">Device</td><td style="width: 33.2768%;">last_modified<br></td><td style="width: 33.2767%;"><br></td></tr><tr><td style="width: 33.3333%;">Tickets</td><td style="width: 33.2768%;">dateoccurred, dateclosed, dateassigned, responsedate, lastactiondate, nextactivitydate, startdate, targetdate, deadlinedate, followupdate, fixbydate, last_update</td><td style="width: 33.2767%;"><br></td></tr><tr><td style="width: 33.3333%;">Invoice</td><td style="width: 33.2768%;">invoice_date, last_modified, duedate, schedulestartdate, scheduleenddate<br></td><td style="width: 33.2767%;"><br></td></tr><tr><td style="width: 33.3333%;">Item</td><td style="width: 33.2768%;">last_modified<br></td><td style="width: 33.2767%;"><br></td></tr><tr><td style="width: 33.3333%;">SalesOrder</td><td style="width: 33.2768%;">last_modified<br></td><td style="width: 33.2767%;"><br></td></tr><tr><td style="width: 33.3333%;">Quotation</td><td style="width: 33.2768%;">last_modified<br></td><td style="width: 33.2767%;"><br></td></tr><tr><td style="width: 33.3333%;">Site</td><td style="width: 33.2768%;">last_modified<br></td><td style="width: 33.2767%;"><br></td></tr><tr><td style="width: 33.3333%;">PurchaseOrder</td><td style="width: 33.2768%;">purchase_order_date, last_modified, date_sent, est_delivery_date, due_date<br></td><td style="width: 33.2767%;"><br></td></tr><tr><td style="width: 33.3333%;">Agent</td><td style="width: 33.2768%;">last_modified<br></td><td style="width: 33.2767%;"><br></td></tr><tr><td style="width: 33.3333%;">Users</td><td style="width: 33.2768%;">last_modified<br></td><td style="width: 33.2767%;"><br></td></tr></tbody></table><p><br></p><p><span style="font-size: 14pt;"><strong>Example</strong></span></p><p><span style="font-size: 11pt;">As an example, I may want to make an API call to only return Customer records that have been updated between the start and end of the 20th of December. To achieve this my API call would look something like </span></p><p><br></p><p><span style="font-size: 11pt;"><em>.../api/client?datesearch=last_modified&start_date=2024-12-20T00:00:00.000&end_date=2024-12-21T00:00:00.000</em></span></p>