Haravan — Orders
List orders — haravan.list_orders
List orders, newest first, filtered by status, payment, delivery or date.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | no | yes | com.read_orders |
Input
| Field | Type | Required | Description |
|---|---|---|---|
status | string | no | Order status filter. One of: open, closed, cancelled, any. |
financial_status | string | no | Payment status filter. One of: pending, paid, partially_paid, refunded, voided, partially_refunded. |
fulfillment_status | string | no | Delivery status filter. One of: unshipped, shipped, partial. |
created_at_min | string | no | Created at or after (ISO 8601). |
created_at_max | string | no | Created at or before (ISO 8601). |
updated_at_min | string | no | Updated at or after (ISO 8601). |
updated_at_max | string | no | Updated at or before (ISO 8601). |
ids | string | no | Comma-separated order ids. |
since_id | integer | no | Only orders after this id. Min 1. |
fields | string | no | Comma-separated fields to return. |
page | integer | no | Page number, from 1. Min 1. |
limit | integer | no | Items per page (1-50, default 50). Min 1. Max 50. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
orders | array of object | Orders, newest first. |
orders[].id | integer | Order id used by the API. |
orders[].name | string | Order name shown to the shop and customer, e.g. #100020. |
orders[].order_number | string | Order number shown to the shop and customer. |
orders[].number | integer | Position of the order in the shop's order count. |
orders[].token | string | Unique token of the order. |
orders[].email | string | null | Customer email. |
orders[].contact_email | string | null | Contact email of the buyer. |
orders[].note | string | null | Order note. |
orders[].note_attributes | array of object | Extra name/value details added to the order. |
orders[].note_attributes[].name | string | Name. |
orders[].note_attributes[].value | string | Value. |
orders[].tags | string | null | Comma-separated tags. |
orders[].currency | string | Currency code, e.g. VND. |
orders[].total_price | number | Total of items, discounts, shipping and tax, VND. |
orders[].subtotal_price | number | Price after discounts, before shipping and tax, VND. |
orders[].total_line_items_price | number | Sum of line item prices, VND. |
orders[].total_discounts | number | Total discounts, VND. |
orders[].total_tax | number | Total tax, VND. |
orders[].total_weight | number | Total weight in grams. |
orders[].taxes_included | boolean | null | Whether tax is included in the subtotal. |
orders[].financial_status | string | Payment status: pending, authorized, partially_paid, paid, partially_refunded, refunded or voided. |
orders[].fulfillment_status | string | null | Delivery status: fulfilled, partial, restocked, or null/notfulfilled when nothing shipped. |
orders[].gateway | string | null | Payment gateway name. |
orders[].gateway_code | string | null | Payment gateway code, e.g. COD. |
orders[].processing_method | string | null | How the payment was processed: checkout, direct, manual or offsite. |
orders[].closed_status | string | unclosed or closed. |
orders[].cancelled_status | string | uncancelled or cancelled. |
orders[].confirmed_status | string | unconfirmed or confirmed. |
orders[].cancel_reason | string | null | Why it was cancelled: customer, fraud, inventory, declined or other. |
orders[].created_at | string | When the order was created (ISO 8601). |
orders[].updated_at | string | When the order was last updated (ISO 8601). |
orders[].closed_at | string | null | When the order was closed (ISO 8601). |
orders[].cancelled_at | string | null | When the order was cancelled (ISO 8601). |
orders[].confirmed_at | string | null | When the order was confirmed (ISO 8601). |
orders[].source_name | string | null | Where the order came from, e.g. web or pos. |
orders[].source | string | null | Channel that created the order. |
orders[].landing_site | string | null | Page where the buyer entered the shop. |
orders[].landing_site_ref | string | null | Ref of the landing page. |
orders[].referring_site | string | null | Site that referred the buyer. |
orders[].utm_source | string | null | UTM source. |
orders[].utm_medium | string | null | UTM medium. |
orders[].utm_campaign | string | null | UTM campaign. |
orders[].utm_term | string | null | UTM term. |
orders[].utm_content | string | null | UTM content. |
orders[].buyer_accepts_marketing | boolean | Whether the buyer accepts marketing. |
orders[].browser_ip | string | null | Buyer's IP address. |
orders[].cart_token | string | null | Token of the cart behind the order. |
orders[].checkout_token | string | null | Token of the checkout behind the order. |
orders[].user_id | integer | null | Staff who processed the order; 0 if none. |
orders[].location_id | integer | null | Location where the order was processed. |
orders[].location_name | string | null | Name of that location. |
orders[].assigned_location_id | integer | null | Location assigned to handle it. |
orders[].assigned_location_name | string | null | Name of the assigned location. |
orders[].assigned_location_at | string | null | When the location was assigned. |
orders[].client_details | object | Browser the customer used. |
orders[].client_details.accept_language | string | null | Browser languages. |
orders[].client_details.browser_ip | string | null | IP address. |
orders[].client_details.browser_height | integer | null | Screen height in pixels. |
orders[].client_details.browser_width | integer | null | Screen width in pixels. |
orders[].client_details.session_hash | string | null | Session hash. |
orders[].client_details.user_agent | string | null | Browser user agent. |
orders[].billing_address | object | Billing address. |
orders[].billing_address.id | integer | Address id. |
orders[].billing_address.name | string | Full name of the person at this address. |
orders[].billing_address.first_name | string | First name. |
orders[].billing_address.last_name | string | Last name. |
orders[].billing_address.company | string | Company name. |
orders[].billing_address.phone | string | Phone number. |
orders[].billing_address.address1 | string | Street address: house number and street. |
orders[].billing_address.address2 | string | Second address line. |
orders[].billing_address.city | string | City, town or village. |
orders[].billing_address.province | string | Province or city name. |
orders[].billing_address.province_code | string | Province code; matches list_provinces. |
orders[].billing_address.district | string | Ward name under the two-level model (district name before). |
orders[].billing_address.district_code | string | Ward code; matches list_wards. |
orders[].billing_address.ward | string | Ward name under the three-level model; usually empty now. |
orders[].billing_address.ward_code | string | Ward code under the three-level model; usually empty now. |
orders[].billing_address.country | string | Country name. |
orders[].billing_address.country_code | string | Two-letter country code, e.g. VN. |
orders[].billing_address.zip | string | Postal code. |
orders[].billing_address.latitude | number | Latitude, if known. |
orders[].billing_address.longitude | number | Longitude, if known. |
orders[].billing_address.default | boolean | True when this is the default address. |
orders[].shipping_address | object | Delivery address. |
orders[].shipping_address.id | integer | Address id. |
orders[].shipping_address.name | string | Full name of the person at this address. |
orders[].shipping_address.first_name | string | First name. |
orders[].shipping_address.last_name | string | Last name. |
orders[].shipping_address.company | string | Company name. |
orders[].shipping_address.phone | string | Phone number. |
orders[].shipping_address.address1 | string | Street address: house number and street. |
orders[].shipping_address.address2 | string | Second address line. |
orders[].shipping_address.city | string | City, town or village. |
orders[].shipping_address.province | string | Province or city name. |
orders[].shipping_address.province_code | string | Province code; matches list_provinces. |
orders[].shipping_address.district | string | Ward name under the two-level model (district name before). |
orders[].shipping_address.district_code | string | Ward code; matches list_wards. |
orders[].shipping_address.ward | string | Ward name under the three-level model; usually empty now. |
orders[].shipping_address.ward_code | string | Ward code under the three-level model; usually empty now. |
orders[].shipping_address.country | string | Country name. |
orders[].shipping_address.country_code | string | Two-letter country code, e.g. VN. |
orders[].shipping_address.zip | string | Postal code. |
orders[].shipping_address.latitude | number | Latitude, if known. |
orders[].shipping_address.longitude | number | Longitude, if known. |
orders[].shipping_address.default | boolean | True when this is the default address. |
orders[].customer | object | The customer; null for some POS orders. |
orders[].customer.id | integer | Customer id. |
orders[].customer.email | string | null | Email. |
orders[].customer.phone | string | null | Phone number. |
orders[].customer.first_name | string | null | First name. |
orders[].customer.last_name | string | null | Last name. |
orders[].customer.accepts_marketing | boolean | Whether the customer accepts marketing. |
orders[].customer.tags | string | null | Comma-separated tags. |
orders[].customer.note | string | null | Note about the customer. |
orders[].customer.state | string | Account state. |
orders[].customer.orders_count | integer | Number of orders. |
orders[].customer.total_spent | number | Total spent, VND. |
orders[].customer.last_order_id | integer | null | Latest order id. |
orders[].customer.last_order_name | string | null | Latest order name. |
orders[].customer.default_address | object | Default address. |
orders[].customer.default_address.id | integer | Address id. |
orders[].customer.default_address.name | string | Full name of the person at this address. |
orders[].customer.default_address.first_name | string | First name. |
orders[].customer.default_address.last_name | string | Last name. |
orders[].customer.default_address.company | string | Company name. |
orders[].customer.default_address.phone | string | Phone number. |
orders[].customer.default_address.address1 | string | Street address: house number and street. |
orders[].customer.default_address.address2 | string | Second address line. |
orders[].customer.default_address.city | string | City, town or village. |
orders[].customer.default_address.province | string | Province or city name. |
orders[].customer.default_address.province_code | string | Province code; matches list_provinces. |
orders[].customer.default_address.district | string | Ward name under the two-level model (district name before). |
orders[].customer.default_address.district_code | string | Ward code; matches list_wards. |
orders[].customer.default_address.ward | string | Ward name under the three-level model; usually empty now. |
orders[].customer.default_address.ward_code | string | Ward code under the three-level model; usually empty now. |
orders[].customer.default_address.country | string | Country name. |
orders[].customer.default_address.country_code | string | Two-letter country code, e.g. VN. |
orders[].customer.default_address.zip | string | Postal code. |
orders[].customer.default_address.latitude | number | Latitude, if known. |
orders[].customer.default_address.longitude | number | Longitude, if known. |
orders[].customer.default_address.default | boolean | True when this is the default address. |
orders[].customer.addresses | array of object | All addresses. |
orders[].customer.addresses[].id | integer | Address id. |
orders[].customer.addresses[].name | string | Full name of the person at this address. |
orders[].customer.addresses[].first_name | string | First name. |
orders[].customer.addresses[].last_name | string | Last name. |
orders[].customer.addresses[].company | string | Company name. |
orders[].customer.addresses[].phone | string | Phone number. |
orders[].customer.addresses[].address1 | string | Street address: house number and street. |
orders[].customer.addresses[].address2 | string | Second address line. |
orders[].customer.addresses[].city | string | City, town or village. |
orders[].customer.addresses[].province | string | Province or city name. |
orders[].customer.addresses[].province_code | string | Province code; matches list_provinces. |
orders[].customer.addresses[].district | string | Ward name under the two-level model (district name before). |
orders[].customer.addresses[].district_code | string | Ward code; matches list_wards. |
orders[].customer.addresses[].ward | string | Ward name under the three-level model; usually empty now. |
orders[].customer.addresses[].ward_code | string | Ward code under the three-level model; usually empty now. |
orders[].customer.addresses[].country | string | Country name. |
orders[].customer.addresses[].country_code | string | Two-letter country code, e.g. VN. |
orders[].customer.addresses[].zip | string | Postal code. |
orders[].customer.addresses[].latitude | number | Latitude, if known. |
orders[].customer.addresses[].longitude | number | Longitude, if known. |
orders[].customer.addresses[].default | boolean | True when this is the default address. |
orders[].customer.created_at | string | When it was created (ISO 8601). |
orders[].customer.updated_at | string | When it was last updated (ISO 8601). |
orders[].line_items | array of object | Items ordered. |
orders[].line_items[].id | integer | Line item id. |
orders[].line_items[].product_id | integer | null | Product id; null when the product was deleted later. |
orders[].line_items[].variant_id | integer | Variant id. |
orders[].line_items[].title | string | Product title. |
orders[].line_items[].variant_title | string | Variant title. |
orders[].line_items[].name | string | Product and variant name. |
orders[].line_items[].sku | string | null | SKU of the variant. |
orders[].line_items[].barcode | string | null | Barcode of the variant. |
orders[].line_items[].vendor | string | Supplier of the item. |
orders[].line_items[].type | string | Product type. |
orders[].line_items[].quantity | integer | Quantity ordered. |
orders[].line_items[].fulfillable_quantity | integer | Quantity still available to fulfill. |
orders[].line_items[].price | number | Unit price before discounts, VND. |
orders[].line_items[].price_original | number | Unit price before any promotion, VND. |
orders[].line_items[].price_promotion | number | Promotion discount per unit, VND. |
orders[].line_items[].total_discount | number | Total discount on this line, VND. |
orders[].line_items[].grams | number | Weight in grams. |
orders[].line_items[].requires_shipping | boolean | Whether the item needs shipping. |
orders[].line_items[].taxable | boolean | Whether the item is taxable. |
orders[].line_items[].gift_card | boolean | Whether the item is a gift card. |
orders[].line_items[].product_exists | boolean | False when the product has been deleted. |
orders[].line_items[].fulfillment_service | string | null | Who fulfills the item. |
orders[].line_items[].fulfillment_status | string | null | Fulfillment status of this line. |
orders[].line_items[].properties | array | null | Custom properties of the line item. |
orders[].line_items[].image | object | Variant image. |
orders[].line_items[].image.src | string | Image URL. |
orders[].shipping_lines | array of object | Shipping methods used. |
orders[].shipping_lines[].code | string | null | Shipping method reference. |
orders[].shipping_lines[].title | string | null | Shipping method title. |
orders[].shipping_lines[].price | number | Shipping price, VND. |
orders[].shipping_lines[].source | string | null | Source of the shipping method. |
orders[].discount_codes | array of object | Discount codes applied. |
orders[].discount_codes[].code | string | The code. |
orders[].discount_codes[].amount | number | Discount amount. |
orders[].discount_codes[].type | string | percentage, shipping or fixed_amount. |
orders[].fulfillments | array of object | Shipments of the order. |
orders[].fulfillments[].id | integer | Fulfillment id. |
orders[].fulfillments[].order_id | integer | Order id. |
orders[].fulfillments[].status | string | Fulfillment status, e.g. success. |
orders[].fulfillments[].tracking_company | string | null | Carrier name. |
orders[].fulfillments[].tracking_company_code | string | null | Carrier code. |
orders[].fulfillments[].tracking_number | string | null | Tracking number. |
orders[].fulfillments[].tracking_numbers | array of string | Tracking numbers. |
orders[].fulfillments[].tracking_url | string | null | Tracking URL. |
orders[].fulfillments[].tracking_urls | array of string | Tracking URLs. |
orders[].fulfillments[].carrier_status_code | string | null | Carrier delivery status code. |
orders[].fulfillments[].carrier_status_name | string | null | Carrier delivery status. |
orders[].fulfillments[].carrier_cod_status_code | string | null | Cash-on-delivery status code. |
orders[].fulfillments[].carrier_cod_status_name | string | null | Cash-on-delivery status. |
orders[].fulfillments[].cod_amount | number | Cash on delivery amount to collect, VND. |
orders[].fulfillments[].real_shipping_fee | number | Actual shipping fee, VND. |
orders[].fulfillments[].total_weight | number | Package weight in grams. |
orders[].fulfillments[].location_id | integer | null | Location the order shipped from. |
orders[].fulfillments[].notify_customer | boolean | Whether the customer was notified. |
orders[].fulfillments[].note | string | null | Fulfillment note. |
orders[].fulfillments[].created_at | string | When it was created (ISO 8601). |
orders[].fulfillments[].updated_at | string | When it was last updated (ISO 8601). |
orders[].fulfillments[].line_items | array of object | Items in this fulfillment. |
orders[].fulfillments[].line_items[].id | integer | Line item id. |
orders[].fulfillments[].line_items[].product_id | integer | null | Product id; null when the product was deleted later. |
orders[].fulfillments[].line_items[].variant_id | integer | Variant id. |
orders[].fulfillments[].line_items[].title | string | Product title. |
orders[].fulfillments[].line_items[].variant_title | string | Variant title. |
orders[].fulfillments[].line_items[].name | string | Product and variant name. |
orders[].fulfillments[].line_items[].sku | string | null | SKU of the variant. |
orders[].fulfillments[].line_items[].barcode | string | null | Barcode of the variant. |
orders[].fulfillments[].line_items[].vendor | string | Supplier of the item. |
orders[].fulfillments[].line_items[].type | string | Product type. |
orders[].fulfillments[].line_items[].quantity | integer | Quantity ordered. |
orders[].fulfillments[].line_items[].fulfillable_quantity | integer | Quantity still available to fulfill. |
orders[].fulfillments[].line_items[].price | number | Unit price before discounts, VND. |
orders[].fulfillments[].line_items[].price_original | number | Unit price before any promotion, VND. |
orders[].fulfillments[].line_items[].price_promotion | number | Promotion discount per unit, VND. |
orders[].fulfillments[].line_items[].total_discount | number | Total discount on this line, VND. |
orders[].fulfillments[].line_items[].grams | number | Weight in grams. |
orders[].fulfillments[].line_items[].requires_shipping | boolean | Whether the item needs shipping. |
orders[].fulfillments[].line_items[].taxable | boolean | Whether the item is taxable. |
orders[].fulfillments[].line_items[].gift_card | boolean | Whether the item is a gift card. |
orders[].fulfillments[].line_items[].product_exists | boolean | False when the product has been deleted. |
orders[].fulfillments[].line_items[].fulfillment_service | string | null | Who fulfills the item. |
orders[].fulfillments[].line_items[].fulfillment_status | string | null | Fulfillment status of this line. |
orders[].fulfillments[].line_items[].properties | array | null | Custom properties of the line item. |
orders[].fulfillments[].line_items[].image | object | Variant image. |
orders[].fulfillments[].line_items[].image.src | string | Image URL. |
orders[].transactions | array of object | Payments on the order. |
orders[].transactions[].id | integer | Transaction id. |
orders[].transactions[].order_id | integer | Order the transaction belongs to. |
orders[].transactions[].parent_id | integer | null | Id of the transaction this one follows. |
orders[].transactions[].kind | string | Kind: pending, authorization, capture, sale, void or refund (case varies). |
orders[].transactions[].status | string | null | Status: pending, failure, success or error; some shops return a Vietnamese label. |
orders[].transactions[].amount | number | Amount, VND; negative for refunds. |
orders[].transactions[].currency | string | null | Currency code, e.g. VND. |
orders[].transactions[].gateway | string | Name of the payment gateway. |
orders[].transactions[].is_cod_gateway | boolean | True when the gateway is cash on delivery. |
orders[].transactions[].authorization | string | null | Authorization code. |
orders[].transactions[].receipt | string | null | Receipt. |
orders[].transactions[].test | boolean | True for a test transaction. |
orders[].transactions[].user_id | integer | null | Staff who recorded it; 0 for the system. |
orders[].transactions[].location_id | integer | null | Location id. |
orders[].transactions[].device_id | integer | null | Device id. |
orders[].transactions[].created_at | string | When it was created (ISO 8601). |
orders[].transactions[].external_transaction_id | string | null | Id at the payment provider. |
orders[].transactions[].haravan_transaction_id | string | null | Haravan payment reference. |
orders[].transactions[].payment_details | object | null | Payment details, if any. |
orders[].transactions[].send_email | boolean | Whether an email was sent. |
orders[].refunds | array of object | Refunds on the order. |
orders[].refunds[].id | integer | Refund id. |
orders[].refunds[].order_id | integer | Order id. |
orders[].refunds[].note | string | null | Note attached to the refund. |
orders[].refunds[].restock | boolean | null | Whether items went back to stock. |
orders[].refunds[].user_id | integer | null | Staff who made the refund. |
orders[].refunds[].location_id | integer | null | Location items were returned to. |
orders[].refunds[].created_at | string | When it was created (ISO 8601). |
orders[].refunds[].refund_line_items | array of object | Items returned or refunded. |
orders[].refunds[].refund_line_items[].id | integer | Refund line item id. |
orders[].refunds[].refund_line_items[].line_item_id | integer | Order line item it refers to. |
orders[].refunds[].refund_line_items[].quantity | integer | Quantity refunded. |
orders[].refunds[].refund_line_items[].line_item | object | The order line item. |
orders[].refunds[].refund_line_items[].line_item.id | integer | Line item id. |
orders[].refunds[].refund_line_items[].line_item.product_id | integer | null | Product id; null when the product was deleted later. |
orders[].refunds[].refund_line_items[].line_item.variant_id | integer | Variant id. |
orders[].refunds[].refund_line_items[].line_item.title | string | Product title. |
orders[].refunds[].refund_line_items[].line_item.variant_title | string | Variant title. |
orders[].refunds[].refund_line_items[].line_item.name | string | Product and variant name. |
orders[].refunds[].refund_line_items[].line_item.sku | string | null | SKU of the variant. |
orders[].refunds[].refund_line_items[].line_item.barcode | string | null | Barcode of the variant. |
orders[].refunds[].refund_line_items[].line_item.vendor | string | Supplier of the item. |
orders[].refunds[].refund_line_items[].line_item.type | string | Product type. |
orders[].refunds[].refund_line_items[].line_item.quantity | integer | Quantity ordered. |
orders[].refunds[].refund_line_items[].line_item.fulfillable_quantity | integer | Quantity still available to fulfill. |
orders[].refunds[].refund_line_items[].line_item.price | number | Unit price before discounts, VND. |
orders[].refunds[].refund_line_items[].line_item.price_original | number | Unit price before any promotion, VND. |
orders[].refunds[].refund_line_items[].line_item.price_promotion | number | Promotion discount per unit, VND. |
orders[].refunds[].refund_line_items[].line_item.total_discount | number | Total discount on this line, VND. |
orders[].refunds[].refund_line_items[].line_item.grams | number | Weight in grams. |
orders[].refunds[].refund_line_items[].line_item.requires_shipping | boolean | Whether the item needs shipping. |
orders[].refunds[].refund_line_items[].line_item.taxable | boolean | Whether the item is taxable. |
orders[].refunds[].refund_line_items[].line_item.gift_card | boolean | Whether the item is a gift card. |
orders[].refunds[].refund_line_items[].line_item.product_exists | boolean | False when the product has been deleted. |
orders[].refunds[].refund_line_items[].line_item.fulfillment_service | string | null | Who fulfills the item. |
orders[].refunds[].refund_line_items[].line_item.fulfillment_status | string | null | Fulfillment status of this line. |
orders[].refunds[].refund_line_items[].line_item.properties | array | null | Custom properties of the line item. |
orders[].refunds[].refund_line_items[].line_item.image | object | Variant image. |
orders[].refunds[].refund_line_items[].line_item.image.src | string | Image URL. |
orders[].refunds[].transactions | array of object | Money returned, as refund transactions. |
orders[].refunds[].transactions[].id | integer | Transaction id. |
orders[].refunds[].transactions[].order_id | integer | Order the transaction belongs to. |
orders[].refunds[].transactions[].parent_id | integer | null | Id of the transaction this one follows. |
orders[].refunds[].transactions[].kind | string | Kind: pending, authorization, capture, sale, void or refund (case varies). |
orders[].refunds[].transactions[].status | string | null | Status: pending, failure, success or error; some shops return a Vietnamese label. |
orders[].refunds[].transactions[].amount | number | Amount, VND; negative for refunds. |
orders[].refunds[].transactions[].currency | string | null | Currency code, e.g. VND. |
orders[].refunds[].transactions[].gateway | string | Name of the payment gateway. |
orders[].refunds[].transactions[].is_cod_gateway | boolean | True when the gateway is cash on delivery. |
orders[].refunds[].transactions[].authorization | string | null | Authorization code. |
orders[].refunds[].transactions[].receipt | string | null | Receipt. |
orders[].refunds[].transactions[].test | boolean | True for a test transaction. |
orders[].refunds[].transactions[].user_id | integer | null | Staff who recorded it; 0 for the system. |
orders[].refunds[].transactions[].location_id | integer | null | Location id. |
orders[].refunds[].transactions[].device_id | integer | null | Device id. |
orders[].refunds[].transactions[].created_at | string | When it was created (ISO 8601). |
orders[].refunds[].transactions[].external_transaction_id | string | null | Id at the payment provider. |
orders[].refunds[].transactions[].haravan_transaction_id | string | null | Haravan payment reference. |
orders[].refunds[].transactions[].payment_details | object | null | Payment details, if any. |
orders[].refunds[].transactions[].send_email | boolean | Whether an email was sent. |
Count orders — haravan.count_orders
Count orders matching status, payment, delivery or date filters.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | no | yes | com.read_orders |
Input
| Field | Type | Required | Description |
|---|---|---|---|
status | string | no | Order status filter. One of: open, closed, cancelled, any. |
financial_status | string | no | Payment status filter. One of: pending, paid, partially_paid, refunded, voided, partially_refunded. |
fulfillment_status | string | no | Delivery status filter. One of: unshipped, shipped, partial. |
created_at_min | string | no | Created at or after (ISO 8601). |
created_at_max | string | no | Created at or before (ISO 8601). |
updated_at_min | string | no | Updated at or after (ISO 8601). |
updated_at_max | string | no | Updated at or before (ISO 8601). |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
count | integer | Count. |
Get order — haravan.get_order
Get one order with its items, customer, addresses, payment and delivery status.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | no | yes | com.read_orders |
Input
| Field | Type | Required | Description |
|---|---|---|---|
order_id | integer | yes | Haravan order id. Min 1. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
order | object | The order. |
order.id | integer | Order id used by the API. |
order.name | string | Order name shown to the shop and customer, e.g. #100020. |
order.order_number | string | Order number shown to the shop and customer. |
order.number | integer | Position of the order in the shop's order count. |
order.token | string | Unique token of the order. |
order.email | string | null | Customer email. |
order.contact_email | string | null | Contact email of the buyer. |
order.note | string | null | Order note. |
order.note_attributes | array of object | Extra name/value details added to the order. |
order.note_attributes[].name | string | Name. |
order.note_attributes[].value | string | Value. |
order.tags | string | null | Comma-separated tags. |
order.currency | string | Currency code, e.g. VND. |
order.total_price | number | Total of items, discounts, shipping and tax, VND. |
order.subtotal_price | number | Price after discounts, before shipping and tax, VND. |
order.total_line_items_price | number | Sum of line item prices, VND. |
order.total_discounts | number | Total discounts, VND. |
order.total_tax | number | Total tax, VND. |
order.total_weight | number | Total weight in grams. |
order.taxes_included | boolean | null | Whether tax is included in the subtotal. |
order.financial_status | string | Payment status: pending, authorized, partially_paid, paid, partially_refunded, refunded or voided. |
order.fulfillment_status | string | null | Delivery status: fulfilled, partial, restocked, or null/notfulfilled when nothing shipped. |
order.gateway | string | null | Payment gateway name. |
order.gateway_code | string | null | Payment gateway code, e.g. COD. |
order.processing_method | string | null | How the payment was processed: checkout, direct, manual or offsite. |
order.closed_status | string | unclosed or closed. |
order.cancelled_status | string | uncancelled or cancelled. |
order.confirmed_status | string | unconfirmed or confirmed. |
order.cancel_reason | string | null | Why it was cancelled: customer, fraud, inventory, declined or other. |
order.created_at | string | When the order was created (ISO 8601). |
order.updated_at | string | When the order was last updated (ISO 8601). |
order.closed_at | string | null | When the order was closed (ISO 8601). |
order.cancelled_at | string | null | When the order was cancelled (ISO 8601). |
order.confirmed_at | string | null | When the order was confirmed (ISO 8601). |
order.source_name | string | null | Where the order came from, e.g. web or pos. |
order.source | string | null | Channel that created the order. |
order.landing_site | string | null | Page where the buyer entered the shop. |
order.landing_site_ref | string | null | Ref of the landing page. |
order.referring_site | string | null | Site that referred the buyer. |
order.utm_source | string | null | UTM source. |
order.utm_medium | string | null | UTM medium. |
order.utm_campaign | string | null | UTM campaign. |
order.utm_term | string | null | UTM term. |
order.utm_content | string | null | UTM content. |
order.buyer_accepts_marketing | boolean | Whether the buyer accepts marketing. |
order.browser_ip | string | null | Buyer's IP address. |
order.cart_token | string | null | Token of the cart behind the order. |
order.checkout_token | string | null | Token of the checkout behind the order. |
order.user_id | integer | null | Staff who processed the order; 0 if none. |
order.location_id | integer | null | Location where the order was processed. |
order.location_name | string | null | Name of that location. |
order.assigned_location_id | integer | null | Location assigned to handle it. |
order.assigned_location_name | string | null | Name of the assigned location. |
order.assigned_location_at | string | null | When the location was assigned. |
order.client_details | object | Browser the customer used. |
order.client_details.accept_language | string | null | Browser languages. |
order.client_details.browser_ip | string | null | IP address. |
order.client_details.browser_height | integer | null | Screen height in pixels. |
order.client_details.browser_width | integer | null | Screen width in pixels. |
order.client_details.session_hash | string | null | Session hash. |
order.client_details.user_agent | string | null | Browser user agent. |
order.billing_address | object | Billing address. |
order.billing_address.id | integer | Address id. |
order.billing_address.name | string | Full name of the person at this address. |
order.billing_address.first_name | string | First name. |
order.billing_address.last_name | string | Last name. |
order.billing_address.company | string | Company name. |
order.billing_address.phone | string | Phone number. |
order.billing_address.address1 | string | Street address: house number and street. |
order.billing_address.address2 | string | Second address line. |
order.billing_address.city | string | City, town or village. |
order.billing_address.province | string | Province or city name. |
order.billing_address.province_code | string | Province code; matches list_provinces. |
order.billing_address.district | string | Ward name under the two-level model (district name before). |
order.billing_address.district_code | string | Ward code; matches list_wards. |
order.billing_address.ward | string | Ward name under the three-level model; usually empty now. |
order.billing_address.ward_code | string | Ward code under the three-level model; usually empty now. |
order.billing_address.country | string | Country name. |
order.billing_address.country_code | string | Two-letter country code, e.g. VN. |
order.billing_address.zip | string | Postal code. |
order.billing_address.latitude | number | Latitude, if known. |
order.billing_address.longitude | number | Longitude, if known. |
order.billing_address.default | boolean | True when this is the default address. |
order.shipping_address | object | Delivery address. |
order.shipping_address.id | integer | Address id. |
order.shipping_address.name | string | Full name of the person at this address. |
order.shipping_address.first_name | string | First name. |
order.shipping_address.last_name | string | Last name. |
order.shipping_address.company | string | Company name. |
order.shipping_address.phone | string | Phone number. |
order.shipping_address.address1 | string | Street address: house number and street. |
order.shipping_address.address2 | string | Second address line. |
order.shipping_address.city | string | City, town or village. |
order.shipping_address.province | string | Province or city name. |
order.shipping_address.province_code | string | Province code; matches list_provinces. |
order.shipping_address.district | string | Ward name under the two-level model (district name before). |
order.shipping_address.district_code | string | Ward code; matches list_wards. |
order.shipping_address.ward | string | Ward name under the three-level model; usually empty now. |
order.shipping_address.ward_code | string | Ward code under the three-level model; usually empty now. |
order.shipping_address.country | string | Country name. |
order.shipping_address.country_code | string | Two-letter country code, e.g. VN. |
order.shipping_address.zip | string | Postal code. |
order.shipping_address.latitude | number | Latitude, if known. |
order.shipping_address.longitude | number | Longitude, if known. |
order.shipping_address.default | boolean | True when this is the default address. |
order.customer | object | The customer; null for some POS orders. |
order.customer.id | integer | Customer id. |
order.customer.email | string | null | Email. |
order.customer.phone | string | null | Phone number. |
order.customer.first_name | string | null | First name. |
order.customer.last_name | string | null | Last name. |
order.customer.accepts_marketing | boolean | Whether the customer accepts marketing. |
order.customer.tags | string | null | Comma-separated tags. |
order.customer.note | string | null | Note about the customer. |
order.customer.state | string | Account state. |
order.customer.orders_count | integer | Number of orders. |
order.customer.total_spent | number | Total spent, VND. |
order.customer.last_order_id | integer | null | Latest order id. |
order.customer.last_order_name | string | null | Latest order name. |
order.customer.default_address | object | Default address. |
order.customer.default_address.id | integer | Address id. |
order.customer.default_address.name | string | Full name of the person at this address. |
order.customer.default_address.first_name | string | First name. |
order.customer.default_address.last_name | string | Last name. |
order.customer.default_address.company | string | Company name. |
order.customer.default_address.phone | string | Phone number. |
order.customer.default_address.address1 | string | Street address: house number and street. |
order.customer.default_address.address2 | string | Second address line. |
order.customer.default_address.city | string | City, town or village. |
order.customer.default_address.province | string | Province or city name. |
order.customer.default_address.province_code | string | Province code; matches list_provinces. |
order.customer.default_address.district | string | Ward name under the two-level model (district name before). |
order.customer.default_address.district_code | string | Ward code; matches list_wards. |
order.customer.default_address.ward | string | Ward name under the three-level model; usually empty now. |
order.customer.default_address.ward_code | string | Ward code under the three-level model; usually empty now. |
order.customer.default_address.country | string | Country name. |
order.customer.default_address.country_code | string | Two-letter country code, e.g. VN. |
order.customer.default_address.zip | string | Postal code. |
order.customer.default_address.latitude | number | Latitude, if known. |
order.customer.default_address.longitude | number | Longitude, if known. |
order.customer.default_address.default | boolean | True when this is the default address. |
order.customer.addresses | array of object | All addresses. |
order.customer.addresses[].id | integer | Address id. |
order.customer.addresses[].name | string | Full name of the person at this address. |
order.customer.addresses[].first_name | string | First name. |
order.customer.addresses[].last_name | string | Last name. |
order.customer.addresses[].company | string | Company name. |
order.customer.addresses[].phone | string | Phone number. |
order.customer.addresses[].address1 | string | Street address: house number and street. |
order.customer.addresses[].address2 | string | Second address line. |
order.customer.addresses[].city | string | City, town or village. |
order.customer.addresses[].province | string | Province or city name. |
order.customer.addresses[].province_code | string | Province code; matches list_provinces. |
order.customer.addresses[].district | string | Ward name under the two-level model (district name before). |
order.customer.addresses[].district_code | string | Ward code; matches list_wards. |
order.customer.addresses[].ward | string | Ward name under the three-level model; usually empty now. |
order.customer.addresses[].ward_code | string | Ward code under the three-level model; usually empty now. |
order.customer.addresses[].country | string | Country name. |
order.customer.addresses[].country_code | string | Two-letter country code, e.g. VN. |
order.customer.addresses[].zip | string | Postal code. |
order.customer.addresses[].latitude | number | Latitude, if known. |
order.customer.addresses[].longitude | number | Longitude, if known. |
order.customer.addresses[].default | boolean | True when this is the default address. |
order.customer.created_at | string | When it was created (ISO 8601). |
order.customer.updated_at | string | When it was last updated (ISO 8601). |
order.line_items | array of object | Items ordered. |
order.line_items[].id | integer | Line item id. |
order.line_items[].product_id | integer | null | Product id; null when the product was deleted later. |
order.line_items[].variant_id | integer | Variant id. |
order.line_items[].title | string | Product title. |
order.line_items[].variant_title | string | Variant title. |
order.line_items[].name | string | Product and variant name. |
order.line_items[].sku | string | null | SKU of the variant. |
order.line_items[].barcode | string | null | Barcode of the variant. |
order.line_items[].vendor | string | Supplier of the item. |
order.line_items[].type | string | Product type. |
order.line_items[].quantity | integer | Quantity ordered. |
order.line_items[].fulfillable_quantity | integer | Quantity still available to fulfill. |
order.line_items[].price | number | Unit price before discounts, VND. |
order.line_items[].price_original | number | Unit price before any promotion, VND. |
order.line_items[].price_promotion | number | Promotion discount per unit, VND. |
order.line_items[].total_discount | number | Total discount on this line, VND. |
order.line_items[].grams | number | Weight in grams. |
order.line_items[].requires_shipping | boolean | Whether the item needs shipping. |
order.line_items[].taxable | boolean | Whether the item is taxable. |
order.line_items[].gift_card | boolean | Whether the item is a gift card. |
order.line_items[].product_exists | boolean | False when the product has been deleted. |
order.line_items[].fulfillment_service | string | null | Who fulfills the item. |
order.line_items[].fulfillment_status | string | null | Fulfillment status of this line. |
order.line_items[].properties | array | null | Custom properties of the line item. |
order.line_items[].image | object | Variant image. |
order.line_items[].image.src | string | Image URL. |
order.shipping_lines | array of object | Shipping methods used. |
order.shipping_lines[].code | string | null | Shipping method reference. |
order.shipping_lines[].title | string | null | Shipping method title. |
order.shipping_lines[].price | number | Shipping price, VND. |
order.shipping_lines[].source | string | null | Source of the shipping method. |
order.discount_codes | array of object | Discount codes applied. |
order.discount_codes[].code | string | The code. |
order.discount_codes[].amount | number | Discount amount. |
order.discount_codes[].type | string | percentage, shipping or fixed_amount. |
order.fulfillments | array of object | Shipments of the order. |
order.fulfillments[].id | integer | Fulfillment id. |
order.fulfillments[].order_id | integer | Order id. |
order.fulfillments[].status | string | Fulfillment status, e.g. success. |
order.fulfillments[].tracking_company | string | null | Carrier name. |
order.fulfillments[].tracking_company_code | string | null | Carrier code. |
order.fulfillments[].tracking_number | string | null | Tracking number. |
order.fulfillments[].tracking_numbers | array of string | Tracking numbers. |
order.fulfillments[].tracking_url | string | null | Tracking URL. |
order.fulfillments[].tracking_urls | array of string | Tracking URLs. |
order.fulfillments[].carrier_status_code | string | null | Carrier delivery status code. |
order.fulfillments[].carrier_status_name | string | null | Carrier delivery status. |
order.fulfillments[].carrier_cod_status_code | string | null | Cash-on-delivery status code. |
order.fulfillments[].carrier_cod_status_name | string | null | Cash-on-delivery status. |
order.fulfillments[].cod_amount | number | Cash on delivery amount to collect, VND. |
order.fulfillments[].real_shipping_fee | number | Actual shipping fee, VND. |
order.fulfillments[].total_weight | number | Package weight in grams. |
order.fulfillments[].location_id | integer | null | Location the order shipped from. |
order.fulfillments[].notify_customer | boolean | Whether the customer was notified. |
order.fulfillments[].note | string | null | Fulfillment note. |
order.fulfillments[].created_at | string | When it was created (ISO 8601). |
order.fulfillments[].updated_at | string | When it was last updated (ISO 8601). |
order.fulfillments[].line_items | array of object | Items in this fulfillment. |
order.fulfillments[].line_items[].id | integer | Line item id. |
order.fulfillments[].line_items[].product_id | integer | null | Product id; null when the product was deleted later. |
order.fulfillments[].line_items[].variant_id | integer | Variant id. |
order.fulfillments[].line_items[].title | string | Product title. |
order.fulfillments[].line_items[].variant_title | string | Variant title. |
order.fulfillments[].line_items[].name | string | Product and variant name. |
order.fulfillments[].line_items[].sku | string | null | SKU of the variant. |
order.fulfillments[].line_items[].barcode | string | null | Barcode of the variant. |
order.fulfillments[].line_items[].vendor | string | Supplier of the item. |
order.fulfillments[].line_items[].type | string | Product type. |
order.fulfillments[].line_items[].quantity | integer | Quantity ordered. |
order.fulfillments[].line_items[].fulfillable_quantity | integer | Quantity still available to fulfill. |
order.fulfillments[].line_items[].price | number | Unit price before discounts, VND. |
order.fulfillments[].line_items[].price_original | number | Unit price before any promotion, VND. |
order.fulfillments[].line_items[].price_promotion | number | Promotion discount per unit, VND. |
order.fulfillments[].line_items[].total_discount | number | Total discount on this line, VND. |
order.fulfillments[].line_items[].grams | number | Weight in grams. |
order.fulfillments[].line_items[].requires_shipping | boolean | Whether the item needs shipping. |
order.fulfillments[].line_items[].taxable | boolean | Whether the item is taxable. |
order.fulfillments[].line_items[].gift_card | boolean | Whether the item is a gift card. |
order.fulfillments[].line_items[].product_exists | boolean | False when the product has been deleted. |
order.fulfillments[].line_items[].fulfillment_service | string | null | Who fulfills the item. |
order.fulfillments[].line_items[].fulfillment_status | string | null | Fulfillment status of this line. |
order.fulfillments[].line_items[].properties | array | null | Custom properties of the line item. |
order.fulfillments[].line_items[].image | object | Variant image. |
order.fulfillments[].line_items[].image.src | string | Image URL. |
order.transactions | array of object | Payments on the order. |
order.transactions[].id | integer | Transaction id. |
order.transactions[].order_id | integer | Order the transaction belongs to. |
order.transactions[].parent_id | integer | null | Id of the transaction this one follows. |
order.transactions[].kind | string | Kind: pending, authorization, capture, sale, void or refund (case varies). |
order.transactions[].status | string | null | Status: pending, failure, success or error; some shops return a Vietnamese label. |
order.transactions[].amount | number | Amount, VND; negative for refunds. |
order.transactions[].currency | string | null | Currency code, e.g. VND. |
order.transactions[].gateway | string | Name of the payment gateway. |
order.transactions[].is_cod_gateway | boolean | True when the gateway is cash on delivery. |
order.transactions[].authorization | string | null | Authorization code. |
order.transactions[].receipt | string | null | Receipt. |
order.transactions[].test | boolean | True for a test transaction. |
order.transactions[].user_id | integer | null | Staff who recorded it; 0 for the system. |
order.transactions[].location_id | integer | null | Location id. |
order.transactions[].device_id | integer | null | Device id. |
order.transactions[].created_at | string | When it was created (ISO 8601). |
order.transactions[].external_transaction_id | string | null | Id at the payment provider. |
order.transactions[].haravan_transaction_id | string | null | Haravan payment reference. |
order.transactions[].payment_details | object | null | Payment details, if any. |
order.transactions[].send_email | boolean | Whether an email was sent. |
order.refunds | array of object | Refunds on the order. |
order.refunds[].id | integer | Refund id. |
order.refunds[].order_id | integer | Order id. |
order.refunds[].note | string | null | Note attached to the refund. |
order.refunds[].restock | boolean | null | Whether items went back to stock. |
order.refunds[].user_id | integer | null | Staff who made the refund. |
order.refunds[].location_id | integer | null | Location items were returned to. |
order.refunds[].created_at | string | When it was created (ISO 8601). |
order.refunds[].refund_line_items | array of object | Items returned or refunded. |
order.refunds[].refund_line_items[].id | integer | Refund line item id. |
order.refunds[].refund_line_items[].line_item_id | integer | Order line item it refers to. |
order.refunds[].refund_line_items[].quantity | integer | Quantity refunded. |
order.refunds[].refund_line_items[].line_item | object | The order line item. |
order.refunds[].refund_line_items[].line_item.id | integer | Line item id. |
order.refunds[].refund_line_items[].line_item.product_id | integer | null | Product id; null when the product was deleted later. |
order.refunds[].refund_line_items[].line_item.variant_id | integer | Variant id. |
order.refunds[].refund_line_items[].line_item.title | string | Product title. |
order.refunds[].refund_line_items[].line_item.variant_title | string | Variant title. |
order.refunds[].refund_line_items[].line_item.name | string | Product and variant name. |
order.refunds[].refund_line_items[].line_item.sku | string | null | SKU of the variant. |
order.refunds[].refund_line_items[].line_item.barcode | string | null | Barcode of the variant. |
order.refunds[].refund_line_items[].line_item.vendor | string | Supplier of the item. |
order.refunds[].refund_line_items[].line_item.type | string | Product type. |
order.refunds[].refund_line_items[].line_item.quantity | integer | Quantity ordered. |
order.refunds[].refund_line_items[].line_item.fulfillable_quantity | integer | Quantity still available to fulfill. |
order.refunds[].refund_line_items[].line_item.price | number | Unit price before discounts, VND. |
order.refunds[].refund_line_items[].line_item.price_original | number | Unit price before any promotion, VND. |
order.refunds[].refund_line_items[].line_item.price_promotion | number | Promotion discount per unit, VND. |
order.refunds[].refund_line_items[].line_item.total_discount | number | Total discount on this line, VND. |
order.refunds[].refund_line_items[].line_item.grams | number | Weight in grams. |
order.refunds[].refund_line_items[].line_item.requires_shipping | boolean | Whether the item needs shipping. |
order.refunds[].refund_line_items[].line_item.taxable | boolean | Whether the item is taxable. |
order.refunds[].refund_line_items[].line_item.gift_card | boolean | Whether the item is a gift card. |
order.refunds[].refund_line_items[].line_item.product_exists | boolean | False when the product has been deleted. |
order.refunds[].refund_line_items[].line_item.fulfillment_service | string | null | Who fulfills the item. |
order.refunds[].refund_line_items[].line_item.fulfillment_status | string | null | Fulfillment status of this line. |
order.refunds[].refund_line_items[].line_item.properties | array | null | Custom properties of the line item. |
order.refunds[].refund_line_items[].line_item.image | object | Variant image. |
order.refunds[].refund_line_items[].line_item.image.src | string | Image URL. |
order.refunds[].transactions | array of object | Money returned, as refund transactions. |
order.refunds[].transactions[].id | integer | Transaction id. |
order.refunds[].transactions[].order_id | integer | Order the transaction belongs to. |
order.refunds[].transactions[].parent_id | integer | null | Id of the transaction this one follows. |
order.refunds[].transactions[].kind | string | Kind: pending, authorization, capture, sale, void or refund (case varies). |
order.refunds[].transactions[].status | string | null | Status: pending, failure, success or error; some shops return a Vietnamese label. |
order.refunds[].transactions[].amount | number | Amount, VND; negative for refunds. |
order.refunds[].transactions[].currency | string | null | Currency code, e.g. VND. |
order.refunds[].transactions[].gateway | string | Name of the payment gateway. |
order.refunds[].transactions[].is_cod_gateway | boolean | True when the gateway is cash on delivery. |
order.refunds[].transactions[].authorization | string | null | Authorization code. |
order.refunds[].transactions[].receipt | string | null | Receipt. |
order.refunds[].transactions[].test | boolean | True for a test transaction. |
order.refunds[].transactions[].user_id | integer | null | Staff who recorded it; 0 for the system. |
order.refunds[].transactions[].location_id | integer | null | Location id. |
order.refunds[].transactions[].device_id | integer | null | Device id. |
order.refunds[].transactions[].created_at | string | When it was created (ISO 8601). |
order.refunds[].transactions[].external_transaction_id | string | null | Id at the payment provider. |
order.refunds[].transactions[].haravan_transaction_id | string | null | Haravan payment reference. |
order.refunds[].transactions[].payment_details | object | null | Payment details, if any. |
order.refunds[].transactions[].send_email | boolean | Whether an email was sent. |
Create order — haravan.create_order
Create an order from variants and quantities. Look up province_code with list_provinces and the ward code (sent as district_code) with list_wards first.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | yes | no | com.write_orders |
Input
| Field | Type | Required | Description |
|---|---|---|---|
order | object | yes | The order. Other Haravan order fields are also accepted. |
order.line_items | array of object | yes | Products ordered. |
order.line_items[].variant_id | integer | yes | Variant id. |
order.line_items[].quantity | integer | yes | Quantity. Min 1. |
order.line_items[].price | number | no | Unit price, VND. |
order.email | string | no | Customer email. |
order.phone | string | no | Customer phone number. |
order.customer | object | no | Customer: {id} of an existing one, or first_name, last_name, phone. |
order.shipping_address | object | no | Delivery address. |
order.shipping_address.name | string | no | Recipient full name. |
order.shipping_address.phone | string | no | Recipient phone number. |
order.shipping_address.address1 | string | no | Street address: house number and street. |
order.shipping_address.province_code | string | no | Province code from list_provinces. |
order.shipping_address.district_code | string | no | New ward code from list_wards (two-level model). |
order.shipping_address.ward_code | string | no | Leave empty under the two-level model. |
order.shipping_address.country_code | string | no | Country code, VN for Vietnam. |
order.billing_address | object | no | Billing address. |
order.billing_address.name | string | no | Recipient full name. |
order.billing_address.phone | string | no | Recipient phone number. |
order.billing_address.address1 | string | no | Street address: house number and street. |
order.billing_address.province_code | string | no | Province code from list_provinces. |
order.billing_address.district_code | string | no | New ward code from list_wards (two-level model). |
order.billing_address.ward_code | string | no | Leave empty under the two-level model. |
order.billing_address.country_code | string | no | Country code, VN for Vietnam. |
order.note | string | no | Order note. |
order.tags | string | no | Comma-separated tags. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
order | object | The order. |
order.id | integer | Order id used by the API. |
order.name | string | Order name shown to the shop and customer, e.g. #100020. |
order.order_number | string | Order number shown to the shop and customer. |
order.number | integer | Position of the order in the shop's order count. |
order.token | string | Unique token of the order. |
order.email | string | null | Customer email. |
order.contact_email | string | null | Contact email of the buyer. |
order.note | string | null | Order note. |
order.note_attributes | array of object | Extra name/value details added to the order. |
order.note_attributes[].name | string | Name. |
order.note_attributes[].value | string | Value. |
order.tags | string | null | Comma-separated tags. |
order.currency | string | Currency code, e.g. VND. |
order.total_price | number | Total of items, discounts, shipping and tax, VND. |
order.subtotal_price | number | Price after discounts, before shipping and tax, VND. |
order.total_line_items_price | number | Sum of line item prices, VND. |
order.total_discounts | number | Total discounts, VND. |
order.total_tax | number | Total tax, VND. |
order.total_weight | number | Total weight in grams. |
order.taxes_included | boolean | null | Whether tax is included in the subtotal. |
order.financial_status | string | Payment status: pending, authorized, partially_paid, paid, partially_refunded, refunded or voided. |
order.fulfillment_status | string | null | Delivery status: fulfilled, partial, restocked, or null/notfulfilled when nothing shipped. |
order.gateway | string | null | Payment gateway name. |
order.gateway_code | string | null | Payment gateway code, e.g. COD. |
order.processing_method | string | null | How the payment was processed: checkout, direct, manual or offsite. |
order.closed_status | string | unclosed or closed. |
order.cancelled_status | string | uncancelled or cancelled. |
order.confirmed_status | string | unconfirmed or confirmed. |
order.cancel_reason | string | null | Why it was cancelled: customer, fraud, inventory, declined or other. |
order.created_at | string | When the order was created (ISO 8601). |
order.updated_at | string | When the order was last updated (ISO 8601). |
order.closed_at | string | null | When the order was closed (ISO 8601). |
order.cancelled_at | string | null | When the order was cancelled (ISO 8601). |
order.confirmed_at | string | null | When the order was confirmed (ISO 8601). |
order.source_name | string | null | Where the order came from, e.g. web or pos. |
order.source | string | null | Channel that created the order. |
order.landing_site | string | null | Page where the buyer entered the shop. |
order.landing_site_ref | string | null | Ref of the landing page. |
order.referring_site | string | null | Site that referred the buyer. |
order.utm_source | string | null | UTM source. |
order.utm_medium | string | null | UTM medium. |
order.utm_campaign | string | null | UTM campaign. |
order.utm_term | string | null | UTM term. |
order.utm_content | string | null | UTM content. |
order.buyer_accepts_marketing | boolean | Whether the buyer accepts marketing. |
order.browser_ip | string | null | Buyer's IP address. |
order.cart_token | string | null | Token of the cart behind the order. |
order.checkout_token | string | null | Token of the checkout behind the order. |
order.user_id | integer | null | Staff who processed the order; 0 if none. |
order.location_id | integer | null | Location where the order was processed. |
order.location_name | string | null | Name of that location. |
order.assigned_location_id | integer | null | Location assigned to handle it. |
order.assigned_location_name | string | null | Name of the assigned location. |
order.assigned_location_at | string | null | When the location was assigned. |
order.client_details | object | Browser the customer used. |
order.client_details.accept_language | string | null | Browser languages. |
order.client_details.browser_ip | string | null | IP address. |
order.client_details.browser_height | integer | null | Screen height in pixels. |
order.client_details.browser_width | integer | null | Screen width in pixels. |
order.client_details.session_hash | string | null | Session hash. |
order.client_details.user_agent | string | null | Browser user agent. |
order.billing_address | object | Billing address. |
order.billing_address.id | integer | Address id. |
order.billing_address.name | string | Full name of the person at this address. |
order.billing_address.first_name | string | First name. |
order.billing_address.last_name | string | Last name. |
order.billing_address.company | string | Company name. |
order.billing_address.phone | string | Phone number. |
order.billing_address.address1 | string | Street address: house number and street. |
order.billing_address.address2 | string | Second address line. |
order.billing_address.city | string | City, town or village. |
order.billing_address.province | string | Province or city name. |
order.billing_address.province_code | string | Province code; matches list_provinces. |
order.billing_address.district | string | Ward name under the two-level model (district name before). |
order.billing_address.district_code | string | Ward code; matches list_wards. |
order.billing_address.ward | string | Ward name under the three-level model; usually empty now. |
order.billing_address.ward_code | string | Ward code under the three-level model; usually empty now. |
order.billing_address.country | string | Country name. |
order.billing_address.country_code | string | Two-letter country code, e.g. VN. |
order.billing_address.zip | string | Postal code. |
order.billing_address.latitude | number | Latitude, if known. |
order.billing_address.longitude | number | Longitude, if known. |
order.billing_address.default | boolean | True when this is the default address. |
order.shipping_address | object | Delivery address. |
order.shipping_address.id | integer | Address id. |
order.shipping_address.name | string | Full name of the person at this address. |
order.shipping_address.first_name | string | First name. |
order.shipping_address.last_name | string | Last name. |
order.shipping_address.company | string | Company name. |
order.shipping_address.phone | string | Phone number. |
order.shipping_address.address1 | string | Street address: house number and street. |
order.shipping_address.address2 | string | Second address line. |
order.shipping_address.city | string | City, town or village. |
order.shipping_address.province | string | Province or city name. |
order.shipping_address.province_code | string | Province code; matches list_provinces. |
order.shipping_address.district | string | Ward name under the two-level model (district name before). |
order.shipping_address.district_code | string | Ward code; matches list_wards. |
order.shipping_address.ward | string | Ward name under the three-level model; usually empty now. |
order.shipping_address.ward_code | string | Ward code under the three-level model; usually empty now. |
order.shipping_address.country | string | Country name. |
order.shipping_address.country_code | string | Two-letter country code, e.g. VN. |
order.shipping_address.zip | string | Postal code. |
order.shipping_address.latitude | number | Latitude, if known. |
order.shipping_address.longitude | number | Longitude, if known. |
order.shipping_address.default | boolean | True when this is the default address. |
order.customer | object | The customer; null for some POS orders. |
order.customer.id | integer | Customer id. |
order.customer.email | string | null | Email. |
order.customer.phone | string | null | Phone number. |
order.customer.first_name | string | null | First name. |
order.customer.last_name | string | null | Last name. |
order.customer.accepts_marketing | boolean | Whether the customer accepts marketing. |
order.customer.tags | string | null | Comma-separated tags. |
order.customer.note | string | null | Note about the customer. |
order.customer.state | string | Account state. |
order.customer.orders_count | integer | Number of orders. |
order.customer.total_spent | number | Total spent, VND. |
order.customer.last_order_id | integer | null | Latest order id. |
order.customer.last_order_name | string | null | Latest order name. |
order.customer.default_address | object | Default address. |
order.customer.default_address.id | integer | Address id. |
order.customer.default_address.name | string | Full name of the person at this address. |
order.customer.default_address.first_name | string | First name. |
order.customer.default_address.last_name | string | Last name. |
order.customer.default_address.company | string | Company name. |
order.customer.default_address.phone | string | Phone number. |
order.customer.default_address.address1 | string | Street address: house number and street. |
order.customer.default_address.address2 | string | Second address line. |
order.customer.default_address.city | string | City, town or village. |
order.customer.default_address.province | string | Province or city name. |
order.customer.default_address.province_code | string | Province code; matches list_provinces. |
order.customer.default_address.district | string | Ward name under the two-level model (district name before). |
order.customer.default_address.district_code | string | Ward code; matches list_wards. |
order.customer.default_address.ward | string | Ward name under the three-level model; usually empty now. |
order.customer.default_address.ward_code | string | Ward code under the three-level model; usually empty now. |
order.customer.default_address.country | string | Country name. |
order.customer.default_address.country_code | string | Two-letter country code, e.g. VN. |
order.customer.default_address.zip | string | Postal code. |
order.customer.default_address.latitude | number | Latitude, if known. |
order.customer.default_address.longitude | number | Longitude, if known. |
order.customer.default_address.default | boolean | True when this is the default address. |
order.customer.addresses | array of object | All addresses. |
order.customer.addresses[].id | integer | Address id. |
order.customer.addresses[].name | string | Full name of the person at this address. |
order.customer.addresses[].first_name | string | First name. |
order.customer.addresses[].last_name | string | Last name. |
order.customer.addresses[].company | string | Company name. |
order.customer.addresses[].phone | string | Phone number. |
order.customer.addresses[].address1 | string | Street address: house number and street. |
order.customer.addresses[].address2 | string | Second address line. |
order.customer.addresses[].city | string | City, town or village. |
order.customer.addresses[].province | string | Province or city name. |
order.customer.addresses[].province_code | string | Province code; matches list_provinces. |
order.customer.addresses[].district | string | Ward name under the two-level model (district name before). |
order.customer.addresses[].district_code | string | Ward code; matches list_wards. |
order.customer.addresses[].ward | string | Ward name under the three-level model; usually empty now. |
order.customer.addresses[].ward_code | string | Ward code under the three-level model; usually empty now. |
order.customer.addresses[].country | string | Country name. |
order.customer.addresses[].country_code | string | Two-letter country code, e.g. VN. |
order.customer.addresses[].zip | string | Postal code. |
order.customer.addresses[].latitude | number | Latitude, if known. |
order.customer.addresses[].longitude | number | Longitude, if known. |
order.customer.addresses[].default | boolean | True when this is the default address. |
order.customer.created_at | string | When it was created (ISO 8601). |
order.customer.updated_at | string | When it was last updated (ISO 8601). |
order.line_items | array of object | Items ordered. |
order.line_items[].id | integer | Line item id. |
order.line_items[].product_id | integer | null | Product id; null when the product was deleted later. |
order.line_items[].variant_id | integer | Variant id. |
order.line_items[].title | string | Product title. |
order.line_items[].variant_title | string | Variant title. |
order.line_items[].name | string | Product and variant name. |
order.line_items[].sku | string | null | SKU of the variant. |
order.line_items[].barcode | string | null | Barcode of the variant. |
order.line_items[].vendor | string | Supplier of the item. |
order.line_items[].type | string | Product type. |
order.line_items[].quantity | integer | Quantity ordered. |
order.line_items[].fulfillable_quantity | integer | Quantity still available to fulfill. |
order.line_items[].price | number | Unit price before discounts, VND. |
order.line_items[].price_original | number | Unit price before any promotion, VND. |
order.line_items[].price_promotion | number | Promotion discount per unit, VND. |
order.line_items[].total_discount | number | Total discount on this line, VND. |
order.line_items[].grams | number | Weight in grams. |
order.line_items[].requires_shipping | boolean | Whether the item needs shipping. |
order.line_items[].taxable | boolean | Whether the item is taxable. |
order.line_items[].gift_card | boolean | Whether the item is a gift card. |
order.line_items[].product_exists | boolean | False when the product has been deleted. |
order.line_items[].fulfillment_service | string | null | Who fulfills the item. |
order.line_items[].fulfillment_status | string | null | Fulfillment status of this line. |
order.line_items[].properties | array | null | Custom properties of the line item. |
order.line_items[].image | object | Variant image. |
order.line_items[].image.src | string | Image URL. |
order.shipping_lines | array of object | Shipping methods used. |
order.shipping_lines[].code | string | null | Shipping method reference. |
order.shipping_lines[].title | string | null | Shipping method title. |
order.shipping_lines[].price | number | Shipping price, VND. |
order.shipping_lines[].source | string | null | Source of the shipping method. |
order.discount_codes | array of object | Discount codes applied. |
order.discount_codes[].code | string | The code. |
order.discount_codes[].amount | number | Discount amount. |
order.discount_codes[].type | string | percentage, shipping or fixed_amount. |
order.fulfillments | array of object | Shipments of the order. |
order.fulfillments[].id | integer | Fulfillment id. |
order.fulfillments[].order_id | integer | Order id. |
order.fulfillments[].status | string | Fulfillment status, e.g. success. |
order.fulfillments[].tracking_company | string | null | Carrier name. |
order.fulfillments[].tracking_company_code | string | null | Carrier code. |
order.fulfillments[].tracking_number | string | null | Tracking number. |
order.fulfillments[].tracking_numbers | array of string | Tracking numbers. |
order.fulfillments[].tracking_url | string | null | Tracking URL. |
order.fulfillments[].tracking_urls | array of string | Tracking URLs. |
order.fulfillments[].carrier_status_code | string | null | Carrier delivery status code. |
order.fulfillments[].carrier_status_name | string | null | Carrier delivery status. |
order.fulfillments[].carrier_cod_status_code | string | null | Cash-on-delivery status code. |
order.fulfillments[].carrier_cod_status_name | string | null | Cash-on-delivery status. |
order.fulfillments[].cod_amount | number | Cash on delivery amount to collect, VND. |
order.fulfillments[].real_shipping_fee | number | Actual shipping fee, VND. |
order.fulfillments[].total_weight | number | Package weight in grams. |
order.fulfillments[].location_id | integer | null | Location the order shipped from. |
order.fulfillments[].notify_customer | boolean | Whether the customer was notified. |
order.fulfillments[].note | string | null | Fulfillment note. |
order.fulfillments[].created_at | string | When it was created (ISO 8601). |
order.fulfillments[].updated_at | string | When it was last updated (ISO 8601). |
order.fulfillments[].line_items | array of object | Items in this fulfillment. |
order.fulfillments[].line_items[].id | integer | Line item id. |
order.fulfillments[].line_items[].product_id | integer | null | Product id; null when the product was deleted later. |
order.fulfillments[].line_items[].variant_id | integer | Variant id. |
order.fulfillments[].line_items[].title | string | Product title. |
order.fulfillments[].line_items[].variant_title | string | Variant title. |
order.fulfillments[].line_items[].name | string | Product and variant name. |
order.fulfillments[].line_items[].sku | string | null | SKU of the variant. |
order.fulfillments[].line_items[].barcode | string | null | Barcode of the variant. |
order.fulfillments[].line_items[].vendor | string | Supplier of the item. |
order.fulfillments[].line_items[].type | string | Product type. |
order.fulfillments[].line_items[].quantity | integer | Quantity ordered. |
order.fulfillments[].line_items[].fulfillable_quantity | integer | Quantity still available to fulfill. |
order.fulfillments[].line_items[].price | number | Unit price before discounts, VND. |
order.fulfillments[].line_items[].price_original | number | Unit price before any promotion, VND. |
order.fulfillments[].line_items[].price_promotion | number | Promotion discount per unit, VND. |
order.fulfillments[].line_items[].total_discount | number | Total discount on this line, VND. |
order.fulfillments[].line_items[].grams | number | Weight in grams. |
order.fulfillments[].line_items[].requires_shipping | boolean | Whether the item needs shipping. |
order.fulfillments[].line_items[].taxable | boolean | Whether the item is taxable. |
order.fulfillments[].line_items[].gift_card | boolean | Whether the item is a gift card. |
order.fulfillments[].line_items[].product_exists | boolean | False when the product has been deleted. |
order.fulfillments[].line_items[].fulfillment_service | string | null | Who fulfills the item. |
order.fulfillments[].line_items[].fulfillment_status | string | null | Fulfillment status of this line. |
order.fulfillments[].line_items[].properties | array | null | Custom properties of the line item. |
order.fulfillments[].line_items[].image | object | Variant image. |
order.fulfillments[].line_items[].image.src | string | Image URL. |
order.transactions | array of object | Payments on the order. |
order.transactions[].id | integer | Transaction id. |
order.transactions[].order_id | integer | Order the transaction belongs to. |
order.transactions[].parent_id | integer | null | Id of the transaction this one follows. |
order.transactions[].kind | string | Kind: pending, authorization, capture, sale, void or refund (case varies). |
order.transactions[].status | string | null | Status: pending, failure, success or error; some shops return a Vietnamese label. |
order.transactions[].amount | number | Amount, VND; negative for refunds. |
order.transactions[].currency | string | null | Currency code, e.g. VND. |
order.transactions[].gateway | string | Name of the payment gateway. |
order.transactions[].is_cod_gateway | boolean | True when the gateway is cash on delivery. |
order.transactions[].authorization | string | null | Authorization code. |
order.transactions[].receipt | string | null | Receipt. |
order.transactions[].test | boolean | True for a test transaction. |
order.transactions[].user_id | integer | null | Staff who recorded it; 0 for the system. |
order.transactions[].location_id | integer | null | Location id. |
order.transactions[].device_id | integer | null | Device id. |
order.transactions[].created_at | string | When it was created (ISO 8601). |
order.transactions[].external_transaction_id | string | null | Id at the payment provider. |
order.transactions[].haravan_transaction_id | string | null | Haravan payment reference. |
order.transactions[].payment_details | object | null | Payment details, if any. |
order.transactions[].send_email | boolean | Whether an email was sent. |
order.refunds | array of object | Refunds on the order. |
order.refunds[].id | integer | Refund id. |
order.refunds[].order_id | integer | Order id. |
order.refunds[].note | string | null | Note attached to the refund. |
order.refunds[].restock | boolean | null | Whether items went back to stock. |
order.refunds[].user_id | integer | null | Staff who made the refund. |
order.refunds[].location_id | integer | null | Location items were returned to. |
order.refunds[].created_at | string | When it was created (ISO 8601). |
order.refunds[].refund_line_items | array of object | Items returned or refunded. |
order.refunds[].refund_line_items[].id | integer | Refund line item id. |
order.refunds[].refund_line_items[].line_item_id | integer | Order line item it refers to. |
order.refunds[].refund_line_items[].quantity | integer | Quantity refunded. |
order.refunds[].refund_line_items[].line_item | object | The order line item. |
order.refunds[].refund_line_items[].line_item.id | integer | Line item id. |
order.refunds[].refund_line_items[].line_item.product_id | integer | null | Product id; null when the product was deleted later. |
order.refunds[].refund_line_items[].line_item.variant_id | integer | Variant id. |
order.refunds[].refund_line_items[].line_item.title | string | Product title. |
order.refunds[].refund_line_items[].line_item.variant_title | string | Variant title. |
order.refunds[].refund_line_items[].line_item.name | string | Product and variant name. |
order.refunds[].refund_line_items[].line_item.sku | string | null | SKU of the variant. |
order.refunds[].refund_line_items[].line_item.barcode | string | null | Barcode of the variant. |
order.refunds[].refund_line_items[].line_item.vendor | string | Supplier of the item. |
order.refunds[].refund_line_items[].line_item.type | string | Product type. |
order.refunds[].refund_line_items[].line_item.quantity | integer | Quantity ordered. |
order.refunds[].refund_line_items[].line_item.fulfillable_quantity | integer | Quantity still available to fulfill. |
order.refunds[].refund_line_items[].line_item.price | number | Unit price before discounts, VND. |
order.refunds[].refund_line_items[].line_item.price_original | number | Unit price before any promotion, VND. |
order.refunds[].refund_line_items[].line_item.price_promotion | number | Promotion discount per unit, VND. |
order.refunds[].refund_line_items[].line_item.total_discount | number | Total discount on this line, VND. |
order.refunds[].refund_line_items[].line_item.grams | number | Weight in grams. |
order.refunds[].refund_line_items[].line_item.requires_shipping | boolean | Whether the item needs shipping. |
order.refunds[].refund_line_items[].line_item.taxable | boolean | Whether the item is taxable. |
order.refunds[].refund_line_items[].line_item.gift_card | boolean | Whether the item is a gift card. |
order.refunds[].refund_line_items[].line_item.product_exists | boolean | False when the product has been deleted. |
order.refunds[].refund_line_items[].line_item.fulfillment_service | string | null | Who fulfills the item. |
order.refunds[].refund_line_items[].line_item.fulfillment_status | string | null | Fulfillment status of this line. |
order.refunds[].refund_line_items[].line_item.properties | array | null | Custom properties of the line item. |
order.refunds[].refund_line_items[].line_item.image | object | Variant image. |
order.refunds[].refund_line_items[].line_item.image.src | string | Image URL. |
order.refunds[].transactions | array of object | Money returned, as refund transactions. |
order.refunds[].transactions[].id | integer | Transaction id. |
order.refunds[].transactions[].order_id | integer | Order the transaction belongs to. |
order.refunds[].transactions[].parent_id | integer | null | Id of the transaction this one follows. |
order.refunds[].transactions[].kind | string | Kind: pending, authorization, capture, sale, void or refund (case varies). |
order.refunds[].transactions[].status | string | null | Status: pending, failure, success or error; some shops return a Vietnamese label. |
order.refunds[].transactions[].amount | number | Amount, VND; negative for refunds. |
order.refunds[].transactions[].currency | string | null | Currency code, e.g. VND. |
order.refunds[].transactions[].gateway | string | Name of the payment gateway. |
order.refunds[].transactions[].is_cod_gateway | boolean | True when the gateway is cash on delivery. |
order.refunds[].transactions[].authorization | string | null | Authorization code. |
order.refunds[].transactions[].receipt | string | null | Receipt. |
order.refunds[].transactions[].test | boolean | True for a test transaction. |
order.refunds[].transactions[].user_id | integer | null | Staff who recorded it; 0 for the system. |
order.refunds[].transactions[].location_id | integer | null | Location id. |
order.refunds[].transactions[].device_id | integer | null | Device id. |
order.refunds[].transactions[].created_at | string | When it was created (ISO 8601). |
order.refunds[].transactions[].external_transaction_id | string | null | Id at the payment provider. |
order.refunds[].transactions[].haravan_transaction_id | string | null | Haravan payment reference. |
order.refunds[].transactions[].payment_details | object | null | Payment details, if any. |
order.refunds[].transactions[].send_email | boolean | Whether an email was sent. |
Update order — haravan.update_order
Update an order's note, tags, email or addresses. Items and quantities cannot be changed. Look up province_code with list_provinces and the ward code (sent as district_code) with list_wards first.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | yes | yes | com.write_orders |
Input
| Field | Type | Required | Description |
|---|---|---|---|
order_id | integer | yes | Haravan order id. Min 1. |
order | object | yes | Fields to change. |
order.email | string | no | Customer email. |
order.phone | string | no | Customer phone number. |
order.customer | object | no | Customer: {id} of an existing one, or first_name, last_name, phone. |
order.shipping_address | object | no | Delivery address. |
order.shipping_address.name | string | no | Recipient full name. |
order.shipping_address.phone | string | no | Recipient phone number. |
order.shipping_address.address1 | string | no | Street address: house number and street. |
order.shipping_address.province_code | string | no | Province code from list_provinces. |
order.shipping_address.district_code | string | no | New ward code from list_wards (two-level model). |
order.shipping_address.ward_code | string | no | Leave empty under the two-level model. |
order.shipping_address.country_code | string | no | Country code, VN for Vietnam. |
order.billing_address | object | no | Billing address. |
order.billing_address.name | string | no | Recipient full name. |
order.billing_address.phone | string | no | Recipient phone number. |
order.billing_address.address1 | string | no | Street address: house number and street. |
order.billing_address.province_code | string | no | Province code from list_provinces. |
order.billing_address.district_code | string | no | New ward code from list_wards (two-level model). |
order.billing_address.ward_code | string | no | Leave empty under the two-level model. |
order.billing_address.country_code | string | no | Country code, VN for Vietnam. |
order.note | string | no | Order note. |
order.tags | string | no | Comma-separated tags. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
order | object | The order. |
order.id | integer | Order id used by the API. |
order.name | string | Order name shown to the shop and customer, e.g. #100020. |
order.order_number | string | Order number shown to the shop and customer. |
order.number | integer | Position of the order in the shop's order count. |
order.token | string | Unique token of the order. |
order.email | string | null | Customer email. |
order.contact_email | string | null | Contact email of the buyer. |
order.note | string | null | Order note. |
order.note_attributes | array of object | Extra name/value details added to the order. |
order.note_attributes[].name | string | Name. |
order.note_attributes[].value | string | Value. |
order.tags | string | null | Comma-separated tags. |
order.currency | string | Currency code, e.g. VND. |
order.total_price | number | Total of items, discounts, shipping and tax, VND. |
order.subtotal_price | number | Price after discounts, before shipping and tax, VND. |
order.total_line_items_price | number | Sum of line item prices, VND. |
order.total_discounts | number | Total discounts, VND. |
order.total_tax | number | Total tax, VND. |
order.total_weight | number | Total weight in grams. |
order.taxes_included | boolean | null | Whether tax is included in the subtotal. |
order.financial_status | string | Payment status: pending, authorized, partially_paid, paid, partially_refunded, refunded or voided. |
order.fulfillment_status | string | null | Delivery status: fulfilled, partial, restocked, or null/notfulfilled when nothing shipped. |
order.gateway | string | null | Payment gateway name. |
order.gateway_code | string | null | Payment gateway code, e.g. COD. |
order.processing_method | string | null | How the payment was processed: checkout, direct, manual or offsite. |
order.closed_status | string | unclosed or closed. |
order.cancelled_status | string | uncancelled or cancelled. |
order.confirmed_status | string | unconfirmed or confirmed. |
order.cancel_reason | string | null | Why it was cancelled: customer, fraud, inventory, declined or other. |
order.created_at | string | When the order was created (ISO 8601). |
order.updated_at | string | When the order was last updated (ISO 8601). |
order.closed_at | string | null | When the order was closed (ISO 8601). |
order.cancelled_at | string | null | When the order was cancelled (ISO 8601). |
order.confirmed_at | string | null | When the order was confirmed (ISO 8601). |
order.source_name | string | null | Where the order came from, e.g. web or pos. |
order.source | string | null | Channel that created the order. |
order.landing_site | string | null | Page where the buyer entered the shop. |
order.landing_site_ref | string | null | Ref of the landing page. |
order.referring_site | string | null | Site that referred the buyer. |
order.utm_source | string | null | UTM source. |
order.utm_medium | string | null | UTM medium. |
order.utm_campaign | string | null | UTM campaign. |
order.utm_term | string | null | UTM term. |
order.utm_content | string | null | UTM content. |
order.buyer_accepts_marketing | boolean | Whether the buyer accepts marketing. |
order.browser_ip | string | null | Buyer's IP address. |
order.cart_token | string | null | Token of the cart behind the order. |
order.checkout_token | string | null | Token of the checkout behind the order. |
order.user_id | integer | null | Staff who processed the order; 0 if none. |
order.location_id | integer | null | Location where the order was processed. |
order.location_name | string | null | Name of that location. |
order.assigned_location_id | integer | null | Location assigned to handle it. |
order.assigned_location_name | string | null | Name of the assigned location. |
order.assigned_location_at | string | null | When the location was assigned. |
order.client_details | object | Browser the customer used. |
order.client_details.accept_language | string | null | Browser languages. |
order.client_details.browser_ip | string | null | IP address. |
order.client_details.browser_height | integer | null | Screen height in pixels. |
order.client_details.browser_width | integer | null | Screen width in pixels. |
order.client_details.session_hash | string | null | Session hash. |
order.client_details.user_agent | string | null | Browser user agent. |
order.billing_address | object | Billing address. |
order.billing_address.id | integer | Address id. |
order.billing_address.name | string | Full name of the person at this address. |
order.billing_address.first_name | string | First name. |
order.billing_address.last_name | string | Last name. |
order.billing_address.company | string | Company name. |
order.billing_address.phone | string | Phone number. |
order.billing_address.address1 | string | Street address: house number and street. |
order.billing_address.address2 | string | Second address line. |
order.billing_address.city | string | City, town or village. |
order.billing_address.province | string | Province or city name. |
order.billing_address.province_code | string | Province code; matches list_provinces. |
order.billing_address.district | string | Ward name under the two-level model (district name before). |
order.billing_address.district_code | string | Ward code; matches list_wards. |
order.billing_address.ward | string | Ward name under the three-level model; usually empty now. |
order.billing_address.ward_code | string | Ward code under the three-level model; usually empty now. |
order.billing_address.country | string | Country name. |
order.billing_address.country_code | string | Two-letter country code, e.g. VN. |
order.billing_address.zip | string | Postal code. |
order.billing_address.latitude | number | Latitude, if known. |
order.billing_address.longitude | number | Longitude, if known. |
order.billing_address.default | boolean | True when this is the default address. |
order.shipping_address | object | Delivery address. |
order.shipping_address.id | integer | Address id. |
order.shipping_address.name | string | Full name of the person at this address. |
order.shipping_address.first_name | string | First name. |
order.shipping_address.last_name | string | Last name. |
order.shipping_address.company | string | Company name. |
order.shipping_address.phone | string | Phone number. |
order.shipping_address.address1 | string | Street address: house number and street. |
order.shipping_address.address2 | string | Second address line. |
order.shipping_address.city | string | City, town or village. |
order.shipping_address.province | string | Province or city name. |
order.shipping_address.province_code | string | Province code; matches list_provinces. |
order.shipping_address.district | string | Ward name under the two-level model (district name before). |
order.shipping_address.district_code | string | Ward code; matches list_wards. |
order.shipping_address.ward | string | Ward name under the three-level model; usually empty now. |
order.shipping_address.ward_code | string | Ward code under the three-level model; usually empty now. |
order.shipping_address.country | string | Country name. |
order.shipping_address.country_code | string | Two-letter country code, e.g. VN. |
order.shipping_address.zip | string | Postal code. |
order.shipping_address.latitude | number | Latitude, if known. |
order.shipping_address.longitude | number | Longitude, if known. |
order.shipping_address.default | boolean | True when this is the default address. |
order.customer | object | The customer; null for some POS orders. |
order.customer.id | integer | Customer id. |
order.customer.email | string | null | Email. |
order.customer.phone | string | null | Phone number. |
order.customer.first_name | string | null | First name. |
order.customer.last_name | string | null | Last name. |
order.customer.accepts_marketing | boolean | Whether the customer accepts marketing. |
order.customer.tags | string | null | Comma-separated tags. |
order.customer.note | string | null | Note about the customer. |
order.customer.state | string | Account state. |
order.customer.orders_count | integer | Number of orders. |
order.customer.total_spent | number | Total spent, VND. |
order.customer.last_order_id | integer | null | Latest order id. |
order.customer.last_order_name | string | null | Latest order name. |
order.customer.default_address | object | Default address. |
order.customer.default_address.id | integer | Address id. |
order.customer.default_address.name | string | Full name of the person at this address. |
order.customer.default_address.first_name | string | First name. |
order.customer.default_address.last_name | string | Last name. |
order.customer.default_address.company | string | Company name. |
order.customer.default_address.phone | string | Phone number. |
order.customer.default_address.address1 | string | Street address: house number and street. |
order.customer.default_address.address2 | string | Second address line. |
order.customer.default_address.city | string | City, town or village. |
order.customer.default_address.province | string | Province or city name. |
order.customer.default_address.province_code | string | Province code; matches list_provinces. |
order.customer.default_address.district | string | Ward name under the two-level model (district name before). |
order.customer.default_address.district_code | string | Ward code; matches list_wards. |
order.customer.default_address.ward | string | Ward name under the three-level model; usually empty now. |
order.customer.default_address.ward_code | string | Ward code under the three-level model; usually empty now. |
order.customer.default_address.country | string | Country name. |
order.customer.default_address.country_code | string | Two-letter country code, e.g. VN. |
order.customer.default_address.zip | string | Postal code. |
order.customer.default_address.latitude | number | Latitude, if known. |
order.customer.default_address.longitude | number | Longitude, if known. |
order.customer.default_address.default | boolean | True when this is the default address. |
order.customer.addresses | array of object | All addresses. |
order.customer.addresses[].id | integer | Address id. |
order.customer.addresses[].name | string | Full name of the person at this address. |
order.customer.addresses[].first_name | string | First name. |
order.customer.addresses[].last_name | string | Last name. |
order.customer.addresses[].company | string | Company name. |
order.customer.addresses[].phone | string | Phone number. |
order.customer.addresses[].address1 | string | Street address: house number and street. |
order.customer.addresses[].address2 | string | Second address line. |
order.customer.addresses[].city | string | City, town or village. |
order.customer.addresses[].province | string | Province or city name. |
order.customer.addresses[].province_code | string | Province code; matches list_provinces. |
order.customer.addresses[].district | string | Ward name under the two-level model (district name before). |
order.customer.addresses[].district_code | string | Ward code; matches list_wards. |
order.customer.addresses[].ward | string | Ward name under the three-level model; usually empty now. |
order.customer.addresses[].ward_code | string | Ward code under the three-level model; usually empty now. |
order.customer.addresses[].country | string | Country name. |
order.customer.addresses[].country_code | string | Two-letter country code, e.g. VN. |
order.customer.addresses[].zip | string | Postal code. |
order.customer.addresses[].latitude | number | Latitude, if known. |
order.customer.addresses[].longitude | number | Longitude, if known. |
order.customer.addresses[].default | boolean | True when this is the default address. |
order.customer.created_at | string | When it was created (ISO 8601). |
order.customer.updated_at | string | When it was last updated (ISO 8601). |
order.line_items | array of object | Items ordered. |
order.line_items[].id | integer | Line item id. |
order.line_items[].product_id | integer | null | Product id; null when the product was deleted later. |
order.line_items[].variant_id | integer | Variant id. |
order.line_items[].title | string | Product title. |
order.line_items[].variant_title | string | Variant title. |
order.line_items[].name | string | Product and variant name. |
order.line_items[].sku | string | null | SKU of the variant. |
order.line_items[].barcode | string | null | Barcode of the variant. |
order.line_items[].vendor | string | Supplier of the item. |
order.line_items[].type | string | Product type. |
order.line_items[].quantity | integer | Quantity ordered. |
order.line_items[].fulfillable_quantity | integer | Quantity still available to fulfill. |
order.line_items[].price | number | Unit price before discounts, VND. |
order.line_items[].price_original | number | Unit price before any promotion, VND. |
order.line_items[].price_promotion | number | Promotion discount per unit, VND. |
order.line_items[].total_discount | number | Total discount on this line, VND. |
order.line_items[].grams | number | Weight in grams. |
order.line_items[].requires_shipping | boolean | Whether the item needs shipping. |
order.line_items[].taxable | boolean | Whether the item is taxable. |
order.line_items[].gift_card | boolean | Whether the item is a gift card. |
order.line_items[].product_exists | boolean | False when the product has been deleted. |
order.line_items[].fulfillment_service | string | null | Who fulfills the item. |
order.line_items[].fulfillment_status | string | null | Fulfillment status of this line. |
order.line_items[].properties | array | null | Custom properties of the line item. |
order.line_items[].image | object | Variant image. |
order.line_items[].image.src | string | Image URL. |
order.shipping_lines | array of object | Shipping methods used. |
order.shipping_lines[].code | string | null | Shipping method reference. |
order.shipping_lines[].title | string | null | Shipping method title. |
order.shipping_lines[].price | number | Shipping price, VND. |
order.shipping_lines[].source | string | null | Source of the shipping method. |
order.discount_codes | array of object | Discount codes applied. |
order.discount_codes[].code | string | The code. |
order.discount_codes[].amount | number | Discount amount. |
order.discount_codes[].type | string | percentage, shipping or fixed_amount. |
order.fulfillments | array of object | Shipments of the order. |
order.fulfillments[].id | integer | Fulfillment id. |
order.fulfillments[].order_id | integer | Order id. |
order.fulfillments[].status | string | Fulfillment status, e.g. success. |
order.fulfillments[].tracking_company | string | null | Carrier name. |
order.fulfillments[].tracking_company_code | string | null | Carrier code. |
order.fulfillments[].tracking_number | string | null | Tracking number. |
order.fulfillments[].tracking_numbers | array of string | Tracking numbers. |
order.fulfillments[].tracking_url | string | null | Tracking URL. |
order.fulfillments[].tracking_urls | array of string | Tracking URLs. |
order.fulfillments[].carrier_status_code | string | null | Carrier delivery status code. |
order.fulfillments[].carrier_status_name | string | null | Carrier delivery status. |
order.fulfillments[].carrier_cod_status_code | string | null | Cash-on-delivery status code. |
order.fulfillments[].carrier_cod_status_name | string | null | Cash-on-delivery status. |
order.fulfillments[].cod_amount | number | Cash on delivery amount to collect, VND. |
order.fulfillments[].real_shipping_fee | number | Actual shipping fee, VND. |
order.fulfillments[].total_weight | number | Package weight in grams. |
order.fulfillments[].location_id | integer | null | Location the order shipped from. |
order.fulfillments[].notify_customer | boolean | Whether the customer was notified. |
order.fulfillments[].note | string | null | Fulfillment note. |
order.fulfillments[].created_at | string | When it was created (ISO 8601). |
order.fulfillments[].updated_at | string | When it was last updated (ISO 8601). |
order.fulfillments[].line_items | array of object | Items in this fulfillment. |
order.fulfillments[].line_items[].id | integer | Line item id. |
order.fulfillments[].line_items[].product_id | integer | null | Product id; null when the product was deleted later. |
order.fulfillments[].line_items[].variant_id | integer | Variant id. |
order.fulfillments[].line_items[].title | string | Product title. |
order.fulfillments[].line_items[].variant_title | string | Variant title. |
order.fulfillments[].line_items[].name | string | Product and variant name. |
order.fulfillments[].line_items[].sku | string | null | SKU of the variant. |
order.fulfillments[].line_items[].barcode | string | null | Barcode of the variant. |
order.fulfillments[].line_items[].vendor | string | Supplier of the item. |
order.fulfillments[].line_items[].type | string | Product type. |
order.fulfillments[].line_items[].quantity | integer | Quantity ordered. |
order.fulfillments[].line_items[].fulfillable_quantity | integer | Quantity still available to fulfill. |
order.fulfillments[].line_items[].price | number | Unit price before discounts, VND. |
order.fulfillments[].line_items[].price_original | number | Unit price before any promotion, VND. |
order.fulfillments[].line_items[].price_promotion | number | Promotion discount per unit, VND. |
order.fulfillments[].line_items[].total_discount | number | Total discount on this line, VND. |
order.fulfillments[].line_items[].grams | number | Weight in grams. |
order.fulfillments[].line_items[].requires_shipping | boolean | Whether the item needs shipping. |
order.fulfillments[].line_items[].taxable | boolean | Whether the item is taxable. |
order.fulfillments[].line_items[].gift_card | boolean | Whether the item is a gift card. |
order.fulfillments[].line_items[].product_exists | boolean | False when the product has been deleted. |
order.fulfillments[].line_items[].fulfillment_service | string | null | Who fulfills the item. |
order.fulfillments[].line_items[].fulfillment_status | string | null | Fulfillment status of this line. |
order.fulfillments[].line_items[].properties | array | null | Custom properties of the line item. |
order.fulfillments[].line_items[].image | object | Variant image. |
order.fulfillments[].line_items[].image.src | string | Image URL. |
order.transactions | array of object | Payments on the order. |
order.transactions[].id | integer | Transaction id. |
order.transactions[].order_id | integer | Order the transaction belongs to. |
order.transactions[].parent_id | integer | null | Id of the transaction this one follows. |
order.transactions[].kind | string | Kind: pending, authorization, capture, sale, void or refund (case varies). |
order.transactions[].status | string | null | Status: pending, failure, success or error; some shops return a Vietnamese label. |
order.transactions[].amount | number | Amount, VND; negative for refunds. |
order.transactions[].currency | string | null | Currency code, e.g. VND. |
order.transactions[].gateway | string | Name of the payment gateway. |
order.transactions[].is_cod_gateway | boolean | True when the gateway is cash on delivery. |
order.transactions[].authorization | string | null | Authorization code. |
order.transactions[].receipt | string | null | Receipt. |
order.transactions[].test | boolean | True for a test transaction. |
order.transactions[].user_id | integer | null | Staff who recorded it; 0 for the system. |
order.transactions[].location_id | integer | null | Location id. |
order.transactions[].device_id | integer | null | Device id. |
order.transactions[].created_at | string | When it was created (ISO 8601). |
order.transactions[].external_transaction_id | string | null | Id at the payment provider. |
order.transactions[].haravan_transaction_id | string | null | Haravan payment reference. |
order.transactions[].payment_details | object | null | Payment details, if any. |
order.transactions[].send_email | boolean | Whether an email was sent. |
order.refunds | array of object | Refunds on the order. |
order.refunds[].id | integer | Refund id. |
order.refunds[].order_id | integer | Order id. |
order.refunds[].note | string | null | Note attached to the refund. |
order.refunds[].restock | boolean | null | Whether items went back to stock. |
order.refunds[].user_id | integer | null | Staff who made the refund. |
order.refunds[].location_id | integer | null | Location items were returned to. |
order.refunds[].created_at | string | When it was created (ISO 8601). |
order.refunds[].refund_line_items | array of object | Items returned or refunded. |
order.refunds[].refund_line_items[].id | integer | Refund line item id. |
order.refunds[].refund_line_items[].line_item_id | integer | Order line item it refers to. |
order.refunds[].refund_line_items[].quantity | integer | Quantity refunded. |
order.refunds[].refund_line_items[].line_item | object | The order line item. |
order.refunds[].refund_line_items[].line_item.id | integer | Line item id. |
order.refunds[].refund_line_items[].line_item.product_id | integer | null | Product id; null when the product was deleted later. |
order.refunds[].refund_line_items[].line_item.variant_id | integer | Variant id. |
order.refunds[].refund_line_items[].line_item.title | string | Product title. |
order.refunds[].refund_line_items[].line_item.variant_title | string | Variant title. |
order.refunds[].refund_line_items[].line_item.name | string | Product and variant name. |
order.refunds[].refund_line_items[].line_item.sku | string | null | SKU of the variant. |
order.refunds[].refund_line_items[].line_item.barcode | string | null | Barcode of the variant. |
order.refunds[].refund_line_items[].line_item.vendor | string | Supplier of the item. |
order.refunds[].refund_line_items[].line_item.type | string | Product type. |
order.refunds[].refund_line_items[].line_item.quantity | integer | Quantity ordered. |
order.refunds[].refund_line_items[].line_item.fulfillable_quantity | integer | Quantity still available to fulfill. |
order.refunds[].refund_line_items[].line_item.price | number | Unit price before discounts, VND. |
order.refunds[].refund_line_items[].line_item.price_original | number | Unit price before any promotion, VND. |
order.refunds[].refund_line_items[].line_item.price_promotion | number | Promotion discount per unit, VND. |
order.refunds[].refund_line_items[].line_item.total_discount | number | Total discount on this line, VND. |
order.refunds[].refund_line_items[].line_item.grams | number | Weight in grams. |
order.refunds[].refund_line_items[].line_item.requires_shipping | boolean | Whether the item needs shipping. |
order.refunds[].refund_line_items[].line_item.taxable | boolean | Whether the item is taxable. |
order.refunds[].refund_line_items[].line_item.gift_card | boolean | Whether the item is a gift card. |
order.refunds[].refund_line_items[].line_item.product_exists | boolean | False when the product has been deleted. |
order.refunds[].refund_line_items[].line_item.fulfillment_service | string | null | Who fulfills the item. |
order.refunds[].refund_line_items[].line_item.fulfillment_status | string | null | Fulfillment status of this line. |
order.refunds[].refund_line_items[].line_item.properties | array | null | Custom properties of the line item. |
order.refunds[].refund_line_items[].line_item.image | object | Variant image. |
order.refunds[].refund_line_items[].line_item.image.src | string | Image URL. |
order.refunds[].transactions | array of object | Money returned, as refund transactions. |
order.refunds[].transactions[].id | integer | Transaction id. |
order.refunds[].transactions[].order_id | integer | Order the transaction belongs to. |
order.refunds[].transactions[].parent_id | integer | null | Id of the transaction this one follows. |
order.refunds[].transactions[].kind | string | Kind: pending, authorization, capture, sale, void or refund (case varies). |
order.refunds[].transactions[].status | string | null | Status: pending, failure, success or error; some shops return a Vietnamese label. |
order.refunds[].transactions[].amount | number | Amount, VND; negative for refunds. |
order.refunds[].transactions[].currency | string | null | Currency code, e.g. VND. |
order.refunds[].transactions[].gateway | string | Name of the payment gateway. |
order.refunds[].transactions[].is_cod_gateway | boolean | True when the gateway is cash on delivery. |
order.refunds[].transactions[].authorization | string | null | Authorization code. |
order.refunds[].transactions[].receipt | string | null | Receipt. |
order.refunds[].transactions[].test | boolean | True for a test transaction. |
order.refunds[].transactions[].user_id | integer | null | Staff who recorded it; 0 for the system. |
order.refunds[].transactions[].location_id | integer | null | Location id. |
order.refunds[].transactions[].device_id | integer | null | Device id. |
order.refunds[].transactions[].created_at | string | When it was created (ISO 8601). |
order.refunds[].transactions[].external_transaction_id | string | null | Id at the payment provider. |
order.refunds[].transactions[].haravan_transaction_id | string | null | Haravan payment reference. |
order.refunds[].transactions[].payment_details | object | null | Payment details, if any. |
order.refunds[].transactions[].send_email | boolean | Whether an email was sent. |
Confirm order — haravan.confirm_order
Confirm a new order.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | yes | no | com.write_orders |
Input
| Field | Type | Required | Description |
|---|---|---|---|
order_id | integer | yes | Haravan order id. Min 1. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
order | object | The order. |
order.id | integer | Order id used by the API. |
order.name | string | Order name shown to the shop and customer, e.g. #100020. |
order.order_number | string | Order number shown to the shop and customer. |
order.number | integer | Position of the order in the shop's order count. |
order.token | string | Unique token of the order. |
order.email | string | null | Customer email. |
order.contact_email | string | null | Contact email of the buyer. |
order.note | string | null | Order note. |
order.note_attributes | array of object | Extra name/value details added to the order. |
order.note_attributes[].name | string | Name. |
order.note_attributes[].value | string | Value. |
order.tags | string | null | Comma-separated tags. |
order.currency | string | Currency code, e.g. VND. |
order.total_price | number | Total of items, discounts, shipping and tax, VND. |
order.subtotal_price | number | Price after discounts, before shipping and tax, VND. |
order.total_line_items_price | number | Sum of line item prices, VND. |
order.total_discounts | number | Total discounts, VND. |
order.total_tax | number | Total tax, VND. |
order.total_weight | number | Total weight in grams. |
order.taxes_included | boolean | null | Whether tax is included in the subtotal. |
order.financial_status | string | Payment status: pending, authorized, partially_paid, paid, partially_refunded, refunded or voided. |
order.fulfillment_status | string | null | Delivery status: fulfilled, partial, restocked, or null/notfulfilled when nothing shipped. |
order.gateway | string | null | Payment gateway name. |
order.gateway_code | string | null | Payment gateway code, e.g. COD. |
order.processing_method | string | null | How the payment was processed: checkout, direct, manual or offsite. |
order.closed_status | string | unclosed or closed. |
order.cancelled_status | string | uncancelled or cancelled. |
order.confirmed_status | string | unconfirmed or confirmed. |
order.cancel_reason | string | null | Why it was cancelled: customer, fraud, inventory, declined or other. |
order.created_at | string | When the order was created (ISO 8601). |
order.updated_at | string | When the order was last updated (ISO 8601). |
order.closed_at | string | null | When the order was closed (ISO 8601). |
order.cancelled_at | string | null | When the order was cancelled (ISO 8601). |
order.confirmed_at | string | null | When the order was confirmed (ISO 8601). |
order.source_name | string | null | Where the order came from, e.g. web or pos. |
order.source | string | null | Channel that created the order. |
order.landing_site | string | null | Page where the buyer entered the shop. |
order.landing_site_ref | string | null | Ref of the landing page. |
order.referring_site | string | null | Site that referred the buyer. |
order.utm_source | string | null | UTM source. |
order.utm_medium | string | null | UTM medium. |
order.utm_campaign | string | null | UTM campaign. |
order.utm_term | string | null | UTM term. |
order.utm_content | string | null | UTM content. |
order.buyer_accepts_marketing | boolean | Whether the buyer accepts marketing. |
order.browser_ip | string | null | Buyer's IP address. |
order.cart_token | string | null | Token of the cart behind the order. |
order.checkout_token | string | null | Token of the checkout behind the order. |
order.user_id | integer | null | Staff who processed the order; 0 if none. |
order.location_id | integer | null | Location where the order was processed. |
order.location_name | string | null | Name of that location. |
order.assigned_location_id | integer | null | Location assigned to handle it. |
order.assigned_location_name | string | null | Name of the assigned location. |
order.assigned_location_at | string | null | When the location was assigned. |
order.client_details | object | Browser the customer used. |
order.client_details.accept_language | string | null | Browser languages. |
order.client_details.browser_ip | string | null | IP address. |
order.client_details.browser_height | integer | null | Screen height in pixels. |
order.client_details.browser_width | integer | null | Screen width in pixels. |
order.client_details.session_hash | string | null | Session hash. |
order.client_details.user_agent | string | null | Browser user agent. |
order.billing_address | object | Billing address. |
order.billing_address.id | integer | Address id. |
order.billing_address.name | string | Full name of the person at this address. |
order.billing_address.first_name | string | First name. |
order.billing_address.last_name | string | Last name. |
order.billing_address.company | string | Company name. |
order.billing_address.phone | string | Phone number. |
order.billing_address.address1 | string | Street address: house number and street. |
order.billing_address.address2 | string | Second address line. |
order.billing_address.city | string | City, town or village. |
order.billing_address.province | string | Province or city name. |
order.billing_address.province_code | string | Province code; matches list_provinces. |
order.billing_address.district | string | Ward name under the two-level model (district name before). |
order.billing_address.district_code | string | Ward code; matches list_wards. |
order.billing_address.ward | string | Ward name under the three-level model; usually empty now. |
order.billing_address.ward_code | string | Ward code under the three-level model; usually empty now. |
order.billing_address.country | string | Country name. |
order.billing_address.country_code | string | Two-letter country code, e.g. VN. |
order.billing_address.zip | string | Postal code. |
order.billing_address.latitude | number | Latitude, if known. |
order.billing_address.longitude | number | Longitude, if known. |
order.billing_address.default | boolean | True when this is the default address. |
order.shipping_address | object | Delivery address. |
order.shipping_address.id | integer | Address id. |
order.shipping_address.name | string | Full name of the person at this address. |
order.shipping_address.first_name | string | First name. |
order.shipping_address.last_name | string | Last name. |
order.shipping_address.company | string | Company name. |
order.shipping_address.phone | string | Phone number. |
order.shipping_address.address1 | string | Street address: house number and street. |
order.shipping_address.address2 | string | Second address line. |
order.shipping_address.city | string | City, town or village. |
order.shipping_address.province | string | Province or city name. |
order.shipping_address.province_code | string | Province code; matches list_provinces. |
order.shipping_address.district | string | Ward name under the two-level model (district name before). |
order.shipping_address.district_code | string | Ward code; matches list_wards. |
order.shipping_address.ward | string | Ward name under the three-level model; usually empty now. |
order.shipping_address.ward_code | string | Ward code under the three-level model; usually empty now. |
order.shipping_address.country | string | Country name. |
order.shipping_address.country_code | string | Two-letter country code, e.g. VN. |
order.shipping_address.zip | string | Postal code. |
order.shipping_address.latitude | number | Latitude, if known. |
order.shipping_address.longitude | number | Longitude, if known. |
order.shipping_address.default | boolean | True when this is the default address. |
order.customer | object | The customer; null for some POS orders. |
order.customer.id | integer | Customer id. |
order.customer.email | string | null | Email. |
order.customer.phone | string | null | Phone number. |
order.customer.first_name | string | null | First name. |
order.customer.last_name | string | null | Last name. |
order.customer.accepts_marketing | boolean | Whether the customer accepts marketing. |
order.customer.tags | string | null | Comma-separated tags. |
order.customer.note | string | null | Note about the customer. |
order.customer.state | string | Account state. |
order.customer.orders_count | integer | Number of orders. |
order.customer.total_spent | number | Total spent, VND. |
order.customer.last_order_id | integer | null | Latest order id. |
order.customer.last_order_name | string | null | Latest order name. |
order.customer.default_address | object | Default address. |
order.customer.default_address.id | integer | Address id. |
order.customer.default_address.name | string | Full name of the person at this address. |
order.customer.default_address.first_name | string | First name. |
order.customer.default_address.last_name | string | Last name. |
order.customer.default_address.company | string | Company name. |
order.customer.default_address.phone | string | Phone number. |
order.customer.default_address.address1 | string | Street address: house number and street. |
order.customer.default_address.address2 | string | Second address line. |
order.customer.default_address.city | string | City, town or village. |
order.customer.default_address.province | string | Province or city name. |
order.customer.default_address.province_code | string | Province code; matches list_provinces. |
order.customer.default_address.district | string | Ward name under the two-level model (district name before). |
order.customer.default_address.district_code | string | Ward code; matches list_wards. |
order.customer.default_address.ward | string | Ward name under the three-level model; usually empty now. |
order.customer.default_address.ward_code | string | Ward code under the three-level model; usually empty now. |
order.customer.default_address.country | string | Country name. |
order.customer.default_address.country_code | string | Two-letter country code, e.g. VN. |
order.customer.default_address.zip | string | Postal code. |
order.customer.default_address.latitude | number | Latitude, if known. |
order.customer.default_address.longitude | number | Longitude, if known. |
order.customer.default_address.default | boolean | True when this is the default address. |
order.customer.addresses | array of object | All addresses. |
order.customer.addresses[].id | integer | Address id. |
order.customer.addresses[].name | string | Full name of the person at this address. |
order.customer.addresses[].first_name | string | First name. |
order.customer.addresses[].last_name | string | Last name. |
order.customer.addresses[].company | string | Company name. |
order.customer.addresses[].phone | string | Phone number. |
order.customer.addresses[].address1 | string | Street address: house number and street. |
order.customer.addresses[].address2 | string | Second address line. |
order.customer.addresses[].city | string | City, town or village. |
order.customer.addresses[].province | string | Province or city name. |
order.customer.addresses[].province_code | string | Province code; matches list_provinces. |
order.customer.addresses[].district | string | Ward name under the two-level model (district name before). |
order.customer.addresses[].district_code | string | Ward code; matches list_wards. |
order.customer.addresses[].ward | string | Ward name under the three-level model; usually empty now. |
order.customer.addresses[].ward_code | string | Ward code under the three-level model; usually empty now. |
order.customer.addresses[].country | string | Country name. |
order.customer.addresses[].country_code | string | Two-letter country code, e.g. VN. |
order.customer.addresses[].zip | string | Postal code. |
order.customer.addresses[].latitude | number | Latitude, if known. |
order.customer.addresses[].longitude | number | Longitude, if known. |
order.customer.addresses[].default | boolean | True when this is the default address. |
order.customer.created_at | string | When it was created (ISO 8601). |
order.customer.updated_at | string | When it was last updated (ISO 8601). |
order.line_items | array of object | Items ordered. |
order.line_items[].id | integer | Line item id. |
order.line_items[].product_id | integer | null | Product id; null when the product was deleted later. |
order.line_items[].variant_id | integer | Variant id. |
order.line_items[].title | string | Product title. |
order.line_items[].variant_title | string | Variant title. |
order.line_items[].name | string | Product and variant name. |
order.line_items[].sku | string | null | SKU of the variant. |
order.line_items[].barcode | string | null | Barcode of the variant. |
order.line_items[].vendor | string | Supplier of the item. |
order.line_items[].type | string | Product type. |
order.line_items[].quantity | integer | Quantity ordered. |
order.line_items[].fulfillable_quantity | integer | Quantity still available to fulfill. |
order.line_items[].price | number | Unit price before discounts, VND. |
order.line_items[].price_original | number | Unit price before any promotion, VND. |
order.line_items[].price_promotion | number | Promotion discount per unit, VND. |
order.line_items[].total_discount | number | Total discount on this line, VND. |
order.line_items[].grams | number | Weight in grams. |
order.line_items[].requires_shipping | boolean | Whether the item needs shipping. |
order.line_items[].taxable | boolean | Whether the item is taxable. |
order.line_items[].gift_card | boolean | Whether the item is a gift card. |
order.line_items[].product_exists | boolean | False when the product has been deleted. |
order.line_items[].fulfillment_service | string | null | Who fulfills the item. |
order.line_items[].fulfillment_status | string | null | Fulfillment status of this line. |
order.line_items[].properties | array | null | Custom properties of the line item. |
order.line_items[].image | object | Variant image. |
order.line_items[].image.src | string | Image URL. |
order.shipping_lines | array of object | Shipping methods used. |
order.shipping_lines[].code | string | null | Shipping method reference. |
order.shipping_lines[].title | string | null | Shipping method title. |
order.shipping_lines[].price | number | Shipping price, VND. |
order.shipping_lines[].source | string | null | Source of the shipping method. |
order.discount_codes | array of object | Discount codes applied. |
order.discount_codes[].code | string | The code. |
order.discount_codes[].amount | number | Discount amount. |
order.discount_codes[].type | string | percentage, shipping or fixed_amount. |
order.fulfillments | array of object | Shipments of the order. |
order.fulfillments[].id | integer | Fulfillment id. |
order.fulfillments[].order_id | integer | Order id. |
order.fulfillments[].status | string | Fulfillment status, e.g. success. |
order.fulfillments[].tracking_company | string | null | Carrier name. |
order.fulfillments[].tracking_company_code | string | null | Carrier code. |
order.fulfillments[].tracking_number | string | null | Tracking number. |
order.fulfillments[].tracking_numbers | array of string | Tracking numbers. |
order.fulfillments[].tracking_url | string | null | Tracking URL. |
order.fulfillments[].tracking_urls | array of string | Tracking URLs. |
order.fulfillments[].carrier_status_code | string | null | Carrier delivery status code. |
order.fulfillments[].carrier_status_name | string | null | Carrier delivery status. |
order.fulfillments[].carrier_cod_status_code | string | null | Cash-on-delivery status code. |
order.fulfillments[].carrier_cod_status_name | string | null | Cash-on-delivery status. |
order.fulfillments[].cod_amount | number | Cash on delivery amount to collect, VND. |
order.fulfillments[].real_shipping_fee | number | Actual shipping fee, VND. |
order.fulfillments[].total_weight | number | Package weight in grams. |
order.fulfillments[].location_id | integer | null | Location the order shipped from. |
order.fulfillments[].notify_customer | boolean | Whether the customer was notified. |
order.fulfillments[].note | string | null | Fulfillment note. |
order.fulfillments[].created_at | string | When it was created (ISO 8601). |
order.fulfillments[].updated_at | string | When it was last updated (ISO 8601). |
order.fulfillments[].line_items | array of object | Items in this fulfillment. |
order.fulfillments[].line_items[].id | integer | Line item id. |
order.fulfillments[].line_items[].product_id | integer | null | Product id; null when the product was deleted later. |
order.fulfillments[].line_items[].variant_id | integer | Variant id. |
order.fulfillments[].line_items[].title | string | Product title. |
order.fulfillments[].line_items[].variant_title | string | Variant title. |
order.fulfillments[].line_items[].name | string | Product and variant name. |
order.fulfillments[].line_items[].sku | string | null | SKU of the variant. |
order.fulfillments[].line_items[].barcode | string | null | Barcode of the variant. |
order.fulfillments[].line_items[].vendor | string | Supplier of the item. |
order.fulfillments[].line_items[].type | string | Product type. |
order.fulfillments[].line_items[].quantity | integer | Quantity ordered. |
order.fulfillments[].line_items[].fulfillable_quantity | integer | Quantity still available to fulfill. |
order.fulfillments[].line_items[].price | number | Unit price before discounts, VND. |
order.fulfillments[].line_items[].price_original | number | Unit price before any promotion, VND. |
order.fulfillments[].line_items[].price_promotion | number | Promotion discount per unit, VND. |
order.fulfillments[].line_items[].total_discount | number | Total discount on this line, VND. |
order.fulfillments[].line_items[].grams | number | Weight in grams. |
order.fulfillments[].line_items[].requires_shipping | boolean | Whether the item needs shipping. |
order.fulfillments[].line_items[].taxable | boolean | Whether the item is taxable. |
order.fulfillments[].line_items[].gift_card | boolean | Whether the item is a gift card. |
order.fulfillments[].line_items[].product_exists | boolean | False when the product has been deleted. |
order.fulfillments[].line_items[].fulfillment_service | string | null | Who fulfills the item. |
order.fulfillments[].line_items[].fulfillment_status | string | null | Fulfillment status of this line. |
order.fulfillments[].line_items[].properties | array | null | Custom properties of the line item. |
order.fulfillments[].line_items[].image | object | Variant image. |
order.fulfillments[].line_items[].image.src | string | Image URL. |
order.transactions | array of object | Payments on the order. |
order.transactions[].id | integer | Transaction id. |
order.transactions[].order_id | integer | Order the transaction belongs to. |
order.transactions[].parent_id | integer | null | Id of the transaction this one follows. |
order.transactions[].kind | string | Kind: pending, authorization, capture, sale, void or refund (case varies). |
order.transactions[].status | string | null | Status: pending, failure, success or error; some shops return a Vietnamese label. |
order.transactions[].amount | number | Amount, VND; negative for refunds. |
order.transactions[].currency | string | null | Currency code, e.g. VND. |
order.transactions[].gateway | string | Name of the payment gateway. |
order.transactions[].is_cod_gateway | boolean | True when the gateway is cash on delivery. |
order.transactions[].authorization | string | null | Authorization code. |
order.transactions[].receipt | string | null | Receipt. |
order.transactions[].test | boolean | True for a test transaction. |
order.transactions[].user_id | integer | null | Staff who recorded it; 0 for the system. |
order.transactions[].location_id | integer | null | Location id. |
order.transactions[].device_id | integer | null | Device id. |
order.transactions[].created_at | string | When it was created (ISO 8601). |
order.transactions[].external_transaction_id | string | null | Id at the payment provider. |
order.transactions[].haravan_transaction_id | string | null | Haravan payment reference. |
order.transactions[].payment_details | object | null | Payment details, if any. |
order.transactions[].send_email | boolean | Whether an email was sent. |
order.refunds | array of object | Refunds on the order. |
order.refunds[].id | integer | Refund id. |
order.refunds[].order_id | integer | Order id. |
order.refunds[].note | string | null | Note attached to the refund. |
order.refunds[].restock | boolean | null | Whether items went back to stock. |
order.refunds[].user_id | integer | null | Staff who made the refund. |
order.refunds[].location_id | integer | null | Location items were returned to. |
order.refunds[].created_at | string | When it was created (ISO 8601). |
order.refunds[].refund_line_items | array of object | Items returned or refunded. |
order.refunds[].refund_line_items[].id | integer | Refund line item id. |
order.refunds[].refund_line_items[].line_item_id | integer | Order line item it refers to. |
order.refunds[].refund_line_items[].quantity | integer | Quantity refunded. |
order.refunds[].refund_line_items[].line_item | object | The order line item. |
order.refunds[].refund_line_items[].line_item.id | integer | Line item id. |
order.refunds[].refund_line_items[].line_item.product_id | integer | null | Product id; null when the product was deleted later. |
order.refunds[].refund_line_items[].line_item.variant_id | integer | Variant id. |
order.refunds[].refund_line_items[].line_item.title | string | Product title. |
order.refunds[].refund_line_items[].line_item.variant_title | string | Variant title. |
order.refunds[].refund_line_items[].line_item.name | string | Product and variant name. |
order.refunds[].refund_line_items[].line_item.sku | string | null | SKU of the variant. |
order.refunds[].refund_line_items[].line_item.barcode | string | null | Barcode of the variant. |
order.refunds[].refund_line_items[].line_item.vendor | string | Supplier of the item. |
order.refunds[].refund_line_items[].line_item.type | string | Product type. |
order.refunds[].refund_line_items[].line_item.quantity | integer | Quantity ordered. |
order.refunds[].refund_line_items[].line_item.fulfillable_quantity | integer | Quantity still available to fulfill. |
order.refunds[].refund_line_items[].line_item.price | number | Unit price before discounts, VND. |
order.refunds[].refund_line_items[].line_item.price_original | number | Unit price before any promotion, VND. |
order.refunds[].refund_line_items[].line_item.price_promotion | number | Promotion discount per unit, VND. |
order.refunds[].refund_line_items[].line_item.total_discount | number | Total discount on this line, VND. |
order.refunds[].refund_line_items[].line_item.grams | number | Weight in grams. |
order.refunds[].refund_line_items[].line_item.requires_shipping | boolean | Whether the item needs shipping. |
order.refunds[].refund_line_items[].line_item.taxable | boolean | Whether the item is taxable. |
order.refunds[].refund_line_items[].line_item.gift_card | boolean | Whether the item is a gift card. |
order.refunds[].refund_line_items[].line_item.product_exists | boolean | False when the product has been deleted. |
order.refunds[].refund_line_items[].line_item.fulfillment_service | string | null | Who fulfills the item. |
order.refunds[].refund_line_items[].line_item.fulfillment_status | string | null | Fulfillment status of this line. |
order.refunds[].refund_line_items[].line_item.properties | array | null | Custom properties of the line item. |
order.refunds[].refund_line_items[].line_item.image | object | Variant image. |
order.refunds[].refund_line_items[].line_item.image.src | string | Image URL. |
order.refunds[].transactions | array of object | Money returned, as refund transactions. |
order.refunds[].transactions[].id | integer | Transaction id. |
order.refunds[].transactions[].order_id | integer | Order the transaction belongs to. |
order.refunds[].transactions[].parent_id | integer | null | Id of the transaction this one follows. |
order.refunds[].transactions[].kind | string | Kind: pending, authorization, capture, sale, void or refund (case varies). |
order.refunds[].transactions[].status | string | null | Status: pending, failure, success or error; some shops return a Vietnamese label. |
order.refunds[].transactions[].amount | number | Amount, VND; negative for refunds. |
order.refunds[].transactions[].currency | string | null | Currency code, e.g. VND. |
order.refunds[].transactions[].gateway | string | Name of the payment gateway. |
order.refunds[].transactions[].is_cod_gateway | boolean | True when the gateway is cash on delivery. |
order.refunds[].transactions[].authorization | string | null | Authorization code. |
order.refunds[].transactions[].receipt | string | null | Receipt. |
order.refunds[].transactions[].test | boolean | True for a test transaction. |
order.refunds[].transactions[].user_id | integer | null | Staff who recorded it; 0 for the system. |
order.refunds[].transactions[].location_id | integer | null | Location id. |
order.refunds[].transactions[].device_id | integer | null | Device id. |
order.refunds[].transactions[].created_at | string | When it was created (ISO 8601). |
order.refunds[].transactions[].external_transaction_id | string | null | Id at the payment provider. |
order.refunds[].transactions[].haravan_transaction_id | string | null | Haravan payment reference. |
order.refunds[].transactions[].payment_details | object | null | Payment details, if any. |
order.refunds[].transactions[].send_email | boolean | Whether an email was sent. |
Close order — haravan.close_order
Close (archive) a completed order.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | yes | no | com.write_orders |
Input
| Field | Type | Required | Description |
|---|---|---|---|
order_id | integer | yes | Haravan order id. Min 1. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
order | object | The order. |
order.id | integer | Order id used by the API. |
order.name | string | Order name shown to the shop and customer, e.g. #100020. |
order.order_number | string | Order number shown to the shop and customer. |
order.number | integer | Position of the order in the shop's order count. |
order.token | string | Unique token of the order. |
order.email | string | null | Customer email. |
order.contact_email | string | null | Contact email of the buyer. |
order.note | string | null | Order note. |
order.note_attributes | array of object | Extra name/value details added to the order. |
order.note_attributes[].name | string | Name. |
order.note_attributes[].value | string | Value. |
order.tags | string | null | Comma-separated tags. |
order.currency | string | Currency code, e.g. VND. |
order.total_price | number | Total of items, discounts, shipping and tax, VND. |
order.subtotal_price | number | Price after discounts, before shipping and tax, VND. |
order.total_line_items_price | number | Sum of line item prices, VND. |
order.total_discounts | number | Total discounts, VND. |
order.total_tax | number | Total tax, VND. |
order.total_weight | number | Total weight in grams. |
order.taxes_included | boolean | null | Whether tax is included in the subtotal. |
order.financial_status | string | Payment status: pending, authorized, partially_paid, paid, partially_refunded, refunded or voided. |
order.fulfillment_status | string | null | Delivery status: fulfilled, partial, restocked, or null/notfulfilled when nothing shipped. |
order.gateway | string | null | Payment gateway name. |
order.gateway_code | string | null | Payment gateway code, e.g. COD. |
order.processing_method | string | null | How the payment was processed: checkout, direct, manual or offsite. |
order.closed_status | string | unclosed or closed. |
order.cancelled_status | string | uncancelled or cancelled. |
order.confirmed_status | string | unconfirmed or confirmed. |
order.cancel_reason | string | null | Why it was cancelled: customer, fraud, inventory, declined or other. |
order.created_at | string | When the order was created (ISO 8601). |
order.updated_at | string | When the order was last updated (ISO 8601). |
order.closed_at | string | null | When the order was closed (ISO 8601). |
order.cancelled_at | string | null | When the order was cancelled (ISO 8601). |
order.confirmed_at | string | null | When the order was confirmed (ISO 8601). |
order.source_name | string | null | Where the order came from, e.g. web or pos. |
order.source | string | null | Channel that created the order. |
order.landing_site | string | null | Page where the buyer entered the shop. |
order.landing_site_ref | string | null | Ref of the landing page. |
order.referring_site | string | null | Site that referred the buyer. |
order.utm_source | string | null | UTM source. |
order.utm_medium | string | null | UTM medium. |
order.utm_campaign | string | null | UTM campaign. |
order.utm_term | string | null | UTM term. |
order.utm_content | string | null | UTM content. |
order.buyer_accepts_marketing | boolean | Whether the buyer accepts marketing. |
order.browser_ip | string | null | Buyer's IP address. |
order.cart_token | string | null | Token of the cart behind the order. |
order.checkout_token | string | null | Token of the checkout behind the order. |
order.user_id | integer | null | Staff who processed the order; 0 if none. |
order.location_id | integer | null | Location where the order was processed. |
order.location_name | string | null | Name of that location. |
order.assigned_location_id | integer | null | Location assigned to handle it. |
order.assigned_location_name | string | null | Name of the assigned location. |
order.assigned_location_at | string | null | When the location was assigned. |
order.client_details | object | Browser the customer used. |
order.client_details.accept_language | string | null | Browser languages. |
order.client_details.browser_ip | string | null | IP address. |
order.client_details.browser_height | integer | null | Screen height in pixels. |
order.client_details.browser_width | integer | null | Screen width in pixels. |
order.client_details.session_hash | string | null | Session hash. |
order.client_details.user_agent | string | null | Browser user agent. |
order.billing_address | object | Billing address. |
order.billing_address.id | integer | Address id. |
order.billing_address.name | string | Full name of the person at this address. |
order.billing_address.first_name | string | First name. |
order.billing_address.last_name | string | Last name. |
order.billing_address.company | string | Company name. |
order.billing_address.phone | string | Phone number. |
order.billing_address.address1 | string | Street address: house number and street. |
order.billing_address.address2 | string | Second address line. |
order.billing_address.city | string | City, town or village. |
order.billing_address.province | string | Province or city name. |
order.billing_address.province_code | string | Province code; matches list_provinces. |
order.billing_address.district | string | Ward name under the two-level model (district name before). |
order.billing_address.district_code | string | Ward code; matches list_wards. |
order.billing_address.ward | string | Ward name under the three-level model; usually empty now. |
order.billing_address.ward_code | string | Ward code under the three-level model; usually empty now. |
order.billing_address.country | string | Country name. |
order.billing_address.country_code | string | Two-letter country code, e.g. VN. |
order.billing_address.zip | string | Postal code. |
order.billing_address.latitude | number | Latitude, if known. |
order.billing_address.longitude | number | Longitude, if known. |
order.billing_address.default | boolean | True when this is the default address. |
order.shipping_address | object | Delivery address. |
order.shipping_address.id | integer | Address id. |
order.shipping_address.name | string | Full name of the person at this address. |
order.shipping_address.first_name | string | First name. |
order.shipping_address.last_name | string | Last name. |
order.shipping_address.company | string | Company name. |
order.shipping_address.phone | string | Phone number. |
order.shipping_address.address1 | string | Street address: house number and street. |
order.shipping_address.address2 | string | Second address line. |
order.shipping_address.city | string | City, town or village. |
order.shipping_address.province | string | Province or city name. |
order.shipping_address.province_code | string | Province code; matches list_provinces. |
order.shipping_address.district | string | Ward name under the two-level model (district name before). |
order.shipping_address.district_code | string | Ward code; matches list_wards. |
order.shipping_address.ward | string | Ward name under the three-level model; usually empty now. |
order.shipping_address.ward_code | string | Ward code under the three-level model; usually empty now. |
order.shipping_address.country | string | Country name. |
order.shipping_address.country_code | string | Two-letter country code, e.g. VN. |
order.shipping_address.zip | string | Postal code. |
order.shipping_address.latitude | number | Latitude, if known. |
order.shipping_address.longitude | number | Longitude, if known. |
order.shipping_address.default | boolean | True when this is the default address. |
order.customer | object | The customer; null for some POS orders. |
order.customer.id | integer | Customer id. |
order.customer.email | string | null | Email. |
order.customer.phone | string | null | Phone number. |
order.customer.first_name | string | null | First name. |
order.customer.last_name | string | null | Last name. |
order.customer.accepts_marketing | boolean | Whether the customer accepts marketing. |
order.customer.tags | string | null | Comma-separated tags. |
order.customer.note | string | null | Note about the customer. |
order.customer.state | string | Account state. |
order.customer.orders_count | integer | Number of orders. |
order.customer.total_spent | number | Total spent, VND. |
order.customer.last_order_id | integer | null | Latest order id. |
order.customer.last_order_name | string | null | Latest order name. |
order.customer.default_address | object | Default address. |
order.customer.default_address.id | integer | Address id. |
order.customer.default_address.name | string | Full name of the person at this address. |
order.customer.default_address.first_name | string | First name. |
order.customer.default_address.last_name | string | Last name. |
order.customer.default_address.company | string | Company name. |
order.customer.default_address.phone | string | Phone number. |
order.customer.default_address.address1 | string | Street address: house number and street. |
order.customer.default_address.address2 | string | Second address line. |
order.customer.default_address.city | string | City, town or village. |
order.customer.default_address.province | string | Province or city name. |
order.customer.default_address.province_code | string | Province code; matches list_provinces. |
order.customer.default_address.district | string | Ward name under the two-level model (district name before). |
order.customer.default_address.district_code | string | Ward code; matches list_wards. |
order.customer.default_address.ward | string | Ward name under the three-level model; usually empty now. |
order.customer.default_address.ward_code | string | Ward code under the three-level model; usually empty now. |
order.customer.default_address.country | string | Country name. |
order.customer.default_address.country_code | string | Two-letter country code, e.g. VN. |
order.customer.default_address.zip | string | Postal code. |
order.customer.default_address.latitude | number | Latitude, if known. |
order.customer.default_address.longitude | number | Longitude, if known. |
order.customer.default_address.default | boolean | True when this is the default address. |
order.customer.addresses | array of object | All addresses. |
order.customer.addresses[].id | integer | Address id. |
order.customer.addresses[].name | string | Full name of the person at this address. |
order.customer.addresses[].first_name | string | First name. |
order.customer.addresses[].last_name | string | Last name. |
order.customer.addresses[].company | string | Company name. |
order.customer.addresses[].phone | string | Phone number. |
order.customer.addresses[].address1 | string | Street address: house number and street. |
order.customer.addresses[].address2 | string | Second address line. |
order.customer.addresses[].city | string | City, town or village. |
order.customer.addresses[].province | string | Province or city name. |
order.customer.addresses[].province_code | string | Province code; matches list_provinces. |
order.customer.addresses[].district | string | Ward name under the two-level model (district name before). |
order.customer.addresses[].district_code | string | Ward code; matches list_wards. |
order.customer.addresses[].ward | string | Ward name under the three-level model; usually empty now. |
order.customer.addresses[].ward_code | string | Ward code under the three-level model; usually empty now. |
order.customer.addresses[].country | string | Country name. |
order.customer.addresses[].country_code | string | Two-letter country code, e.g. VN. |
order.customer.addresses[].zip | string | Postal code. |
order.customer.addresses[].latitude | number | Latitude, if known. |
order.customer.addresses[].longitude | number | Longitude, if known. |
order.customer.addresses[].default | boolean | True when this is the default address. |
order.customer.created_at | string | When it was created (ISO 8601). |
order.customer.updated_at | string | When it was last updated (ISO 8601). |
order.line_items | array of object | Items ordered. |
order.line_items[].id | integer | Line item id. |
order.line_items[].product_id | integer | null | Product id; null when the product was deleted later. |
order.line_items[].variant_id | integer | Variant id. |
order.line_items[].title | string | Product title. |
order.line_items[].variant_title | string | Variant title. |
order.line_items[].name | string | Product and variant name. |
order.line_items[].sku | string | null | SKU of the variant. |
order.line_items[].barcode | string | null | Barcode of the variant. |
order.line_items[].vendor | string | Supplier of the item. |
order.line_items[].type | string | Product type. |
order.line_items[].quantity | integer | Quantity ordered. |
order.line_items[].fulfillable_quantity | integer | Quantity still available to fulfill. |
order.line_items[].price | number | Unit price before discounts, VND. |
order.line_items[].price_original | number | Unit price before any promotion, VND. |
order.line_items[].price_promotion | number | Promotion discount per unit, VND. |
order.line_items[].total_discount | number | Total discount on this line, VND. |
order.line_items[].grams | number | Weight in grams. |
order.line_items[].requires_shipping | boolean | Whether the item needs shipping. |
order.line_items[].taxable | boolean | Whether the item is taxable. |
order.line_items[].gift_card | boolean | Whether the item is a gift card. |
order.line_items[].product_exists | boolean | False when the product has been deleted. |
order.line_items[].fulfillment_service | string | null | Who fulfills the item. |
order.line_items[].fulfillment_status | string | null | Fulfillment status of this line. |
order.line_items[].properties | array | null | Custom properties of the line item. |
order.line_items[].image | object | Variant image. |
order.line_items[].image.src | string | Image URL. |
order.shipping_lines | array of object | Shipping methods used. |
order.shipping_lines[].code | string | null | Shipping method reference. |
order.shipping_lines[].title | string | null | Shipping method title. |
order.shipping_lines[].price | number | Shipping price, VND. |
order.shipping_lines[].source | string | null | Source of the shipping method. |
order.discount_codes | array of object | Discount codes applied. |
order.discount_codes[].code | string | The code. |
order.discount_codes[].amount | number | Discount amount. |
order.discount_codes[].type | string | percentage, shipping or fixed_amount. |
order.fulfillments | array of object | Shipments of the order. |
order.fulfillments[].id | integer | Fulfillment id. |
order.fulfillments[].order_id | integer | Order id. |
order.fulfillments[].status | string | Fulfillment status, e.g. success. |
order.fulfillments[].tracking_company | string | null | Carrier name. |
order.fulfillments[].tracking_company_code | string | null | Carrier code. |
order.fulfillments[].tracking_number | string | null | Tracking number. |
order.fulfillments[].tracking_numbers | array of string | Tracking numbers. |
order.fulfillments[].tracking_url | string | null | Tracking URL. |
order.fulfillments[].tracking_urls | array of string | Tracking URLs. |
order.fulfillments[].carrier_status_code | string | null | Carrier delivery status code. |
order.fulfillments[].carrier_status_name | string | null | Carrier delivery status. |
order.fulfillments[].carrier_cod_status_code | string | null | Cash-on-delivery status code. |
order.fulfillments[].carrier_cod_status_name | string | null | Cash-on-delivery status. |
order.fulfillments[].cod_amount | number | Cash on delivery amount to collect, VND. |
order.fulfillments[].real_shipping_fee | number | Actual shipping fee, VND. |
order.fulfillments[].total_weight | number | Package weight in grams. |
order.fulfillments[].location_id | integer | null | Location the order shipped from. |
order.fulfillments[].notify_customer | boolean | Whether the customer was notified. |
order.fulfillments[].note | string | null | Fulfillment note. |
order.fulfillments[].created_at | string | When it was created (ISO 8601). |
order.fulfillments[].updated_at | string | When it was last updated (ISO 8601). |
order.fulfillments[].line_items | array of object | Items in this fulfillment. |
order.fulfillments[].line_items[].id | integer | Line item id. |
order.fulfillments[].line_items[].product_id | integer | null | Product id; null when the product was deleted later. |
order.fulfillments[].line_items[].variant_id | integer | Variant id. |
order.fulfillments[].line_items[].title | string | Product title. |
order.fulfillments[].line_items[].variant_title | string | Variant title. |
order.fulfillments[].line_items[].name | string | Product and variant name. |
order.fulfillments[].line_items[].sku | string | null | SKU of the variant. |
order.fulfillments[].line_items[].barcode | string | null | Barcode of the variant. |
order.fulfillments[].line_items[].vendor | string | Supplier of the item. |
order.fulfillments[].line_items[].type | string | Product type. |
order.fulfillments[].line_items[].quantity | integer | Quantity ordered. |
order.fulfillments[].line_items[].fulfillable_quantity | integer | Quantity still available to fulfill. |
order.fulfillments[].line_items[].price | number | Unit price before discounts, VND. |
order.fulfillments[].line_items[].price_original | number | Unit price before any promotion, VND. |
order.fulfillments[].line_items[].price_promotion | number | Promotion discount per unit, VND. |
order.fulfillments[].line_items[].total_discount | number | Total discount on this line, VND. |
order.fulfillments[].line_items[].grams | number | Weight in grams. |
order.fulfillments[].line_items[].requires_shipping | boolean | Whether the item needs shipping. |
order.fulfillments[].line_items[].taxable | boolean | Whether the item is taxable. |
order.fulfillments[].line_items[].gift_card | boolean | Whether the item is a gift card. |
order.fulfillments[].line_items[].product_exists | boolean | False when the product has been deleted. |
order.fulfillments[].line_items[].fulfillment_service | string | null | Who fulfills the item. |
order.fulfillments[].line_items[].fulfillment_status | string | null | Fulfillment status of this line. |
order.fulfillments[].line_items[].properties | array | null | Custom properties of the line item. |
order.fulfillments[].line_items[].image | object | Variant image. |
order.fulfillments[].line_items[].image.src | string | Image URL. |
order.transactions | array of object | Payments on the order. |
order.transactions[].id | integer | Transaction id. |
order.transactions[].order_id | integer | Order the transaction belongs to. |
order.transactions[].parent_id | integer | null | Id of the transaction this one follows. |
order.transactions[].kind | string | Kind: pending, authorization, capture, sale, void or refund (case varies). |
order.transactions[].status | string | null | Status: pending, failure, success or error; some shops return a Vietnamese label. |
order.transactions[].amount | number | Amount, VND; negative for refunds. |
order.transactions[].currency | string | null | Currency code, e.g. VND. |
order.transactions[].gateway | string | Name of the payment gateway. |
order.transactions[].is_cod_gateway | boolean | True when the gateway is cash on delivery. |
order.transactions[].authorization | string | null | Authorization code. |
order.transactions[].receipt | string | null | Receipt. |
order.transactions[].test | boolean | True for a test transaction. |
order.transactions[].user_id | integer | null | Staff who recorded it; 0 for the system. |
order.transactions[].location_id | integer | null | Location id. |
order.transactions[].device_id | integer | null | Device id. |
order.transactions[].created_at | string | When it was created (ISO 8601). |
order.transactions[].external_transaction_id | string | null | Id at the payment provider. |
order.transactions[].haravan_transaction_id | string | null | Haravan payment reference. |
order.transactions[].payment_details | object | null | Payment details, if any. |
order.transactions[].send_email | boolean | Whether an email was sent. |
order.refunds | array of object | Refunds on the order. |
order.refunds[].id | integer | Refund id. |
order.refunds[].order_id | integer | Order id. |
order.refunds[].note | string | null | Note attached to the refund. |
order.refunds[].restock | boolean | null | Whether items went back to stock. |
order.refunds[].user_id | integer | null | Staff who made the refund. |
order.refunds[].location_id | integer | null | Location items were returned to. |
order.refunds[].created_at | string | When it was created (ISO 8601). |
order.refunds[].refund_line_items | array of object | Items returned or refunded. |
order.refunds[].refund_line_items[].id | integer | Refund line item id. |
order.refunds[].refund_line_items[].line_item_id | integer | Order line item it refers to. |
order.refunds[].refund_line_items[].quantity | integer | Quantity refunded. |
order.refunds[].refund_line_items[].line_item | object | The order line item. |
order.refunds[].refund_line_items[].line_item.id | integer | Line item id. |
order.refunds[].refund_line_items[].line_item.product_id | integer | null | Product id; null when the product was deleted later. |
order.refunds[].refund_line_items[].line_item.variant_id | integer | Variant id. |
order.refunds[].refund_line_items[].line_item.title | string | Product title. |
order.refunds[].refund_line_items[].line_item.variant_title | string | Variant title. |
order.refunds[].refund_line_items[].line_item.name | string | Product and variant name. |
order.refunds[].refund_line_items[].line_item.sku | string | null | SKU of the variant. |
order.refunds[].refund_line_items[].line_item.barcode | string | null | Barcode of the variant. |
order.refunds[].refund_line_items[].line_item.vendor | string | Supplier of the item. |
order.refunds[].refund_line_items[].line_item.type | string | Product type. |
order.refunds[].refund_line_items[].line_item.quantity | integer | Quantity ordered. |
order.refunds[].refund_line_items[].line_item.fulfillable_quantity | integer | Quantity still available to fulfill. |
order.refunds[].refund_line_items[].line_item.price | number | Unit price before discounts, VND. |
order.refunds[].refund_line_items[].line_item.price_original | number | Unit price before any promotion, VND. |
order.refunds[].refund_line_items[].line_item.price_promotion | number | Promotion discount per unit, VND. |
order.refunds[].refund_line_items[].line_item.total_discount | number | Total discount on this line, VND. |
order.refunds[].refund_line_items[].line_item.grams | number | Weight in grams. |
order.refunds[].refund_line_items[].line_item.requires_shipping | boolean | Whether the item needs shipping. |
order.refunds[].refund_line_items[].line_item.taxable | boolean | Whether the item is taxable. |
order.refunds[].refund_line_items[].line_item.gift_card | boolean | Whether the item is a gift card. |
order.refunds[].refund_line_items[].line_item.product_exists | boolean | False when the product has been deleted. |
order.refunds[].refund_line_items[].line_item.fulfillment_service | string | null | Who fulfills the item. |
order.refunds[].refund_line_items[].line_item.fulfillment_status | string | null | Fulfillment status of this line. |
order.refunds[].refund_line_items[].line_item.properties | array | null | Custom properties of the line item. |
order.refunds[].refund_line_items[].line_item.image | object | Variant image. |
order.refunds[].refund_line_items[].line_item.image.src | string | Image URL. |
order.refunds[].transactions | array of object | Money returned, as refund transactions. |
order.refunds[].transactions[].id | integer | Transaction id. |
order.refunds[].transactions[].order_id | integer | Order the transaction belongs to. |
order.refunds[].transactions[].parent_id | integer | null | Id of the transaction this one follows. |
order.refunds[].transactions[].kind | string | Kind: pending, authorization, capture, sale, void or refund (case varies). |
order.refunds[].transactions[].status | string | null | Status: pending, failure, success or error; some shops return a Vietnamese label. |
order.refunds[].transactions[].amount | number | Amount, VND; negative for refunds. |
order.refunds[].transactions[].currency | string | null | Currency code, e.g. VND. |
order.refunds[].transactions[].gateway | string | Name of the payment gateway. |
order.refunds[].transactions[].is_cod_gateway | boolean | True when the gateway is cash on delivery. |
order.refunds[].transactions[].authorization | string | null | Authorization code. |
order.refunds[].transactions[].receipt | string | null | Receipt. |
order.refunds[].transactions[].test | boolean | True for a test transaction. |
order.refunds[].transactions[].user_id | integer | null | Staff who recorded it; 0 for the system. |
order.refunds[].transactions[].location_id | integer | null | Location id. |
order.refunds[].transactions[].device_id | integer | null | Device id. |
order.refunds[].transactions[].created_at | string | When it was created (ISO 8601). |
order.refunds[].transactions[].external_transaction_id | string | null | Id at the payment provider. |
order.refunds[].transactions[].haravan_transaction_id | string | null | Haravan payment reference. |
order.refunds[].transactions[].payment_details | object | null | Payment details, if any. |
order.refunds[].transactions[].send_email | boolean | Whether an email was sent. |
Reopen order — haravan.open_order
Reopen a closed order.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | yes | no | com.write_orders |
Input
| Field | Type | Required | Description |
|---|---|---|---|
order_id | integer | yes | Haravan order id. Min 1. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
order | object | The order. |
order.id | integer | Order id used by the API. |
order.name | string | Order name shown to the shop and customer, e.g. #100020. |
order.order_number | string | Order number shown to the shop and customer. |
order.number | integer | Position of the order in the shop's order count. |
order.token | string | Unique token of the order. |
order.email | string | null | Customer email. |
order.contact_email | string | null | Contact email of the buyer. |
order.note | string | null | Order note. |
order.note_attributes | array of object | Extra name/value details added to the order. |
order.note_attributes[].name | string | Name. |
order.note_attributes[].value | string | Value. |
order.tags | string | null | Comma-separated tags. |
order.currency | string | Currency code, e.g. VND. |
order.total_price | number | Total of items, discounts, shipping and tax, VND. |
order.subtotal_price | number | Price after discounts, before shipping and tax, VND. |
order.total_line_items_price | number | Sum of line item prices, VND. |
order.total_discounts | number | Total discounts, VND. |
order.total_tax | number | Total tax, VND. |
order.total_weight | number | Total weight in grams. |
order.taxes_included | boolean | null | Whether tax is included in the subtotal. |
order.financial_status | string | Payment status: pending, authorized, partially_paid, paid, partially_refunded, refunded or voided. |
order.fulfillment_status | string | null | Delivery status: fulfilled, partial, restocked, or null/notfulfilled when nothing shipped. |
order.gateway | string | null | Payment gateway name. |
order.gateway_code | string | null | Payment gateway code, e.g. COD. |
order.processing_method | string | null | How the payment was processed: checkout, direct, manual or offsite. |
order.closed_status | string | unclosed or closed. |
order.cancelled_status | string | uncancelled or cancelled. |
order.confirmed_status | string | unconfirmed or confirmed. |
order.cancel_reason | string | null | Why it was cancelled: customer, fraud, inventory, declined or other. |
order.created_at | string | When the order was created (ISO 8601). |
order.updated_at | string | When the order was last updated (ISO 8601). |
order.closed_at | string | null | When the order was closed (ISO 8601). |
order.cancelled_at | string | null | When the order was cancelled (ISO 8601). |
order.confirmed_at | string | null | When the order was confirmed (ISO 8601). |
order.source_name | string | null | Where the order came from, e.g. web or pos. |
order.source | string | null | Channel that created the order. |
order.landing_site | string | null | Page where the buyer entered the shop. |
order.landing_site_ref | string | null | Ref of the landing page. |
order.referring_site | string | null | Site that referred the buyer. |
order.utm_source | string | null | UTM source. |
order.utm_medium | string | null | UTM medium. |
order.utm_campaign | string | null | UTM campaign. |
order.utm_term | string | null | UTM term. |
order.utm_content | string | null | UTM content. |
order.buyer_accepts_marketing | boolean | Whether the buyer accepts marketing. |
order.browser_ip | string | null | Buyer's IP address. |
order.cart_token | string | null | Token of the cart behind the order. |
order.checkout_token | string | null | Token of the checkout behind the order. |
order.user_id | integer | null | Staff who processed the order; 0 if none. |
order.location_id | integer | null | Location where the order was processed. |
order.location_name | string | null | Name of that location. |
order.assigned_location_id | integer | null | Location assigned to handle it. |
order.assigned_location_name | string | null | Name of the assigned location. |
order.assigned_location_at | string | null | When the location was assigned. |
order.client_details | object | Browser the customer used. |
order.client_details.accept_language | string | null | Browser languages. |
order.client_details.browser_ip | string | null | IP address. |
order.client_details.browser_height | integer | null | Screen height in pixels. |
order.client_details.browser_width | integer | null | Screen width in pixels. |
order.client_details.session_hash | string | null | Session hash. |
order.client_details.user_agent | string | null | Browser user agent. |
order.billing_address | object | Billing address. |
order.billing_address.id | integer | Address id. |
order.billing_address.name | string | Full name of the person at this address. |
order.billing_address.first_name | string | First name. |
order.billing_address.last_name | string | Last name. |
order.billing_address.company | string | Company name. |
order.billing_address.phone | string | Phone number. |
order.billing_address.address1 | string | Street address: house number and street. |
order.billing_address.address2 | string | Second address line. |
order.billing_address.city | string | City, town or village. |
order.billing_address.province | string | Province or city name. |
order.billing_address.province_code | string | Province code; matches list_provinces. |
order.billing_address.district | string | Ward name under the two-level model (district name before). |
order.billing_address.district_code | string | Ward code; matches list_wards. |
order.billing_address.ward | string | Ward name under the three-level model; usually empty now. |
order.billing_address.ward_code | string | Ward code under the three-level model; usually empty now. |
order.billing_address.country | string | Country name. |
order.billing_address.country_code | string | Two-letter country code, e.g. VN. |
order.billing_address.zip | string | Postal code. |
order.billing_address.latitude | number | Latitude, if known. |
order.billing_address.longitude | number | Longitude, if known. |
order.billing_address.default | boolean | True when this is the default address. |
order.shipping_address | object | Delivery address. |
order.shipping_address.id | integer | Address id. |
order.shipping_address.name | string | Full name of the person at this address. |
order.shipping_address.first_name | string | First name. |
order.shipping_address.last_name | string | Last name. |
order.shipping_address.company | string | Company name. |
order.shipping_address.phone | string | Phone number. |
order.shipping_address.address1 | string | Street address: house number and street. |
order.shipping_address.address2 | string | Second address line. |
order.shipping_address.city | string | City, town or village. |
order.shipping_address.province | string | Province or city name. |
order.shipping_address.province_code | string | Province code; matches list_provinces. |
order.shipping_address.district | string | Ward name under the two-level model (district name before). |
order.shipping_address.district_code | string | Ward code; matches list_wards. |
order.shipping_address.ward | string | Ward name under the three-level model; usually empty now. |
order.shipping_address.ward_code | string | Ward code under the three-level model; usually empty now. |
order.shipping_address.country | string | Country name. |
order.shipping_address.country_code | string | Two-letter country code, e.g. VN. |
order.shipping_address.zip | string | Postal code. |
order.shipping_address.latitude | number | Latitude, if known. |
order.shipping_address.longitude | number | Longitude, if known. |
order.shipping_address.default | boolean | True when this is the default address. |
order.customer | object | The customer; null for some POS orders. |
order.customer.id | integer | Customer id. |
order.customer.email | string | null | Email. |
order.customer.phone | string | null | Phone number. |
order.customer.first_name | string | null | First name. |
order.customer.last_name | string | null | Last name. |
order.customer.accepts_marketing | boolean | Whether the customer accepts marketing. |
order.customer.tags | string | null | Comma-separated tags. |
order.customer.note | string | null | Note about the customer. |
order.customer.state | string | Account state. |
order.customer.orders_count | integer | Number of orders. |
order.customer.total_spent | number | Total spent, VND. |
order.customer.last_order_id | integer | null | Latest order id. |
order.customer.last_order_name | string | null | Latest order name. |
order.customer.default_address | object | Default address. |
order.customer.default_address.id | integer | Address id. |
order.customer.default_address.name | string | Full name of the person at this address. |
order.customer.default_address.first_name | string | First name. |
order.customer.default_address.last_name | string | Last name. |
order.customer.default_address.company | string | Company name. |
order.customer.default_address.phone | string | Phone number. |
order.customer.default_address.address1 | string | Street address: house number and street. |
order.customer.default_address.address2 | string | Second address line. |
order.customer.default_address.city | string | City, town or village. |
order.customer.default_address.province | string | Province or city name. |
order.customer.default_address.province_code | string | Province code; matches list_provinces. |
order.customer.default_address.district | string | Ward name under the two-level model (district name before). |
order.customer.default_address.district_code | string | Ward code; matches list_wards. |
order.customer.default_address.ward | string | Ward name under the three-level model; usually empty now. |
order.customer.default_address.ward_code | string | Ward code under the three-level model; usually empty now. |
order.customer.default_address.country | string | Country name. |
order.customer.default_address.country_code | string | Two-letter country code, e.g. VN. |
order.customer.default_address.zip | string | Postal code. |
order.customer.default_address.latitude | number | Latitude, if known. |
order.customer.default_address.longitude | number | Longitude, if known. |
order.customer.default_address.default | boolean | True when this is the default address. |
order.customer.addresses | array of object | All addresses. |
order.customer.addresses[].id | integer | Address id. |
order.customer.addresses[].name | string | Full name of the person at this address. |
order.customer.addresses[].first_name | string | First name. |
order.customer.addresses[].last_name | string | Last name. |
order.customer.addresses[].company | string | Company name. |
order.customer.addresses[].phone | string | Phone number. |
order.customer.addresses[].address1 | string | Street address: house number and street. |
order.customer.addresses[].address2 | string | Second address line. |
order.customer.addresses[].city | string | City, town or village. |
order.customer.addresses[].province | string | Province or city name. |
order.customer.addresses[].province_code | string | Province code; matches list_provinces. |
order.customer.addresses[].district | string | Ward name under the two-level model (district name before). |
order.customer.addresses[].district_code | string | Ward code; matches list_wards. |
order.customer.addresses[].ward | string | Ward name under the three-level model; usually empty now. |
order.customer.addresses[].ward_code | string | Ward code under the three-level model; usually empty now. |
order.customer.addresses[].country | string | Country name. |
order.customer.addresses[].country_code | string | Two-letter country code, e.g. VN. |
order.customer.addresses[].zip | string | Postal code. |
order.customer.addresses[].latitude | number | Latitude, if known. |
order.customer.addresses[].longitude | number | Longitude, if known. |
order.customer.addresses[].default | boolean | True when this is the default address. |
order.customer.created_at | string | When it was created (ISO 8601). |
order.customer.updated_at | string | When it was last updated (ISO 8601). |
order.line_items | array of object | Items ordered. |
order.line_items[].id | integer | Line item id. |
order.line_items[].product_id | integer | null | Product id; null when the product was deleted later. |
order.line_items[].variant_id | integer | Variant id. |
order.line_items[].title | string | Product title. |
order.line_items[].variant_title | string | Variant title. |
order.line_items[].name | string | Product and variant name. |
order.line_items[].sku | string | null | SKU of the variant. |
order.line_items[].barcode | string | null | Barcode of the variant. |
order.line_items[].vendor | string | Supplier of the item. |
order.line_items[].type | string | Product type. |
order.line_items[].quantity | integer | Quantity ordered. |
order.line_items[].fulfillable_quantity | integer | Quantity still available to fulfill. |
order.line_items[].price | number | Unit price before discounts, VND. |
order.line_items[].price_original | number | Unit price before any promotion, VND. |
order.line_items[].price_promotion | number | Promotion discount per unit, VND. |
order.line_items[].total_discount | number | Total discount on this line, VND. |
order.line_items[].grams | number | Weight in grams. |
order.line_items[].requires_shipping | boolean | Whether the item needs shipping. |
order.line_items[].taxable | boolean | Whether the item is taxable. |
order.line_items[].gift_card | boolean | Whether the item is a gift card. |
order.line_items[].product_exists | boolean | False when the product has been deleted. |
order.line_items[].fulfillment_service | string | null | Who fulfills the item. |
order.line_items[].fulfillment_status | string | null | Fulfillment status of this line. |
order.line_items[].properties | array | null | Custom properties of the line item. |
order.line_items[].image | object | Variant image. |
order.line_items[].image.src | string | Image URL. |
order.shipping_lines | array of object | Shipping methods used. |
order.shipping_lines[].code | string | null | Shipping method reference. |
order.shipping_lines[].title | string | null | Shipping method title. |
order.shipping_lines[].price | number | Shipping price, VND. |
order.shipping_lines[].source | string | null | Source of the shipping method. |
order.discount_codes | array of object | Discount codes applied. |
order.discount_codes[].code | string | The code. |
order.discount_codes[].amount | number | Discount amount. |
order.discount_codes[].type | string | percentage, shipping or fixed_amount. |
order.fulfillments | array of object | Shipments of the order. |
order.fulfillments[].id | integer | Fulfillment id. |
order.fulfillments[].order_id | integer | Order id. |
order.fulfillments[].status | string | Fulfillment status, e.g. success. |
order.fulfillments[].tracking_company | string | null | Carrier name. |
order.fulfillments[].tracking_company_code | string | null | Carrier code. |
order.fulfillments[].tracking_number | string | null | Tracking number. |
order.fulfillments[].tracking_numbers | array of string | Tracking numbers. |
order.fulfillments[].tracking_url | string | null | Tracking URL. |
order.fulfillments[].tracking_urls | array of string | Tracking URLs. |
order.fulfillments[].carrier_status_code | string | null | Carrier delivery status code. |
order.fulfillments[].carrier_status_name | string | null | Carrier delivery status. |
order.fulfillments[].carrier_cod_status_code | string | null | Cash-on-delivery status code. |
order.fulfillments[].carrier_cod_status_name | string | null | Cash-on-delivery status. |
order.fulfillments[].cod_amount | number | Cash on delivery amount to collect, VND. |
order.fulfillments[].real_shipping_fee | number | Actual shipping fee, VND. |
order.fulfillments[].total_weight | number | Package weight in grams. |
order.fulfillments[].location_id | integer | null | Location the order shipped from. |
order.fulfillments[].notify_customer | boolean | Whether the customer was notified. |
order.fulfillments[].note | string | null | Fulfillment note. |
order.fulfillments[].created_at | string | When it was created (ISO 8601). |
order.fulfillments[].updated_at | string | When it was last updated (ISO 8601). |
order.fulfillments[].line_items | array of object | Items in this fulfillment. |
order.fulfillments[].line_items[].id | integer | Line item id. |
order.fulfillments[].line_items[].product_id | integer | null | Product id; null when the product was deleted later. |
order.fulfillments[].line_items[].variant_id | integer | Variant id. |
order.fulfillments[].line_items[].title | string | Product title. |
order.fulfillments[].line_items[].variant_title | string | Variant title. |
order.fulfillments[].line_items[].name | string | Product and variant name. |
order.fulfillments[].line_items[].sku | string | null | SKU of the variant. |
order.fulfillments[].line_items[].barcode | string | null | Barcode of the variant. |
order.fulfillments[].line_items[].vendor | string | Supplier of the item. |
order.fulfillments[].line_items[].type | string | Product type. |
order.fulfillments[].line_items[].quantity | integer | Quantity ordered. |
order.fulfillments[].line_items[].fulfillable_quantity | integer | Quantity still available to fulfill. |
order.fulfillments[].line_items[].price | number | Unit price before discounts, VND. |
order.fulfillments[].line_items[].price_original | number | Unit price before any promotion, VND. |
order.fulfillments[].line_items[].price_promotion | number | Promotion discount per unit, VND. |
order.fulfillments[].line_items[].total_discount | number | Total discount on this line, VND. |
order.fulfillments[].line_items[].grams | number | Weight in grams. |
order.fulfillments[].line_items[].requires_shipping | boolean | Whether the item needs shipping. |
order.fulfillments[].line_items[].taxable | boolean | Whether the item is taxable. |
order.fulfillments[].line_items[].gift_card | boolean | Whether the item is a gift card. |
order.fulfillments[].line_items[].product_exists | boolean | False when the product has been deleted. |
order.fulfillments[].line_items[].fulfillment_service | string | null | Who fulfills the item. |
order.fulfillments[].line_items[].fulfillment_status | string | null | Fulfillment status of this line. |
order.fulfillments[].line_items[].properties | array | null | Custom properties of the line item. |
order.fulfillments[].line_items[].image | object | Variant image. |
order.fulfillments[].line_items[].image.src | string | Image URL. |
order.transactions | array of object | Payments on the order. |
order.transactions[].id | integer | Transaction id. |
order.transactions[].order_id | integer | Order the transaction belongs to. |
order.transactions[].parent_id | integer | null | Id of the transaction this one follows. |
order.transactions[].kind | string | Kind: pending, authorization, capture, sale, void or refund (case varies). |
order.transactions[].status | string | null | Status: pending, failure, success or error; some shops return a Vietnamese label. |
order.transactions[].amount | number | Amount, VND; negative for refunds. |
order.transactions[].currency | string | null | Currency code, e.g. VND. |
order.transactions[].gateway | string | Name of the payment gateway. |
order.transactions[].is_cod_gateway | boolean | True when the gateway is cash on delivery. |
order.transactions[].authorization | string | null | Authorization code. |
order.transactions[].receipt | string | null | Receipt. |
order.transactions[].test | boolean | True for a test transaction. |
order.transactions[].user_id | integer | null | Staff who recorded it; 0 for the system. |
order.transactions[].location_id | integer | null | Location id. |
order.transactions[].device_id | integer | null | Device id. |
order.transactions[].created_at | string | When it was created (ISO 8601). |
order.transactions[].external_transaction_id | string | null | Id at the payment provider. |
order.transactions[].haravan_transaction_id | string | null | Haravan payment reference. |
order.transactions[].payment_details | object | null | Payment details, if any. |
order.transactions[].send_email | boolean | Whether an email was sent. |
order.refunds | array of object | Refunds on the order. |
order.refunds[].id | integer | Refund id. |
order.refunds[].order_id | integer | Order id. |
order.refunds[].note | string | null | Note attached to the refund. |
order.refunds[].restock | boolean | null | Whether items went back to stock. |
order.refunds[].user_id | integer | null | Staff who made the refund. |
order.refunds[].location_id | integer | null | Location items were returned to. |
order.refunds[].created_at | string | When it was created (ISO 8601). |
order.refunds[].refund_line_items | array of object | Items returned or refunded. |
order.refunds[].refund_line_items[].id | integer | Refund line item id. |
order.refunds[].refund_line_items[].line_item_id | integer | Order line item it refers to. |
order.refunds[].refund_line_items[].quantity | integer | Quantity refunded. |
order.refunds[].refund_line_items[].line_item | object | The order line item. |
order.refunds[].refund_line_items[].line_item.id | integer | Line item id. |
order.refunds[].refund_line_items[].line_item.product_id | integer | null | Product id; null when the product was deleted later. |
order.refunds[].refund_line_items[].line_item.variant_id | integer | Variant id. |
order.refunds[].refund_line_items[].line_item.title | string | Product title. |
order.refunds[].refund_line_items[].line_item.variant_title | string | Variant title. |
order.refunds[].refund_line_items[].line_item.name | string | Product and variant name. |
order.refunds[].refund_line_items[].line_item.sku | string | null | SKU of the variant. |
order.refunds[].refund_line_items[].line_item.barcode | string | null | Barcode of the variant. |
order.refunds[].refund_line_items[].line_item.vendor | string | Supplier of the item. |
order.refunds[].refund_line_items[].line_item.type | string | Product type. |
order.refunds[].refund_line_items[].line_item.quantity | integer | Quantity ordered. |
order.refunds[].refund_line_items[].line_item.fulfillable_quantity | integer | Quantity still available to fulfill. |
order.refunds[].refund_line_items[].line_item.price | number | Unit price before discounts, VND. |
order.refunds[].refund_line_items[].line_item.price_original | number | Unit price before any promotion, VND. |
order.refunds[].refund_line_items[].line_item.price_promotion | number | Promotion discount per unit, VND. |
order.refunds[].refund_line_items[].line_item.total_discount | number | Total discount on this line, VND. |
order.refunds[].refund_line_items[].line_item.grams | number | Weight in grams. |
order.refunds[].refund_line_items[].line_item.requires_shipping | boolean | Whether the item needs shipping. |
order.refunds[].refund_line_items[].line_item.taxable | boolean | Whether the item is taxable. |
order.refunds[].refund_line_items[].line_item.gift_card | boolean | Whether the item is a gift card. |
order.refunds[].refund_line_items[].line_item.product_exists | boolean | False when the product has been deleted. |
order.refunds[].refund_line_items[].line_item.fulfillment_service | string | null | Who fulfills the item. |
order.refunds[].refund_line_items[].line_item.fulfillment_status | string | null | Fulfillment status of this line. |
order.refunds[].refund_line_items[].line_item.properties | array | null | Custom properties of the line item. |
order.refunds[].refund_line_items[].line_item.image | object | Variant image. |
order.refunds[].refund_line_items[].line_item.image.src | string | Image URL. |
order.refunds[].transactions | array of object | Money returned, as refund transactions. |
order.refunds[].transactions[].id | integer | Transaction id. |
order.refunds[].transactions[].order_id | integer | Order the transaction belongs to. |
order.refunds[].transactions[].parent_id | integer | null | Id of the transaction this one follows. |
order.refunds[].transactions[].kind | string | Kind: pending, authorization, capture, sale, void or refund (case varies). |
order.refunds[].transactions[].status | string | null | Status: pending, failure, success or error; some shops return a Vietnamese label. |
order.refunds[].transactions[].amount | number | Amount, VND; negative for refunds. |
order.refunds[].transactions[].currency | string | null | Currency code, e.g. VND. |
order.refunds[].transactions[].gateway | string | Name of the payment gateway. |
order.refunds[].transactions[].is_cod_gateway | boolean | True when the gateway is cash on delivery. |
order.refunds[].transactions[].authorization | string | null | Authorization code. |
order.refunds[].transactions[].receipt | string | null | Receipt. |
order.refunds[].transactions[].test | boolean | True for a test transaction. |
order.refunds[].transactions[].user_id | integer | null | Staff who recorded it; 0 for the system. |
order.refunds[].transactions[].location_id | integer | null | Location id. |
order.refunds[].transactions[].device_id | integer | null | Device id. |
order.refunds[].transactions[].created_at | string | When it was created (ISO 8601). |
order.refunds[].transactions[].external_transaction_id | string | null | Id at the payment provider. |
order.refunds[].transactions[].haravan_transaction_id | string | null | Haravan payment reference. |
order.refunds[].transactions[].payment_details | object | null | Payment details, if any. |
order.refunds[].transactions[].send_email | boolean | Whether an email was sent. |
Cancel order — haravan.cancel_order
Cancel an order, optionally restocking items and refunding an amount.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | high | yes | no | com.write_orders |
Input
| Field | Type | Required | Description |
|---|---|---|---|
order_id | integer | yes | Haravan order id. Min 1. |
reason | string | yes | Why the order is cancelled. One of: customer, inventory, fraud, declined, other. |
amount | string | no | Amount to refund, VND, e.g. '520000'. |
restock | boolean | no | Put items back in stock. |
email | boolean | no | Email the customer about it. |
note | string | no | Internal note. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
order | object | The order. |
order.id | integer | Order id used by the API. |
order.name | string | Order name shown to the shop and customer, e.g. #100020. |
order.order_number | string | Order number shown to the shop and customer. |
order.number | integer | Position of the order in the shop's order count. |
order.token | string | Unique token of the order. |
order.email | string | null | Customer email. |
order.contact_email | string | null | Contact email of the buyer. |
order.note | string | null | Order note. |
order.note_attributes | array of object | Extra name/value details added to the order. |
order.note_attributes[].name | string | Name. |
order.note_attributes[].value | string | Value. |
order.tags | string | null | Comma-separated tags. |
order.currency | string | Currency code, e.g. VND. |
order.total_price | number | Total of items, discounts, shipping and tax, VND. |
order.subtotal_price | number | Price after discounts, before shipping and tax, VND. |
order.total_line_items_price | number | Sum of line item prices, VND. |
order.total_discounts | number | Total discounts, VND. |
order.total_tax | number | Total tax, VND. |
order.total_weight | number | Total weight in grams. |
order.taxes_included | boolean | null | Whether tax is included in the subtotal. |
order.financial_status | string | Payment status: pending, authorized, partially_paid, paid, partially_refunded, refunded or voided. |
order.fulfillment_status | string | null | Delivery status: fulfilled, partial, restocked, or null/notfulfilled when nothing shipped. |
order.gateway | string | null | Payment gateway name. |
order.gateway_code | string | null | Payment gateway code, e.g. COD. |
order.processing_method | string | null | How the payment was processed: checkout, direct, manual or offsite. |
order.closed_status | string | unclosed or closed. |
order.cancelled_status | string | uncancelled or cancelled. |
order.confirmed_status | string | unconfirmed or confirmed. |
order.cancel_reason | string | null | Why it was cancelled: customer, fraud, inventory, declined or other. |
order.created_at | string | When the order was created (ISO 8601). |
order.updated_at | string | When the order was last updated (ISO 8601). |
order.closed_at | string | null | When the order was closed (ISO 8601). |
order.cancelled_at | string | null | When the order was cancelled (ISO 8601). |
order.confirmed_at | string | null | When the order was confirmed (ISO 8601). |
order.source_name | string | null | Where the order came from, e.g. web or pos. |
order.source | string | null | Channel that created the order. |
order.landing_site | string | null | Page where the buyer entered the shop. |
order.landing_site_ref | string | null | Ref of the landing page. |
order.referring_site | string | null | Site that referred the buyer. |
order.utm_source | string | null | UTM source. |
order.utm_medium | string | null | UTM medium. |
order.utm_campaign | string | null | UTM campaign. |
order.utm_term | string | null | UTM term. |
order.utm_content | string | null | UTM content. |
order.buyer_accepts_marketing | boolean | Whether the buyer accepts marketing. |
order.browser_ip | string | null | Buyer's IP address. |
order.cart_token | string | null | Token of the cart behind the order. |
order.checkout_token | string | null | Token of the checkout behind the order. |
order.user_id | integer | null | Staff who processed the order; 0 if none. |
order.location_id | integer | null | Location where the order was processed. |
order.location_name | string | null | Name of that location. |
order.assigned_location_id | integer | null | Location assigned to handle it. |
order.assigned_location_name | string | null | Name of the assigned location. |
order.assigned_location_at | string | null | When the location was assigned. |
order.client_details | object | Browser the customer used. |
order.client_details.accept_language | string | null | Browser languages. |
order.client_details.browser_ip | string | null | IP address. |
order.client_details.browser_height | integer | null | Screen height in pixels. |
order.client_details.browser_width | integer | null | Screen width in pixels. |
order.client_details.session_hash | string | null | Session hash. |
order.client_details.user_agent | string | null | Browser user agent. |
order.billing_address | object | Billing address. |
order.billing_address.id | integer | Address id. |
order.billing_address.name | string | Full name of the person at this address. |
order.billing_address.first_name | string | First name. |
order.billing_address.last_name | string | Last name. |
order.billing_address.company | string | Company name. |
order.billing_address.phone | string | Phone number. |
order.billing_address.address1 | string | Street address: house number and street. |
order.billing_address.address2 | string | Second address line. |
order.billing_address.city | string | City, town or village. |
order.billing_address.province | string | Province or city name. |
order.billing_address.province_code | string | Province code; matches list_provinces. |
order.billing_address.district | string | Ward name under the two-level model (district name before). |
order.billing_address.district_code | string | Ward code; matches list_wards. |
order.billing_address.ward | string | Ward name under the three-level model; usually empty now. |
order.billing_address.ward_code | string | Ward code under the three-level model; usually empty now. |
order.billing_address.country | string | Country name. |
order.billing_address.country_code | string | Two-letter country code, e.g. VN. |
order.billing_address.zip | string | Postal code. |
order.billing_address.latitude | number | Latitude, if known. |
order.billing_address.longitude | number | Longitude, if known. |
order.billing_address.default | boolean | True when this is the default address. |
order.shipping_address | object | Delivery address. |
order.shipping_address.id | integer | Address id. |
order.shipping_address.name | string | Full name of the person at this address. |
order.shipping_address.first_name | string | First name. |
order.shipping_address.last_name | string | Last name. |
order.shipping_address.company | string | Company name. |
order.shipping_address.phone | string | Phone number. |
order.shipping_address.address1 | string | Street address: house number and street. |
order.shipping_address.address2 | string | Second address line. |
order.shipping_address.city | string | City, town or village. |
order.shipping_address.province | string | Province or city name. |
order.shipping_address.province_code | string | Province code; matches list_provinces. |
order.shipping_address.district | string | Ward name under the two-level model (district name before). |
order.shipping_address.district_code | string | Ward code; matches list_wards. |
order.shipping_address.ward | string | Ward name under the three-level model; usually empty now. |
order.shipping_address.ward_code | string | Ward code under the three-level model; usually empty now. |
order.shipping_address.country | string | Country name. |
order.shipping_address.country_code | string | Two-letter country code, e.g. VN. |
order.shipping_address.zip | string | Postal code. |
order.shipping_address.latitude | number | Latitude, if known. |
order.shipping_address.longitude | number | Longitude, if known. |
order.shipping_address.default | boolean | True when this is the default address. |
order.customer | object | The customer; null for some POS orders. |
order.customer.id | integer | Customer id. |
order.customer.email | string | null | Email. |
order.customer.phone | string | null | Phone number. |
order.customer.first_name | string | null | First name. |
order.customer.last_name | string | null | Last name. |
order.customer.accepts_marketing | boolean | Whether the customer accepts marketing. |
order.customer.tags | string | null | Comma-separated tags. |
order.customer.note | string | null | Note about the customer. |
order.customer.state | string | Account state. |
order.customer.orders_count | integer | Number of orders. |
order.customer.total_spent | number | Total spent, VND. |
order.customer.last_order_id | integer | null | Latest order id. |
order.customer.last_order_name | string | null | Latest order name. |
order.customer.default_address | object | Default address. |
order.customer.default_address.id | integer | Address id. |
order.customer.default_address.name | string | Full name of the person at this address. |
order.customer.default_address.first_name | string | First name. |
order.customer.default_address.last_name | string | Last name. |
order.customer.default_address.company | string | Company name. |
order.customer.default_address.phone | string | Phone number. |
order.customer.default_address.address1 | string | Street address: house number and street. |
order.customer.default_address.address2 | string | Second address line. |
order.customer.default_address.city | string | City, town or village. |
order.customer.default_address.province | string | Province or city name. |
order.customer.default_address.province_code | string | Province code; matches list_provinces. |
order.customer.default_address.district | string | Ward name under the two-level model (district name before). |
order.customer.default_address.district_code | string | Ward code; matches list_wards. |
order.customer.default_address.ward | string | Ward name under the three-level model; usually empty now. |
order.customer.default_address.ward_code | string | Ward code under the three-level model; usually empty now. |
order.customer.default_address.country | string | Country name. |
order.customer.default_address.country_code | string | Two-letter country code, e.g. VN. |
order.customer.default_address.zip | string | Postal code. |
order.customer.default_address.latitude | number | Latitude, if known. |
order.customer.default_address.longitude | number | Longitude, if known. |
order.customer.default_address.default | boolean | True when this is the default address. |
order.customer.addresses | array of object | All addresses. |
order.customer.addresses[].id | integer | Address id. |
order.customer.addresses[].name | string | Full name of the person at this address. |
order.customer.addresses[].first_name | string | First name. |
order.customer.addresses[].last_name | string | Last name. |
order.customer.addresses[].company | string | Company name. |
order.customer.addresses[].phone | string | Phone number. |
order.customer.addresses[].address1 | string | Street address: house number and street. |
order.customer.addresses[].address2 | string | Second address line. |
order.customer.addresses[].city | string | City, town or village. |
order.customer.addresses[].province | string | Province or city name. |
order.customer.addresses[].province_code | string | Province code; matches list_provinces. |
order.customer.addresses[].district | string | Ward name under the two-level model (district name before). |
order.customer.addresses[].district_code | string | Ward code; matches list_wards. |
order.customer.addresses[].ward | string | Ward name under the three-level model; usually empty now. |
order.customer.addresses[].ward_code | string | Ward code under the three-level model; usually empty now. |
order.customer.addresses[].country | string | Country name. |
order.customer.addresses[].country_code | string | Two-letter country code, e.g. VN. |
order.customer.addresses[].zip | string | Postal code. |
order.customer.addresses[].latitude | number | Latitude, if known. |
order.customer.addresses[].longitude | number | Longitude, if known. |
order.customer.addresses[].default | boolean | True when this is the default address. |
order.customer.created_at | string | When it was created (ISO 8601). |
order.customer.updated_at | string | When it was last updated (ISO 8601). |
order.line_items | array of object | Items ordered. |
order.line_items[].id | integer | Line item id. |
order.line_items[].product_id | integer | null | Product id; null when the product was deleted later. |
order.line_items[].variant_id | integer | Variant id. |
order.line_items[].title | string | Product title. |
order.line_items[].variant_title | string | Variant title. |
order.line_items[].name | string | Product and variant name. |
order.line_items[].sku | string | null | SKU of the variant. |
order.line_items[].barcode | string | null | Barcode of the variant. |
order.line_items[].vendor | string | Supplier of the item. |
order.line_items[].type | string | Product type. |
order.line_items[].quantity | integer | Quantity ordered. |
order.line_items[].fulfillable_quantity | integer | Quantity still available to fulfill. |
order.line_items[].price | number | Unit price before discounts, VND. |
order.line_items[].price_original | number | Unit price before any promotion, VND. |
order.line_items[].price_promotion | number | Promotion discount per unit, VND. |
order.line_items[].total_discount | number | Total discount on this line, VND. |
order.line_items[].grams | number | Weight in grams. |
order.line_items[].requires_shipping | boolean | Whether the item needs shipping. |
order.line_items[].taxable | boolean | Whether the item is taxable. |
order.line_items[].gift_card | boolean | Whether the item is a gift card. |
order.line_items[].product_exists | boolean | False when the product has been deleted. |
order.line_items[].fulfillment_service | string | null | Who fulfills the item. |
order.line_items[].fulfillment_status | string | null | Fulfillment status of this line. |
order.line_items[].properties | array | null | Custom properties of the line item. |
order.line_items[].image | object | Variant image. |
order.line_items[].image.src | string | Image URL. |
order.shipping_lines | array of object | Shipping methods used. |
order.shipping_lines[].code | string | null | Shipping method reference. |
order.shipping_lines[].title | string | null | Shipping method title. |
order.shipping_lines[].price | number | Shipping price, VND. |
order.shipping_lines[].source | string | null | Source of the shipping method. |
order.discount_codes | array of object | Discount codes applied. |
order.discount_codes[].code | string | The code. |
order.discount_codes[].amount | number | Discount amount. |
order.discount_codes[].type | string | percentage, shipping or fixed_amount. |
order.fulfillments | array of object | Shipments of the order. |
order.fulfillments[].id | integer | Fulfillment id. |
order.fulfillments[].order_id | integer | Order id. |
order.fulfillments[].status | string | Fulfillment status, e.g. success. |
order.fulfillments[].tracking_company | string | null | Carrier name. |
order.fulfillments[].tracking_company_code | string | null | Carrier code. |
order.fulfillments[].tracking_number | string | null | Tracking number. |
order.fulfillments[].tracking_numbers | array of string | Tracking numbers. |
order.fulfillments[].tracking_url | string | null | Tracking URL. |
order.fulfillments[].tracking_urls | array of string | Tracking URLs. |
order.fulfillments[].carrier_status_code | string | null | Carrier delivery status code. |
order.fulfillments[].carrier_status_name | string | null | Carrier delivery status. |
order.fulfillments[].carrier_cod_status_code | string | null | Cash-on-delivery status code. |
order.fulfillments[].carrier_cod_status_name | string | null | Cash-on-delivery status. |
order.fulfillments[].cod_amount | number | Cash on delivery amount to collect, VND. |
order.fulfillments[].real_shipping_fee | number | Actual shipping fee, VND. |
order.fulfillments[].total_weight | number | Package weight in grams. |
order.fulfillments[].location_id | integer | null | Location the order shipped from. |
order.fulfillments[].notify_customer | boolean | Whether the customer was notified. |
order.fulfillments[].note | string | null | Fulfillment note. |
order.fulfillments[].created_at | string | When it was created (ISO 8601). |
order.fulfillments[].updated_at | string | When it was last updated (ISO 8601). |
order.fulfillments[].line_items | array of object | Items in this fulfillment. |
order.fulfillments[].line_items[].id | integer | Line item id. |
order.fulfillments[].line_items[].product_id | integer | null | Product id; null when the product was deleted later. |
order.fulfillments[].line_items[].variant_id | integer | Variant id. |
order.fulfillments[].line_items[].title | string | Product title. |
order.fulfillments[].line_items[].variant_title | string | Variant title. |
order.fulfillments[].line_items[].name | string | Product and variant name. |
order.fulfillments[].line_items[].sku | string | null | SKU of the variant. |
order.fulfillments[].line_items[].barcode | string | null | Barcode of the variant. |
order.fulfillments[].line_items[].vendor | string | Supplier of the item. |
order.fulfillments[].line_items[].type | string | Product type. |
order.fulfillments[].line_items[].quantity | integer | Quantity ordered. |
order.fulfillments[].line_items[].fulfillable_quantity | integer | Quantity still available to fulfill. |
order.fulfillments[].line_items[].price | number | Unit price before discounts, VND. |
order.fulfillments[].line_items[].price_original | number | Unit price before any promotion, VND. |
order.fulfillments[].line_items[].price_promotion | number | Promotion discount per unit, VND. |
order.fulfillments[].line_items[].total_discount | number | Total discount on this line, VND. |
order.fulfillments[].line_items[].grams | number | Weight in grams. |
order.fulfillments[].line_items[].requires_shipping | boolean | Whether the item needs shipping. |
order.fulfillments[].line_items[].taxable | boolean | Whether the item is taxable. |
order.fulfillments[].line_items[].gift_card | boolean | Whether the item is a gift card. |
order.fulfillments[].line_items[].product_exists | boolean | False when the product has been deleted. |
order.fulfillments[].line_items[].fulfillment_service | string | null | Who fulfills the item. |
order.fulfillments[].line_items[].fulfillment_status | string | null | Fulfillment status of this line. |
order.fulfillments[].line_items[].properties | array | null | Custom properties of the line item. |
order.fulfillments[].line_items[].image | object | Variant image. |
order.fulfillments[].line_items[].image.src | string | Image URL. |
order.transactions | array of object | Payments on the order. |
order.transactions[].id | integer | Transaction id. |
order.transactions[].order_id | integer | Order the transaction belongs to. |
order.transactions[].parent_id | integer | null | Id of the transaction this one follows. |
order.transactions[].kind | string | Kind: pending, authorization, capture, sale, void or refund (case varies). |
order.transactions[].status | string | null | Status: pending, failure, success or error; some shops return a Vietnamese label. |
order.transactions[].amount | number | Amount, VND; negative for refunds. |
order.transactions[].currency | string | null | Currency code, e.g. VND. |
order.transactions[].gateway | string | Name of the payment gateway. |
order.transactions[].is_cod_gateway | boolean | True when the gateway is cash on delivery. |
order.transactions[].authorization | string | null | Authorization code. |
order.transactions[].receipt | string | null | Receipt. |
order.transactions[].test | boolean | True for a test transaction. |
order.transactions[].user_id | integer | null | Staff who recorded it; 0 for the system. |
order.transactions[].location_id | integer | null | Location id. |
order.transactions[].device_id | integer | null | Device id. |
order.transactions[].created_at | string | When it was created (ISO 8601). |
order.transactions[].external_transaction_id | string | null | Id at the payment provider. |
order.transactions[].haravan_transaction_id | string | null | Haravan payment reference. |
order.transactions[].payment_details | object | null | Payment details, if any. |
order.transactions[].send_email | boolean | Whether an email was sent. |
order.refunds | array of object | Refunds on the order. |
order.refunds[].id | integer | Refund id. |
order.refunds[].order_id | integer | Order id. |
order.refunds[].note | string | null | Note attached to the refund. |
order.refunds[].restock | boolean | null | Whether items went back to stock. |
order.refunds[].user_id | integer | null | Staff who made the refund. |
order.refunds[].location_id | integer | null | Location items were returned to. |
order.refunds[].created_at | string | When it was created (ISO 8601). |
order.refunds[].refund_line_items | array of object | Items returned or refunded. |
order.refunds[].refund_line_items[].id | integer | Refund line item id. |
order.refunds[].refund_line_items[].line_item_id | integer | Order line item it refers to. |
order.refunds[].refund_line_items[].quantity | integer | Quantity refunded. |
order.refunds[].refund_line_items[].line_item | object | The order line item. |
order.refunds[].refund_line_items[].line_item.id | integer | Line item id. |
order.refunds[].refund_line_items[].line_item.product_id | integer | null | Product id; null when the product was deleted later. |
order.refunds[].refund_line_items[].line_item.variant_id | integer | Variant id. |
order.refunds[].refund_line_items[].line_item.title | string | Product title. |
order.refunds[].refund_line_items[].line_item.variant_title | string | Variant title. |
order.refunds[].refund_line_items[].line_item.name | string | Product and variant name. |
order.refunds[].refund_line_items[].line_item.sku | string | null | SKU of the variant. |
order.refunds[].refund_line_items[].line_item.barcode | string | null | Barcode of the variant. |
order.refunds[].refund_line_items[].line_item.vendor | string | Supplier of the item. |
order.refunds[].refund_line_items[].line_item.type | string | Product type. |
order.refunds[].refund_line_items[].line_item.quantity | integer | Quantity ordered. |
order.refunds[].refund_line_items[].line_item.fulfillable_quantity | integer | Quantity still available to fulfill. |
order.refunds[].refund_line_items[].line_item.price | number | Unit price before discounts, VND. |
order.refunds[].refund_line_items[].line_item.price_original | number | Unit price before any promotion, VND. |
order.refunds[].refund_line_items[].line_item.price_promotion | number | Promotion discount per unit, VND. |
order.refunds[].refund_line_items[].line_item.total_discount | number | Total discount on this line, VND. |
order.refunds[].refund_line_items[].line_item.grams | number | Weight in grams. |
order.refunds[].refund_line_items[].line_item.requires_shipping | boolean | Whether the item needs shipping. |
order.refunds[].refund_line_items[].line_item.taxable | boolean | Whether the item is taxable. |
order.refunds[].refund_line_items[].line_item.gift_card | boolean | Whether the item is a gift card. |
order.refunds[].refund_line_items[].line_item.product_exists | boolean | False when the product has been deleted. |
order.refunds[].refund_line_items[].line_item.fulfillment_service | string | null | Who fulfills the item. |
order.refunds[].refund_line_items[].line_item.fulfillment_status | string | null | Fulfillment status of this line. |
order.refunds[].refund_line_items[].line_item.properties | array | null | Custom properties of the line item. |
order.refunds[].refund_line_items[].line_item.image | object | Variant image. |
order.refunds[].refund_line_items[].line_item.image.src | string | Image URL. |
order.refunds[].transactions | array of object | Money returned, as refund transactions. |
order.refunds[].transactions[].id | integer | Transaction id. |
order.refunds[].transactions[].order_id | integer | Order the transaction belongs to. |
order.refunds[].transactions[].parent_id | integer | null | Id of the transaction this one follows. |
order.refunds[].transactions[].kind | string | Kind: pending, authorization, capture, sale, void or refund (case varies). |
order.refunds[].transactions[].status | string | null | Status: pending, failure, success or error; some shops return a Vietnamese label. |
order.refunds[].transactions[].amount | number | Amount, VND; negative for refunds. |
order.refunds[].transactions[].currency | string | null | Currency code, e.g. VND. |
order.refunds[].transactions[].gateway | string | Name of the payment gateway. |
order.refunds[].transactions[].is_cod_gateway | boolean | True when the gateway is cash on delivery. |
order.refunds[].transactions[].authorization | string | null | Authorization code. |
order.refunds[].transactions[].receipt | string | null | Receipt. |
order.refunds[].transactions[].test | boolean | True for a test transaction. |
order.refunds[].transactions[].user_id | integer | null | Staff who recorded it; 0 for the system. |
order.refunds[].transactions[].location_id | integer | null | Location id. |
order.refunds[].transactions[].device_id | integer | null | Device id. |
order.refunds[].transactions[].created_at | string | When it was created (ISO 8601). |
order.refunds[].transactions[].external_transaction_id | string | null | Id at the payment provider. |
order.refunds[].transactions[].haravan_transaction_id | string | null | Haravan payment reference. |
order.refunds[].transactions[].payment_details | object | null | Payment details, if any. |
order.refunds[].transactions[].send_email | boolean | Whether an email was sent. |
Add order tags — haravan.add_order_tags
Add tags to an order; existing tags are kept.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | yes | no | com.write_orders |
Input
| Field | Type | Required | Description |
|---|---|---|---|
order_id | integer | yes | Haravan order id. Min 1. |
tags | string | yes | Comma-separated tags, e.g. 'vip,zalo'. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
tags | string | null | Order tags after the change. |
Remove order tags — haravan.remove_order_tags
Remove tags from an order.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | yes | yes | com.write_orders |
Input
| Field | Type | Required | Description |
|---|---|---|---|
order_id | integer | yes | Haravan order id. Min 1. |
tags | string | yes | Comma-separated tags, e.g. 'vip,zalo'. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
tags | string | null | Order tags after the change. |
Assign order — haravan.assign_order
Assign staff to handle an order (advanced order processing only).
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | medium | yes | no | com.write_orders |
Input
| Field | Type | Required | Description |
|---|---|---|---|
order_id | integer | yes | Haravan order id. Min 1. |
user_ids | array of integer | no | Staff ids from list_staff. |
group_user_ids | array of integer | no | Staff group ids. |
location_id | integer | no | Location id from list_locations. Min 1. |
Extra fields: ignored.
Output
Returns an empty object.
List order events — haravan.list_order_events
List what happened to an order: created, paid, shipped, edited.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | no | yes | com.read_orders |
Input
| Field | Type | Required | Description |
|---|---|---|---|
order_id | integer | yes | Haravan order id. Min 1. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
events | array of object | What happened to the order. |
events[].id | integer | Event id. |
events[].subject_id | integer | Id of the resource that produced the event. |
events[].subject_type | string | Type of that resource: Article, Blog, Collection, Comment, Order, Page or Product. |
events[].verb | string | What happened, e.g. create, update, destroy or confirmed. |
events[].message | string | Human-readable text of the event; may contain HTML links. |
events[].description | string | null | Plain-text description. |
events[].body | string | null | Extra text about the event. |
events[].arguments | array of string | Values the message was built from. |
events[].author | string | Who caused the event. |
events[].path | string | null | Relative admin URL of the resource. |
events[].created_at | string | When it happened (ISO 8601). |
List order payments — haravan.list_order_transactions
List payment transactions of an order.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | no | yes | com.read_orders |
Input
| Field | Type | Required | Description |
|---|---|---|---|
order_id | integer | yes | Haravan order id. Min 1. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
transactions | array of object | Payment transactions of the order. |
transactions[].id | integer | Transaction id. |
transactions[].order_id | integer | Order the transaction belongs to. |
transactions[].parent_id | integer | null | Id of the transaction this one follows. |
transactions[].kind | string | Kind: pending, authorization, capture, sale, void or refund (case varies). |
transactions[].status | string | null | Status: pending, failure, success or error; some shops return a Vietnamese label. |
transactions[].amount | number | Amount, VND; negative for refunds. |
transactions[].currency | string | null | Currency code, e.g. VND. |
transactions[].gateway | string | Name of the payment gateway. |
transactions[].is_cod_gateway | boolean | True when the gateway is cash on delivery. |
transactions[].authorization | string | null | Authorization code. |
transactions[].receipt | string | null | Receipt. |
transactions[].test | boolean | True for a test transaction. |
transactions[].user_id | integer | null | Staff who recorded it; 0 for the system. |
transactions[].location_id | integer | null | Location id. |
transactions[].device_id | integer | null | Device id. |
transactions[].created_at | string | When it was created (ISO 8601). |
transactions[].external_transaction_id | string | null | Id at the payment provider. |
transactions[].haravan_transaction_id | string | null | Haravan payment reference. |
transactions[].payment_details | object | null | Payment details, if any. |
transactions[].send_email | boolean | Whether an email was sent. |
Record order payment — haravan.create_order_transaction
Record a payment on an order, e.g. kind 'capture' for a cash payment.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | high | yes | no | com.write_orders |
Input
| Field | Type | Required | Description |
|---|---|---|---|
order_id | integer | yes | Haravan order id. Min 1. |
transaction | object | yes | The payment. |
transaction.amount | number | yes | Amount, VND. |
transaction.kind | string | yes | Transaction kind, e.g. capture. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
transaction | object | The transaction that was recorded. |
transaction.id | integer | Transaction id. |
transaction.order_id | integer | Order the transaction belongs to. |
transaction.parent_id | integer | null | Id of the transaction this one follows. |
transaction.kind | string | Kind: pending, authorization, capture, sale, void or refund (case varies). |
transaction.status | string | null | Status: pending, failure, success or error; some shops return a Vietnamese label. |
transaction.amount | number | Amount, VND; negative for refunds. |
transaction.currency | string | null | Currency code, e.g. VND. |
transaction.gateway | string | Name of the payment gateway. |
transaction.is_cod_gateway | boolean | True when the gateway is cash on delivery. |
transaction.authorization | string | null | Authorization code. |
transaction.receipt | string | null | Receipt. |
transaction.test | boolean | True for a test transaction. |
transaction.user_id | integer | null | Staff who recorded it; 0 for the system. |
transaction.location_id | integer | null | Location id. |
transaction.device_id | integer | null | Device id. |
transaction.created_at | string | When it was created (ISO 8601). |
transaction.external_transaction_id | string | null | Id at the payment provider. |
transaction.haravan_transaction_id | string | null | Haravan payment reference. |
transaction.payment_details | object | null | Payment details, if any. |
transaction.send_email | boolean | Whether an email was sent. |
List order refunds — haravan.list_order_refunds
List refunds of an order.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | no | yes | com.read_orders |
Input
| Field | Type | Required | Description |
|---|---|---|---|
order_id | integer | yes | Haravan order id. Min 1. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
refunds | array of object | Refunds of the order. |
refunds[].id | integer | Refund id. |
refunds[].order_id | integer | Order id. |
refunds[].note | string | null | Note attached to the refund. |
refunds[].restock | boolean | null | Whether items went back to stock. |
refunds[].user_id | integer | null | Staff who made the refund. |
refunds[].location_id | integer | null | Location items were returned to. |
refunds[].created_at | string | When it was created (ISO 8601). |
refunds[].refund_line_items | array of object | Items returned or refunded. |
refunds[].refund_line_items[].id | integer | Refund line item id. |
refunds[].refund_line_items[].line_item_id | integer | Order line item it refers to. |
refunds[].refund_line_items[].quantity | integer | Quantity refunded. |
refunds[].refund_line_items[].line_item | object | The order line item. |
refunds[].refund_line_items[].line_item.id | integer | Line item id. |
refunds[].refund_line_items[].line_item.product_id | integer | null | Product id; null when the product was deleted later. |
refunds[].refund_line_items[].line_item.variant_id | integer | Variant id. |
refunds[].refund_line_items[].line_item.title | string | Product title. |
refunds[].refund_line_items[].line_item.variant_title | string | Variant title. |
refunds[].refund_line_items[].line_item.name | string | Product and variant name. |
refunds[].refund_line_items[].line_item.sku | string | null | SKU of the variant. |
refunds[].refund_line_items[].line_item.barcode | string | null | Barcode of the variant. |
refunds[].refund_line_items[].line_item.vendor | string | Supplier of the item. |
refunds[].refund_line_items[].line_item.type | string | Product type. |
refunds[].refund_line_items[].line_item.quantity | integer | Quantity ordered. |
refunds[].refund_line_items[].line_item.fulfillable_quantity | integer | Quantity still available to fulfill. |
refunds[].refund_line_items[].line_item.price | number | Unit price before discounts, VND. |
refunds[].refund_line_items[].line_item.price_original | number | Unit price before any promotion, VND. |
refunds[].refund_line_items[].line_item.price_promotion | number | Promotion discount per unit, VND. |
refunds[].refund_line_items[].line_item.total_discount | number | Total discount on this line, VND. |
refunds[].refund_line_items[].line_item.grams | number | Weight in grams. |
refunds[].refund_line_items[].line_item.requires_shipping | boolean | Whether the item needs shipping. |
refunds[].refund_line_items[].line_item.taxable | boolean | Whether the item is taxable. |
refunds[].refund_line_items[].line_item.gift_card | boolean | Whether the item is a gift card. |
refunds[].refund_line_items[].line_item.product_exists | boolean | False when the product has been deleted. |
refunds[].refund_line_items[].line_item.fulfillment_service | string | null | Who fulfills the item. |
refunds[].refund_line_items[].line_item.fulfillment_status | string | null | Fulfillment status of this line. |
refunds[].refund_line_items[].line_item.properties | array | null | Custom properties of the line item. |
refunds[].refund_line_items[].line_item.image | object | Variant image. |
refunds[].refund_line_items[].line_item.image.src | string | Image URL. |
refunds[].transactions | array of object | Money returned, as refund transactions. |
refunds[].transactions[].id | integer | Transaction id. |
refunds[].transactions[].order_id | integer | Order the transaction belongs to. |
refunds[].transactions[].parent_id | integer | null | Id of the transaction this one follows. |
refunds[].transactions[].kind | string | Kind: pending, authorization, capture, sale, void or refund (case varies). |
refunds[].transactions[].status | string | null | Status: pending, failure, success or error; some shops return a Vietnamese label. |
refunds[].transactions[].amount | number | Amount, VND; negative for refunds. |
refunds[].transactions[].currency | string | null | Currency code, e.g. VND. |
refunds[].transactions[].gateway | string | Name of the payment gateway. |
refunds[].transactions[].is_cod_gateway | boolean | True when the gateway is cash on delivery. |
refunds[].transactions[].authorization | string | null | Authorization code. |
refunds[].transactions[].receipt | string | null | Receipt. |
refunds[].transactions[].test | boolean | True for a test transaction. |
refunds[].transactions[].user_id | integer | null | Staff who recorded it; 0 for the system. |
refunds[].transactions[].location_id | integer | null | Location id. |
refunds[].transactions[].device_id | integer | null | Device id. |
refunds[].transactions[].created_at | string | When it was created (ISO 8601). |
refunds[].transactions[].external_transaction_id | string | null | Id at the payment provider. |
refunds[].transactions[].haravan_transaction_id | string | null | Haravan payment reference. |
refunds[].transactions[].payment_details | object | null | Payment details, if any. |
refunds[].transactions[].send_email | boolean | Whether an email was sent. |
Refund order — haravan.create_order_refund
Refund items or an amount on an order, optionally restocking.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| WRITE | high | yes | no | com.write_orders |
Input
| Field | Type | Required | Description |
|---|---|---|---|
order_id | integer | yes | Haravan order id. Min 1. |
refund | object | yes | The refund. |
refund.restock | boolean | no | Put items back in stock. |
refund.notify | boolean | no | Notify the customer. |
refund.note | string | no | Refund note. |
refund.refund_line_items | array of object | no | Items to refund: line_item_id and quantity. |
refund.transactions | array of object | no | Refund transactions: amount, kind 'refund'. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
refund | object | The refund that was created. |
refund.id | integer | Refund id. |
refund.order_id | integer | Order id. |
refund.note | string | null | Note attached to the refund. |
refund.restock | boolean | null | Whether items went back to stock. |
refund.user_id | integer | null | Staff who made the refund. |
refund.location_id | integer | null | Location items were returned to. |
refund.created_at | string | When it was created (ISO 8601). |
refund.refund_line_items | array of object | Items returned or refunded. |
refund.refund_line_items[].id | integer | Refund line item id. |
refund.refund_line_items[].line_item_id | integer | Order line item it refers to. |
refund.refund_line_items[].quantity | integer | Quantity refunded. |
refund.refund_line_items[].line_item | object | The order line item. |
refund.refund_line_items[].line_item.id | integer | Line item id. |
refund.refund_line_items[].line_item.product_id | integer | null | Product id; null when the product was deleted later. |
refund.refund_line_items[].line_item.variant_id | integer | Variant id. |
refund.refund_line_items[].line_item.title | string | Product title. |
refund.refund_line_items[].line_item.variant_title | string | Variant title. |
refund.refund_line_items[].line_item.name | string | Product and variant name. |
refund.refund_line_items[].line_item.sku | string | null | SKU of the variant. |
refund.refund_line_items[].line_item.barcode | string | null | Barcode of the variant. |
refund.refund_line_items[].line_item.vendor | string | Supplier of the item. |
refund.refund_line_items[].line_item.type | string | Product type. |
refund.refund_line_items[].line_item.quantity | integer | Quantity ordered. |
refund.refund_line_items[].line_item.fulfillable_quantity | integer | Quantity still available to fulfill. |
refund.refund_line_items[].line_item.price | number | Unit price before discounts, VND. |
refund.refund_line_items[].line_item.price_original | number | Unit price before any promotion, VND. |
refund.refund_line_items[].line_item.price_promotion | number | Promotion discount per unit, VND. |
refund.refund_line_items[].line_item.total_discount | number | Total discount on this line, VND. |
refund.refund_line_items[].line_item.grams | number | Weight in grams. |
refund.refund_line_items[].line_item.requires_shipping | boolean | Whether the item needs shipping. |
refund.refund_line_items[].line_item.taxable | boolean | Whether the item is taxable. |
refund.refund_line_items[].line_item.gift_card | boolean | Whether the item is a gift card. |
refund.refund_line_items[].line_item.product_exists | boolean | False when the product has been deleted. |
refund.refund_line_items[].line_item.fulfillment_service | string | null | Who fulfills the item. |
refund.refund_line_items[].line_item.fulfillment_status | string | null | Fulfillment status of this line. |
refund.refund_line_items[].line_item.properties | array | null | Custom properties of the line item. |
refund.refund_line_items[].line_item.image | object | Variant image. |
refund.refund_line_items[].line_item.image.src | string | Image URL. |
refund.transactions | array of object | Money returned, as refund transactions. |
refund.transactions[].id | integer | Transaction id. |
refund.transactions[].order_id | integer | Order the transaction belongs to. |
refund.transactions[].parent_id | integer | null | Id of the transaction this one follows. |
refund.transactions[].kind | string | Kind: pending, authorization, capture, sale, void or refund (case varies). |
refund.transactions[].status | string | null | Status: pending, failure, success or error; some shops return a Vietnamese label. |
refund.transactions[].amount | number | Amount, VND; negative for refunds. |
refund.transactions[].currency | string | null | Currency code, e.g. VND. |
refund.transactions[].gateway | string | Name of the payment gateway. |
refund.transactions[].is_cod_gateway | boolean | True when the gateway is cash on delivery. |
refund.transactions[].authorization | string | null | Authorization code. |
refund.transactions[].receipt | string | null | Receipt. |
refund.transactions[].test | boolean | True for a test transaction. |
refund.transactions[].user_id | integer | null | Staff who recorded it; 0 for the system. |
refund.transactions[].location_id | integer | null | Location id. |
refund.transactions[].device_id | integer | null | Device id. |
refund.transactions[].created_at | string | When it was created (ISO 8601). |
refund.transactions[].external_transaction_id | string | null | Id at the payment provider. |
refund.transactions[].haravan_transaction_id | string | null | Haravan payment reference. |
refund.transactions[].payment_details | object | null | Payment details, if any. |
refund.transactions[].send_email | boolean | Whether an email was sent. |
Get shipping rates — haravan.get_shipping_rates
Shipping rates for a destination, order value and weight.
| Side effect | Risk | Needs approval | Idempotent | Scopes |
|---|---|---|---|---|
| NONE | low | no | yes | com.read_orders |
Input
| Field | Type | Required | Description |
|---|---|---|---|
country_id | integer | no | Country id, 704 for Vietnam. Min 1. |
province_id | integer | no | Province id from list_provinces. Min 1. |
district_id | integer | no | Ward id from list_wards. Min 1. |
total_price | number | no | Order value, VND. |
total_weight | number | no | Total weight in grams. |
Extra fields: ignored.
Output
| Field | Type | Description |
|---|---|---|
shipping_rates | array of object | Shipping methods available for the destination. |
shipping_rates[].id | integer | Shipping rate id. |
shipping_rates[].title | string | Rate title. |
shipping_rates[].price | number | Price, VND. |