curl --request POST \
--url https://{companyName}.api.joinluminous.com/external/api/v1/prepayments/{id}/transfer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"purchase_order_id": 123,
"work_order_id": 123,
"amount": 1,
"from_work_order_id": 123
}
'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/prepayments/{id}/transfer"
payload = {
"purchase_order_id": 123,
"work_order_id": 123,
"amount": 1,
"from_work_order_id": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({purchase_order_id: 123, work_order_id: 123, amount: 1, from_work_order_id: 123})
};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/prepayments/{id}/transfer', 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/prepayments/{id}/transfer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'purchase_order_id' => 123,
'work_order_id' => 123,
'amount' => 1,
'from_work_order_id' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{companyName}.api.joinluminous.com/external/api/v1/prepayments/{id}/transfer"
payload := strings.NewReader("{\n \"purchase_order_id\": 123,\n \"work_order_id\": 123,\n \"amount\": 1,\n \"from_work_order_id\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{companyName}.api.joinluminous.com/external/api/v1/prepayments/{id}/transfer")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"purchase_order_id\": 123,\n \"work_order_id\": 123,\n \"amount\": 1,\n \"from_work_order_id\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/prepayments/{id}/transfer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"purchase_order_id\": 123,\n \"work_order_id\": 123,\n \"amount\": 1,\n \"from_work_order_id\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"vendor_id": 123,
"purchase_order_id": 123,
"purchase_order_shipment_id": 123,
"currency_code": "<string>",
"amount": 123,
"base_amount": 123,
"exchange_rate": 123,
"unapplied_amount": 123,
"base_unapplied_amount": 123,
"payment_date": "2023-12-25",
"reference": "<string>",
"notes": "<string>",
"auto_apply": true,
"voided_at": "2023-11-07T05:31:56Z",
"void_reason": "<string>",
"is_voided": true,
"quickbooks_sync_status": "<string>",
"quickbooks_detailed_message": "<string>",
"quickbooks_purchase_id": "<string>",
"quickbooks_last_synced_at": "2023-11-07T05:31:56Z",
"bill_pay_owned": true,
"created_at": "2023-11-07T05:31:56Z",
"purchase_order_shipment": {
"id": 123,
"reference_number": "<string>"
},
"vendor": {
"id": 123,
"factory_name": "<string>"
},
"applications": [
{
"id": 123,
"bill_id": 123,
"bill_number": "<string>",
"amount": 123,
"applied_at": "<string>",
"reversed_at": "<string>"
}
],
"purchase_orders": [
{
"id": 123,
"po_number": "<string>",
"linked_at": "<string>",
"linked_by": 123,
"amount": 123
}
],
"work_orders": [
{
"id": 123,
"work_order_number": "<string>",
"production_batch_id": 123,
"linked_at": "<string>",
"linked_by": 123,
"amount": 123
}
],
"allocations": [
{
"id": 123,
"purchase_order_id": 123,
"work_order_id": 123,
"payment_obligation_id": 123,
"amount": 123,
"created_at": "2023-11-07T05:31:56Z"
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Transfer a prepayment to another purchase order
Move all or part of a prepayment’s credit to another purchase order or production-run work
order of the same vendor. Send exactly one target: purchase_order_id or work_order_id.
- Omit
amountto move everything still on the source. To another purchase order, from the home purchase order, the prepayment is repointed to the target (purchase_order_idchanges). - Send a smaller
amountto move part of it, or move any amount to a work order: the prepayment stays one record on its home PO and the moved slice is returned inallocations. - Send
from_work_order_idto move credit off a production-run work order instead of off the home purchase order: the slices already moved onto that run, or the whole deposit when it was recorded straight onto that one run. A prepayment that is not on a purchase order can only be moved this way. Credit on a run settles no payment milestone, so it lands unscheduled on the target.
A prepayment that settles a payment milestone on its PO moves onto the target’s earliest
open milestone of the same type; if the target has none, the transfer is refused (422).
No over-value warning is raised for the target PO. QuickBooks is not called (the
deposit is vendor-level and does not change).
curl --request POST \
--url https://{companyName}.api.joinluminous.com/external/api/v1/prepayments/{id}/transfer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"purchase_order_id": 123,
"work_order_id": 123,
"amount": 1,
"from_work_order_id": 123
}
'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/prepayments/{id}/transfer"
payload = {
"purchase_order_id": 123,
"work_order_id": 123,
"amount": 1,
"from_work_order_id": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({purchase_order_id: 123, work_order_id: 123, amount: 1, from_work_order_id: 123})
};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/prepayments/{id}/transfer', 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/prepayments/{id}/transfer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'purchase_order_id' => 123,
'work_order_id' => 123,
'amount' => 1,
'from_work_order_id' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{companyName}.api.joinluminous.com/external/api/v1/prepayments/{id}/transfer"
payload := strings.NewReader("{\n \"purchase_order_id\": 123,\n \"work_order_id\": 123,\n \"amount\": 1,\n \"from_work_order_id\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{companyName}.api.joinluminous.com/external/api/v1/prepayments/{id}/transfer")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"purchase_order_id\": 123,\n \"work_order_id\": 123,\n \"amount\": 1,\n \"from_work_order_id\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/prepayments/{id}/transfer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"purchase_order_id\": 123,\n \"work_order_id\": 123,\n \"amount\": 1,\n \"from_work_order_id\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"vendor_id": 123,
"purchase_order_id": 123,
"purchase_order_shipment_id": 123,
"currency_code": "<string>",
"amount": 123,
"base_amount": 123,
"exchange_rate": 123,
"unapplied_amount": 123,
"base_unapplied_amount": 123,
"payment_date": "2023-12-25",
"reference": "<string>",
"notes": "<string>",
"auto_apply": true,
"voided_at": "2023-11-07T05:31:56Z",
"void_reason": "<string>",
"is_voided": true,
"quickbooks_sync_status": "<string>",
"quickbooks_detailed_message": "<string>",
"quickbooks_purchase_id": "<string>",
"quickbooks_last_synced_at": "2023-11-07T05:31:56Z",
"bill_pay_owned": true,
"created_at": "2023-11-07T05:31:56Z",
"purchase_order_shipment": {
"id": 123,
"reference_number": "<string>"
},
"vendor": {
"id": 123,
"factory_name": "<string>"
},
"applications": [
{
"id": 123,
"bill_id": 123,
"bill_number": "<string>",
"amount": 123,
"applied_at": "<string>",
"reversed_at": "<string>"
}
],
"purchase_orders": [
{
"id": 123,
"po_number": "<string>",
"linked_at": "<string>",
"linked_by": 123,
"amount": 123
}
],
"work_orders": [
{
"id": 123,
"work_order_number": "<string>",
"production_batch_id": 123,
"linked_at": "<string>",
"linked_by": 123,
"amount": 123
}
],
"allocations": [
{
"id": 123,
"purchase_order_id": 123,
"work_order_id": 123,
"payment_obligation_id": 123,
"amount": 123,
"created_at": "2023-11-07T05:31:56Z"
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Body
Target production-run work order. Must be from the same vendor and not cancelled. Required unless purchase_order_id is sent; send this or purchase_order_id, not both. Prepayments can be linked to work orders only on accounts where that is enabled; otherwise the transfer is refused (422).
Response
The transferred prepayment (top-level object, not wrapped in data).
A vendor prepayment (deposit).