curl --request GET \
--url https://api.useopenwrench.com/api/external/v1/buyer/invoice/invoices/count_by \
--header 'OW-KEY: <api-key>' \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.useopenwrench.com/api/external/v1/buyer/invoice/invoices/count_by"
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/count_by', 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/count_by",
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/count_by"
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/count_by")
.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/count_by")
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": 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>"
}Count invoices
Count of invoices matching the given filters. Takes the same filters as the list endpoint; supplier drafts and voided invoices are never counted. A singular key (status) takes one value; the plural key (statuses) takes a comma-separated list with no spaces. If a parameter is repeated, only the first value is used. A query parameter that is not a supported filter is ignored rather than rejected. A non-numeric id, a space in a list, or a boolean other than true/false can fail the request with a 500. Filters are combined with the tenant-security filters derived from the API key, which can’t be overridden.
curl --request GET \
--url https://api.useopenwrench.com/api/external/v1/buyer/invoice/invoices/count_by \
--header 'OW-KEY: <api-key>' \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.useopenwrench.com/api/external/v1/buyer/invoice/invoices/count_by"
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/count_by', 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/count_by",
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/count_by"
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/count_by")
.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/count_by")
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": 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>"
}Autorisations
Paramètres de requête
Invoices for one location. Get location ids from GET /v1/buyer/location/locations.
Invoices from one supplier. Get supplier facility ids from GET /v1/buyer/supplier_facilities.
Earliest creation time to include, inclusive. Format MM/dd/yyyy HH:mm:ss: a local wall-clock time read in timezone, or UTC when timezone is omitted. Don't include an offset in the value: it is ignored. A non-empty value that doesn't parse, such as an ISO 8601 value or a date without a time, is rejected with 400. An empty value is read as 1 January 1970. Send either end on its own for an open-ended range.
Latest creation time to include. The whole end day is included: the time part is replaced with 23:59:59 on that date in timezone. Format MM/dd/yyyy HH:mm:ss: a local wall-clock time read in timezone, or UTC when timezone is omitted. Don't include an offset in the value: it is ignored. A non-empty value that doesn't parse, such as an ISO 8601 value or a date without a time, is rejected with 400. An empty value is read as 1 January 1970.
Earliest time the invoice was published to the buyer to include, inclusive. Format MM/dd/yyyy HH:mm:ss: a local wall-clock time read in timezone, or UTC when timezone is omitted. Don't include an offset in the value: it is ignored. A non-empty value that doesn't parse, such as an ISO 8601 value or a date without a time, is rejected with 400. An empty value is read as 1 January 1970. Send either end on its own for an open-ended range.
Latest time the invoice was published to the buyer to include. The whole end day is included: the time part is replaced with 23:59:59 on that date in timezone. Format MM/dd/yyyy HH:mm:ss: a local wall-clock time read in timezone, or UTC when timezone is omitted. Don't include an offset in the value: it is ignored. A non-empty value that doesn't parse, such as an ISO 8601 value or a date without a time, is rejected with 400. An empty value is read as 1 January 1970.
Earliest approval time to include, inclusive. Format MM/dd/yyyy HH:mm:ss: a local wall-clock time read in timezone, or UTC when timezone is omitted. Don't include an offset in the value: it is ignored. A non-empty value that doesn't parse, such as an ISO 8601 value or a date without a time, is rejected with 400. An empty value is read as 1 January 1970. Send either end on its own for an open-ended range.
Latest approval time to include. The whole end day is included: the time part is replaced with 23:59:59 on that date in timezone. Format MM/dd/yyyy HH:mm:ss: a local wall-clock time read in timezone, or UTC when timezone is omitted. Don't include an offset in the value: it is ignored. A non-empty value that doesn't parse, such as an ISO 8601 value or a date without a time, is rejected with 400. An empty value is read as 1 January 1970.
Earliest time the invoice moved to processing to include, inclusive. Format MM/dd/yyyy HH:mm:ss: a local wall-clock time read in timezone, or UTC when timezone is omitted. Don't include an offset in the value: it is ignored. A non-empty value that doesn't parse, such as an ISO 8601 value or a date without a time, is rejected with 400. An empty value is read as 1 January 1970. Send either end on its own for an open-ended range.
Latest time the invoice moved to processing to include. The whole end day is included: the time part is replaced with 23:59:59 on that date in timezone. Format MM/dd/yyyy HH:mm:ss: a local wall-clock time read in timezone, or UTC when timezone is omitted. Don't include an offset in the value: it is ignored. A non-empty value that doesn't parse, such as an ISO 8601 value or a date without a time, is rejected with 400. An empty value is read as 1 January 1970.
Earliest time the invoice was marked paid to include, inclusive. Format MM/dd/yyyy HH:mm:ss: a local wall-clock time read in timezone, or UTC when timezone is omitted. Don't include an offset in the value: it is ignored. A non-empty value that doesn't parse, such as an ISO 8601 value or a date without a time, is rejected with 400. An empty value is read as 1 January 1970. Send either end on its own for an open-ended range.
Latest time the invoice was marked paid to include. The whole end day is included: the time part is replaced with 23:59:59 on that date in timezone. Format MM/dd/yyyy HH:mm:ss: a local wall-clock time read in timezone, or UTC when timezone is omitted. Don't include an offset in the value: it is ignored. A non-empty value that doesn't parse, such as an ISO 8601 value or a date without a time, is rejected with 400. An empty value is read as 1 January 1970.
Earliest due date to include, inclusive. Format MM/dd/yyyy HH:mm:ss: a local wall-clock time read in timezone, or UTC when timezone is omitted. Don't include an offset in the value: it is ignored. A non-empty value that doesn't parse, such as an ISO 8601 value or a date without a time, is rejected with 400. An empty value is read as 1 January 1970. Send either end on its own for an open-ended range.
Latest due date to include. The whole end day is included: the time part is replaced with 23:59:59 on that date in timezone. Format MM/dd/yyyy HH:mm:ss: a local wall-clock time read in timezone, or UTC when timezone is omitted. Don't include an offset in the value: it is ignored. A non-empty value that doesn't parse, such as an ISO 8601 value or a date without a time, is rejected with 400. An empty value is read as 1 January 1970.
Earliest completion time of the invoice's work order to include, inclusive. Format MM/dd/yyyy HH:mm:ss: a local wall-clock time read in timezone, or UTC when timezone is omitted. Don't include an offset in the value: it is ignored. A non-empty value that doesn't parse, such as an ISO 8601 value or a date without a time, is rejected with 400. An empty value is read as 1 January 1970. Send either end on its own for an open-ended range.
Latest completion time of the invoice's work order to include. The whole end day is included: the time part is replaced with 23:59:59 on that date in timezone. Format MM/dd/yyyy HH:mm:ss: a local wall-clock time read in timezone, or UTC when timezone is omitted. Don't include an offset in the value: it is ignored. A non-empty value that doesn't parse, such as an ISO 8601 value or a date without a time, is rejected with 400. An empty value is read as 1 January 1970.
Optional IANA time zone name, such as America/Chicago or UTC, that this route's date filters are read in. Each date filter value is a local wall-clock time in this zone. When omitted, date filters are read in UTC. Names are case-sensitive. Fixed offsets (-05:00, GMT-5, Z, Etc/GMT+5), abbreviations (CST), and unknown names are rejected with 400. On a daylight saving change day, a time in the skipped hour moves forward by the length of the gap, and a time in the repeated hour means the standard-time (second) occurrence.
"America/Chicago"