Creating an Order

Endpoint: POST /admin/orders 

Purpose

This endpoint allows administrators and users to create a new order manually for an existing customer, specifying shipping details, product lines, and payment configuration. It supports discounts, gift cards, and custom shipping inputs.

Path Parameters

This endpoint does not require any path parameters.

Query Parameters

This endpoint does not require any query parameters.

Use Case

An admin and user manually creates an order in the backend system—for example, when processing phone orders, handling bulk or special requests, or supporting a customer with checkout issues. This API allows full control over line items, billing/shipping, and payments.

Request Body

Parameter Type Description
customer_id string Unique identifier of the customer placing the order.
billing_address object Customer’s billing address details (e.g., street, city, zip, country).
shipping_address object Delivery address for the order.
shipping_cost number Cost of shipping for the order.
product_id string Unique identifier of the product included in the order.
product_order_quantity integer Quantity of the product ordered.
{
    "customer": CUSTOMER_ID,
    "billing_address": {
        "first_name": "FIRST_NAME",
        "last_name": "LAST_NAME",
        "email": "EMAIL",
        "phone": "PHONE",
        "mobile": "MOBILE",
        "address_line_1": "ADDRESS_LINE_1",
        "address_line_2": "ADDRESS_LINE_2",
        "city": "CITY",
        "state": "STATE",
        "country": "COUNTRY",
        "post_code": "POST_CODE"
    },
    "shipping_address": {
        "first_name": "FIRST_NAME",
        "last_name": "LAST_NAME",
        "email": "EMAIL",
        "phone": "PHONE",
        "mobile": "MOBILE",
        "address_line_1": "ADDRESS_LINE_1",
        "address_line_2": "ADDRESS_LINE_2",
        "city": "CITY",
        "state": "STATE",
        "country": "COUNTRY",
        "post_code": "POST_CODE"
    },
    "shipping_cost": SHIPPING_COST,
    "discount_coupon": "COUPON_CODE",
    "lines": [
        {
            "product_id": "PRODUCT_ID",
            "product_name": "PRODUCT_NAME",
            "product_order_quantity": "QUANTITY",
            "product_price": "UNIT_PRICE"
        }
    ],
    "payment": {
        "coupon": "PAYMENT_COUPON_CODE",
        "gift_card": "GIFT_CARD_CODE",
        "store_credit": "STORE_CREDIT_AMOUNT",
        "payment_gateway": "PAYMENT_GATEWAY_CODE"
    }
}

Response

The response confirms successful order creation. It returns the order object, including order summary, customer details, payment breakdown, and item list (if applicable). This confirms the backend has recorded the order and is ready for processing.

POST
https://{your_site_domain}/api/v4/admin/orders
Try It Out
{
    "status": "success",
    "order": {
        "order_id": ORDER_ID,
        "order_status": "ORDER_STATUS",
        "sub_total": SUB_TOTAL,
        "shipping_cost": SHIPPING_COST,
        "shipping_tax": SHIPPING_TAX,
        "handling_cost": HANDLING_COST,
        "total_surcharge": TOTAL_SURCHARGE,
        "total_discount": TOTAL_DISCOUNT,
        "total_tax": TOTAL_TAX,
        "grand_total": GRAND_TOTAL,
        "paid": PAID_AMOUNT,
        "due": DUE_AMOUNT,
        "items_total": ITEMS_TOTAL,
        "payment_status": "PAYMENT_STATUS",
        "ip_address": "CUSTOMER_IP",
        "customer_summary": {
            "first_name": "FIRST_NAME",
            "last_name": "LAST_NAME",
            "customer_group": "CUSTOMER_GROUP",
            "gender": "GENDER",
            "customer_id": CUSTOMER_ID,
            "email": "EMAIL",
            "address_line_1": "ADDRESS_LINE_1",
            "address_line_2": "ADDRESS_LINE_2",
            "city": "CITY",
            "country": {
                "id": COUNTRY_ID,
                "name": "COUNTRY_NAME",
                "code": "COUNTRY_CODE"
            },
            "state": {
                "id": STATE_ID,
                "name": "STATE_NAME",
                "code": "STATE_CODE"
            },
            "post_code": "POST_CODE",
            "phone": "PHONE",
            "mobile": "MOBILE",
            "fax": "FAX",
            "company_name": "COMPANY_NAME"
        },
        "order_line_details": [
            {
                "item_id": ITEM_ID,
                "product_name": "PRODUCT_NAME",
                "product_id": PRODUCT_ID,
                "quantity": QUANTITY,
                "price": UNIT_PRICE,
                "total_amount": ITEM_TOTAL,
                "tax": TAX,
                "discount": DISCOUNT,
                "tax_discount": TAX_DISCOUNT,
                "is_taxable": IS_TAXABLE,
                "is_shippable": IS_SHIPPABLE
            }
        ],
        "payments": [
            {
                "id": PAYMENT_ID,
                "status": "PAYMENT_STATUS",
                "amount": PAYMENT_AMOUNT,
                "track_info": "TRACKING_INFO",
                "gateway_name": "GATEWAY_NAME",
                "gateway_code": "GATEWAY_CODE",
                "gateway_response": "GATEWAY_RESPONSE",
                "payer_info": "PAYER_INFO",
                "paying_date": "PAYMENT_DATE"
            }
        ]
    }
}

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

