curl --request GET \
--url https://api.exowpee.com/v1/catalog/purchases/{purchase} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/catalog/purchases/{purchase}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/catalog/purchases/{purchase}', 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.exowpee.com/v1/catalog/purchases/{purchase}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.exowpee.com/v1/catalog/purchases/{purchase}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.exowpee.com/v1/catalog/purchases/{purchase}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/purchases/{purchase}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"company_id": "<string>",
"vendor_id": "<string>",
"reference": "<string>",
"purchase_date": "2023-12-25",
"notes": "<string>",
"status": "<string>",
"is_credit": true,
"cost_total": 123,
"cost_total_includes_vat": true,
"vat_total": 123,
"vat_is_recoverable": true,
"invoice_total": 123,
"cost_leftover": 123,
"invoiced_at": "2023-11-07T05:31:56Z",
"amount_paid": 123,
"amount_debt_adjusted": 123,
"remaining_amount": 123,
"due_date": "2023-12-25",
"payment_status": "<string>",
"need_approval": true,
"cost_strategy": "<string>",
"items": "<array>",
"debt_adjustments": "<array>",
"returns": "<array>",
"pickups": "<array>",
"deliveries": "<array>",
"vendor": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}View a purchase
Shows a purchase in detail with its supplier, lines, pickups, deliveries and returns.
curl --request GET \
--url https://api.exowpee.com/v1/catalog/purchases/{purchase} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/catalog/purchases/{purchase}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/catalog/purchases/{purchase}', 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.exowpee.com/v1/catalog/purchases/{purchase}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.exowpee.com/v1/catalog/purchases/{purchase}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.exowpee.com/v1/catalog/purchases/{purchase}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/purchases/{purchase}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"company_id": "<string>",
"vendor_id": "<string>",
"reference": "<string>",
"purchase_date": "2023-12-25",
"notes": "<string>",
"status": "<string>",
"is_credit": true,
"cost_total": 123,
"cost_total_includes_vat": true,
"vat_total": 123,
"vat_is_recoverable": true,
"invoice_total": 123,
"cost_leftover": 123,
"invoiced_at": "2023-11-07T05:31:56Z",
"amount_paid": 123,
"amount_debt_adjusted": 123,
"remaining_amount": 123,
"due_date": "2023-12-25",
"payment_status": "<string>",
"need_approval": true,
"cost_strategy": "<string>",
"items": "<array>",
"debt_adjustments": "<array>",
"returns": "<array>",
"pickups": "<array>",
"deliveries": "<array>",
"vendor": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}purchases.retrieve
Part of Create and approve purchases.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the purchase.
Query Parameters
Response mode. Default resource; none answers 204 No Content.
resource Comma-separated JSON keys of the root resource (id is always rendered). Available: id, company_id, vendor_id, reference, purchase_date, notes, status, is_credit, cost_total, cost_total_includes_vat, vat_total, vat_is_recoverable, invoice_total, cost_leftover, invoiced_at, amount_paid, amount_debt_adjusted, remaining_amount, due_date, payment_status, need_approval, cost_strategy, created_at, updated_at, settlement.
Comma-separated include paths, each optionally followed by its fields in parentheses: units(id,sku),units.uomUnit(id,name). Max depth 6, max 40 paths. Available: items, items.stockable, items.stockableUnit, debtAdjustments, debtAdjustments.purchase, returns, returns.items, pickups, pickups.items, pickups.costs, deliveries, deliveries.items, deliveries.costs, vendor.
Response
Resource.
Identifier of the purchase (27-character KSUID).
Identifier of the company the record belongs to.
Identifier of the supplier the goods are bought from.
Free reference of the purchase (for example the supplier's order number); unique among the company's purchases when set.
Date of the purchase (ISO 8601 date), null when not given.
Free notes, up to 1000 characters.
Workflow status: draft (editable), awaiting_approval (waiting for a manager when a credit limit was exceeded), rejected (editable again), pending (confirmed, goods can be received), completed, closed.
True when the purchase is bought on credit from the supplier, so the unpaid amount counts as a debt.
Cost of the purchase as entered. Under the unit cost strategy it is the sum of the line costs before VAT; under the total strategy it is the amount entered by the caller, which includes VAT when cost_total_includes_vat is true. In major units (the stored minor-unit amount divided by 10 to the power currency_exponent).
Whether cost_total already includes VAT. Only meaningful under the total cost strategy; null under the unit strategy.
VAT of the purchase. Computed from the lines under the unit strategy; entered by the caller under the total strategy. In major units (the stored minor-unit amount divided by 10 to the power currency_exponent).
Whether the VAT of this purchase can be recovered. Required when VAT is above zero; null when never set.
Amount invoiced by the supplier, VAT included: the sum of the line totals (unit strategy) or cost_total plus VAT when VAT is not included (total strategy). Recomputed while the purchase is editable; null while not yet computed. In major units (the stored minor-unit amount divided by 10 to the power currency_exponent).
Remainder in the division of the invoice total by the total quantity under the total cost strategy, which cannot be spread evenly over the units. 0 under the unit strategy. In major units (the stored minor-unit amount divided by 10 to the power currency_exponent).
When the supplier invoice was recognised (ISO 8601), set the first time the purchase becomes pending; null before that.
Cash paid so far against the purchase. In major units (the stored minor-unit amount divided by 10 to the power currency_exponent).
Total of debt adjustments applied to the purchase. In major units (the stored minor-unit amount divided by 10 to the power currency_exponent).
Amount still to be paid to the supplier. 0 before the invoice is recognised and while awaiting approval. In major units (the stored minor-unit amount divided by 10 to the power currency_exponent).
Date by which a credit purchase must be paid (ISO 8601 date); when omitted on a credit purchase, filled from the purchase date (or the creation day) plus the supplier's standard payment terms, if those are above 0.
Payment state: unpaid, partial or paid.
True while the purchase waits for a manager's approval because a supplier debt limit was exceeded.
How costs are entered: unit (a unit_cost per line) or total (one cost_total for the whole purchase).
Lines of the purchase. Present only when requested with include=items.
Debt adjustments of the purchase. Present only when requested with include.
Returns made against the purchase. Present only when requested with include.
Pickup receptions of the purchase. Present only when requested with include.
Delivery receptions of the purchase. Present only when requested with include.
The supplier of the purchase. Present only when requested with include=vendor.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).