curl --request PUT \
--url https://{companyName}.api.joinluminous.com/external/api/v1/purchase-orders/{purchaseOrderId}/payments/{paymentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"paid_amount": 600
}
'{
"data": {
"id": 123,
"order_numbers": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"order_status": "active",
"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,
"total_volume_cbm": 123,
"total_weight_kg": 123,
"lines_missing_dimensions": 123,
"volume_target_cbm": 123,
"volume_remaining_cbm": 123,
"volume_fill_percent": 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,
"expected_ship_date": "2023-12-25",
"expected_arrival_date": "2023-12-25",
"quantity_received": 123,
"received_quantity": 123,
"quantity_ordered": 123,
"quantity_shipped": 123,
"quantity_billed": 123,
"quantity_allocated": 123,
"quantity_released": 123,
"under_covered_quantity": 123,
"remaining_to_ship": 123,
"remaining_to_receive": 123,
"available_to_allocate": 123,
"volume_cbm": 123,
"line_volume_cbm": 123,
"weight_kg": 123,
"line_weight_kg": 123,
"allocations": [
{
"sales_order_id": 123,
"sales_order_number": "<string>",
"quantity_allocated": 123,
"quantity_released": 123,
"peg_ids": [
123
]
}
],
"source_sku": "<string>",
"product": {
"id": 123,
"name": "<string>",
"description": "<string>",
"retail_price": 123,
"wholesale_price": 123,
"unit_cost": 123,
"product_weight": 123,
"product_length": 123,
"product_width": 123,
"product_height": 123,
"sellable": true,
"discontinued": true,
"image_url": "<string>",
"variant_attributes": {},
"sku": "<string>",
"upc": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"base_unit_of_measure": {
"id": 123,
"name": "<string>",
"abbreviation": "<string>"
},
"ordered_unit_of_measure": {
"id": 123,
"name": "<string>",
"abbreviation": "<string>"
},
"lot": {
"id": 123,
"lot_number": "<string>",
"expiration_date": "2023-12-25"
}
}
],
"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",
"custom_fields": {
"Region": "Southwest",
"Preferred Carrier": "UPS"
}
},
"payments": [
{
"id": 123,
"payment_date": "2023-12-25",
"payment_type": "cash",
"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>",
"default_ship_to_address": "ship_to_address"
},
"warehouse_id": 123,
"location_id": 123,
"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>"
}{
"message": "<string>"
}{
"message": "<string>"
}Purchase Orders
Update a purchase order payment
Update an existing payment for a purchase order. All fields are optional - only provided fields will be updated.
The purchase order totals (total_paid and total_due) are automatically recalculated after the payment is updated.
Payment Types
Valid payment types: cash, credit_card, debit_card, check, bank_transfer
Total Recalculation
After updating a payment, the system automatically:
- Recalculates
total_paidby summing all payment amounts - Recalculates
total_dueastotal_cost - total_paid
PUT
/
purchase-orders
/
{purchaseOrderId}
/
payments
/
{paymentId}
curl --request PUT \
--url https://{companyName}.api.joinluminous.com/external/api/v1/purchase-orders/{purchaseOrderId}/payments/{paymentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"paid_amount": 600
}
'{
"data": {
"id": 123,
"order_numbers": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"order_status": "active",
"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,
"total_volume_cbm": 123,
"total_weight_kg": 123,
"lines_missing_dimensions": 123,
"volume_target_cbm": 123,
"volume_remaining_cbm": 123,
"volume_fill_percent": 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,
"expected_ship_date": "2023-12-25",
"expected_arrival_date": "2023-12-25",
"quantity_received": 123,
"received_quantity": 123,
"quantity_ordered": 123,
"quantity_shipped": 123,
"quantity_billed": 123,
"quantity_allocated": 123,
"quantity_released": 123,
"under_covered_quantity": 123,
"remaining_to_ship": 123,
"remaining_to_receive": 123,
"available_to_allocate": 123,
"volume_cbm": 123,
"line_volume_cbm": 123,
"weight_kg": 123,
"line_weight_kg": 123,
"allocations": [
{
"sales_order_id": 123,
"sales_order_number": "<string>",
"quantity_allocated": 123,
"quantity_released": 123,
"peg_ids": [
123
]
}
],
"source_sku": "<string>",
"product": {
"id": 123,
"name": "<string>",
"description": "<string>",
"retail_price": 123,
"wholesale_price": 123,
"unit_cost": 123,
"product_weight": 123,
"product_length": 123,
"product_width": 123,
"product_height": 123,
"sellable": true,
"discontinued": true,
"image_url": "<string>",
"variant_attributes": {},
"sku": "<string>",
"upc": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"base_unit_of_measure": {
"id": 123,
"name": "<string>",
"abbreviation": "<string>"
},
"ordered_unit_of_measure": {
"id": 123,
"name": "<string>",
"abbreviation": "<string>"
},
"lot": {
"id": 123,
"lot_number": "<string>",
"expiration_date": "2023-12-25"
}
}
],
"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",
"custom_fields": {
"Region": "Southwest",
"Preferred Carrier": "UPS"
}
},
"payments": [
{
"id": 123,
"payment_date": "2023-12-25",
"payment_type": "cash",
"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>",
"default_ship_to_address": "ship_to_address"
},
"warehouse_id": 123,
"location_id": 123,
"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>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Authenticate using a bearer token. To create a token, navigate to /settings/api-tokens and click Create API Token.
Path Parameters
ID of the purchase order
ID of the payment to update
Body
application/json
Date of the payment (YYYY-MM-DD)
Example:
"2024-01-16"
Type of payment
Available options:
cash, credit_card, debit_card, check, bank_transfer Example:
"check"
Amount paid
Required range:
x >= 0.01Example:
600
Payment remarks or notes
Maximum string length:
1000Example:
"Updated check #1234"
External payment reference ID
Maximum string length:
255Example:
"PAY-EXT-12345"
Response
Payment updated successfully
Show child attributes
Show child attributes