Path Parameters
The ID of the order to update
Request Body Parameters
Total amount for the order
Subtotal amount for the order
Discount amount for the order
Coupon code applied to the order
Order status. Valid values: open, cancelled, completed
Payment status. Valid values: not_paid, partially_paid, fully_paid, processing, refunded, partially_refunded
Fulfillment status. Valid values: not_fulfilled, partially_fulfilled, fulfilled
Customer comment or notes for the order
Internal notes for the order
Discount amount from coupon
IP address of the customer
Source identifier for tracking
Customer ID (can be updated to transfer order to different customer)
Invoice Management
Orders can contain invoices that track payment obligations. When updating orders, you may also need to manage associated invoices.
Valid Invoice Statuses
open - Invoice is open and awaiting payment
paid - Invoice has been fully paid
partially_paid - Invoice has been partially paid
draft - Invoice is in draft status
void - Invoice has been voided
uncollectible - Invoice is marked as uncollectible
Invoice Update Example
To update an invoice within an order, you can use the dedicated invoice endpoint:
PUT /wp-json/latepoint-api/v1/orders/{order_id}/invoices/{invoice_id}
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"status": "paid",
"charge_amount": 55.00
}
When updating invoice status to paid, ensure that the corresponding payment transactions are properly recorded in the system.
Example Request
PUT /wp-json/latepoint-api/v1/orders/39
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"status": "completed",
"payment_status": "fully_paid",
"fulfillment_status": "fulfilled",
"customer_comment": "Order completed successfully",
"total": 55.00
}
Example Response
{
"id": 39,
"confirmation_code": "LP39CONF",
"subtotal": "45.00",
"total": "55.00",
"status": "completed",
"fulfillment_status": "fulfilled",
"payment_status": "fully_paid",
"customer_id": 8,
"coupon_code": null,
"tax_total": "5.00",
"customer_comment": "Order completed successfully",
"created_at": "2024-12-21 18:15:45",
"updated_at": "2024-12-21 18:20:12"
}