curl --request GET \
--url https://api.useopenwrench.com/api/external/v1/buyer/invoice/invoices/download \
--header 'OW-KEY: <api-key>' \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.useopenwrench.com/api/external/v1/buyer/invoice/invoices/download"
headers = {
"X-API-KEY": "<api-key>",
"OW-KEY": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>', 'OW-KEY': '<api-key>'}};
fetch('https://api.useopenwrench.com/api/external/v1/buyer/invoice/invoices/download', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.useopenwrench.com/api/external/v1/buyer/invoice/invoices/download",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"OW-KEY: <api-key>",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.useopenwrench.com/api/external/v1/buyer/invoice/invoices/download"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("OW-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.useopenwrench.com/api/external/v1/buyer/invoice/invoices/download")
.header("X-API-KEY", "<api-key>")
.header("OW-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useopenwrench.com/api/external/v1/buyer/invoice/invoices/download")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
request["OW-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"type": "<string>",
"data": [
{
"status": "<string>",
"buyerCompanyId": 123,
"supplierFacilityId": 123,
"createdByEmail": "<string>",
"createdByName": "<string>",
"id": 123,
"workOrderId": "<string>",
"projectId": 123,
"title": "<string>",
"invoiceNumber": "<string>",
"workOrderTitle": "<string>",
"workOrderCompletedAt": "<string>",
"expenseType": "<string>",
"invoicePDFLink": "<string>",
"scope": "<string>",
"problemTypeId": 123,
"problemTypeName": "<string>",
"locationId": 123,
"storeId": "<string>",
"locationName": "<string>",
"regionId": 123,
"paymentTerms": "<string>",
"glCode": "<string>",
"poNumber": "<string>",
"dueDate": "<string>",
"createdAt": "<string>",
"dateOfInvoice": "<string>",
"supplierName": "<string>",
"supplierCode": "<string>",
"approvedBy": "<string>",
"approvedAt": "<string>",
"invoiceTotalAfterTax": "<string>",
"invoiceTax": "<string>",
"invoiceTotalBeforeTax": "<string>",
"laborTotalBeforeTax": "<string>",
"materialTotalBeforeTax": "<string>",
"travelTotalBeforeTax": "<string>",
"freightTotalBeforeTax": "<string>",
"miscTotalBeforeTax": "<string>",
"travelFreightMiscTotalBeforeTax": "<string>",
"assetName": "<string>"
}
],
"count": 123,
"status": "ok"
}{
"message": "<string>",
"type": "<string>",
"status": "error",
"traceId": "<string>"
}{
"message": "<string>",
"type": "<string>",
"status": "error",
"traceId": "<string>"
}{
"message": "<string>",
"type": "<string>",
"status": "error",
"traceId": "<string>"
}List invoices in download (flattened) form
Flattened invoice rows suitable for spreadsheet export. Includes both work-order and project invoices; work-order-derived columns (workOrderId, workOrderTitle, problem type, location) are null on project rows. Filtering: every query parameter other than the pagination parameters is passed to the entity’s filter layer and matched against its indexed columns (multi-value filters are comma-separated strings); the per-entity column names are not exhaustively documented here. Additional filters: invoiceEntityType (work_order | project, omit for both), projectId, and projectIdSeq. Filters are combined with the tenant-security filters derived from the API key.
curl --request GET \
--url https://api.useopenwrench.com/api/external/v1/buyer/invoice/invoices/download \
--header 'OW-KEY: <api-key>' \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.useopenwrench.com/api/external/v1/buyer/invoice/invoices/download"
headers = {
"X-API-KEY": "<api-key>",
"OW-KEY": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>', 'OW-KEY': '<api-key>'}};
fetch('https://api.useopenwrench.com/api/external/v1/buyer/invoice/invoices/download', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.useopenwrench.com/api/external/v1/buyer/invoice/invoices/download",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"OW-KEY: <api-key>",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.useopenwrench.com/api/external/v1/buyer/invoice/invoices/download"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("OW-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.useopenwrench.com/api/external/v1/buyer/invoice/invoices/download")
.header("X-API-KEY", "<api-key>")
.header("OW-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useopenwrench.com/api/external/v1/buyer/invoice/invoices/download")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
request["OW-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"type": "<string>",
"data": [
{
"status": "<string>",
"buyerCompanyId": 123,
"supplierFacilityId": 123,
"createdByEmail": "<string>",
"createdByName": "<string>",
"id": 123,
"workOrderId": "<string>",
"projectId": 123,
"title": "<string>",
"invoiceNumber": "<string>",
"workOrderTitle": "<string>",
"workOrderCompletedAt": "<string>",
"expenseType": "<string>",
"invoicePDFLink": "<string>",
"scope": "<string>",
"problemTypeId": 123,
"problemTypeName": "<string>",
"locationId": 123,
"storeId": "<string>",
"locationName": "<string>",
"regionId": 123,
"paymentTerms": "<string>",
"glCode": "<string>",
"poNumber": "<string>",
"dueDate": "<string>",
"createdAt": "<string>",
"dateOfInvoice": "<string>",
"supplierName": "<string>",
"supplierCode": "<string>",
"approvedBy": "<string>",
"approvedAt": "<string>",
"invoiceTotalAfterTax": "<string>",
"invoiceTax": "<string>",
"invoiceTotalBeforeTax": "<string>",
"laborTotalBeforeTax": "<string>",
"materialTotalBeforeTax": "<string>",
"travelTotalBeforeTax": "<string>",
"freightTotalBeforeTax": "<string>",
"miscTotalBeforeTax": "<string>",
"travelFreightMiscTotalBeforeTax": "<string>",
"assetName": "<string>"
}
],
"count": 123,
"status": "ok"
}{
"message": "<string>",
"type": "<string>",
"status": "error",
"traceId": "<string>"
}{
"message": "<string>",
"type": "<string>",
"status": "error",
"traceId": "<string>"
}{
"message": "<string>",
"type": "<string>",
"status": "error",
"traceId": "<string>"
}Auktoriseringar
OpenWrench shared secret. Required on every request alongside X-API-KEY; issued together with your API key.
Frågeparametrar
Number of records to skip.
x >= 0Page size. Default 10, maximum 25.
1 <= x <= 25Field/column to sort by.
Sort direction.
asc, desc