Sending Invoice of an Order to a Customer
Endpoint: POST/admin/orders/{$order_id}/send-invoice
Purpose
This endpoint sends an invoice for a specific order to the customer. It includes payment details, status, and additional notes, helping businesses streamline billing and payment tracking.
Path Parameters
Field |
Type |
Description |
---|---|---|
order_id |
string |
The unique identifier of the order for which the invoice is being sent |
Query Parameters
This endpoint does not require any query parameters.
Use Case
A user triggers an invoice email for an order, ensuring that customers receive payment instructions. This is useful for businesses to automate billing, notify customers of outstanding payments, and maintain financial records.
Request Body
{
"order_id": "ORDER_ID",
"payment_settings": {
"payment_method_options": null
},
"payment_status": "PAYMENT_STATUS",
"notes": "INVOICE_NOTES"
}
Response
The response confirms whether the invoice was successfully sent. A status field indicates the operation result, ensuring businesses can track invoice dispatch and payment follow-ups.
{
"status": "success"
}
Adding comment to an Order
Endpoint: POST /orders/{$order_id}/comments
& POST/admin/orders/{$order_id}/comments
Purpose
This endpoint allows adding a comment to a specific order. Comments can be used for internal notes or customer-facing updates, helping businesses keep track of order progress and communication.
Path Parameters
Field | Type | Description |
---|---|---|
order_id | integer | The unique identifier of the order |
Query Parameters
This endpoint does not require any query parameters.
Use Case
A user adds a comment to an order to record an update, notify a customer, or track internal discussions related to the order’s progress. Businesses can use this to improve customer service, maintain internal notes, and manage order updates efficiently.
Request Body
{
"id": ORDER_ID,
"content": "COMMENT_CONTENT",
"flagged": FLAGGED_STATUS
}
Response
The response confirms the successful addition of a comment to the order. It includes comment content, admin details, visibility settings, and timestamp, ensuring proper record-keeping and order tracking.
{
"comments": [
{
"id": COMMENT_ID,
"content": "COMMENT_CONTENT",
"admin_name": "ADMIN_NAME",
"is_visible_to_customer": true,
"is_admin": true,
"created": "CREATED_TIMESTAMP"
}
]
}
Cancelling an Order
Endpoint: POST /orders/{$order_id}/cancel
& POST/admin /orders/{$order_id}/cancel
Purpose
This endpoint cancels a specific order. It allows businesses to mark an order as canceled, preventing further processing, shipping, or payment collection.
Path Parameters
Field | Type | Description |
---|---|---|
order_id | integer | The unique identifier of the order to be canceled |
Query Parameters
This endpoint does not require any query parameters.
Use Case
A user cancels an order that is no longer needed or was placed by mistake. Businesses can use this to manage refunds, prevent shipments, and update records accordingly. This ensures better control over order processing and customer satisfaction.
Request Body
This endpoint does not require a request body.
Response
A successful request returns a 204 No Content response, indicating that the order was successfully canceled. No response body is returned.