Single purchase order
curl --request GET \
--url https://{companyName}.api.joinluminous.com/external/api/v1/purchase-orders/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/purchase-orders/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/purchase-orders/{id}', 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://{companyName}.api.joinluminous.com/external/api/v1/purchase-orders/{id}",
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://{companyName}.api.joinluminous.com/external/api/v1/purchase-orders/{id}"
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://{companyName}.api.joinluminous.com/external/api/v1/purchase-orders/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/purchase-orders/{id}")
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{
"data": {
"id": 123,
"order_numbers": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"order_date": "2023-12-25",
"invoice_date": "2023-12-25",
"arrival_due_date": "2023-12-25",
"requested_ship_date": "2023-12-25",
"order_type": 123,
"incoterm": "<string>",
"tracking_info": "<string>",
"payment_terms": "<string>",
"supplier_id": 123,
"item_count": 123,
"total_qty_ordered": 123,
"total_qty_received": 123,
"total_qty_remaining": 123,
"order_cost": 123,
"total_tax": 123,
"total_shipping_cost": 123,
"total_cost": 123,
"total_paid": 123,
"total_due": 123,
"down_payment": 123,
"public_note": "<string>",
"private_note": "<string>",
"starred": true,
"items": [
{
"id": 123,
"purchase_order_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"quantity": 123,
"unit_price": 123,
"unit": "<string>",
"tax": 123,
"discount_amount": 123,
"line_total": 123,
"received_quantity": 123,
"source_sku": "<string>",
"product": {
"id": 123,
"name": "<string>",
"description": "<string>",
"retail_price": 123,
"wholesale_price": 123,
"variant_attributes": {},
"sku": "<string>",
"upc": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}
],
"supplier": {
"id": 123,
"status": 123,
"name": "<string>",
"description": "<string>",
"street_address": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"contact_name": "<string>",
"contact_email": "<string>",
"contact_phone": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"payments": [
{
"id": 123,
"payment_date": "2023-12-25",
"paid_amount": 123,
"remarks": "<string>",
"external_id": "<string>",
"created_by": {
"id": 123,
"name": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"ship_to": {
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"warehouse": {
"id": 123,
"name": "<string>"
},
"location": {
"id": 123,
"name": "<string>"
},
"tags": [
{
"id": 123,
"name": "<string>",
"description": "<string>",
"icon": "<string>",
"color": "<string>"
}
],
"fulfillment_orders": [
{
"id": 123,
"order_number": "<string>",
"order_status": "<string>"
}
]
}
}{
"message": "<string>"
}Purchase Orders
Single purchase order
Get details of a specific purchase order by ID
GET
/
purchase-orders
/
{id}
Single purchase order
curl --request GET \
--url https://{companyName}.api.joinluminous.com/external/api/v1/purchase-orders/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/purchase-orders/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/purchase-orders/{id}', 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://{companyName}.api.joinluminous.com/external/api/v1/purchase-orders/{id}",
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://{companyName}.api.joinluminous.com/external/api/v1/purchase-orders/{id}"
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://{companyName}.api.joinluminous.com/external/api/v1/purchase-orders/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/purchase-orders/{id}")
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{
"data": {
"id": 123,
"order_numbers": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"order_date": "2023-12-25",
"invoice_date": "2023-12-25",
"arrival_due_date": "2023-12-25",
"requested_ship_date": "2023-12-25",
"order_type": 123,
"incoterm": "<string>",
"tracking_info": "<string>",
"payment_terms": "<string>",
"supplier_id": 123,
"item_count": 123,
"total_qty_ordered": 123,
"total_qty_received": 123,
"total_qty_remaining": 123,
"order_cost": 123,
"total_tax": 123,
"total_shipping_cost": 123,
"total_cost": 123,
"total_paid": 123,
"total_due": 123,
"down_payment": 123,
"public_note": "<string>",
"private_note": "<string>",
"starred": true,
"items": [
{
"id": 123,
"purchase_order_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"quantity": 123,
"unit_price": 123,
"unit": "<string>",
"tax": 123,
"discount_amount": 123,
"line_total": 123,
"received_quantity": 123,
"source_sku": "<string>",
"product": {
"id": 123,
"name": "<string>",
"description": "<string>",
"retail_price": 123,
"wholesale_price": 123,
"variant_attributes": {},
"sku": "<string>",
"upc": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}
],
"supplier": {
"id": 123,
"status": 123,
"name": "<string>",
"description": "<string>",
"street_address": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"contact_name": "<string>",
"contact_email": "<string>",
"contact_phone": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"payments": [
{
"id": 123,
"payment_date": "2023-12-25",
"paid_amount": 123,
"remarks": "<string>",
"external_id": "<string>",
"created_by": {
"id": 123,
"name": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"ship_to": {
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"warehouse": {
"id": 123,
"name": "<string>"
},
"location": {
"id": 123,
"name": "<string>"
},
"tags": [
{
"id": 123,
"name": "<string>",
"description": "<string>",
"icon": "<string>",
"color": "<string>"
}
],
"fulfillment_orders": [
{
"id": 123,
"order_number": "<string>",
"order_status": "<string>"
}
]
}
}{
"message": "<string>"
}⌘I