### Create a Job using SimPro API Source: https://github.com/jezweb/simpro-api-docs/blob/main/guides/getting-started.md Example using curl to create a new job via the SimPro API. Requires an Authorization header and a JSON payload with job details. ```bash curl -X POST "https://api.simprosuite.com/api/v1.0/jobs/" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "CustomerID": 123, "SiteID": 456, "Description": "New job description" }' ``` -------------------------------- ### List Customers using SimPro API Source: https://github.com/jezweb/simpro-api-docs/blob/main/guides/getting-started.md Example using curl to list customers from the SimPro API. Requires an Authorization header with a Bearer token. ```bash curl -X GET "https://api.simprosuite.com/api/v1.0/customers/" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Accept: application/json" ``` -------------------------------- ### Shell Example: Get Prebuild Catalog Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example using curl to retrieve prebuild catalog details. This demonstrates how to make a GET request to the API endpoint, including setting the Accept header for JSON response. ```shell # You can also use wget curl -X GET /api/v1.0/companies/{companyID}/prebuilds/{prebuildID}/catalogs/{catalogID} \ -H 'Accept: application/json' ``` -------------------------------- ### Example GET Request for Set-Price Prebuild Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Demonstrates how to make a GET request to retrieve set-price prebuild details using cURL, JavaScript (fetch API), and Python (requests library). ```shell # You can also use wget curl -X GET /api/v1.0/companies/{companyID}/prebuilds/setPrice/{setPricePrebuildID} \ -H 'Accept: application/json' ``` ```javascript const headers = { 'Accept':'application/json' }; fetch('/api/v1.0/companies/{companyID}/prebuilds/setPrice/{setPricePrebuildID}', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); }); ``` ```python import requests headers = { 'Accept': 'application/json' } r = requests.get('/api/v1.0/companies/{companyID}/prebuilds/setPrice/{setPricePrebuildID}', headers = headers) print(r.json()) ``` -------------------------------- ### Simpro API GET Recommendations - Shell Example Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example of how to fetch recommendations using curl. ```shell # You can also use wget curl -X GET /api/v1.0/companies/{companyID}/setup/assetTypes/{assetTypeID}/serviceLevels/{assetTypeServiceLevelID}/failurePoints/{failurePointID}/recommendations/ \ -H 'Accept: application/json' ``` -------------------------------- ### Simpro API GET Recommendations - JavaScript Example Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example of how to fetch recommendations using JavaScript's fetch API. ```javascript const headers = { 'Accept':'application/json' }; fetch('/api/v1.0/companies/{companyID}/setup/assetTypes/{assetTypeID}/serviceLevels/{assetTypeServiceLevelID}/failurePoints/{failurePointID}/recommendations/', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); }); ``` -------------------------------- ### Simpro API GET Request Examples Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Code samples demonstrating how to make GET requests to the Simpro API using cURL, JavaScript (fetch API), and Python (requests library). These examples show how to set headers and handle responses. ```shell # You can also use wget curl -X GET /api/v1.0/companies/{companyID}/invoices/{invoiceID}/customFields/{customFieldID} \ -H 'Accept: application/json' ``` ```javascript const headers = { 'Accept':'application/json' }; fetch('/api/v1.0/companies/{companyID}/invoices/{invoiceID}/customFields/{customFieldID}', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); }); ``` ```python import requests headers = { 'Accept': 'application/json' } r = requests.get('/api/v1.0/companies/{companyID}/invoices/{invoiceID}/customFields/{customFieldID}', headers = headers) print(r.json()) ``` -------------------------------- ### Simpro API GET Recommendations - Python Example Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example of how to fetch recommendations using Python's requests library. ```python import requests headers = { 'Accept': 'application/json' } r = requests.get('/api/v1.0/companies/{companyID}/setup/assetTypes/{assetTypeID}/serviceLevels/{assetTypeServiceLevelID}/failurePoints/{failurePointID}/recommendations/', headers = headers) print(r.json()) ``` -------------------------------- ### API Request Examples Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Examples of how to make a GET request to retrieve job cost center catalog item details using cURL, JavaScript (fetch API), and Python (requests library). All examples include the necessary 'Accept: application/json' header. ```shell # You can also use wget curl -X GET /api/v1.0/companies/{companyID}/jobs/{jobID}/sections/{sectionID}/costCenters/{costCenterID}/catalogs/{catalogID} \ -H 'Accept: application/json' ``` ```javascript const headers = { 'Accept':'application/json' }; fetch('/api/v1.0/companies/{companyID}/jobs/{jobID}/sections/{sectionID}/costCenters/{costCenterID}/catalogs/{catalogID}', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); }); ``` ```python import requests headers = { 'Accept': 'application/json' } r = requests.get('/api/v1.0/companies/{companyID}/jobs/{jobID}/sections/{sectionID}/costCenters/{costCenterID}/catalogs/{catalogID}', headers = headers) print(r.json()) ``` -------------------------------- ### Retrieve Purchasing Stage - JavaScript Example Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md JavaScript example using the Fetch API to retrieve a purchasing stage, demonstrating GET method and Accept header. ```JavaScript const headers = { 'Accept':'application/json' }; fetch('/api/v1.0/companies/{companyID}/setup/materials/purchasingStages/{purchasingStageID}', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); }); ``` -------------------------------- ### Simpro API GET Request Examples Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Provides code samples for making GET requests to the Simpro API to retrieve job cost center schedule details. ```shell # You can also use wget curl -X GET /api/v1.0/companies/{companyID}/jobs/{jobID}/sections/{sectionID}/costCenters/{costCenterID}/schedules/{scheduleID} \ -H 'Accept: application/json' ``` -------------------------------- ### API Request Examples (GET Cost Center) Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Provides code samples for making a GET request to retrieve job cost center details using cURL, JavaScript (fetch API), and Python (requests library). ```shell # You can also use wget curl -X GET /api/v1.0/companies/{companyID}/jobs/{jobID}/sections/{sectionID}/costCenters/{costCenterID} \ -H 'Accept: application/json' ``` ```javascript const headers = { 'Accept':'application/json' }; fetch('/api/v1.0/companies/{companyID}/jobs/{jobID}/sections/{sectionID}/costCenters/{costCenterID}', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); }); ``` ```python import requests headers = { 'Accept': 'application/json' } r = requests.get('/api/v1.0/companies/{companyID}/jobs/{jobID}/sections/{sectionID}/costCenters/{costCenterID}', headers = headers) print(r.json()) ``` -------------------------------- ### Simpro API GET Request Examples Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Provides examples of how to make a GET request to the Simpro API to retrieve quote note details using different tools and programming languages. These examples demonstrate the necessary headers and request structure. ```shell # You can also use wget curl -X GET /api/v1.0/companies/{companyID}/quotes/{quoteID}/notes/{noteID} \ -H 'Accept: application/json' ``` ```javascript const headers = { 'Accept':'application/json' }; fetch('/api/v1.0/companies/{companyID}/quotes/{quoteID}/notes/{noteID}', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); }); ``` ```python import requests headers = { 'Accept': 'application/json' } r = requests.get('/api/v1.0/companies/{companyID}/quotes/{quoteID}/notes/{noteID}', headers = headers) print(r.json()) ``` -------------------------------- ### JavaScript Example for Creating a Vendor Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Provides a JavaScript example using the `fetch` API to create a vendor. It shows how to set up the request body, headers, and handle the response. ```JavaScript const inputBody = '{ "Name": "string", "EIN": "string", "CompanyNo": "string", "Website": "string", "Email": "string", "Phone": "string", "Fax": "string", "Address": { "Address": "string", "City": "string", "State": "string", "PostalCode": "string", "Country": "string" }, "BillingAddress": { "Address": "string", "City": "string", "State": "string", "PostalCode": "string", "Country": "string" }, "Banking": { "AccountName": "string", "RoutingNo": "string", "AccountNo": "string", "PaymentTermID": 0, "PaymentTerms": { "Days": 0, "Type": "Invoice" } }, "PrivateNotes": "string", "Profile": { "TaxCode": 0, "Account": "string", "Currency": "string", "PreferredNotificationMethod": "string" }, "Archived": true }'; const headers = { 'Content-Type':'application/json', 'Accept':'application/json' }; fetch('/api/v1.0/companies/{companyID}/vendors/', { method: 'POST', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); }); ``` -------------------------------- ### Get Asset Custom Field - Python Example Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Provides a Python example using the requests library to fetch asset custom field information. It sends a GET request with the 'Accept: application/json' header. ```python import requests headers = { 'Accept': 'application/json' } r = requests.get('/api/v1.0/companies/{companyID}/sites/{siteID}/assets/{assetID}/customFields/{customFieldID}', headers = headers) print(r.json()) ``` -------------------------------- ### Python Example: Requests Prebuild Catalog Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example using the Python 'requests' library to fetch prebuild catalog details. It demonstrates setting headers and printing the JSON response. ```python import requests headers = { 'Accept': 'application/json' } r = requests.get('/api/v1.0/companies/{companyID}/prebuilds/{prebuildID}/catalogs/{catalogID}', headers = headers) print(r.json()) ``` -------------------------------- ### API Request Examples (GET OneOff Item) Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example code snippets for making a GET request to retrieve a job cost center one-off item using cURL, JavaScript (fetch API), and Python (requests library). These examples demonstrate how to set the necessary headers and construct the API request. ```Shell # You can also use wget curl -X GET /api/v1.0/companies/{companyID}/jobs/{jobID}/sections/{sectionID}/costCenters/{costCenterID}/oneOffs/{oneOffID} \ -H 'Accept: application/json' ``` ```JavaScript const headers = { 'Accept':'application/json' }; fetch('/api/v1.0/companies/{companyID}/jobs/{jobID}/sections/{sectionID}/costCenters/{costCenterID}/oneOffs/{oneOffID}', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); }); ``` ```Python import requests headers = { 'Accept': 'application/json' } r = requests.get('/api/v1.0/companies/{companyID}/jobs/{jobID}/sections/{sectionID}/costCenters/{costCenterID}/oneOffs/{oneOffID}', headers = headers) print(r.json()) ``` -------------------------------- ### Create Plant (Python) Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Python example using the requests library to create a plant and equipment. It shows how to set headers and make a POST request to the API. ```python import requests headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } r = requests.post('/api/v1.0/companies/{companyID}/plantTypes/{plantTypeID}/plants/', headers = headers) print(r.json()) ``` -------------------------------- ### Simpro API GET Request Examples Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Provides examples of how to make a GET request to the Simpro API endpoint for retrieving quote cost center catalog item details using different tools and languages. ```Python import requests headers = { 'Accept': 'application/json' } r = requests.get('/api/v1.0/companies/{companyID}/quotes/{quoteID}/sections/{sectionID}/costCenters/{costCenterID}/catalogs/{catalogID}', headers = headers) print(r.json()) ``` -------------------------------- ### Shell Example for Listing Customers Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example of how to list individual customers using curl. ```Shell # You can also use wget curl -X GET /api/v1.0/companies/{companyID}/customers/individuals/ \ -H 'Accept: application/json' ``` -------------------------------- ### Simpro API: Fetch Prebuild Details (Shell) Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example using cURL to fetch details for a specific take off template prebuild. ```shell # You can also use wget curl -X GET /api/v1.0/companies/{companyID}/takeOffTemplates/{takeOffTemplateID}/prebuilds/{prebuildsID} \ -H 'Accept: application/json' ``` -------------------------------- ### Simpro API GET Request Examples Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Provides examples of how to make a GET request to the Simpro API endpoint for retrieving quote cost center catalog item details using different tools and languages. ```Shell # You can also use wget curl -X GET /api/v1.0/companies/{companyID}/quotes/{quoteID}/sections/{sectionID}/costCenters/{costCenterID}/catalogs/{catalogID} \ -H 'Accept: application/json' ``` -------------------------------- ### Shell Example for Retrieving Standard Price Prebuild Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example using curl to retrieve standard price prebuild details. ```shell # You can also use wget curl -X GET /api/v1.0/companies/{companyID}/prebuilds/standardPrice/{standardPricePrebuildID} \ -H 'Accept: application/json' ``` -------------------------------- ### Simpro API GET Request Examples Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Provides examples of how to make a GET request to the Simpro API endpoint for retrieving quote cost center catalog item details using different tools and languages. ```JavaScript const headers = { 'Accept':'application/json' }; fetch('/api/v1.0/companies/{companyID}/quotes/{quoteID}/sections/{sectionID}/costCenters/{costCenterID}/catalogs/{catalogID}', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); }); ``` -------------------------------- ### Create Site using JavaScript (Fetch API) Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md This JavaScript code snippet demonstrates how to create a new site using the Fetch API. It includes setting up the request body, headers, and handling the response. ```javascript const inputBody = '{ "Name": "string", "Address": { "Address": "string", "City": "string", "State": "string", "PostalCode": "string", "Country": "string" }, "BillingAddress": { "Address": "string", "City": "string", "State": "string", "PostalCode": "string" }, "BillingContact": "string", "PrimaryContact": { "Contact": 0, "Title": "string", "GivenName": "string", "FamilyName": "string", "Email": "string", "WorkPhone": "string", "CellPhone": "string", "Fax": "string", "Position": "string", "PreferredNotificationMethod": "string" }, "PublicNotes": "string", "PrivateNotes": "string", "Zone": 0, "PreferredTechs": [ 0 ], "Customers": [ 0 ], "Archived": true, "STCZone": 1, "VEECZone": "Metropolitan", "Rates": { "ServiceFee": 0 } }'; const headers = { 'Content-Type':'application/json', 'Accept':'application/json' }; fetch('/api/v1.0/companies/{companyID}/sites/', { method: 'POST', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); }); ``` -------------------------------- ### Python Example: Create Job Cost Center Prebuild Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example using the requests library in Python to send a POST request to create a job cost center prebuild item. Includes setting request headers. ```python import requests headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } r = requests.post('/api/v1.0/companies/{companyID}/jobs/{jobID}/sections/{sectionID}/costCenters/{costCenterID}/prebuilds/', headers = headers) print(r.json()) ``` -------------------------------- ### List Prebuilds using JavaScript Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example using JavaScript's fetch API to retrieve prebuild items from the Simpro API. ```javascript const headers = { 'Accept':'application/json' }; fetch('/api/v1.0/companies/{companyID}/recurringInvoices/{recurringInvoiceID}/sections/{sectionID}/costCenters/{costCenterID}/prebuilds/', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); }); ``` -------------------------------- ### Shell Example: Get Contractor Job Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example of how to retrieve contractor job details using curl. ```shell # You can also use wget curl -X GET /api/v1.0/companies/{companyID}/jobs/{jobID}/sections/{sectionID}/costCenters/{costCenterID}/contractorJobs/{contractorJobID} \ -H 'Accept: application/json' ``` -------------------------------- ### JavaScript Example: Create Job Cost Center Prebuild Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example using the Fetch API in JavaScript to send a POST request to create a job cost center prebuild item. Includes setting request headers and body. ```javascript const inputBody = '{ "Prebuild": 0, "BillableItem": true, "BillableStatus": "Billable", "EstimatedTime": 0, "FitTime": 0, "BasePrice": 0, "Markup": 0, "SalesTaxCode": 0, "DisplayOrder": 0, "Discount": 0, "SellPriceExDiscount": 0, "SellPriceIncDiscount": 0, "SellPrice": 0, "Total": { "Qty": 0 }, "IncomeAccount": 0 }'; const headers = { 'Content-Type':'application/json', 'Accept':'application/json' }; fetch('/api/v1.0/companies/{companyID}/jobs/{jobID}/sections/{sectionID}/costCenters/{costCenterID}/prebuilds/', { method: 'POST', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); }); ``` -------------------------------- ### Shell Example: Get Company Customer Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example of how to retrieve company customer details using curl. ```Shell # You can also use wget curl -X GET /api/v1.0/companies/{companyID}/customers/companies/{customerID} \ -H 'Accept: application/json' ``` -------------------------------- ### Simpro API - Get Prebuilds (Python) Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example using the requests library in Python to get prebuild data. ```python import requests headers = { 'Accept': 'application/json' } r = requests.get('/api/v1.0/companies/{companyID}/prebuilds/', headers = headers) print(r.json()) ``` -------------------------------- ### List Prebuilds using cURL Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example using cURL to fetch prebuild items from the Simpro API. ```shell curl -X GET /api/v1.0/companies/{companyID}/recurringInvoices/{recurringInvoiceID}/sections/{sectionID}/costCenters/{costCenterID}/prebuilds/ \ -H 'Accept: application/json' ``` -------------------------------- ### JavaScript Example: Create Test Readings Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example of how to create test readings using JavaScript's fetch API. It includes setting up the request body and headers. ```javascript const inputBody = '{ "Name": "string", "Type": "List", "ListItems": [ "string" ], "IsMandatory": true, "ServiceLevels": [ 0 ], "Order": 0 }'; const headers = { 'Content-Type':'application/json', 'Accept':'application/json' }; fetch('/api/v1.0/companies/{companyID}/setup/assetTypes/{assetTypeID}/testReadings/', { method: 'POST', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); }); ``` -------------------------------- ### Example Request for Site Contact Creation Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md A shell command example for making a request to create a site contact. This is a placeholder and would typically include request body details. ```shell # Example shell command for site contact creation (details omitted) # curl -X POST -d '' ``` -------------------------------- ### Create Recommendation - JavaScript Example Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md JavaScript example using the fetch API to create a recommendation, including the endpoint, headers, and request body. ```javascript const inputBody = '{ "Name": "New Pipe", "Prebuild": 0, "ChargeRate": 0 }'; const headers = { 'Content-Type':'application/json', 'Accept':'application/json' }; fetch('/api/v1.0/companies/{companyID}/setup/assetTypes/{assetTypeID}/serviceLevels/{assetTypeServiceLevelID}/failurePoints/{failurePointID}/recommendations/', { method: 'POST', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); }); ``` -------------------------------- ### JavaScript Example: Get Contractor Job Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example of how to retrieve contractor job details using the fetch API in JavaScript. ```javascript const headers = { 'Accept':'application/json' }; fetch('/api/v1.0/companies/{companyID}/jobs/{jobID}/sections/{sectionID}/costCenters/{costCenterID}/contractorJobs/{contractorJobID}', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); }); ``` -------------------------------- ### Python Example: Get Contractor Job Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example of how to retrieve contractor job details using the requests library in Python. ```python import requests headers = { 'Accept': 'application/json' } r = requests.get('/api/v1.0/companies/{companyID}/jobs/{jobID}/sections/{sectionID}/costCenters/{costCenterID}/contractorJobs/{contractorJobID}', headers = headers) print(r.json()) ``` -------------------------------- ### JavaScript Example: Get Company Customer Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example of how to retrieve company customer details using the fetch API in JavaScript. ```JavaScript const headers = { 'Accept':'application/json' }; fetch('/api/v1.0/companies/{companyID}/customers/companies/{customerID}', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); }); ``` -------------------------------- ### JavaScript Example for Listing Customers Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example of how to list individual customers using JavaScript's fetch API. ```JavaScript const headers = { 'Accept':'application/json' }; fetch('/api/v1.0/companies/{companyID}/customers/individuals/', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); }); ``` -------------------------------- ### Simpro API: Fetch Prebuild Details (Python) Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example using Python's requests library to fetch details for a specific take off template prebuild. ```python import requests headers = { 'Accept': 'application/json' } r = requests.get('/api/v1.0/companies/{companyID}/takeOffTemplates/{takeOffTemplateID}/prebuilds/{prebuildsID}', headers = headers) print(r.json()) ``` -------------------------------- ### Python Example: Get Company Customer Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example of how to retrieve company customer details using the requests library in Python. ```Python import requests headers = { 'Accept': 'application/json' } r = requests.get('/api/v1.0/companies/{companyID}/customers/companies/{customerID}', headers = headers) print(r.json()) ``` -------------------------------- ### Get Employee API Request Examples Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Provides example requests for retrieving employee data using cURL, JavaScript, and Python. ```shell # You can also use wget curl -X GET /api/v1.0/companies/{companyID}/employees/{employeeID} \ -H 'Accept: application/json' ``` ```javascript const headers = { 'Accept':'application/json' }; fetch('/api/v1.0/companies/{companyID}/employees/{employeeID}', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); }); ``` ```python import requests headers = { 'Accept': 'application/json' } r = requests.get('/api/v1.0/companies/{companyID}/employees/{employeeID}', headers = headers) print(r.json()) ``` -------------------------------- ### API Request Examples Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Provides code samples for making GET requests to retrieve job cost center prebuild item details using cURL, JavaScript (fetch API), and Python (requests library). ```shell # You can also use wget curl -X GET /api/v1.0/companies/{companyID}/jobs/{jobID}/sections/{sectionID}/costCenters/{costCenterID}/prebuilds/{prebuildID} \ -H 'Accept: application/json' ``` ```javascript const headers = { 'Accept':'application/json' }; fetch('/api/v1.0/companies/{companyID}/jobs/{jobID}/sections/{sectionID}/costCenters/{costCenterID}/prebuilds/{prebuildID}', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); }); ``` ```python import requests headers = { 'Accept': 'application/json' } r = requests.get('/api/v1.0/companies/{companyID}/jobs/{jobID}/sections/{sectionID}/costCenters/{costCenterID}/prebuilds/{prebuildID}', headers = headers) print(r.json()) ``` -------------------------------- ### Create Lead with JavaScript Fetch Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example of creating a lead using the JavaScript `fetch` API. It demonstrates setting the request method, headers, and request body. ```javascript const inputBody = '{ "LeadName": "string", "Customer": 0, "CustomerContact": 0, "AdditionalContacts": [ 0 ], "Site": 0, "SiteContact": 0, "Stage": "Open", "FollowUpDate": "2021-04-22", "Description": "string", "Notes": "string", "CostCenter": 0, "Tags": [ 0 ], "Salesperson": 0, "ProjectManager": 0, "Status": 0, "Forecast": { "EstimatedPrice": 1.57, "Probability": 100, "ExpectedYear": 1900, "ExpectedMonth": 1 }, "AutoAdjustStatus": true }'; const headers = { 'Content-Type':'application/json', 'Accept':'application/json' }; fetch('/api/v1.0/companies/{companyID}/leads/', { method: 'POST', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); }); ``` -------------------------------- ### Retrieve Purchasing Stage - cURL Example Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example of retrieving a purchasing stage using cURL, including GET method and Accept header. ```cURL # You can also use wget curl -X GET /api/v1.0/companies/{companyID}/setup/materials/purchasingStages/{purchasingStageID} \ -H 'Accept: application/json' ``` -------------------------------- ### List Invoice Credit Notes - Shell Example Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example using curl to list invoice credit notes via a GET request. ```shell # You can also use wget curl -X GET /api/v1.0/companies/{companyID}/invoices/{invoiceID}/creditNotes/ \ -H 'Accept: application/json' ``` -------------------------------- ### Simpro API Customer Asset Creation Example Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md A shell command example for creating a customer asset via the Simpro API. This demonstrates how to structure the request. ```shell ``` -------------------------------- ### Shell Example: Get Recurring Job Cost Center Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example of how to retrieve recurring job cost center details using curl. ```shell # You can also use wget curl -X GET /api/v1.0/companies/{companyID}/recurringJobs/{recurringJobID}/sections/{sectionID}/costCenters/{costCenterID} \ -H 'Accept: application/json' ``` -------------------------------- ### JavaScript Example: Fetch Prebuild Catalog Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example using the Fetch API in JavaScript to retrieve prebuild catalog details. It shows how to set request headers and process the JSON response. ```javascript const headers = { 'Accept':'application/json' }; fetch('/api/v1.0/companies/{companyID}/prebuilds/{prebuildID}/catalogs/{catalogID}', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); }); ``` -------------------------------- ### Python Example for Listing Customers Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example of how to list individual customers using Python's requests library. ```Python import requests headers = { 'Accept': 'application/json' } r = requests.get('/api/v1.0/companies/{companyID}/customers/individuals/', headers = headers) print(r.json()) ``` -------------------------------- ### Shell Example: Get Job Invoice Custom Fields Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example of how to retrieve job invoice custom fields using curl or wget. ```shell # You can also use wget curl -X GET /api/v1.0/companies/{companyID}/jobs/{jobID}/invoices/{invoiceID}/customFields/ \ -H 'Accept: application/json' ``` -------------------------------- ### Simpro API Request Examples Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Provides example code snippets for making GET requests to the Simpro API to retrieve invoice note details. ```Shell # You can also use wget curl -X GET /api/v1.0/companies/{companyID}/invoices/{invoiceID}/notes/{noteID} \ -H 'Accept: application/json' ``` ```JavaScript const headers = { 'Accept':'application/json' }; fetch('/api/v1.0/companies/{companyID}/invoices/{invoiceID}/notes/{noteID}', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); }); ``` ```Python import requests headers = { 'Accept': 'application/json' } r = requests.get('/api/v1.0/companies/{companyID}/invoices/{invoiceID}/notes/{noteID}', headers = headers) print(r.json()) ``` -------------------------------- ### Shell Example: List Catalog PricingTier Prices Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example of how to list catalog pricing tier prices using curl. ```shell # You can also use wget curl -X GET /api/v1.0/companies/{companyID}/catalogs/{catalogID}/pricingTiers/{pricingTierID}/prices/ \ -H 'Accept: application/json' ``` -------------------------------- ### Python Example: Get Job Invoice Custom Fields Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example of how to retrieve job invoice custom fields using the requests library in Python. ```python import requests headers = { 'Accept': 'application/json' } r = requests.get('/api/v1.0/companies/{companyID}/jobs/{jobID}/invoices/{invoiceID}/customFields/', headers = headers) print(r.json()) ``` -------------------------------- ### Create Recommendation - Shell Example Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example using curl to create a recommendation, including the endpoint and headers. ```shell curl -X POST /api/v1.0/companies/{companyID}/setup/assetTypes/{assetTypeID}/serviceLevels/{assetTypeServiceLevelID}/failurePoints/{failurePointID}/recommendations/ \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' ``` -------------------------------- ### Python Example for Retrieving Standard Price Prebuild Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example using the requests library in Python to retrieve standard price prebuild details. ```python import requests headers = { 'Accept': 'application/json' } r = requests.get('/api/v1.0/companies/{companyID}/prebuilds/standardPrice/{standardPricePrebuildID}', headers = headers) print(r.json()) ``` -------------------------------- ### JavaScript Example: Get Job Invoice Custom Fields Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example of how to retrieve job invoice custom fields using the Fetch API in JavaScript. ```javascript const headers = { 'Accept':'application/json' }; fetch('/api/v1.0/companies/{companyID}/jobs/{jobID}/invoices/{invoiceID}/customFields/', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); }); ``` -------------------------------- ### Create Site using cURL Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example of how to create a new site using a cURL command. This demonstrates the HTTP POST request with necessary headers. ```curl curl -X POST /api/v1.0/companies/{companyID}/sites/ \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' ``` -------------------------------- ### List Invoice Credit Notes - Python Example Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example using the requests library in Python to list invoice credit notes via a GET request. ```python import requests headers = { 'Accept': 'application/json' } r = requests.get('/api/v1.0/companies/{companyID}/invoices/{invoiceID}/creditNotes/', headers = headers) print(r.json()) ``` -------------------------------- ### Create Plant (JavaScript) Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md JavaScript example using the fetch API to create a plant and equipment. It includes setting the request method, headers, and the JSON body. ```javascript const inputBody = '{ "Name": "string", "ServiceFee": 0, "CheckedOutBy": 0, "EnableServicing": true, "Servicing": { "Frequency": 0, "FrequencyType": "Year", "StartsIn": 0, "StartDate": "2021-04-22" }, "Billable": true, "Billing": { "CostRate": 1.57, "OverheadRate": 1.57, "SellRate": 1.57, "TaxCode": 0 } }'; const headers = { 'Content-Type':'application/json', 'Accept':'application/json' }; fetch('/api/v1.0/companies/{companyID}/plantTypes/{plantTypeID}/plants/', { method: 'POST', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); }); ``` -------------------------------- ### List Invoice Credit Notes - JavaScript Example Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example using fetch API in JavaScript to list invoice credit notes via a GET request. ```javascript const headers = { 'Accept':'application/json' }; fetch('/api/v1.0/companies/{companyID}/invoices/{invoiceID}/creditNotes/', { method: 'GET', headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); }); ``` -------------------------------- ### Simpro API - GET Site Contact Custom Fields (Python) Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example using Python's requests library to get site contact custom fields. ```Python import requests headers = { 'Accept': 'application/json' } r = requests.get('/api/v1.0/companies/{companyID}/sites/{siteID}/contacts/{contactID}/customFields/', headers = headers) print(r.json()) ``` -------------------------------- ### Simpro API - Shell Example Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example of how to call the Simpro API endpoint for creating a job cost center stock item using curl or wget. ```shell # You can also use wget curl -X POST /api/v1.0/companies/{companyID}/jobs/{jobID}/sections/{sectionID}/costCenters/{costCenterID}/stock/ \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' ``` -------------------------------- ### Create Company Site Asset - JavaScript Example Source: https://github.com/jezweb/simpro-api-docs/blob/main/api-reference/simpro-api.md Example of how to create a company site asset using JavaScript's Fetch API. ```JavaScript const inputBody = '{ "AssetType": 0, "DisplayOrder": 0, "CustomerContract": 0, "StartDate": "2018-01-27", "Archived": true, "ParentID": 0 }'; const headers = { 'Content-Type':'application/json', 'Accept':'application/json' }; fetch('/api/v1.0/companies/{companyID}/sites/{siteID}/assets/', { method: 'POST', body: inputBody, headers: headers }) .then(function(res) { return res.json(); }).then(function(body) { console.log(body); }); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.