Parameter 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

Parameter Type Description
order_id string Unique identifier for the order.
payment_settings.payment_method_options string Specifies the payment method option (e.g., PAY_IN_STORE).
payment_status string Status of the payment (e.g., unpaid, paid, partially_paid).
notes string Additional notes or instructions related to the order or invoice.
{
    "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.

POST
https://{your_site_domain}/api/v4/admin/orders/{order_id}/send-invoice
Try It Out
{
    "status": "success"
}

Create Shipment for Order

Endpoint: POST /admin/orders/{order_id}/shipments

Purpose

This endpoint  POST/admin/orders/{order_id}/shipments allows administrators to create a shipment record for a specific order. It captures shipping method, shipping date, tracking information, and the items being shipped.

Path Parameters

ParameterType
Description
order_id
Integer
The unique identifier of the order for which the shipment is created

Query Parameters

This endpoint does not require any query parameters.

Use Case

An admin records a shipment against an order, updating order fulfillment status, attaching tracking details, and specifying which items are included. This enables inventory management, order tracking, and shipment notifications.

Request Body

Parameter Type Description
shipping_date string (datetime) Date and time when the shipment is scheduled or sent.
method string Shipping method or carrier used (e.g., Au Post).
tracking_info string Tracking number or information for the shipment.
shipment_items array of objects List of shipment items, each containing details below.
└─ quantity integer Quantity of the specific item in the shipment.
└─ order_item_id string Unique identifier for the specific order item being shipped.
{
    "shipping_date": "SHIPPING_DATE",
    "method": "SHIPPING_METHOD",
    "tracking_info": "TRACKING_INFORMATION",
    "shipment_items": [
        {
            "quantity": SHIPPED_QUANTITY,
            "order_item_id": "ORDER_ITEM_ID"
        }
    ]
}

Response

The response confirms that the shipment has been successfully created for the order. It links the shipment to the order and provides necessary tracking and fulfillment details, ensuring orders can be monitored and delivered accurately.

POST
https://{your_site_domain}/api/v4/admin/orders/{order_id}/shipments
Try It Out
{
    "shipment": {
        "id": SHIPMENT_ID,
        "order_id": ORDER_ID,
        "shipping_method": "SHIPPING_METHOD",
        "tracking_number": "TRACKING_INFORMATION",
        "shipping_date": "SHIPPING_DATE",
        "items": [
            {
                "order_item_id": ORDER_ITEM_ID,
                "quantity": SHIPPED_QUANTITY
            }
        ],
        "created_at": "CREATED_TIMESTAMP"
    }
}

Adding Comment to an Order

Endpoint: 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

ParameterType
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

Parameter Type Description
id string Unique identifier for the order comment.
content string Text content of the comment (e.g., order status or note).
flagged boolean Indicates whether the comment has been flagged for review or attention.
{
    "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.

POST
https://{your_site_domain}/api/v4/admin/orders/{order_id}/comments
Try It Out
{
    "comments": [
        {
            "id": COMMENT_ID,
            "content": "COMMENT_CONTENT",
            "admin_name": "ADMIN_NAME",
            "is_visible_to_customer": true,
            "is_admin": true,
            "created": "CREATED_TIMESTAMP"
        }
    ]
}

Create Payment for Order

Endpoint: POST /admin/orders/{order_id}/payments

Purpose

This endpoint allows users to add a payment to a specific order, recording transaction details such as amount paid, payment method, surcharge, and payer information. It ensures proper tracking of financial settlements against orders.

Path Parameters:

ParameterType
Description
order_id
integer
The unique identifier of the order to which the payment is being applied

Query Parameters

This endpoint does not require any query parameters.

Use Case

A user adds a payment record for an order to update the paid amount, track outstanding dues, and notify the customer if needed. This facilitates financial reconciliation and maintains accurate order payment status within the system.

Request Body

Parameter Type Description
payment_method string The method used for payment (e.g., PIS).
date string (datetime) The date and time when the payment was made.
amount string / number The amount paid by the customer.
surcharge string / number Any additional surcharge applied to the payment.
track_info string Tracking or reference information for the payment (if applicable).
payer_info string Information about the payer (e.g., customer name or identifier).
is_notify string / boolean Indicates whether the payer was notified (e.g., true or false).
{
    "payment": {
        "payment_method": "PAYMENT_METHOD",
        "date": "PAYMENT_DATE",
        "amount": "PAYMENT_AMOUNT",
        "surcharge": "SURCHARGE_AMOUNT",
        "track_info": "TRACKING_INFORMATION",
        "payer_info": "PAYER_INFORMATION",
        "is_notify": "IS_NOTIFY_CUSTOMER"
    }
}

Response

The response provides payment details, including payment status, applied amount, order ID, updated due amount, paid amount, and customer details. This confirms that the payment has been successfully recorded against the specified order.

POST
https://{your_site_domain}/api/v4/admin/orders/{order_id}/payments
Try It Out
{
    "payment": {
        "status": "PAYMENT_STATUS",
        "id": PAYMENT_ID,
        "date": "PAYMENT_DATE",
        "payment_applied": PAYMENT_APPLIED_AMOUNT,
        "payment_method": "PAYMENT_METHOD",
        "order_id": ORDER_ID,
        "order_total": ORDER_TOTAL_AMOUNT,
        "due_amount": DUE_AMOUNT,
        "paid_amount": PAID_AMOUNT,
        "customer": {},
        "created_by": "CREATED_BY",
        "created_at": "CREATED_TIMESTAMP"
    }
}

Create Refund for Payment

Endpoint: POST /admin/payment/{payment_id}/refunds

Purpose

This endpoint allows administrators to initiate a refund against a specific payment. It supports partial or full refunds, with options to adjust the order total and notify the customer about the refund.

Path Parameters

ParameterType
Description
payment_id
Integer
The unique identifier of the payment to be refunded

Query Parameters

This endpoint does not require any query parameters.

Use Case

An admin processes a refund for a payment, either partially or fully, adjusting the associated order if required. This supports customer satisfaction, financial reconciliation, and correct order tracking during refund operations.

Request Body

Parameter Type Description
amount string / number The amount to be refunded.
reason string The reason provided for issuing the refund.
gateway_refund boolean Indicates whether the refund is processed through the payment gateway.
send_refund_email boolean Indicates whether a refund notification email should be sent to the customer.
adjust_with_order boolean Specifies if the refund should be adjusted against the original order total.
{
    "refund": {
        "amount": "REFUND_AMOUNT",
        "reason": "REFUND_REASON",
        "gateway_refund": GATEWAY_REFUND_BOOLEAN,
        "send_refund_email": SEND_REFUND_EMAIL_BOOLEAN,
        "adjust_with_order": ADJUST_WITH_ORDER_BOOLEAN
    }
}

Response

The response confirms the successful creation of a refund, detailing the refund amount, reason, whether a refund email was sent, and if the order total was adjusted. This ensures clear tracking and verification of refund activities.

POST
https://{your_site_domain}/api/v4/admin/payment/{payment_id}/refunds
Try It Out
{
    "status": "REFUND_STATUS",
    "payment_id": PAYMENT_ID,
    "amount": "REFUND_AMOUNT",
    "reason": "REFUND_REASON",
    "send_refund_email": SEND_REFUND_EMAIL_BOOLEAN,
    "adjust_with_order": ADJUST_WITH_ORDER_BOOLEAN
}

Cancelling an Order

Endpoint:  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

ParameterType
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.

POST
https://{your_site_domain}/api/v4/admin/orders/{order_id}/cancel
Try It Out