PUT
/
wp-json
/
latepoint-api
/
v1
/
orders
/
{id}

Path Parameters

id
integer
required
The ID of the order to update

Request Body Parameters

total
number
Total amount for the order
subtotal
number
Subtotal amount for the order
tax_total
number
Tax amount for the order
discount_total
number
Discount amount for the order
coupon_code
string
Coupon code applied to the order
status
string
Order status. Valid values: open, cancelled, completed
payment_status
string
Payment status. Valid values: not_paid, partially_paid, fully_paid, processing, refunded, partially_refunded
fulfillment_status
string
Fulfillment status. Valid values: not_fulfilled, partially_fulfilled, fulfilled
customer_comment
string
Customer comment or notes for the order
notes
string
Internal notes for the order
coupon_discount
number
Discount amount from coupon
ip_address
string
IP address of the customer
source_id
string
Source identifier for tracking
source_url
string
Source URL for tracking
confirmation_code
string
Custom confirmation code
customer_id
integer
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"
}