Skip to content

Haravan — Orders ​

List orders — haravan.list_orders ​

List orders, newest first, filtered by status, payment, delivery or date.

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyescom.read_orders

Input

FieldTypeRequiredDescription
statusstringnoOrder status filter. One of: open, closed, cancelled, any.
financial_statusstringnoPayment status filter. One of: pending, paid, partially_paid, refunded, voided, partially_refunded.
fulfillment_statusstringnoDelivery status filter. One of: unshipped, shipped, partial.
created_at_minstringnoCreated at or after (ISO 8601).
created_at_maxstringnoCreated at or before (ISO 8601).
updated_at_minstringnoUpdated at or after (ISO 8601).
updated_at_maxstringnoUpdated at or before (ISO 8601).
idsstringnoComma-separated order ids.
since_idintegernoOnly orders after this id. Min 1.
fieldsstringnoComma-separated fields to return.
pageintegernoPage number, from 1. Min 1.
limitintegernoItems per page (1-50, default 50). Min 1. Max 50.

Extra fields: ignored.

Output

FieldTypeDescription
ordersarray of objectOrders, newest first.
orders[].idintegerOrder id used by the API.
orders[].namestringOrder name shown to the shop and customer, e.g. #100020.
orders[].order_numberstringOrder number shown to the shop and customer.
orders[].numberintegerPosition of the order in the shop's order count.
orders[].tokenstringUnique token of the order.
orders[].emailstring | nullCustomer email.
orders[].contact_emailstring | nullContact email of the buyer.
orders[].notestring | nullOrder note.
orders[].note_attributesarray of objectExtra name/value details added to the order.
orders[].note_attributes[].namestringName.
orders[].note_attributes[].valuestringValue.
orders[].tagsstring | nullComma-separated tags.
orders[].currencystringCurrency code, e.g. VND.
orders[].total_pricenumberTotal of items, discounts, shipping and tax, VND.
orders[].subtotal_pricenumberPrice after discounts, before shipping and tax, VND.
orders[].total_line_items_pricenumberSum of line item prices, VND.
orders[].total_discountsnumberTotal discounts, VND.
orders[].total_taxnumberTotal tax, VND.
orders[].total_weightnumberTotal weight in grams.
orders[].taxes_includedboolean | nullWhether tax is included in the subtotal.
orders[].financial_statusstringPayment status: pending, authorized, partially_paid, paid, partially_refunded, refunded or voided.
orders[].fulfillment_statusstring | nullDelivery status: fulfilled, partial, restocked, or null/notfulfilled when nothing shipped.
orders[].gatewaystring | nullPayment gateway name.
orders[].gateway_codestring | nullPayment gateway code, e.g. COD.
orders[].processing_methodstring | nullHow the payment was processed: checkout, direct, manual or offsite.
orders[].closed_statusstringunclosed or closed.
orders[].cancelled_statusstringuncancelled or cancelled.
orders[].confirmed_statusstringunconfirmed or confirmed.
orders[].cancel_reasonstring | nullWhy it was cancelled: customer, fraud, inventory, declined or other.
orders[].created_atstringWhen the order was created (ISO 8601).
orders[].updated_atstringWhen the order was last updated (ISO 8601).
orders[].closed_atstring | nullWhen the order was closed (ISO 8601).
orders[].cancelled_atstring | nullWhen the order was cancelled (ISO 8601).
orders[].confirmed_atstring | nullWhen the order was confirmed (ISO 8601).
orders[].source_namestring | nullWhere the order came from, e.g. web or pos.
orders[].sourcestring | nullChannel that created the order.
orders[].landing_sitestring | nullPage where the buyer entered the shop.
orders[].landing_site_refstring | nullRef of the landing page.
orders[].referring_sitestring | nullSite that referred the buyer.
orders[].utm_sourcestring | nullUTM source.
orders[].utm_mediumstring | nullUTM medium.
orders[].utm_campaignstring | nullUTM campaign.
orders[].utm_termstring | nullUTM term.
orders[].utm_contentstring | nullUTM content.
orders[].buyer_accepts_marketingbooleanWhether the buyer accepts marketing.
orders[].browser_ipstring | nullBuyer's IP address.
orders[].cart_tokenstring | nullToken of the cart behind the order.
orders[].checkout_tokenstring | nullToken of the checkout behind the order.
orders[].user_idinteger | nullStaff who processed the order; 0 if none.
orders[].location_idinteger | nullLocation where the order was processed.
orders[].location_namestring | nullName of that location.
orders[].assigned_location_idinteger | nullLocation assigned to handle it.
orders[].assigned_location_namestring | nullName of the assigned location.
orders[].assigned_location_atstring | nullWhen the location was assigned.
orders[].client_detailsobjectBrowser the customer used.
orders[].client_details.accept_languagestring | nullBrowser languages.
orders[].client_details.browser_ipstring | nullIP address.
orders[].client_details.browser_heightinteger | nullScreen height in pixels.
orders[].client_details.browser_widthinteger | nullScreen width in pixels.
orders[].client_details.session_hashstring | nullSession hash.
orders[].client_details.user_agentstring | nullBrowser user agent.
orders[].billing_addressobjectBilling address.
orders[].billing_address.idintegerAddress id.
orders[].billing_address.namestringFull name of the person at this address.
orders[].billing_address.first_namestringFirst name.
orders[].billing_address.last_namestringLast name.
orders[].billing_address.companystringCompany name.
orders[].billing_address.phonestringPhone number.
orders[].billing_address.address1stringStreet address: house number and street.
orders[].billing_address.address2stringSecond address line.
orders[].billing_address.citystringCity, town or village.
orders[].billing_address.provincestringProvince or city name.
orders[].billing_address.province_codestringProvince code; matches list_provinces.
orders[].billing_address.districtstringWard name under the two-level model (district name before).
orders[].billing_address.district_codestringWard code; matches list_wards.
orders[].billing_address.wardstringWard name under the three-level model; usually empty now.
orders[].billing_address.ward_codestringWard code under the three-level model; usually empty now.
orders[].billing_address.countrystringCountry name.
orders[].billing_address.country_codestringTwo-letter country code, e.g. VN.
orders[].billing_address.zipstringPostal code.
orders[].billing_address.latitudenumberLatitude, if known.
orders[].billing_address.longitudenumberLongitude, if known.
orders[].billing_address.defaultbooleanTrue when this is the default address.
orders[].shipping_addressobjectDelivery address.
orders[].shipping_address.idintegerAddress id.
orders[].shipping_address.namestringFull name of the person at this address.
orders[].shipping_address.first_namestringFirst name.
orders[].shipping_address.last_namestringLast name.
orders[].shipping_address.companystringCompany name.
orders[].shipping_address.phonestringPhone number.
orders[].shipping_address.address1stringStreet address: house number and street.
orders[].shipping_address.address2stringSecond address line.
orders[].shipping_address.citystringCity, town or village.
orders[].shipping_address.provincestringProvince or city name.
orders[].shipping_address.province_codestringProvince code; matches list_provinces.
orders[].shipping_address.districtstringWard name under the two-level model (district name before).
orders[].shipping_address.district_codestringWard code; matches list_wards.
orders[].shipping_address.wardstringWard name under the three-level model; usually empty now.
orders[].shipping_address.ward_codestringWard code under the three-level model; usually empty now.
orders[].shipping_address.countrystringCountry name.
orders[].shipping_address.country_codestringTwo-letter country code, e.g. VN.
orders[].shipping_address.zipstringPostal code.
orders[].shipping_address.latitudenumberLatitude, if known.
orders[].shipping_address.longitudenumberLongitude, if known.
orders[].shipping_address.defaultbooleanTrue when this is the default address.
orders[].customerobjectThe customer; null for some POS orders.
orders[].customer.idintegerCustomer id.
orders[].customer.emailstring | nullEmail.
orders[].customer.phonestring | nullPhone number.
orders[].customer.first_namestring | nullFirst name.
orders[].customer.last_namestring | nullLast name.
orders[].customer.accepts_marketingbooleanWhether the customer accepts marketing.
orders[].customer.tagsstring | nullComma-separated tags.
orders[].customer.notestring | nullNote about the customer.
orders[].customer.statestringAccount state.
orders[].customer.orders_countintegerNumber of orders.
orders[].customer.total_spentnumberTotal spent, VND.
orders[].customer.last_order_idinteger | nullLatest order id.
orders[].customer.last_order_namestring | nullLatest order name.
orders[].customer.default_addressobjectDefault address.
orders[].customer.default_address.idintegerAddress id.
orders[].customer.default_address.namestringFull name of the person at this address.
orders[].customer.default_address.first_namestringFirst name.
orders[].customer.default_address.last_namestringLast name.
orders[].customer.default_address.companystringCompany name.
orders[].customer.default_address.phonestringPhone number.
orders[].customer.default_address.address1stringStreet address: house number and street.
orders[].customer.default_address.address2stringSecond address line.
orders[].customer.default_address.citystringCity, town or village.
orders[].customer.default_address.provincestringProvince or city name.
orders[].customer.default_address.province_codestringProvince code; matches list_provinces.
orders[].customer.default_address.districtstringWard name under the two-level model (district name before).
orders[].customer.default_address.district_codestringWard code; matches list_wards.
orders[].customer.default_address.wardstringWard name under the three-level model; usually empty now.
orders[].customer.default_address.ward_codestringWard code under the three-level model; usually empty now.
orders[].customer.default_address.countrystringCountry name.
orders[].customer.default_address.country_codestringTwo-letter country code, e.g. VN.
orders[].customer.default_address.zipstringPostal code.
orders[].customer.default_address.latitudenumberLatitude, if known.
orders[].customer.default_address.longitudenumberLongitude, if known.
orders[].customer.default_address.defaultbooleanTrue when this is the default address.
orders[].customer.addressesarray of objectAll addresses.
orders[].customer.addresses[].idintegerAddress id.
orders[].customer.addresses[].namestringFull name of the person at this address.
orders[].customer.addresses[].first_namestringFirst name.
orders[].customer.addresses[].last_namestringLast name.
orders[].customer.addresses[].companystringCompany name.
orders[].customer.addresses[].phonestringPhone number.
orders[].customer.addresses[].address1stringStreet address: house number and street.
orders[].customer.addresses[].address2stringSecond address line.
orders[].customer.addresses[].citystringCity, town or village.
orders[].customer.addresses[].provincestringProvince or city name.
orders[].customer.addresses[].province_codestringProvince code; matches list_provinces.
orders[].customer.addresses[].districtstringWard name under the two-level model (district name before).
orders[].customer.addresses[].district_codestringWard code; matches list_wards.
orders[].customer.addresses[].wardstringWard name under the three-level model; usually empty now.
orders[].customer.addresses[].ward_codestringWard code under the three-level model; usually empty now.
orders[].customer.addresses[].countrystringCountry name.
orders[].customer.addresses[].country_codestringTwo-letter country code, e.g. VN.
orders[].customer.addresses[].zipstringPostal code.
orders[].customer.addresses[].latitudenumberLatitude, if known.
orders[].customer.addresses[].longitudenumberLongitude, if known.
orders[].customer.addresses[].defaultbooleanTrue when this is the default address.
orders[].customer.created_atstringWhen it was created (ISO 8601).
orders[].customer.updated_atstringWhen it was last updated (ISO 8601).
orders[].line_itemsarray of objectItems ordered.
orders[].line_items[].idintegerLine item id.
orders[].line_items[].product_idinteger | nullProduct id; null when the product was deleted later.
orders[].line_items[].variant_idintegerVariant id.
orders[].line_items[].titlestringProduct title.
orders[].line_items[].variant_titlestringVariant title.
orders[].line_items[].namestringProduct and variant name.
orders[].line_items[].skustring | nullSKU of the variant.
orders[].line_items[].barcodestring | nullBarcode of the variant.
orders[].line_items[].vendorstringSupplier of the item.
orders[].line_items[].typestringProduct type.
orders[].line_items[].quantityintegerQuantity ordered.
orders[].line_items[].fulfillable_quantityintegerQuantity still available to fulfill.
orders[].line_items[].pricenumberUnit price before discounts, VND.
orders[].line_items[].price_originalnumberUnit price before any promotion, VND.
orders[].line_items[].price_promotionnumberPromotion discount per unit, VND.
orders[].line_items[].total_discountnumberTotal discount on this line, VND.
orders[].line_items[].gramsnumberWeight in grams.
orders[].line_items[].requires_shippingbooleanWhether the item needs shipping.
orders[].line_items[].taxablebooleanWhether the item is taxable.
orders[].line_items[].gift_cardbooleanWhether the item is a gift card.
orders[].line_items[].product_existsbooleanFalse when the product has been deleted.
orders[].line_items[].fulfillment_servicestring | nullWho fulfills the item.
orders[].line_items[].fulfillment_statusstring | nullFulfillment status of this line.
orders[].line_items[].propertiesarray | nullCustom properties of the line item.
orders[].line_items[].imageobjectVariant image.
orders[].line_items[].image.srcstringImage URL.
orders[].shipping_linesarray of objectShipping methods used.
orders[].shipping_lines[].codestring | nullShipping method reference.
orders[].shipping_lines[].titlestring | nullShipping method title.
orders[].shipping_lines[].pricenumberShipping price, VND.
orders[].shipping_lines[].sourcestring | nullSource of the shipping method.
orders[].discount_codesarray of objectDiscount codes applied.
orders[].discount_codes[].codestringThe code.
orders[].discount_codes[].amountnumberDiscount amount.
orders[].discount_codes[].typestringpercentage, shipping or fixed_amount.
orders[].fulfillmentsarray of objectShipments of the order.
orders[].fulfillments[].idintegerFulfillment id.
orders[].fulfillments[].order_idintegerOrder id.
orders[].fulfillments[].statusstringFulfillment status, e.g. success.
orders[].fulfillments[].tracking_companystring | nullCarrier name.
orders[].fulfillments[].tracking_company_codestring | nullCarrier code.
orders[].fulfillments[].tracking_numberstring | nullTracking number.
orders[].fulfillments[].tracking_numbersarray of stringTracking numbers.
orders[].fulfillments[].tracking_urlstring | nullTracking URL.
orders[].fulfillments[].tracking_urlsarray of stringTracking URLs.
orders[].fulfillments[].carrier_status_codestring | nullCarrier delivery status code.
orders[].fulfillments[].carrier_status_namestring | nullCarrier delivery status.
orders[].fulfillments[].carrier_cod_status_codestring | nullCash-on-delivery status code.
orders[].fulfillments[].carrier_cod_status_namestring | nullCash-on-delivery status.
orders[].fulfillments[].cod_amountnumberCash on delivery amount to collect, VND.
orders[].fulfillments[].real_shipping_feenumberActual shipping fee, VND.
orders[].fulfillments[].total_weightnumberPackage weight in grams.
orders[].fulfillments[].location_idinteger | nullLocation the order shipped from.
orders[].fulfillments[].notify_customerbooleanWhether the customer was notified.
orders[].fulfillments[].notestring | nullFulfillment note.
orders[].fulfillments[].created_atstringWhen it was created (ISO 8601).
orders[].fulfillments[].updated_atstringWhen it was last updated (ISO 8601).
orders[].fulfillments[].line_itemsarray of objectItems in this fulfillment.
orders[].fulfillments[].line_items[].idintegerLine item id.
orders[].fulfillments[].line_items[].product_idinteger | nullProduct id; null when the product was deleted later.
orders[].fulfillments[].line_items[].variant_idintegerVariant id.
orders[].fulfillments[].line_items[].titlestringProduct title.
orders[].fulfillments[].line_items[].variant_titlestringVariant title.
orders[].fulfillments[].line_items[].namestringProduct and variant name.
orders[].fulfillments[].line_items[].skustring | nullSKU of the variant.
orders[].fulfillments[].line_items[].barcodestring | nullBarcode of the variant.
orders[].fulfillments[].line_items[].vendorstringSupplier of the item.
orders[].fulfillments[].line_items[].typestringProduct type.
orders[].fulfillments[].line_items[].quantityintegerQuantity ordered.
orders[].fulfillments[].line_items[].fulfillable_quantityintegerQuantity still available to fulfill.
orders[].fulfillments[].line_items[].pricenumberUnit price before discounts, VND.
orders[].fulfillments[].line_items[].price_originalnumberUnit price before any promotion, VND.
orders[].fulfillments[].line_items[].price_promotionnumberPromotion discount per unit, VND.
orders[].fulfillments[].line_items[].total_discountnumberTotal discount on this line, VND.
orders[].fulfillments[].line_items[].gramsnumberWeight in grams.
orders[].fulfillments[].line_items[].requires_shippingbooleanWhether the item needs shipping.
orders[].fulfillments[].line_items[].taxablebooleanWhether the item is taxable.
orders[].fulfillments[].line_items[].gift_cardbooleanWhether the item is a gift card.
orders[].fulfillments[].line_items[].product_existsbooleanFalse when the product has been deleted.
orders[].fulfillments[].line_items[].fulfillment_servicestring | nullWho fulfills the item.
orders[].fulfillments[].line_items[].fulfillment_statusstring | nullFulfillment status of this line.
orders[].fulfillments[].line_items[].propertiesarray | nullCustom properties of the line item.
orders[].fulfillments[].line_items[].imageobjectVariant image.
orders[].fulfillments[].line_items[].image.srcstringImage URL.
orders[].transactionsarray of objectPayments on the order.
orders[].transactions[].idintegerTransaction id.
orders[].transactions[].order_idintegerOrder the transaction belongs to.
orders[].transactions[].parent_idinteger | nullId of the transaction this one follows.
orders[].transactions[].kindstringKind: pending, authorization, capture, sale, void or refund (case varies).
orders[].transactions[].statusstring | nullStatus: pending, failure, success or error; some shops return a Vietnamese label.
orders[].transactions[].amountnumberAmount, VND; negative for refunds.
orders[].transactions[].currencystring | nullCurrency code, e.g. VND.
orders[].transactions[].gatewaystringName of the payment gateway.
orders[].transactions[].is_cod_gatewaybooleanTrue when the gateway is cash on delivery.
orders[].transactions[].authorizationstring | nullAuthorization code.
orders[].transactions[].receiptstring | nullReceipt.
orders[].transactions[].testbooleanTrue for a test transaction.
orders[].transactions[].user_idinteger | nullStaff who recorded it; 0 for the system.
orders[].transactions[].location_idinteger | nullLocation id.
orders[].transactions[].device_idinteger | nullDevice id.
orders[].transactions[].created_atstringWhen it was created (ISO 8601).
orders[].transactions[].external_transaction_idstring | nullId at the payment provider.
orders[].transactions[].haravan_transaction_idstring | nullHaravan payment reference.
orders[].transactions[].payment_detailsobject | nullPayment details, if any.
orders[].transactions[].send_emailbooleanWhether an email was sent.
orders[].refundsarray of objectRefunds on the order.
orders[].refunds[].idintegerRefund id.
orders[].refunds[].order_idintegerOrder id.
orders[].refunds[].notestring | nullNote attached to the refund.
orders[].refunds[].restockboolean | nullWhether items went back to stock.
orders[].refunds[].user_idinteger | nullStaff who made the refund.
orders[].refunds[].location_idinteger | nullLocation items were returned to.
orders[].refunds[].created_atstringWhen it was created (ISO 8601).
orders[].refunds[].refund_line_itemsarray of objectItems returned or refunded.
orders[].refunds[].refund_line_items[].idintegerRefund line item id.
orders[].refunds[].refund_line_items[].line_item_idintegerOrder line item it refers to.
orders[].refunds[].refund_line_items[].quantityintegerQuantity refunded.
orders[].refunds[].refund_line_items[].line_itemobjectThe order line item.
orders[].refunds[].refund_line_items[].line_item.idintegerLine item id.
orders[].refunds[].refund_line_items[].line_item.product_idinteger | nullProduct id; null when the product was deleted later.
orders[].refunds[].refund_line_items[].line_item.variant_idintegerVariant id.
orders[].refunds[].refund_line_items[].line_item.titlestringProduct title.
orders[].refunds[].refund_line_items[].line_item.variant_titlestringVariant title.
orders[].refunds[].refund_line_items[].line_item.namestringProduct and variant name.
orders[].refunds[].refund_line_items[].line_item.skustring | nullSKU of the variant.
orders[].refunds[].refund_line_items[].line_item.barcodestring | nullBarcode of the variant.
orders[].refunds[].refund_line_items[].line_item.vendorstringSupplier of the item.
orders[].refunds[].refund_line_items[].line_item.typestringProduct type.
orders[].refunds[].refund_line_items[].line_item.quantityintegerQuantity ordered.
orders[].refunds[].refund_line_items[].line_item.fulfillable_quantityintegerQuantity still available to fulfill.
orders[].refunds[].refund_line_items[].line_item.pricenumberUnit price before discounts, VND.
orders[].refunds[].refund_line_items[].line_item.price_originalnumberUnit price before any promotion, VND.
orders[].refunds[].refund_line_items[].line_item.price_promotionnumberPromotion discount per unit, VND.
orders[].refunds[].refund_line_items[].line_item.total_discountnumberTotal discount on this line, VND.
orders[].refunds[].refund_line_items[].line_item.gramsnumberWeight in grams.
orders[].refunds[].refund_line_items[].line_item.requires_shippingbooleanWhether the item needs shipping.
orders[].refunds[].refund_line_items[].line_item.taxablebooleanWhether the item is taxable.
orders[].refunds[].refund_line_items[].line_item.gift_cardbooleanWhether the item is a gift card.
orders[].refunds[].refund_line_items[].line_item.product_existsbooleanFalse when the product has been deleted.
orders[].refunds[].refund_line_items[].line_item.fulfillment_servicestring | nullWho fulfills the item.
orders[].refunds[].refund_line_items[].line_item.fulfillment_statusstring | nullFulfillment status of this line.
orders[].refunds[].refund_line_items[].line_item.propertiesarray | nullCustom properties of the line item.
orders[].refunds[].refund_line_items[].line_item.imageobjectVariant image.
orders[].refunds[].refund_line_items[].line_item.image.srcstringImage URL.
orders[].refunds[].transactionsarray of objectMoney returned, as refund transactions.
orders[].refunds[].transactions[].idintegerTransaction id.
orders[].refunds[].transactions[].order_idintegerOrder the transaction belongs to.
orders[].refunds[].transactions[].parent_idinteger | nullId of the transaction this one follows.
orders[].refunds[].transactions[].kindstringKind: pending, authorization, capture, sale, void or refund (case varies).
orders[].refunds[].transactions[].statusstring | nullStatus: pending, failure, success or error; some shops return a Vietnamese label.
orders[].refunds[].transactions[].amountnumberAmount, VND; negative for refunds.
orders[].refunds[].transactions[].currencystring | nullCurrency code, e.g. VND.
orders[].refunds[].transactions[].gatewaystringName of the payment gateway.
orders[].refunds[].transactions[].is_cod_gatewaybooleanTrue when the gateway is cash on delivery.
orders[].refunds[].transactions[].authorizationstring | nullAuthorization code.
orders[].refunds[].transactions[].receiptstring | nullReceipt.
orders[].refunds[].transactions[].testbooleanTrue for a test transaction.
orders[].refunds[].transactions[].user_idinteger | nullStaff who recorded it; 0 for the system.
orders[].refunds[].transactions[].location_idinteger | nullLocation id.
orders[].refunds[].transactions[].device_idinteger | nullDevice id.
orders[].refunds[].transactions[].created_atstringWhen it was created (ISO 8601).
orders[].refunds[].transactions[].external_transaction_idstring | nullId at the payment provider.
orders[].refunds[].transactions[].haravan_transaction_idstring | nullHaravan payment reference.
orders[].refunds[].transactions[].payment_detailsobject | nullPayment details, if any.
orders[].refunds[].transactions[].send_emailbooleanWhether an email was sent.

Count orders — haravan.count_orders ​

Count orders matching status, payment, delivery or date filters.

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyescom.read_orders

Input

FieldTypeRequiredDescription
statusstringnoOrder status filter. One of: open, closed, cancelled, any.
financial_statusstringnoPayment status filter. One of: pending, paid, partially_paid, refunded, voided, partially_refunded.
fulfillment_statusstringnoDelivery status filter. One of: unshipped, shipped, partial.
created_at_minstringnoCreated at or after (ISO 8601).
created_at_maxstringnoCreated at or before (ISO 8601).
updated_at_minstringnoUpdated at or after (ISO 8601).
updated_at_maxstringnoUpdated at or before (ISO 8601).

Extra fields: ignored.

Output

FieldTypeDescription
countintegerCount.

Get order — haravan.get_order ​

Get one order with its items, customer, addresses, payment and delivery status.

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyescom.read_orders

Input

FieldTypeRequiredDescription
order_idintegeryesHaravan order id. Min 1.

Extra fields: ignored.

Output

FieldTypeDescription
orderobjectThe order.
order.idintegerOrder id used by the API.
order.namestringOrder name shown to the shop and customer, e.g. #100020.
order.order_numberstringOrder number shown to the shop and customer.
order.numberintegerPosition of the order in the shop's order count.
order.tokenstringUnique token of the order.
order.emailstring | nullCustomer email.
order.contact_emailstring | nullContact email of the buyer.
order.notestring | nullOrder note.
order.note_attributesarray of objectExtra name/value details added to the order.
order.note_attributes[].namestringName.
order.note_attributes[].valuestringValue.
order.tagsstring | nullComma-separated tags.
order.currencystringCurrency code, e.g. VND.
order.total_pricenumberTotal of items, discounts, shipping and tax, VND.
order.subtotal_pricenumberPrice after discounts, before shipping and tax, VND.
order.total_line_items_pricenumberSum of line item prices, VND.
order.total_discountsnumberTotal discounts, VND.
order.total_taxnumberTotal tax, VND.
order.total_weightnumberTotal weight in grams.
order.taxes_includedboolean | nullWhether tax is included in the subtotal.
order.financial_statusstringPayment status: pending, authorized, partially_paid, paid, partially_refunded, refunded or voided.
order.fulfillment_statusstring | nullDelivery status: fulfilled, partial, restocked, or null/notfulfilled when nothing shipped.
order.gatewaystring | nullPayment gateway name.
order.gateway_codestring | nullPayment gateway code, e.g. COD.
order.processing_methodstring | nullHow the payment was processed: checkout, direct, manual or offsite.
order.closed_statusstringunclosed or closed.
order.cancelled_statusstringuncancelled or cancelled.
order.confirmed_statusstringunconfirmed or confirmed.
order.cancel_reasonstring | nullWhy it was cancelled: customer, fraud, inventory, declined or other.
order.created_atstringWhen the order was created (ISO 8601).
order.updated_atstringWhen the order was last updated (ISO 8601).
order.closed_atstring | nullWhen the order was closed (ISO 8601).
order.cancelled_atstring | nullWhen the order was cancelled (ISO 8601).
order.confirmed_atstring | nullWhen the order was confirmed (ISO 8601).
order.source_namestring | nullWhere the order came from, e.g. web or pos.
order.sourcestring | nullChannel that created the order.
order.landing_sitestring | nullPage where the buyer entered the shop.
order.landing_site_refstring | nullRef of the landing page.
order.referring_sitestring | nullSite that referred the buyer.
order.utm_sourcestring | nullUTM source.
order.utm_mediumstring | nullUTM medium.
order.utm_campaignstring | nullUTM campaign.
order.utm_termstring | nullUTM term.
order.utm_contentstring | nullUTM content.
order.buyer_accepts_marketingbooleanWhether the buyer accepts marketing.
order.browser_ipstring | nullBuyer's IP address.
order.cart_tokenstring | nullToken of the cart behind the order.
order.checkout_tokenstring | nullToken of the checkout behind the order.
order.user_idinteger | nullStaff who processed the order; 0 if none.
order.location_idinteger | nullLocation where the order was processed.
order.location_namestring | nullName of that location.
order.assigned_location_idinteger | nullLocation assigned to handle it.
order.assigned_location_namestring | nullName of the assigned location.
order.assigned_location_atstring | nullWhen the location was assigned.
order.client_detailsobjectBrowser the customer used.
order.client_details.accept_languagestring | nullBrowser languages.
order.client_details.browser_ipstring | nullIP address.
order.client_details.browser_heightinteger | nullScreen height in pixels.
order.client_details.browser_widthinteger | nullScreen width in pixels.
order.client_details.session_hashstring | nullSession hash.
order.client_details.user_agentstring | nullBrowser user agent.
order.billing_addressobjectBilling address.
order.billing_address.idintegerAddress id.
order.billing_address.namestringFull name of the person at this address.
order.billing_address.first_namestringFirst name.
order.billing_address.last_namestringLast name.
order.billing_address.companystringCompany name.
order.billing_address.phonestringPhone number.
order.billing_address.address1stringStreet address: house number and street.
order.billing_address.address2stringSecond address line.
order.billing_address.citystringCity, town or village.
order.billing_address.provincestringProvince or city name.
order.billing_address.province_codestringProvince code; matches list_provinces.
order.billing_address.districtstringWard name under the two-level model (district name before).
order.billing_address.district_codestringWard code; matches list_wards.
order.billing_address.wardstringWard name under the three-level model; usually empty now.
order.billing_address.ward_codestringWard code under the three-level model; usually empty now.
order.billing_address.countrystringCountry name.
order.billing_address.country_codestringTwo-letter country code, e.g. VN.
order.billing_address.zipstringPostal code.
order.billing_address.latitudenumberLatitude, if known.
order.billing_address.longitudenumberLongitude, if known.
order.billing_address.defaultbooleanTrue when this is the default address.
order.shipping_addressobjectDelivery address.
order.shipping_address.idintegerAddress id.
order.shipping_address.namestringFull name of the person at this address.
order.shipping_address.first_namestringFirst name.
order.shipping_address.last_namestringLast name.
order.shipping_address.companystringCompany name.
order.shipping_address.phonestringPhone number.
order.shipping_address.address1stringStreet address: house number and street.
order.shipping_address.address2stringSecond address line.
order.shipping_address.citystringCity, town or village.
order.shipping_address.provincestringProvince or city name.
order.shipping_address.province_codestringProvince code; matches list_provinces.
order.shipping_address.districtstringWard name under the two-level model (district name before).
order.shipping_address.district_codestringWard code; matches list_wards.
order.shipping_address.wardstringWard name under the three-level model; usually empty now.
order.shipping_address.ward_codestringWard code under the three-level model; usually empty now.
order.shipping_address.countrystringCountry name.
order.shipping_address.country_codestringTwo-letter country code, e.g. VN.
order.shipping_address.zipstringPostal code.
order.shipping_address.latitudenumberLatitude, if known.
order.shipping_address.longitudenumberLongitude, if known.
order.shipping_address.defaultbooleanTrue when this is the default address.
order.customerobjectThe customer; null for some POS orders.
order.customer.idintegerCustomer id.
order.customer.emailstring | nullEmail.
order.customer.phonestring | nullPhone number.
order.customer.first_namestring | nullFirst name.
order.customer.last_namestring | nullLast name.
order.customer.accepts_marketingbooleanWhether the customer accepts marketing.
order.customer.tagsstring | nullComma-separated tags.
order.customer.notestring | nullNote about the customer.
order.customer.statestringAccount state.
order.customer.orders_countintegerNumber of orders.
order.customer.total_spentnumberTotal spent, VND.
order.customer.last_order_idinteger | nullLatest order id.
order.customer.last_order_namestring | nullLatest order name.
order.customer.default_addressobjectDefault address.
order.customer.default_address.idintegerAddress id.
order.customer.default_address.namestringFull name of the person at this address.
order.customer.default_address.first_namestringFirst name.
order.customer.default_address.last_namestringLast name.
order.customer.default_address.companystringCompany name.
order.customer.default_address.phonestringPhone number.
order.customer.default_address.address1stringStreet address: house number and street.
order.customer.default_address.address2stringSecond address line.
order.customer.default_address.citystringCity, town or village.
order.customer.default_address.provincestringProvince or city name.
order.customer.default_address.province_codestringProvince code; matches list_provinces.
order.customer.default_address.districtstringWard name under the two-level model (district name before).
order.customer.default_address.district_codestringWard code; matches list_wards.
order.customer.default_address.wardstringWard name under the three-level model; usually empty now.
order.customer.default_address.ward_codestringWard code under the three-level model; usually empty now.
order.customer.default_address.countrystringCountry name.
order.customer.default_address.country_codestringTwo-letter country code, e.g. VN.
order.customer.default_address.zipstringPostal code.
order.customer.default_address.latitudenumberLatitude, if known.
order.customer.default_address.longitudenumberLongitude, if known.
order.customer.default_address.defaultbooleanTrue when this is the default address.
order.customer.addressesarray of objectAll addresses.
order.customer.addresses[].idintegerAddress id.
order.customer.addresses[].namestringFull name of the person at this address.
order.customer.addresses[].first_namestringFirst name.
order.customer.addresses[].last_namestringLast name.
order.customer.addresses[].companystringCompany name.
order.customer.addresses[].phonestringPhone number.
order.customer.addresses[].address1stringStreet address: house number and street.
order.customer.addresses[].address2stringSecond address line.
order.customer.addresses[].citystringCity, town or village.
order.customer.addresses[].provincestringProvince or city name.
order.customer.addresses[].province_codestringProvince code; matches list_provinces.
order.customer.addresses[].districtstringWard name under the two-level model (district name before).
order.customer.addresses[].district_codestringWard code; matches list_wards.
order.customer.addresses[].wardstringWard name under the three-level model; usually empty now.
order.customer.addresses[].ward_codestringWard code under the three-level model; usually empty now.
order.customer.addresses[].countrystringCountry name.
order.customer.addresses[].country_codestringTwo-letter country code, e.g. VN.
order.customer.addresses[].zipstringPostal code.
order.customer.addresses[].latitudenumberLatitude, if known.
order.customer.addresses[].longitudenumberLongitude, if known.
order.customer.addresses[].defaultbooleanTrue when this is the default address.
order.customer.created_atstringWhen it was created (ISO 8601).
order.customer.updated_atstringWhen it was last updated (ISO 8601).
order.line_itemsarray of objectItems ordered.
order.line_items[].idintegerLine item id.
order.line_items[].product_idinteger | nullProduct id; null when the product was deleted later.
order.line_items[].variant_idintegerVariant id.
order.line_items[].titlestringProduct title.
order.line_items[].variant_titlestringVariant title.
order.line_items[].namestringProduct and variant name.
order.line_items[].skustring | nullSKU of the variant.
order.line_items[].barcodestring | nullBarcode of the variant.
order.line_items[].vendorstringSupplier of the item.
order.line_items[].typestringProduct type.
order.line_items[].quantityintegerQuantity ordered.
order.line_items[].fulfillable_quantityintegerQuantity still available to fulfill.
order.line_items[].pricenumberUnit price before discounts, VND.
order.line_items[].price_originalnumberUnit price before any promotion, VND.
order.line_items[].price_promotionnumberPromotion discount per unit, VND.
order.line_items[].total_discountnumberTotal discount on this line, VND.
order.line_items[].gramsnumberWeight in grams.
order.line_items[].requires_shippingbooleanWhether the item needs shipping.
order.line_items[].taxablebooleanWhether the item is taxable.
order.line_items[].gift_cardbooleanWhether the item is a gift card.
order.line_items[].product_existsbooleanFalse when the product has been deleted.
order.line_items[].fulfillment_servicestring | nullWho fulfills the item.
order.line_items[].fulfillment_statusstring | nullFulfillment status of this line.
order.line_items[].propertiesarray | nullCustom properties of the line item.
order.line_items[].imageobjectVariant image.
order.line_items[].image.srcstringImage URL.
order.shipping_linesarray of objectShipping methods used.
order.shipping_lines[].codestring | nullShipping method reference.
order.shipping_lines[].titlestring | nullShipping method title.
order.shipping_lines[].pricenumberShipping price, VND.
order.shipping_lines[].sourcestring | nullSource of the shipping method.
order.discount_codesarray of objectDiscount codes applied.
order.discount_codes[].codestringThe code.
order.discount_codes[].amountnumberDiscount amount.
order.discount_codes[].typestringpercentage, shipping or fixed_amount.
order.fulfillmentsarray of objectShipments of the order.
order.fulfillments[].idintegerFulfillment id.
order.fulfillments[].order_idintegerOrder id.
order.fulfillments[].statusstringFulfillment status, e.g. success.
order.fulfillments[].tracking_companystring | nullCarrier name.
order.fulfillments[].tracking_company_codestring | nullCarrier code.
order.fulfillments[].tracking_numberstring | nullTracking number.
order.fulfillments[].tracking_numbersarray of stringTracking numbers.
order.fulfillments[].tracking_urlstring | nullTracking URL.
order.fulfillments[].tracking_urlsarray of stringTracking URLs.
order.fulfillments[].carrier_status_codestring | nullCarrier delivery status code.
order.fulfillments[].carrier_status_namestring | nullCarrier delivery status.
order.fulfillments[].carrier_cod_status_codestring | nullCash-on-delivery status code.
order.fulfillments[].carrier_cod_status_namestring | nullCash-on-delivery status.
order.fulfillments[].cod_amountnumberCash on delivery amount to collect, VND.
order.fulfillments[].real_shipping_feenumberActual shipping fee, VND.
order.fulfillments[].total_weightnumberPackage weight in grams.
order.fulfillments[].location_idinteger | nullLocation the order shipped from.
order.fulfillments[].notify_customerbooleanWhether the customer was notified.
order.fulfillments[].notestring | nullFulfillment note.
order.fulfillments[].created_atstringWhen it was created (ISO 8601).
order.fulfillments[].updated_atstringWhen it was last updated (ISO 8601).
order.fulfillments[].line_itemsarray of objectItems in this fulfillment.
order.fulfillments[].line_items[].idintegerLine item id.
order.fulfillments[].line_items[].product_idinteger | nullProduct id; null when the product was deleted later.
order.fulfillments[].line_items[].variant_idintegerVariant id.
order.fulfillments[].line_items[].titlestringProduct title.
order.fulfillments[].line_items[].variant_titlestringVariant title.
order.fulfillments[].line_items[].namestringProduct and variant name.
order.fulfillments[].line_items[].skustring | nullSKU of the variant.
order.fulfillments[].line_items[].barcodestring | nullBarcode of the variant.
order.fulfillments[].line_items[].vendorstringSupplier of the item.
order.fulfillments[].line_items[].typestringProduct type.
order.fulfillments[].line_items[].quantityintegerQuantity ordered.
order.fulfillments[].line_items[].fulfillable_quantityintegerQuantity still available to fulfill.
order.fulfillments[].line_items[].pricenumberUnit price before discounts, VND.
order.fulfillments[].line_items[].price_originalnumberUnit price before any promotion, VND.
order.fulfillments[].line_items[].price_promotionnumberPromotion discount per unit, VND.
order.fulfillments[].line_items[].total_discountnumberTotal discount on this line, VND.
order.fulfillments[].line_items[].gramsnumberWeight in grams.
order.fulfillments[].line_items[].requires_shippingbooleanWhether the item needs shipping.
order.fulfillments[].line_items[].taxablebooleanWhether the item is taxable.
order.fulfillments[].line_items[].gift_cardbooleanWhether the item is a gift card.
order.fulfillments[].line_items[].product_existsbooleanFalse when the product has been deleted.
order.fulfillments[].line_items[].fulfillment_servicestring | nullWho fulfills the item.
order.fulfillments[].line_items[].fulfillment_statusstring | nullFulfillment status of this line.
order.fulfillments[].line_items[].propertiesarray | nullCustom properties of the line item.
order.fulfillments[].line_items[].imageobjectVariant image.
order.fulfillments[].line_items[].image.srcstringImage URL.
order.transactionsarray of objectPayments on the order.
order.transactions[].idintegerTransaction id.
order.transactions[].order_idintegerOrder the transaction belongs to.
order.transactions[].parent_idinteger | nullId of the transaction this one follows.
order.transactions[].kindstringKind: pending, authorization, capture, sale, void or refund (case varies).
order.transactions[].statusstring | nullStatus: pending, failure, success or error; some shops return a Vietnamese label.
order.transactions[].amountnumberAmount, VND; negative for refunds.
order.transactions[].currencystring | nullCurrency code, e.g. VND.
order.transactions[].gatewaystringName of the payment gateway.
order.transactions[].is_cod_gatewaybooleanTrue when the gateway is cash on delivery.
order.transactions[].authorizationstring | nullAuthorization code.
order.transactions[].receiptstring | nullReceipt.
order.transactions[].testbooleanTrue for a test transaction.
order.transactions[].user_idinteger | nullStaff who recorded it; 0 for the system.
order.transactions[].location_idinteger | nullLocation id.
order.transactions[].device_idinteger | nullDevice id.
order.transactions[].created_atstringWhen it was created (ISO 8601).
order.transactions[].external_transaction_idstring | nullId at the payment provider.
order.transactions[].haravan_transaction_idstring | nullHaravan payment reference.
order.transactions[].payment_detailsobject | nullPayment details, if any.
order.transactions[].send_emailbooleanWhether an email was sent.
order.refundsarray of objectRefunds on the order.
order.refunds[].idintegerRefund id.
order.refunds[].order_idintegerOrder id.
order.refunds[].notestring | nullNote attached to the refund.
order.refunds[].restockboolean | nullWhether items went back to stock.
order.refunds[].user_idinteger | nullStaff who made the refund.
order.refunds[].location_idinteger | nullLocation items were returned to.
order.refunds[].created_atstringWhen it was created (ISO 8601).
order.refunds[].refund_line_itemsarray of objectItems returned or refunded.
order.refunds[].refund_line_items[].idintegerRefund line item id.
order.refunds[].refund_line_items[].line_item_idintegerOrder line item it refers to.
order.refunds[].refund_line_items[].quantityintegerQuantity refunded.
order.refunds[].refund_line_items[].line_itemobjectThe order line item.
order.refunds[].refund_line_items[].line_item.idintegerLine item id.
order.refunds[].refund_line_items[].line_item.product_idinteger | nullProduct id; null when the product was deleted later.
order.refunds[].refund_line_items[].line_item.variant_idintegerVariant id.
order.refunds[].refund_line_items[].line_item.titlestringProduct title.
order.refunds[].refund_line_items[].line_item.variant_titlestringVariant title.
order.refunds[].refund_line_items[].line_item.namestringProduct and variant name.
order.refunds[].refund_line_items[].line_item.skustring | nullSKU of the variant.
order.refunds[].refund_line_items[].line_item.barcodestring | nullBarcode of the variant.
order.refunds[].refund_line_items[].line_item.vendorstringSupplier of the item.
order.refunds[].refund_line_items[].line_item.typestringProduct type.
order.refunds[].refund_line_items[].line_item.quantityintegerQuantity ordered.
order.refunds[].refund_line_items[].line_item.fulfillable_quantityintegerQuantity still available to fulfill.
order.refunds[].refund_line_items[].line_item.pricenumberUnit price before discounts, VND.
order.refunds[].refund_line_items[].line_item.price_originalnumberUnit price before any promotion, VND.
order.refunds[].refund_line_items[].line_item.price_promotionnumberPromotion discount per unit, VND.
order.refunds[].refund_line_items[].line_item.total_discountnumberTotal discount on this line, VND.
order.refunds[].refund_line_items[].line_item.gramsnumberWeight in grams.
order.refunds[].refund_line_items[].line_item.requires_shippingbooleanWhether the item needs shipping.
order.refunds[].refund_line_items[].line_item.taxablebooleanWhether the item is taxable.
order.refunds[].refund_line_items[].line_item.gift_cardbooleanWhether the item is a gift card.
order.refunds[].refund_line_items[].line_item.product_existsbooleanFalse when the product has been deleted.
order.refunds[].refund_line_items[].line_item.fulfillment_servicestring | nullWho fulfills the item.
order.refunds[].refund_line_items[].line_item.fulfillment_statusstring | nullFulfillment status of this line.
order.refunds[].refund_line_items[].line_item.propertiesarray | nullCustom properties of the line item.
order.refunds[].refund_line_items[].line_item.imageobjectVariant image.
order.refunds[].refund_line_items[].line_item.image.srcstringImage URL.
order.refunds[].transactionsarray of objectMoney returned, as refund transactions.
order.refunds[].transactions[].idintegerTransaction id.
order.refunds[].transactions[].order_idintegerOrder the transaction belongs to.
order.refunds[].transactions[].parent_idinteger | nullId of the transaction this one follows.
order.refunds[].transactions[].kindstringKind: pending, authorization, capture, sale, void or refund (case varies).
order.refunds[].transactions[].statusstring | nullStatus: pending, failure, success or error; some shops return a Vietnamese label.
order.refunds[].transactions[].amountnumberAmount, VND; negative for refunds.
order.refunds[].transactions[].currencystring | nullCurrency code, e.g. VND.
order.refunds[].transactions[].gatewaystringName of the payment gateway.
order.refunds[].transactions[].is_cod_gatewaybooleanTrue when the gateway is cash on delivery.
order.refunds[].transactions[].authorizationstring | nullAuthorization code.
order.refunds[].transactions[].receiptstring | nullReceipt.
order.refunds[].transactions[].testbooleanTrue for a test transaction.
order.refunds[].transactions[].user_idinteger | nullStaff who recorded it; 0 for the system.
order.refunds[].transactions[].location_idinteger | nullLocation id.
order.refunds[].transactions[].device_idinteger | nullDevice id.
order.refunds[].transactions[].created_atstringWhen it was created (ISO 8601).
order.refunds[].transactions[].external_transaction_idstring | nullId at the payment provider.
order.refunds[].transactions[].haravan_transaction_idstring | nullHaravan payment reference.
order.refunds[].transactions[].payment_detailsobject | nullPayment details, if any.
order.refunds[].transactions[].send_emailbooleanWhether 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 effectRiskNeeds approvalIdempotentScopes
WRITEmediumyesnocom.write_orders

Input

FieldTypeRequiredDescription
orderobjectyesThe order. Other Haravan order fields are also accepted.
order.line_itemsarray of objectyesProducts ordered.
order.line_items[].variant_idintegeryesVariant id.
order.line_items[].quantityintegeryesQuantity. Min 1.
order.line_items[].pricenumbernoUnit price, VND.
order.emailstringnoCustomer email.
order.phonestringnoCustomer phone number.
order.customerobjectnoCustomer: {id} of an existing one, or first_name, last_name, phone.
order.shipping_addressobjectnoDelivery address.
order.shipping_address.namestringnoRecipient full name.
order.shipping_address.phonestringnoRecipient phone number.
order.shipping_address.address1stringnoStreet address: house number and street.
order.shipping_address.province_codestringnoProvince code from list_provinces.
order.shipping_address.district_codestringnoNew ward code from list_wards (two-level model).
order.shipping_address.ward_codestringnoLeave empty under the two-level model.
order.shipping_address.country_codestringnoCountry code, VN for Vietnam.
order.billing_addressobjectnoBilling address.
order.billing_address.namestringnoRecipient full name.
order.billing_address.phonestringnoRecipient phone number.
order.billing_address.address1stringnoStreet address: house number and street.
order.billing_address.province_codestringnoProvince code from list_provinces.
order.billing_address.district_codestringnoNew ward code from list_wards (two-level model).
order.billing_address.ward_codestringnoLeave empty under the two-level model.
order.billing_address.country_codestringnoCountry code, VN for Vietnam.
order.notestringnoOrder note.
order.tagsstringnoComma-separated tags.

Extra fields: ignored.

Output

FieldTypeDescription
orderobjectThe order.
order.idintegerOrder id used by the API.
order.namestringOrder name shown to the shop and customer, e.g. #100020.
order.order_numberstringOrder number shown to the shop and customer.
order.numberintegerPosition of the order in the shop's order count.
order.tokenstringUnique token of the order.
order.emailstring | nullCustomer email.
order.contact_emailstring | nullContact email of the buyer.
order.notestring | nullOrder note.
order.note_attributesarray of objectExtra name/value details added to the order.
order.note_attributes[].namestringName.
order.note_attributes[].valuestringValue.
order.tagsstring | nullComma-separated tags.
order.currencystringCurrency code, e.g. VND.
order.total_pricenumberTotal of items, discounts, shipping and tax, VND.
order.subtotal_pricenumberPrice after discounts, before shipping and tax, VND.
order.total_line_items_pricenumberSum of line item prices, VND.
order.total_discountsnumberTotal discounts, VND.
order.total_taxnumberTotal tax, VND.
order.total_weightnumberTotal weight in grams.
order.taxes_includedboolean | nullWhether tax is included in the subtotal.
order.financial_statusstringPayment status: pending, authorized, partially_paid, paid, partially_refunded, refunded or voided.
order.fulfillment_statusstring | nullDelivery status: fulfilled, partial, restocked, or null/notfulfilled when nothing shipped.
order.gatewaystring | nullPayment gateway name.
order.gateway_codestring | nullPayment gateway code, e.g. COD.
order.processing_methodstring | nullHow the payment was processed: checkout, direct, manual or offsite.
order.closed_statusstringunclosed or closed.
order.cancelled_statusstringuncancelled or cancelled.
order.confirmed_statusstringunconfirmed or confirmed.
order.cancel_reasonstring | nullWhy it was cancelled: customer, fraud, inventory, declined or other.
order.created_atstringWhen the order was created (ISO 8601).
order.updated_atstringWhen the order was last updated (ISO 8601).
order.closed_atstring | nullWhen the order was closed (ISO 8601).
order.cancelled_atstring | nullWhen the order was cancelled (ISO 8601).
order.confirmed_atstring | nullWhen the order was confirmed (ISO 8601).
order.source_namestring | nullWhere the order came from, e.g. web or pos.
order.sourcestring | nullChannel that created the order.
order.landing_sitestring | nullPage where the buyer entered the shop.
order.landing_site_refstring | nullRef of the landing page.
order.referring_sitestring | nullSite that referred the buyer.
order.utm_sourcestring | nullUTM source.
order.utm_mediumstring | nullUTM medium.
order.utm_campaignstring | nullUTM campaign.
order.utm_termstring | nullUTM term.
order.utm_contentstring | nullUTM content.
order.buyer_accepts_marketingbooleanWhether the buyer accepts marketing.
order.browser_ipstring | nullBuyer's IP address.
order.cart_tokenstring | nullToken of the cart behind the order.
order.checkout_tokenstring | nullToken of the checkout behind the order.
order.user_idinteger | nullStaff who processed the order; 0 if none.
order.location_idinteger | nullLocation where the order was processed.
order.location_namestring | nullName of that location.
order.assigned_location_idinteger | nullLocation assigned to handle it.
order.assigned_location_namestring | nullName of the assigned location.
order.assigned_location_atstring | nullWhen the location was assigned.
order.client_detailsobjectBrowser the customer used.
order.client_details.accept_languagestring | nullBrowser languages.
order.client_details.browser_ipstring | nullIP address.
order.client_details.browser_heightinteger | nullScreen height in pixels.
order.client_details.browser_widthinteger | nullScreen width in pixels.
order.client_details.session_hashstring | nullSession hash.
order.client_details.user_agentstring | nullBrowser user agent.
order.billing_addressobjectBilling address.
order.billing_address.idintegerAddress id.
order.billing_address.namestringFull name of the person at this address.
order.billing_address.first_namestringFirst name.
order.billing_address.last_namestringLast name.
order.billing_address.companystringCompany name.
order.billing_address.phonestringPhone number.
order.billing_address.address1stringStreet address: house number and street.
order.billing_address.address2stringSecond address line.
order.billing_address.citystringCity, town or village.
order.billing_address.provincestringProvince or city name.
order.billing_address.province_codestringProvince code; matches list_provinces.
order.billing_address.districtstringWard name under the two-level model (district name before).
order.billing_address.district_codestringWard code; matches list_wards.
order.billing_address.wardstringWard name under the three-level model; usually empty now.
order.billing_address.ward_codestringWard code under the three-level model; usually empty now.
order.billing_address.countrystringCountry name.
order.billing_address.country_codestringTwo-letter country code, e.g. VN.
order.billing_address.zipstringPostal code.
order.billing_address.latitudenumberLatitude, if known.
order.billing_address.longitudenumberLongitude, if known.
order.billing_address.defaultbooleanTrue when this is the default address.
order.shipping_addressobjectDelivery address.
order.shipping_address.idintegerAddress id.
order.shipping_address.namestringFull name of the person at this address.
order.shipping_address.first_namestringFirst name.
order.shipping_address.last_namestringLast name.
order.shipping_address.companystringCompany name.
order.shipping_address.phonestringPhone number.
order.shipping_address.address1stringStreet address: house number and street.
order.shipping_address.address2stringSecond address line.
order.shipping_address.citystringCity, town or village.
order.shipping_address.provincestringProvince or city name.
order.shipping_address.province_codestringProvince code; matches list_provinces.
order.shipping_address.districtstringWard name under the two-level model (district name before).
order.shipping_address.district_codestringWard code; matches list_wards.
order.shipping_address.wardstringWard name under the three-level model; usually empty now.
order.shipping_address.ward_codestringWard code under the three-level model; usually empty now.
order.shipping_address.countrystringCountry name.
order.shipping_address.country_codestringTwo-letter country code, e.g. VN.
order.shipping_address.zipstringPostal code.
order.shipping_address.latitudenumberLatitude, if known.
order.shipping_address.longitudenumberLongitude, if known.
order.shipping_address.defaultbooleanTrue when this is the default address.
order.customerobjectThe customer; null for some POS orders.
order.customer.idintegerCustomer id.
order.customer.emailstring | nullEmail.
order.customer.phonestring | nullPhone number.
order.customer.first_namestring | nullFirst name.
order.customer.last_namestring | nullLast name.
order.customer.accepts_marketingbooleanWhether the customer accepts marketing.
order.customer.tagsstring | nullComma-separated tags.
order.customer.notestring | nullNote about the customer.
order.customer.statestringAccount state.
order.customer.orders_countintegerNumber of orders.
order.customer.total_spentnumberTotal spent, VND.
order.customer.last_order_idinteger | nullLatest order id.
order.customer.last_order_namestring | nullLatest order name.
order.customer.default_addressobjectDefault address.
order.customer.default_address.idintegerAddress id.
order.customer.default_address.namestringFull name of the person at this address.
order.customer.default_address.first_namestringFirst name.
order.customer.default_address.last_namestringLast name.
order.customer.default_address.companystringCompany name.
order.customer.default_address.phonestringPhone number.
order.customer.default_address.address1stringStreet address: house number and street.
order.customer.default_address.address2stringSecond address line.
order.customer.default_address.citystringCity, town or village.
order.customer.default_address.provincestringProvince or city name.
order.customer.default_address.province_codestringProvince code; matches list_provinces.
order.customer.default_address.districtstringWard name under the two-level model (district name before).
order.customer.default_address.district_codestringWard code; matches list_wards.
order.customer.default_address.wardstringWard name under the three-level model; usually empty now.
order.customer.default_address.ward_codestringWard code under the three-level model; usually empty now.
order.customer.default_address.countrystringCountry name.
order.customer.default_address.country_codestringTwo-letter country code, e.g. VN.
order.customer.default_address.zipstringPostal code.
order.customer.default_address.latitudenumberLatitude, if known.
order.customer.default_address.longitudenumberLongitude, if known.
order.customer.default_address.defaultbooleanTrue when this is the default address.
order.customer.addressesarray of objectAll addresses.
order.customer.addresses[].idintegerAddress id.
order.customer.addresses[].namestringFull name of the person at this address.
order.customer.addresses[].first_namestringFirst name.
order.customer.addresses[].last_namestringLast name.
order.customer.addresses[].companystringCompany name.
order.customer.addresses[].phonestringPhone number.
order.customer.addresses[].address1stringStreet address: house number and street.
order.customer.addresses[].address2stringSecond address line.
order.customer.addresses[].citystringCity, town or village.
order.customer.addresses[].provincestringProvince or city name.
order.customer.addresses[].province_codestringProvince code; matches list_provinces.
order.customer.addresses[].districtstringWard name under the two-level model (district name before).
order.customer.addresses[].district_codestringWard code; matches list_wards.
order.customer.addresses[].wardstringWard name under the three-level model; usually empty now.
order.customer.addresses[].ward_codestringWard code under the three-level model; usually empty now.
order.customer.addresses[].countrystringCountry name.
order.customer.addresses[].country_codestringTwo-letter country code, e.g. VN.
order.customer.addresses[].zipstringPostal code.
order.customer.addresses[].latitudenumberLatitude, if known.
order.customer.addresses[].longitudenumberLongitude, if known.
order.customer.addresses[].defaultbooleanTrue when this is the default address.
order.customer.created_atstringWhen it was created (ISO 8601).
order.customer.updated_atstringWhen it was last updated (ISO 8601).
order.line_itemsarray of objectItems ordered.
order.line_items[].idintegerLine item id.
order.line_items[].product_idinteger | nullProduct id; null when the product was deleted later.
order.line_items[].variant_idintegerVariant id.
order.line_items[].titlestringProduct title.
order.line_items[].variant_titlestringVariant title.
order.line_items[].namestringProduct and variant name.
order.line_items[].skustring | nullSKU of the variant.
order.line_items[].barcodestring | nullBarcode of the variant.
order.line_items[].vendorstringSupplier of the item.
order.line_items[].typestringProduct type.
order.line_items[].quantityintegerQuantity ordered.
order.line_items[].fulfillable_quantityintegerQuantity still available to fulfill.
order.line_items[].pricenumberUnit price before discounts, VND.
order.line_items[].price_originalnumberUnit price before any promotion, VND.
order.line_items[].price_promotionnumberPromotion discount per unit, VND.
order.line_items[].total_discountnumberTotal discount on this line, VND.
order.line_items[].gramsnumberWeight in grams.
order.line_items[].requires_shippingbooleanWhether the item needs shipping.
order.line_items[].taxablebooleanWhether the item is taxable.
order.line_items[].gift_cardbooleanWhether the item is a gift card.
order.line_items[].product_existsbooleanFalse when the product has been deleted.
order.line_items[].fulfillment_servicestring | nullWho fulfills the item.
order.line_items[].fulfillment_statusstring | nullFulfillment status of this line.
order.line_items[].propertiesarray | nullCustom properties of the line item.
order.line_items[].imageobjectVariant image.
order.line_items[].image.srcstringImage URL.
order.shipping_linesarray of objectShipping methods used.
order.shipping_lines[].codestring | nullShipping method reference.
order.shipping_lines[].titlestring | nullShipping method title.
order.shipping_lines[].pricenumberShipping price, VND.
order.shipping_lines[].sourcestring | nullSource of the shipping method.
order.discount_codesarray of objectDiscount codes applied.
order.discount_codes[].codestringThe code.
order.discount_codes[].amountnumberDiscount amount.
order.discount_codes[].typestringpercentage, shipping or fixed_amount.
order.fulfillmentsarray of objectShipments of the order.
order.fulfillments[].idintegerFulfillment id.
order.fulfillments[].order_idintegerOrder id.
order.fulfillments[].statusstringFulfillment status, e.g. success.
order.fulfillments[].tracking_companystring | nullCarrier name.
order.fulfillments[].tracking_company_codestring | nullCarrier code.
order.fulfillments[].tracking_numberstring | nullTracking number.
order.fulfillments[].tracking_numbersarray of stringTracking numbers.
order.fulfillments[].tracking_urlstring | nullTracking URL.
order.fulfillments[].tracking_urlsarray of stringTracking URLs.
order.fulfillments[].carrier_status_codestring | nullCarrier delivery status code.
order.fulfillments[].carrier_status_namestring | nullCarrier delivery status.
order.fulfillments[].carrier_cod_status_codestring | nullCash-on-delivery status code.
order.fulfillments[].carrier_cod_status_namestring | nullCash-on-delivery status.
order.fulfillments[].cod_amountnumberCash on delivery amount to collect, VND.
order.fulfillments[].real_shipping_feenumberActual shipping fee, VND.
order.fulfillments[].total_weightnumberPackage weight in grams.
order.fulfillments[].location_idinteger | nullLocation the order shipped from.
order.fulfillments[].notify_customerbooleanWhether the customer was notified.
order.fulfillments[].notestring | nullFulfillment note.
order.fulfillments[].created_atstringWhen it was created (ISO 8601).
order.fulfillments[].updated_atstringWhen it was last updated (ISO 8601).
order.fulfillments[].line_itemsarray of objectItems in this fulfillment.
order.fulfillments[].line_items[].idintegerLine item id.
order.fulfillments[].line_items[].product_idinteger | nullProduct id; null when the product was deleted later.
order.fulfillments[].line_items[].variant_idintegerVariant id.
order.fulfillments[].line_items[].titlestringProduct title.
order.fulfillments[].line_items[].variant_titlestringVariant title.
order.fulfillments[].line_items[].namestringProduct and variant name.
order.fulfillments[].line_items[].skustring | nullSKU of the variant.
order.fulfillments[].line_items[].barcodestring | nullBarcode of the variant.
order.fulfillments[].line_items[].vendorstringSupplier of the item.
order.fulfillments[].line_items[].typestringProduct type.
order.fulfillments[].line_items[].quantityintegerQuantity ordered.
order.fulfillments[].line_items[].fulfillable_quantityintegerQuantity still available to fulfill.
order.fulfillments[].line_items[].pricenumberUnit price before discounts, VND.
order.fulfillments[].line_items[].price_originalnumberUnit price before any promotion, VND.
order.fulfillments[].line_items[].price_promotionnumberPromotion discount per unit, VND.
order.fulfillments[].line_items[].total_discountnumberTotal discount on this line, VND.
order.fulfillments[].line_items[].gramsnumberWeight in grams.
order.fulfillments[].line_items[].requires_shippingbooleanWhether the item needs shipping.
order.fulfillments[].line_items[].taxablebooleanWhether the item is taxable.
order.fulfillments[].line_items[].gift_cardbooleanWhether the item is a gift card.
order.fulfillments[].line_items[].product_existsbooleanFalse when the product has been deleted.
order.fulfillments[].line_items[].fulfillment_servicestring | nullWho fulfills the item.
order.fulfillments[].line_items[].fulfillment_statusstring | nullFulfillment status of this line.
order.fulfillments[].line_items[].propertiesarray | nullCustom properties of the line item.
order.fulfillments[].line_items[].imageobjectVariant image.
order.fulfillments[].line_items[].image.srcstringImage URL.
order.transactionsarray of objectPayments on the order.
order.transactions[].idintegerTransaction id.
order.transactions[].order_idintegerOrder the transaction belongs to.
order.transactions[].parent_idinteger | nullId of the transaction this one follows.
order.transactions[].kindstringKind: pending, authorization, capture, sale, void or refund (case varies).
order.transactions[].statusstring | nullStatus: pending, failure, success or error; some shops return a Vietnamese label.
order.transactions[].amountnumberAmount, VND; negative for refunds.
order.transactions[].currencystring | nullCurrency code, e.g. VND.
order.transactions[].gatewaystringName of the payment gateway.
order.transactions[].is_cod_gatewaybooleanTrue when the gateway is cash on delivery.
order.transactions[].authorizationstring | nullAuthorization code.
order.transactions[].receiptstring | nullReceipt.
order.transactions[].testbooleanTrue for a test transaction.
order.transactions[].user_idinteger | nullStaff who recorded it; 0 for the system.
order.transactions[].location_idinteger | nullLocation id.
order.transactions[].device_idinteger | nullDevice id.
order.transactions[].created_atstringWhen it was created (ISO 8601).
order.transactions[].external_transaction_idstring | nullId at the payment provider.
order.transactions[].haravan_transaction_idstring | nullHaravan payment reference.
order.transactions[].payment_detailsobject | nullPayment details, if any.
order.transactions[].send_emailbooleanWhether an email was sent.
order.refundsarray of objectRefunds on the order.
order.refunds[].idintegerRefund id.
order.refunds[].order_idintegerOrder id.
order.refunds[].notestring | nullNote attached to the refund.
order.refunds[].restockboolean | nullWhether items went back to stock.
order.refunds[].user_idinteger | nullStaff who made the refund.
order.refunds[].location_idinteger | nullLocation items were returned to.
order.refunds[].created_atstringWhen it was created (ISO 8601).
order.refunds[].refund_line_itemsarray of objectItems returned or refunded.
order.refunds[].refund_line_items[].idintegerRefund line item id.
order.refunds[].refund_line_items[].line_item_idintegerOrder line item it refers to.
order.refunds[].refund_line_items[].quantityintegerQuantity refunded.
order.refunds[].refund_line_items[].line_itemobjectThe order line item.
order.refunds[].refund_line_items[].line_item.idintegerLine item id.
order.refunds[].refund_line_items[].line_item.product_idinteger | nullProduct id; null when the product was deleted later.
order.refunds[].refund_line_items[].line_item.variant_idintegerVariant id.
order.refunds[].refund_line_items[].line_item.titlestringProduct title.
order.refunds[].refund_line_items[].line_item.variant_titlestringVariant title.
order.refunds[].refund_line_items[].line_item.namestringProduct and variant name.
order.refunds[].refund_line_items[].line_item.skustring | nullSKU of the variant.
order.refunds[].refund_line_items[].line_item.barcodestring | nullBarcode of the variant.
order.refunds[].refund_line_items[].line_item.vendorstringSupplier of the item.
order.refunds[].refund_line_items[].line_item.typestringProduct type.
order.refunds[].refund_line_items[].line_item.quantityintegerQuantity ordered.
order.refunds[].refund_line_items[].line_item.fulfillable_quantityintegerQuantity still available to fulfill.
order.refunds[].refund_line_items[].line_item.pricenumberUnit price before discounts, VND.
order.refunds[].refund_line_items[].line_item.price_originalnumberUnit price before any promotion, VND.
order.refunds[].refund_line_items[].line_item.price_promotionnumberPromotion discount per unit, VND.
order.refunds[].refund_line_items[].line_item.total_discountnumberTotal discount on this line, VND.
order.refunds[].refund_line_items[].line_item.gramsnumberWeight in grams.
order.refunds[].refund_line_items[].line_item.requires_shippingbooleanWhether the item needs shipping.
order.refunds[].refund_line_items[].line_item.taxablebooleanWhether the item is taxable.
order.refunds[].refund_line_items[].line_item.gift_cardbooleanWhether the item is a gift card.
order.refunds[].refund_line_items[].line_item.product_existsbooleanFalse when the product has been deleted.
order.refunds[].refund_line_items[].line_item.fulfillment_servicestring | nullWho fulfills the item.
order.refunds[].refund_line_items[].line_item.fulfillment_statusstring | nullFulfillment status of this line.
order.refunds[].refund_line_items[].line_item.propertiesarray | nullCustom properties of the line item.
order.refunds[].refund_line_items[].line_item.imageobjectVariant image.
order.refunds[].refund_line_items[].line_item.image.srcstringImage URL.
order.refunds[].transactionsarray of objectMoney returned, as refund transactions.
order.refunds[].transactions[].idintegerTransaction id.
order.refunds[].transactions[].order_idintegerOrder the transaction belongs to.
order.refunds[].transactions[].parent_idinteger | nullId of the transaction this one follows.
order.refunds[].transactions[].kindstringKind: pending, authorization, capture, sale, void or refund (case varies).
order.refunds[].transactions[].statusstring | nullStatus: pending, failure, success or error; some shops return a Vietnamese label.
order.refunds[].transactions[].amountnumberAmount, VND; negative for refunds.
order.refunds[].transactions[].currencystring | nullCurrency code, e.g. VND.
order.refunds[].transactions[].gatewaystringName of the payment gateway.
order.refunds[].transactions[].is_cod_gatewaybooleanTrue when the gateway is cash on delivery.
order.refunds[].transactions[].authorizationstring | nullAuthorization code.
order.refunds[].transactions[].receiptstring | nullReceipt.
order.refunds[].transactions[].testbooleanTrue for a test transaction.
order.refunds[].transactions[].user_idinteger | nullStaff who recorded it; 0 for the system.
order.refunds[].transactions[].location_idinteger | nullLocation id.
order.refunds[].transactions[].device_idinteger | nullDevice id.
order.refunds[].transactions[].created_atstringWhen it was created (ISO 8601).
order.refunds[].transactions[].external_transaction_idstring | nullId at the payment provider.
order.refunds[].transactions[].haravan_transaction_idstring | nullHaravan payment reference.
order.refunds[].transactions[].payment_detailsobject | nullPayment details, if any.
order.refunds[].transactions[].send_emailbooleanWhether 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 effectRiskNeeds approvalIdempotentScopes
WRITEmediumyesyescom.write_orders

Input

FieldTypeRequiredDescription
order_idintegeryesHaravan order id. Min 1.
orderobjectyesFields to change.
order.emailstringnoCustomer email.
order.phonestringnoCustomer phone number.
order.customerobjectnoCustomer: {id} of an existing one, or first_name, last_name, phone.
order.shipping_addressobjectnoDelivery address.
order.shipping_address.namestringnoRecipient full name.
order.shipping_address.phonestringnoRecipient phone number.
order.shipping_address.address1stringnoStreet address: house number and street.
order.shipping_address.province_codestringnoProvince code from list_provinces.
order.shipping_address.district_codestringnoNew ward code from list_wards (two-level model).
order.shipping_address.ward_codestringnoLeave empty under the two-level model.
order.shipping_address.country_codestringnoCountry code, VN for Vietnam.
order.billing_addressobjectnoBilling address.
order.billing_address.namestringnoRecipient full name.
order.billing_address.phonestringnoRecipient phone number.
order.billing_address.address1stringnoStreet address: house number and street.
order.billing_address.province_codestringnoProvince code from list_provinces.
order.billing_address.district_codestringnoNew ward code from list_wards (two-level model).
order.billing_address.ward_codestringnoLeave empty under the two-level model.
order.billing_address.country_codestringnoCountry code, VN for Vietnam.
order.notestringnoOrder note.
order.tagsstringnoComma-separated tags.

Extra fields: ignored.

Output

FieldTypeDescription
orderobjectThe order.
order.idintegerOrder id used by the API.
order.namestringOrder name shown to the shop and customer, e.g. #100020.
order.order_numberstringOrder number shown to the shop and customer.
order.numberintegerPosition of the order in the shop's order count.
order.tokenstringUnique token of the order.
order.emailstring | nullCustomer email.
order.contact_emailstring | nullContact email of the buyer.
order.notestring | nullOrder note.
order.note_attributesarray of objectExtra name/value details added to the order.
order.note_attributes[].namestringName.
order.note_attributes[].valuestringValue.
order.tagsstring | nullComma-separated tags.
order.currencystringCurrency code, e.g. VND.
order.total_pricenumberTotal of items, discounts, shipping and tax, VND.
order.subtotal_pricenumberPrice after discounts, before shipping and tax, VND.
order.total_line_items_pricenumberSum of line item prices, VND.
order.total_discountsnumberTotal discounts, VND.
order.total_taxnumberTotal tax, VND.
order.total_weightnumberTotal weight in grams.
order.taxes_includedboolean | nullWhether tax is included in the subtotal.
order.financial_statusstringPayment status: pending, authorized, partially_paid, paid, partially_refunded, refunded or voided.
order.fulfillment_statusstring | nullDelivery status: fulfilled, partial, restocked, or null/notfulfilled when nothing shipped.
order.gatewaystring | nullPayment gateway name.
order.gateway_codestring | nullPayment gateway code, e.g. COD.
order.processing_methodstring | nullHow the payment was processed: checkout, direct, manual or offsite.
order.closed_statusstringunclosed or closed.
order.cancelled_statusstringuncancelled or cancelled.
order.confirmed_statusstringunconfirmed or confirmed.
order.cancel_reasonstring | nullWhy it was cancelled: customer, fraud, inventory, declined or other.
order.created_atstringWhen the order was created (ISO 8601).
order.updated_atstringWhen the order was last updated (ISO 8601).
order.closed_atstring | nullWhen the order was closed (ISO 8601).
order.cancelled_atstring | nullWhen the order was cancelled (ISO 8601).
order.confirmed_atstring | nullWhen the order was confirmed (ISO 8601).
order.source_namestring | nullWhere the order came from, e.g. web or pos.
order.sourcestring | nullChannel that created the order.
order.landing_sitestring | nullPage where the buyer entered the shop.
order.landing_site_refstring | nullRef of the landing page.
order.referring_sitestring | nullSite that referred the buyer.
order.utm_sourcestring | nullUTM source.
order.utm_mediumstring | nullUTM medium.
order.utm_campaignstring | nullUTM campaign.
order.utm_termstring | nullUTM term.
order.utm_contentstring | nullUTM content.
order.buyer_accepts_marketingbooleanWhether the buyer accepts marketing.
order.browser_ipstring | nullBuyer's IP address.
order.cart_tokenstring | nullToken of the cart behind the order.
order.checkout_tokenstring | nullToken of the checkout behind the order.
order.user_idinteger | nullStaff who processed the order; 0 if none.
order.location_idinteger | nullLocation where the order was processed.
order.location_namestring | nullName of that location.
order.assigned_location_idinteger | nullLocation assigned to handle it.
order.assigned_location_namestring | nullName of the assigned location.
order.assigned_location_atstring | nullWhen the location was assigned.
order.client_detailsobjectBrowser the customer used.
order.client_details.accept_languagestring | nullBrowser languages.
order.client_details.browser_ipstring | nullIP address.
order.client_details.browser_heightinteger | nullScreen height in pixels.
order.client_details.browser_widthinteger | nullScreen width in pixels.
order.client_details.session_hashstring | nullSession hash.
order.client_details.user_agentstring | nullBrowser user agent.
order.billing_addressobjectBilling address.
order.billing_address.idintegerAddress id.
order.billing_address.namestringFull name of the person at this address.
order.billing_address.first_namestringFirst name.
order.billing_address.last_namestringLast name.
order.billing_address.companystringCompany name.
order.billing_address.phonestringPhone number.
order.billing_address.address1stringStreet address: house number and street.
order.billing_address.address2stringSecond address line.
order.billing_address.citystringCity, town or village.
order.billing_address.provincestringProvince or city name.
order.billing_address.province_codestringProvince code; matches list_provinces.
order.billing_address.districtstringWard name under the two-level model (district name before).
order.billing_address.district_codestringWard code; matches list_wards.
order.billing_address.wardstringWard name under the three-level model; usually empty now.
order.billing_address.ward_codestringWard code under the three-level model; usually empty now.
order.billing_address.countrystringCountry name.
order.billing_address.country_codestringTwo-letter country code, e.g. VN.
order.billing_address.zipstringPostal code.
order.billing_address.latitudenumberLatitude, if known.
order.billing_address.longitudenumberLongitude, if known.
order.billing_address.defaultbooleanTrue when this is the default address.
order.shipping_addressobjectDelivery address.
order.shipping_address.idintegerAddress id.
order.shipping_address.namestringFull name of the person at this address.
order.shipping_address.first_namestringFirst name.
order.shipping_address.last_namestringLast name.
order.shipping_address.companystringCompany name.
order.shipping_address.phonestringPhone number.
order.shipping_address.address1stringStreet address: house number and street.
order.shipping_address.address2stringSecond address line.
order.shipping_address.citystringCity, town or village.
order.shipping_address.provincestringProvince or city name.
order.shipping_address.province_codestringProvince code; matches list_provinces.
order.shipping_address.districtstringWard name under the two-level model (district name before).
order.shipping_address.district_codestringWard code; matches list_wards.
order.shipping_address.wardstringWard name under the three-level model; usually empty now.
order.shipping_address.ward_codestringWard code under the three-level model; usually empty now.
order.shipping_address.countrystringCountry name.
order.shipping_address.country_codestringTwo-letter country code, e.g. VN.
order.shipping_address.zipstringPostal code.
order.shipping_address.latitudenumberLatitude, if known.
order.shipping_address.longitudenumberLongitude, if known.
order.shipping_address.defaultbooleanTrue when this is the default address.
order.customerobjectThe customer; null for some POS orders.
order.customer.idintegerCustomer id.
order.customer.emailstring | nullEmail.
order.customer.phonestring | nullPhone number.
order.customer.first_namestring | nullFirst name.
order.customer.last_namestring | nullLast name.
order.customer.accepts_marketingbooleanWhether the customer accepts marketing.
order.customer.tagsstring | nullComma-separated tags.
order.customer.notestring | nullNote about the customer.
order.customer.statestringAccount state.
order.customer.orders_countintegerNumber of orders.
order.customer.total_spentnumberTotal spent, VND.
order.customer.last_order_idinteger | nullLatest order id.
order.customer.last_order_namestring | nullLatest order name.
order.customer.default_addressobjectDefault address.
order.customer.default_address.idintegerAddress id.
order.customer.default_address.namestringFull name of the person at this address.
order.customer.default_address.first_namestringFirst name.
order.customer.default_address.last_namestringLast name.
order.customer.default_address.companystringCompany name.
order.customer.default_address.phonestringPhone number.
order.customer.default_address.address1stringStreet address: house number and street.
order.customer.default_address.address2stringSecond address line.
order.customer.default_address.citystringCity, town or village.
order.customer.default_address.provincestringProvince or city name.
order.customer.default_address.province_codestringProvince code; matches list_provinces.
order.customer.default_address.districtstringWard name under the two-level model (district name before).
order.customer.default_address.district_codestringWard code; matches list_wards.
order.customer.default_address.wardstringWard name under the three-level model; usually empty now.
order.customer.default_address.ward_codestringWard code under the three-level model; usually empty now.
order.customer.default_address.countrystringCountry name.
order.customer.default_address.country_codestringTwo-letter country code, e.g. VN.
order.customer.default_address.zipstringPostal code.
order.customer.default_address.latitudenumberLatitude, if known.
order.customer.default_address.longitudenumberLongitude, if known.
order.customer.default_address.defaultbooleanTrue when this is the default address.
order.customer.addressesarray of objectAll addresses.
order.customer.addresses[].idintegerAddress id.
order.customer.addresses[].namestringFull name of the person at this address.
order.customer.addresses[].first_namestringFirst name.
order.customer.addresses[].last_namestringLast name.
order.customer.addresses[].companystringCompany name.
order.customer.addresses[].phonestringPhone number.
order.customer.addresses[].address1stringStreet address: house number and street.
order.customer.addresses[].address2stringSecond address line.
order.customer.addresses[].citystringCity, town or village.
order.customer.addresses[].provincestringProvince or city name.
order.customer.addresses[].province_codestringProvince code; matches list_provinces.
order.customer.addresses[].districtstringWard name under the two-level model (district name before).
order.customer.addresses[].district_codestringWard code; matches list_wards.
order.customer.addresses[].wardstringWard name under the three-level model; usually empty now.
order.customer.addresses[].ward_codestringWard code under the three-level model; usually empty now.
order.customer.addresses[].countrystringCountry name.
order.customer.addresses[].country_codestringTwo-letter country code, e.g. VN.
order.customer.addresses[].zipstringPostal code.
order.customer.addresses[].latitudenumberLatitude, if known.
order.customer.addresses[].longitudenumberLongitude, if known.
order.customer.addresses[].defaultbooleanTrue when this is the default address.
order.customer.created_atstringWhen it was created (ISO 8601).
order.customer.updated_atstringWhen it was last updated (ISO 8601).
order.line_itemsarray of objectItems ordered.
order.line_items[].idintegerLine item id.
order.line_items[].product_idinteger | nullProduct id; null when the product was deleted later.
order.line_items[].variant_idintegerVariant id.
order.line_items[].titlestringProduct title.
order.line_items[].variant_titlestringVariant title.
order.line_items[].namestringProduct and variant name.
order.line_items[].skustring | nullSKU of the variant.
order.line_items[].barcodestring | nullBarcode of the variant.
order.line_items[].vendorstringSupplier of the item.
order.line_items[].typestringProduct type.
order.line_items[].quantityintegerQuantity ordered.
order.line_items[].fulfillable_quantityintegerQuantity still available to fulfill.
order.line_items[].pricenumberUnit price before discounts, VND.
order.line_items[].price_originalnumberUnit price before any promotion, VND.
order.line_items[].price_promotionnumberPromotion discount per unit, VND.
order.line_items[].total_discountnumberTotal discount on this line, VND.
order.line_items[].gramsnumberWeight in grams.
order.line_items[].requires_shippingbooleanWhether the item needs shipping.
order.line_items[].taxablebooleanWhether the item is taxable.
order.line_items[].gift_cardbooleanWhether the item is a gift card.
order.line_items[].product_existsbooleanFalse when the product has been deleted.
order.line_items[].fulfillment_servicestring | nullWho fulfills the item.
order.line_items[].fulfillment_statusstring | nullFulfillment status of this line.
order.line_items[].propertiesarray | nullCustom properties of the line item.
order.line_items[].imageobjectVariant image.
order.line_items[].image.srcstringImage URL.
order.shipping_linesarray of objectShipping methods used.
order.shipping_lines[].codestring | nullShipping method reference.
order.shipping_lines[].titlestring | nullShipping method title.
order.shipping_lines[].pricenumberShipping price, VND.
order.shipping_lines[].sourcestring | nullSource of the shipping method.
order.discount_codesarray of objectDiscount codes applied.
order.discount_codes[].codestringThe code.
order.discount_codes[].amountnumberDiscount amount.
order.discount_codes[].typestringpercentage, shipping or fixed_amount.
order.fulfillmentsarray of objectShipments of the order.
order.fulfillments[].idintegerFulfillment id.
order.fulfillments[].order_idintegerOrder id.
order.fulfillments[].statusstringFulfillment status, e.g. success.
order.fulfillments[].tracking_companystring | nullCarrier name.
order.fulfillments[].tracking_company_codestring | nullCarrier code.
order.fulfillments[].tracking_numberstring | nullTracking number.
order.fulfillments[].tracking_numbersarray of stringTracking numbers.
order.fulfillments[].tracking_urlstring | nullTracking URL.
order.fulfillments[].tracking_urlsarray of stringTracking URLs.
order.fulfillments[].carrier_status_codestring | nullCarrier delivery status code.
order.fulfillments[].carrier_status_namestring | nullCarrier delivery status.
order.fulfillments[].carrier_cod_status_codestring | nullCash-on-delivery status code.
order.fulfillments[].carrier_cod_status_namestring | nullCash-on-delivery status.
order.fulfillments[].cod_amountnumberCash on delivery amount to collect, VND.
order.fulfillments[].real_shipping_feenumberActual shipping fee, VND.
order.fulfillments[].total_weightnumberPackage weight in grams.
order.fulfillments[].location_idinteger | nullLocation the order shipped from.
order.fulfillments[].notify_customerbooleanWhether the customer was notified.
order.fulfillments[].notestring | nullFulfillment note.
order.fulfillments[].created_atstringWhen it was created (ISO 8601).
order.fulfillments[].updated_atstringWhen it was last updated (ISO 8601).
order.fulfillments[].line_itemsarray of objectItems in this fulfillment.
order.fulfillments[].line_items[].idintegerLine item id.
order.fulfillments[].line_items[].product_idinteger | nullProduct id; null when the product was deleted later.
order.fulfillments[].line_items[].variant_idintegerVariant id.
order.fulfillments[].line_items[].titlestringProduct title.
order.fulfillments[].line_items[].variant_titlestringVariant title.
order.fulfillments[].line_items[].namestringProduct and variant name.
order.fulfillments[].line_items[].skustring | nullSKU of the variant.
order.fulfillments[].line_items[].barcodestring | nullBarcode of the variant.
order.fulfillments[].line_items[].vendorstringSupplier of the item.
order.fulfillments[].line_items[].typestringProduct type.
order.fulfillments[].line_items[].quantityintegerQuantity ordered.
order.fulfillments[].line_items[].fulfillable_quantityintegerQuantity still available to fulfill.
order.fulfillments[].line_items[].pricenumberUnit price before discounts, VND.
order.fulfillments[].line_items[].price_originalnumberUnit price before any promotion, VND.
order.fulfillments[].line_items[].price_promotionnumberPromotion discount per unit, VND.
order.fulfillments[].line_items[].total_discountnumberTotal discount on this line, VND.
order.fulfillments[].line_items[].gramsnumberWeight in grams.
order.fulfillments[].line_items[].requires_shippingbooleanWhether the item needs shipping.
order.fulfillments[].line_items[].taxablebooleanWhether the item is taxable.
order.fulfillments[].line_items[].gift_cardbooleanWhether the item is a gift card.
order.fulfillments[].line_items[].product_existsbooleanFalse when the product has been deleted.
order.fulfillments[].line_items[].fulfillment_servicestring | nullWho fulfills the item.
order.fulfillments[].line_items[].fulfillment_statusstring | nullFulfillment status of this line.
order.fulfillments[].line_items[].propertiesarray | nullCustom properties of the line item.
order.fulfillments[].line_items[].imageobjectVariant image.
order.fulfillments[].line_items[].image.srcstringImage URL.
order.transactionsarray of objectPayments on the order.
order.transactions[].idintegerTransaction id.
order.transactions[].order_idintegerOrder the transaction belongs to.
order.transactions[].parent_idinteger | nullId of the transaction this one follows.
order.transactions[].kindstringKind: pending, authorization, capture, sale, void or refund (case varies).
order.transactions[].statusstring | nullStatus: pending, failure, success or error; some shops return a Vietnamese label.
order.transactions[].amountnumberAmount, VND; negative for refunds.
order.transactions[].currencystring | nullCurrency code, e.g. VND.
order.transactions[].gatewaystringName of the payment gateway.
order.transactions[].is_cod_gatewaybooleanTrue when the gateway is cash on delivery.
order.transactions[].authorizationstring | nullAuthorization code.
order.transactions[].receiptstring | nullReceipt.
order.transactions[].testbooleanTrue for a test transaction.
order.transactions[].user_idinteger | nullStaff who recorded it; 0 for the system.
order.transactions[].location_idinteger | nullLocation id.
order.transactions[].device_idinteger | nullDevice id.
order.transactions[].created_atstringWhen it was created (ISO 8601).
order.transactions[].external_transaction_idstring | nullId at the payment provider.
order.transactions[].haravan_transaction_idstring | nullHaravan payment reference.
order.transactions[].payment_detailsobject | nullPayment details, if any.
order.transactions[].send_emailbooleanWhether an email was sent.
order.refundsarray of objectRefunds on the order.
order.refunds[].idintegerRefund id.
order.refunds[].order_idintegerOrder id.
order.refunds[].notestring | nullNote attached to the refund.
order.refunds[].restockboolean | nullWhether items went back to stock.
order.refunds[].user_idinteger | nullStaff who made the refund.
order.refunds[].location_idinteger | nullLocation items were returned to.
order.refunds[].created_atstringWhen it was created (ISO 8601).
order.refunds[].refund_line_itemsarray of objectItems returned or refunded.
order.refunds[].refund_line_items[].idintegerRefund line item id.
order.refunds[].refund_line_items[].line_item_idintegerOrder line item it refers to.
order.refunds[].refund_line_items[].quantityintegerQuantity refunded.
order.refunds[].refund_line_items[].line_itemobjectThe order line item.
order.refunds[].refund_line_items[].line_item.idintegerLine item id.
order.refunds[].refund_line_items[].line_item.product_idinteger | nullProduct id; null when the product was deleted later.
order.refunds[].refund_line_items[].line_item.variant_idintegerVariant id.
order.refunds[].refund_line_items[].line_item.titlestringProduct title.
order.refunds[].refund_line_items[].line_item.variant_titlestringVariant title.
order.refunds[].refund_line_items[].line_item.namestringProduct and variant name.
order.refunds[].refund_line_items[].line_item.skustring | nullSKU of the variant.
order.refunds[].refund_line_items[].line_item.barcodestring | nullBarcode of the variant.
order.refunds[].refund_line_items[].line_item.vendorstringSupplier of the item.
order.refunds[].refund_line_items[].line_item.typestringProduct type.
order.refunds[].refund_line_items[].line_item.quantityintegerQuantity ordered.
order.refunds[].refund_line_items[].line_item.fulfillable_quantityintegerQuantity still available to fulfill.
order.refunds[].refund_line_items[].line_item.pricenumberUnit price before discounts, VND.
order.refunds[].refund_line_items[].line_item.price_originalnumberUnit price before any promotion, VND.
order.refunds[].refund_line_items[].line_item.price_promotionnumberPromotion discount per unit, VND.
order.refunds[].refund_line_items[].line_item.total_discountnumberTotal discount on this line, VND.
order.refunds[].refund_line_items[].line_item.gramsnumberWeight in grams.
order.refunds[].refund_line_items[].line_item.requires_shippingbooleanWhether the item needs shipping.
order.refunds[].refund_line_items[].line_item.taxablebooleanWhether the item is taxable.
order.refunds[].refund_line_items[].line_item.gift_cardbooleanWhether the item is a gift card.
order.refunds[].refund_line_items[].line_item.product_existsbooleanFalse when the product has been deleted.
order.refunds[].refund_line_items[].line_item.fulfillment_servicestring | nullWho fulfills the item.
order.refunds[].refund_line_items[].line_item.fulfillment_statusstring | nullFulfillment status of this line.
order.refunds[].refund_line_items[].line_item.propertiesarray | nullCustom properties of the line item.
order.refunds[].refund_line_items[].line_item.imageobjectVariant image.
order.refunds[].refund_line_items[].line_item.image.srcstringImage URL.
order.refunds[].transactionsarray of objectMoney returned, as refund transactions.
order.refunds[].transactions[].idintegerTransaction id.
order.refunds[].transactions[].order_idintegerOrder the transaction belongs to.
order.refunds[].transactions[].parent_idinteger | nullId of the transaction this one follows.
order.refunds[].transactions[].kindstringKind: pending, authorization, capture, sale, void or refund (case varies).
order.refunds[].transactions[].statusstring | nullStatus: pending, failure, success or error; some shops return a Vietnamese label.
order.refunds[].transactions[].amountnumberAmount, VND; negative for refunds.
order.refunds[].transactions[].currencystring | nullCurrency code, e.g. VND.
order.refunds[].transactions[].gatewaystringName of the payment gateway.
order.refunds[].transactions[].is_cod_gatewaybooleanTrue when the gateway is cash on delivery.
order.refunds[].transactions[].authorizationstring | nullAuthorization code.
order.refunds[].transactions[].receiptstring | nullReceipt.
order.refunds[].transactions[].testbooleanTrue for a test transaction.
order.refunds[].transactions[].user_idinteger | nullStaff who recorded it; 0 for the system.
order.refunds[].transactions[].location_idinteger | nullLocation id.
order.refunds[].transactions[].device_idinteger | nullDevice id.
order.refunds[].transactions[].created_atstringWhen it was created (ISO 8601).
order.refunds[].transactions[].external_transaction_idstring | nullId at the payment provider.
order.refunds[].transactions[].haravan_transaction_idstring | nullHaravan payment reference.
order.refunds[].transactions[].payment_detailsobject | nullPayment details, if any.
order.refunds[].transactions[].send_emailbooleanWhether an email was sent.

Confirm order — haravan.confirm_order ​

Confirm a new order.

Side effectRiskNeeds approvalIdempotentScopes
WRITEmediumyesnocom.write_orders

Input

FieldTypeRequiredDescription
order_idintegeryesHaravan order id. Min 1.

Extra fields: ignored.

Output

FieldTypeDescription
orderobjectThe order.
order.idintegerOrder id used by the API.
order.namestringOrder name shown to the shop and customer, e.g. #100020.
order.order_numberstringOrder number shown to the shop and customer.
order.numberintegerPosition of the order in the shop's order count.
order.tokenstringUnique token of the order.
order.emailstring | nullCustomer email.
order.contact_emailstring | nullContact email of the buyer.
order.notestring | nullOrder note.
order.note_attributesarray of objectExtra name/value details added to the order.
order.note_attributes[].namestringName.
order.note_attributes[].valuestringValue.
order.tagsstring | nullComma-separated tags.
order.currencystringCurrency code, e.g. VND.
order.total_pricenumberTotal of items, discounts, shipping and tax, VND.
order.subtotal_pricenumberPrice after discounts, before shipping and tax, VND.
order.total_line_items_pricenumberSum of line item prices, VND.
order.total_discountsnumberTotal discounts, VND.
order.total_taxnumberTotal tax, VND.
order.total_weightnumberTotal weight in grams.
order.taxes_includedboolean | nullWhether tax is included in the subtotal.
order.financial_statusstringPayment status: pending, authorized, partially_paid, paid, partially_refunded, refunded or voided.
order.fulfillment_statusstring | nullDelivery status: fulfilled, partial, restocked, or null/notfulfilled when nothing shipped.
order.gatewaystring | nullPayment gateway name.
order.gateway_codestring | nullPayment gateway code, e.g. COD.
order.processing_methodstring | nullHow the payment was processed: checkout, direct, manual or offsite.
order.closed_statusstringunclosed or closed.
order.cancelled_statusstringuncancelled or cancelled.
order.confirmed_statusstringunconfirmed or confirmed.
order.cancel_reasonstring | nullWhy it was cancelled: customer, fraud, inventory, declined or other.
order.created_atstringWhen the order was created (ISO 8601).
order.updated_atstringWhen the order was last updated (ISO 8601).
order.closed_atstring | nullWhen the order was closed (ISO 8601).
order.cancelled_atstring | nullWhen the order was cancelled (ISO 8601).
order.confirmed_atstring | nullWhen the order was confirmed (ISO 8601).
order.source_namestring | nullWhere the order came from, e.g. web or pos.
order.sourcestring | nullChannel that created the order.
order.landing_sitestring | nullPage where the buyer entered the shop.
order.landing_site_refstring | nullRef of the landing page.
order.referring_sitestring | nullSite that referred the buyer.
order.utm_sourcestring | nullUTM source.
order.utm_mediumstring | nullUTM medium.
order.utm_campaignstring | nullUTM campaign.
order.utm_termstring | nullUTM term.
order.utm_contentstring | nullUTM content.
order.buyer_accepts_marketingbooleanWhether the buyer accepts marketing.
order.browser_ipstring | nullBuyer's IP address.
order.cart_tokenstring | nullToken of the cart behind the order.
order.checkout_tokenstring | nullToken of the checkout behind the order.
order.user_idinteger | nullStaff who processed the order; 0 if none.
order.location_idinteger | nullLocation where the order was processed.
order.location_namestring | nullName of that location.
order.assigned_location_idinteger | nullLocation assigned to handle it.
order.assigned_location_namestring | nullName of the assigned location.
order.assigned_location_atstring | nullWhen the location was assigned.
order.client_detailsobjectBrowser the customer used.
order.client_details.accept_languagestring | nullBrowser languages.
order.client_details.browser_ipstring | nullIP address.
order.client_details.browser_heightinteger | nullScreen height in pixels.
order.client_details.browser_widthinteger | nullScreen width in pixels.
order.client_details.session_hashstring | nullSession hash.
order.client_details.user_agentstring | nullBrowser user agent.
order.billing_addressobjectBilling address.
order.billing_address.idintegerAddress id.
order.billing_address.namestringFull name of the person at this address.
order.billing_address.first_namestringFirst name.
order.billing_address.last_namestringLast name.
order.billing_address.companystringCompany name.
order.billing_address.phonestringPhone number.
order.billing_address.address1stringStreet address: house number and street.
order.billing_address.address2stringSecond address line.
order.billing_address.citystringCity, town or village.
order.billing_address.provincestringProvince or city name.
order.billing_address.province_codestringProvince code; matches list_provinces.
order.billing_address.districtstringWard name under the two-level model (district name before).
order.billing_address.district_codestringWard code; matches list_wards.
order.billing_address.wardstringWard name under the three-level model; usually empty now.
order.billing_address.ward_codestringWard code under the three-level model; usually empty now.
order.billing_address.countrystringCountry name.
order.billing_address.country_codestringTwo-letter country code, e.g. VN.
order.billing_address.zipstringPostal code.
order.billing_address.latitudenumberLatitude, if known.
order.billing_address.longitudenumberLongitude, if known.
order.billing_address.defaultbooleanTrue when this is the default address.
order.shipping_addressobjectDelivery address.
order.shipping_address.idintegerAddress id.
order.shipping_address.namestringFull name of the person at this address.
order.shipping_address.first_namestringFirst name.
order.shipping_address.last_namestringLast name.
order.shipping_address.companystringCompany name.
order.shipping_address.phonestringPhone number.
order.shipping_address.address1stringStreet address: house number and street.
order.shipping_address.address2stringSecond address line.
order.shipping_address.citystringCity, town or village.
order.shipping_address.provincestringProvince or city name.
order.shipping_address.province_codestringProvince code; matches list_provinces.
order.shipping_address.districtstringWard name under the two-level model (district name before).
order.shipping_address.district_codestringWard code; matches list_wards.
order.shipping_address.wardstringWard name under the three-level model; usually empty now.
order.shipping_address.ward_codestringWard code under the three-level model; usually empty now.
order.shipping_address.countrystringCountry name.
order.shipping_address.country_codestringTwo-letter country code, e.g. VN.
order.shipping_address.zipstringPostal code.
order.shipping_address.latitudenumberLatitude, if known.
order.shipping_address.longitudenumberLongitude, if known.
order.shipping_address.defaultbooleanTrue when this is the default address.
order.customerobjectThe customer; null for some POS orders.
order.customer.idintegerCustomer id.
order.customer.emailstring | nullEmail.
order.customer.phonestring | nullPhone number.
order.customer.first_namestring | nullFirst name.
order.customer.last_namestring | nullLast name.
order.customer.accepts_marketingbooleanWhether the customer accepts marketing.
order.customer.tagsstring | nullComma-separated tags.
order.customer.notestring | nullNote about the customer.
order.customer.statestringAccount state.
order.customer.orders_countintegerNumber of orders.
order.customer.total_spentnumberTotal spent, VND.
order.customer.last_order_idinteger | nullLatest order id.
order.customer.last_order_namestring | nullLatest order name.
order.customer.default_addressobjectDefault address.
order.customer.default_address.idintegerAddress id.
order.customer.default_address.namestringFull name of the person at this address.
order.customer.default_address.first_namestringFirst name.
order.customer.default_address.last_namestringLast name.
order.customer.default_address.companystringCompany name.
order.customer.default_address.phonestringPhone number.
order.customer.default_address.address1stringStreet address: house number and street.
order.customer.default_address.address2stringSecond address line.
order.customer.default_address.citystringCity, town or village.
order.customer.default_address.provincestringProvince or city name.
order.customer.default_address.province_codestringProvince code; matches list_provinces.
order.customer.default_address.districtstringWard name under the two-level model (district name before).
order.customer.default_address.district_codestringWard code; matches list_wards.
order.customer.default_address.wardstringWard name under the three-level model; usually empty now.
order.customer.default_address.ward_codestringWard code under the three-level model; usually empty now.
order.customer.default_address.countrystringCountry name.
order.customer.default_address.country_codestringTwo-letter country code, e.g. VN.
order.customer.default_address.zipstringPostal code.
order.customer.default_address.latitudenumberLatitude, if known.
order.customer.default_address.longitudenumberLongitude, if known.
order.customer.default_address.defaultbooleanTrue when this is the default address.
order.customer.addressesarray of objectAll addresses.
order.customer.addresses[].idintegerAddress id.
order.customer.addresses[].namestringFull name of the person at this address.
order.customer.addresses[].first_namestringFirst name.
order.customer.addresses[].last_namestringLast name.
order.customer.addresses[].companystringCompany name.
order.customer.addresses[].phonestringPhone number.
order.customer.addresses[].address1stringStreet address: house number and street.
order.customer.addresses[].address2stringSecond address line.
order.customer.addresses[].citystringCity, town or village.
order.customer.addresses[].provincestringProvince or city name.
order.customer.addresses[].province_codestringProvince code; matches list_provinces.
order.customer.addresses[].districtstringWard name under the two-level model (district name before).
order.customer.addresses[].district_codestringWard code; matches list_wards.
order.customer.addresses[].wardstringWard name under the three-level model; usually empty now.
order.customer.addresses[].ward_codestringWard code under the three-level model; usually empty now.
order.customer.addresses[].countrystringCountry name.
order.customer.addresses[].country_codestringTwo-letter country code, e.g. VN.
order.customer.addresses[].zipstringPostal code.
order.customer.addresses[].latitudenumberLatitude, if known.
order.customer.addresses[].longitudenumberLongitude, if known.
order.customer.addresses[].defaultbooleanTrue when this is the default address.
order.customer.created_atstringWhen it was created (ISO 8601).
order.customer.updated_atstringWhen it was last updated (ISO 8601).
order.line_itemsarray of objectItems ordered.
order.line_items[].idintegerLine item id.
order.line_items[].product_idinteger | nullProduct id; null when the product was deleted later.
order.line_items[].variant_idintegerVariant id.
order.line_items[].titlestringProduct title.
order.line_items[].variant_titlestringVariant title.
order.line_items[].namestringProduct and variant name.
order.line_items[].skustring | nullSKU of the variant.
order.line_items[].barcodestring | nullBarcode of the variant.
order.line_items[].vendorstringSupplier of the item.
order.line_items[].typestringProduct type.
order.line_items[].quantityintegerQuantity ordered.
order.line_items[].fulfillable_quantityintegerQuantity still available to fulfill.
order.line_items[].pricenumberUnit price before discounts, VND.
order.line_items[].price_originalnumberUnit price before any promotion, VND.
order.line_items[].price_promotionnumberPromotion discount per unit, VND.
order.line_items[].total_discountnumberTotal discount on this line, VND.
order.line_items[].gramsnumberWeight in grams.
order.line_items[].requires_shippingbooleanWhether the item needs shipping.
order.line_items[].taxablebooleanWhether the item is taxable.
order.line_items[].gift_cardbooleanWhether the item is a gift card.
order.line_items[].product_existsbooleanFalse when the product has been deleted.
order.line_items[].fulfillment_servicestring | nullWho fulfills the item.
order.line_items[].fulfillment_statusstring | nullFulfillment status of this line.
order.line_items[].propertiesarray | nullCustom properties of the line item.
order.line_items[].imageobjectVariant image.
order.line_items[].image.srcstringImage URL.
order.shipping_linesarray of objectShipping methods used.
order.shipping_lines[].codestring | nullShipping method reference.
order.shipping_lines[].titlestring | nullShipping method title.
order.shipping_lines[].pricenumberShipping price, VND.
order.shipping_lines[].sourcestring | nullSource of the shipping method.
order.discount_codesarray of objectDiscount codes applied.
order.discount_codes[].codestringThe code.
order.discount_codes[].amountnumberDiscount amount.
order.discount_codes[].typestringpercentage, shipping or fixed_amount.
order.fulfillmentsarray of objectShipments of the order.
order.fulfillments[].idintegerFulfillment id.
order.fulfillments[].order_idintegerOrder id.
order.fulfillments[].statusstringFulfillment status, e.g. success.
order.fulfillments[].tracking_companystring | nullCarrier name.
order.fulfillments[].tracking_company_codestring | nullCarrier code.
order.fulfillments[].tracking_numberstring | nullTracking number.
order.fulfillments[].tracking_numbersarray of stringTracking numbers.
order.fulfillments[].tracking_urlstring | nullTracking URL.
order.fulfillments[].tracking_urlsarray of stringTracking URLs.
order.fulfillments[].carrier_status_codestring | nullCarrier delivery status code.
order.fulfillments[].carrier_status_namestring | nullCarrier delivery status.
order.fulfillments[].carrier_cod_status_codestring | nullCash-on-delivery status code.
order.fulfillments[].carrier_cod_status_namestring | nullCash-on-delivery status.
order.fulfillments[].cod_amountnumberCash on delivery amount to collect, VND.
order.fulfillments[].real_shipping_feenumberActual shipping fee, VND.
order.fulfillments[].total_weightnumberPackage weight in grams.
order.fulfillments[].location_idinteger | nullLocation the order shipped from.
order.fulfillments[].notify_customerbooleanWhether the customer was notified.
order.fulfillments[].notestring | nullFulfillment note.
order.fulfillments[].created_atstringWhen it was created (ISO 8601).
order.fulfillments[].updated_atstringWhen it was last updated (ISO 8601).
order.fulfillments[].line_itemsarray of objectItems in this fulfillment.
order.fulfillments[].line_items[].idintegerLine item id.
order.fulfillments[].line_items[].product_idinteger | nullProduct id; null when the product was deleted later.
order.fulfillments[].line_items[].variant_idintegerVariant id.
order.fulfillments[].line_items[].titlestringProduct title.
order.fulfillments[].line_items[].variant_titlestringVariant title.
order.fulfillments[].line_items[].namestringProduct and variant name.
order.fulfillments[].line_items[].skustring | nullSKU of the variant.
order.fulfillments[].line_items[].barcodestring | nullBarcode of the variant.
order.fulfillments[].line_items[].vendorstringSupplier of the item.
order.fulfillments[].line_items[].typestringProduct type.
order.fulfillments[].line_items[].quantityintegerQuantity ordered.
order.fulfillments[].line_items[].fulfillable_quantityintegerQuantity still available to fulfill.
order.fulfillments[].line_items[].pricenumberUnit price before discounts, VND.
order.fulfillments[].line_items[].price_originalnumberUnit price before any promotion, VND.
order.fulfillments[].line_items[].price_promotionnumberPromotion discount per unit, VND.
order.fulfillments[].line_items[].total_discountnumberTotal discount on this line, VND.
order.fulfillments[].line_items[].gramsnumberWeight in grams.
order.fulfillments[].line_items[].requires_shippingbooleanWhether the item needs shipping.
order.fulfillments[].line_items[].taxablebooleanWhether the item is taxable.
order.fulfillments[].line_items[].gift_cardbooleanWhether the item is a gift card.
order.fulfillments[].line_items[].product_existsbooleanFalse when the product has been deleted.
order.fulfillments[].line_items[].fulfillment_servicestring | nullWho fulfills the item.
order.fulfillments[].line_items[].fulfillment_statusstring | nullFulfillment status of this line.
order.fulfillments[].line_items[].propertiesarray | nullCustom properties of the line item.
order.fulfillments[].line_items[].imageobjectVariant image.
order.fulfillments[].line_items[].image.srcstringImage URL.
order.transactionsarray of objectPayments on the order.
order.transactions[].idintegerTransaction id.
order.transactions[].order_idintegerOrder the transaction belongs to.
order.transactions[].parent_idinteger | nullId of the transaction this one follows.
order.transactions[].kindstringKind: pending, authorization, capture, sale, void or refund (case varies).
order.transactions[].statusstring | nullStatus: pending, failure, success or error; some shops return a Vietnamese label.
order.transactions[].amountnumberAmount, VND; negative for refunds.
order.transactions[].currencystring | nullCurrency code, e.g. VND.
order.transactions[].gatewaystringName of the payment gateway.
order.transactions[].is_cod_gatewaybooleanTrue when the gateway is cash on delivery.
order.transactions[].authorizationstring | nullAuthorization code.
order.transactions[].receiptstring | nullReceipt.
order.transactions[].testbooleanTrue for a test transaction.
order.transactions[].user_idinteger | nullStaff who recorded it; 0 for the system.
order.transactions[].location_idinteger | nullLocation id.
order.transactions[].device_idinteger | nullDevice id.
order.transactions[].created_atstringWhen it was created (ISO 8601).
order.transactions[].external_transaction_idstring | nullId at the payment provider.
order.transactions[].haravan_transaction_idstring | nullHaravan payment reference.
order.transactions[].payment_detailsobject | nullPayment details, if any.
order.transactions[].send_emailbooleanWhether an email was sent.
order.refundsarray of objectRefunds on the order.
order.refunds[].idintegerRefund id.
order.refunds[].order_idintegerOrder id.
order.refunds[].notestring | nullNote attached to the refund.
order.refunds[].restockboolean | nullWhether items went back to stock.
order.refunds[].user_idinteger | nullStaff who made the refund.
order.refunds[].location_idinteger | nullLocation items were returned to.
order.refunds[].created_atstringWhen it was created (ISO 8601).
order.refunds[].refund_line_itemsarray of objectItems returned or refunded.
order.refunds[].refund_line_items[].idintegerRefund line item id.
order.refunds[].refund_line_items[].line_item_idintegerOrder line item it refers to.
order.refunds[].refund_line_items[].quantityintegerQuantity refunded.
order.refunds[].refund_line_items[].line_itemobjectThe order line item.
order.refunds[].refund_line_items[].line_item.idintegerLine item id.
order.refunds[].refund_line_items[].line_item.product_idinteger | nullProduct id; null when the product was deleted later.
order.refunds[].refund_line_items[].line_item.variant_idintegerVariant id.
order.refunds[].refund_line_items[].line_item.titlestringProduct title.
order.refunds[].refund_line_items[].line_item.variant_titlestringVariant title.
order.refunds[].refund_line_items[].line_item.namestringProduct and variant name.
order.refunds[].refund_line_items[].line_item.skustring | nullSKU of the variant.
order.refunds[].refund_line_items[].line_item.barcodestring | nullBarcode of the variant.
order.refunds[].refund_line_items[].line_item.vendorstringSupplier of the item.
order.refunds[].refund_line_items[].line_item.typestringProduct type.
order.refunds[].refund_line_items[].line_item.quantityintegerQuantity ordered.
order.refunds[].refund_line_items[].line_item.fulfillable_quantityintegerQuantity still available to fulfill.
order.refunds[].refund_line_items[].line_item.pricenumberUnit price before discounts, VND.
order.refunds[].refund_line_items[].line_item.price_originalnumberUnit price before any promotion, VND.
order.refunds[].refund_line_items[].line_item.price_promotionnumberPromotion discount per unit, VND.
order.refunds[].refund_line_items[].line_item.total_discountnumberTotal discount on this line, VND.
order.refunds[].refund_line_items[].line_item.gramsnumberWeight in grams.
order.refunds[].refund_line_items[].line_item.requires_shippingbooleanWhether the item needs shipping.
order.refunds[].refund_line_items[].line_item.taxablebooleanWhether the item is taxable.
order.refunds[].refund_line_items[].line_item.gift_cardbooleanWhether the item is a gift card.
order.refunds[].refund_line_items[].line_item.product_existsbooleanFalse when the product has been deleted.
order.refunds[].refund_line_items[].line_item.fulfillment_servicestring | nullWho fulfills the item.
order.refunds[].refund_line_items[].line_item.fulfillment_statusstring | nullFulfillment status of this line.
order.refunds[].refund_line_items[].line_item.propertiesarray | nullCustom properties of the line item.
order.refunds[].refund_line_items[].line_item.imageobjectVariant image.
order.refunds[].refund_line_items[].line_item.image.srcstringImage URL.
order.refunds[].transactionsarray of objectMoney returned, as refund transactions.
order.refunds[].transactions[].idintegerTransaction id.
order.refunds[].transactions[].order_idintegerOrder the transaction belongs to.
order.refunds[].transactions[].parent_idinteger | nullId of the transaction this one follows.
order.refunds[].transactions[].kindstringKind: pending, authorization, capture, sale, void or refund (case varies).
order.refunds[].transactions[].statusstring | nullStatus: pending, failure, success or error; some shops return a Vietnamese label.
order.refunds[].transactions[].amountnumberAmount, VND; negative for refunds.
order.refunds[].transactions[].currencystring | nullCurrency code, e.g. VND.
order.refunds[].transactions[].gatewaystringName of the payment gateway.
order.refunds[].transactions[].is_cod_gatewaybooleanTrue when the gateway is cash on delivery.
order.refunds[].transactions[].authorizationstring | nullAuthorization code.
order.refunds[].transactions[].receiptstring | nullReceipt.
order.refunds[].transactions[].testbooleanTrue for a test transaction.
order.refunds[].transactions[].user_idinteger | nullStaff who recorded it; 0 for the system.
order.refunds[].transactions[].location_idinteger | nullLocation id.
order.refunds[].transactions[].device_idinteger | nullDevice id.
order.refunds[].transactions[].created_atstringWhen it was created (ISO 8601).
order.refunds[].transactions[].external_transaction_idstring | nullId at the payment provider.
order.refunds[].transactions[].haravan_transaction_idstring | nullHaravan payment reference.
order.refunds[].transactions[].payment_detailsobject | nullPayment details, if any.
order.refunds[].transactions[].send_emailbooleanWhether an email was sent.

Close order — haravan.close_order ​

Close (archive) a completed order.

Side effectRiskNeeds approvalIdempotentScopes
WRITEmediumyesnocom.write_orders

Input

FieldTypeRequiredDescription
order_idintegeryesHaravan order id. Min 1.

Extra fields: ignored.

Output

FieldTypeDescription
orderobjectThe order.
order.idintegerOrder id used by the API.
order.namestringOrder name shown to the shop and customer, e.g. #100020.
order.order_numberstringOrder number shown to the shop and customer.
order.numberintegerPosition of the order in the shop's order count.
order.tokenstringUnique token of the order.
order.emailstring | nullCustomer email.
order.contact_emailstring | nullContact email of the buyer.
order.notestring | nullOrder note.
order.note_attributesarray of objectExtra name/value details added to the order.
order.note_attributes[].namestringName.
order.note_attributes[].valuestringValue.
order.tagsstring | nullComma-separated tags.
order.currencystringCurrency code, e.g. VND.
order.total_pricenumberTotal of items, discounts, shipping and tax, VND.
order.subtotal_pricenumberPrice after discounts, before shipping and tax, VND.
order.total_line_items_pricenumberSum of line item prices, VND.
order.total_discountsnumberTotal discounts, VND.
order.total_taxnumberTotal tax, VND.
order.total_weightnumberTotal weight in grams.
order.taxes_includedboolean | nullWhether tax is included in the subtotal.
order.financial_statusstringPayment status: pending, authorized, partially_paid, paid, partially_refunded, refunded or voided.
order.fulfillment_statusstring | nullDelivery status: fulfilled, partial, restocked, or null/notfulfilled when nothing shipped.
order.gatewaystring | nullPayment gateway name.
order.gateway_codestring | nullPayment gateway code, e.g. COD.
order.processing_methodstring | nullHow the payment was processed: checkout, direct, manual or offsite.
order.closed_statusstringunclosed or closed.
order.cancelled_statusstringuncancelled or cancelled.
order.confirmed_statusstringunconfirmed or confirmed.
order.cancel_reasonstring | nullWhy it was cancelled: customer, fraud, inventory, declined or other.
order.created_atstringWhen the order was created (ISO 8601).
order.updated_atstringWhen the order was last updated (ISO 8601).
order.closed_atstring | nullWhen the order was closed (ISO 8601).
order.cancelled_atstring | nullWhen the order was cancelled (ISO 8601).
order.confirmed_atstring | nullWhen the order was confirmed (ISO 8601).
order.source_namestring | nullWhere the order came from, e.g. web or pos.
order.sourcestring | nullChannel that created the order.
order.landing_sitestring | nullPage where the buyer entered the shop.
order.landing_site_refstring | nullRef of the landing page.
order.referring_sitestring | nullSite that referred the buyer.
order.utm_sourcestring | nullUTM source.
order.utm_mediumstring | nullUTM medium.
order.utm_campaignstring | nullUTM campaign.
order.utm_termstring | nullUTM term.
order.utm_contentstring | nullUTM content.
order.buyer_accepts_marketingbooleanWhether the buyer accepts marketing.
order.browser_ipstring | nullBuyer's IP address.
order.cart_tokenstring | nullToken of the cart behind the order.
order.checkout_tokenstring | nullToken of the checkout behind the order.
order.user_idinteger | nullStaff who processed the order; 0 if none.
order.location_idinteger | nullLocation where the order was processed.
order.location_namestring | nullName of that location.
order.assigned_location_idinteger | nullLocation assigned to handle it.
order.assigned_location_namestring | nullName of the assigned location.
order.assigned_location_atstring | nullWhen the location was assigned.
order.client_detailsobjectBrowser the customer used.
order.client_details.accept_languagestring | nullBrowser languages.
order.client_details.browser_ipstring | nullIP address.
order.client_details.browser_heightinteger | nullScreen height in pixels.
order.client_details.browser_widthinteger | nullScreen width in pixels.
order.client_details.session_hashstring | nullSession hash.
order.client_details.user_agentstring | nullBrowser user agent.
order.billing_addressobjectBilling address.
order.billing_address.idintegerAddress id.
order.billing_address.namestringFull name of the person at this address.
order.billing_address.first_namestringFirst name.
order.billing_address.last_namestringLast name.
order.billing_address.companystringCompany name.
order.billing_address.phonestringPhone number.
order.billing_address.address1stringStreet address: house number and street.
order.billing_address.address2stringSecond address line.
order.billing_address.citystringCity, town or village.
order.billing_address.provincestringProvince or city name.
order.billing_address.province_codestringProvince code; matches list_provinces.
order.billing_address.districtstringWard name under the two-level model (district name before).
order.billing_address.district_codestringWard code; matches list_wards.
order.billing_address.wardstringWard name under the three-level model; usually empty now.
order.billing_address.ward_codestringWard code under the three-level model; usually empty now.
order.billing_address.countrystringCountry name.
order.billing_address.country_codestringTwo-letter country code, e.g. VN.
order.billing_address.zipstringPostal code.
order.billing_address.latitudenumberLatitude, if known.
order.billing_address.longitudenumberLongitude, if known.
order.billing_address.defaultbooleanTrue when this is the default address.
order.shipping_addressobjectDelivery address.
order.shipping_address.idintegerAddress id.
order.shipping_address.namestringFull name of the person at this address.
order.shipping_address.first_namestringFirst name.
order.shipping_address.last_namestringLast name.
order.shipping_address.companystringCompany name.
order.shipping_address.phonestringPhone number.
order.shipping_address.address1stringStreet address: house number and street.
order.shipping_address.address2stringSecond address line.
order.shipping_address.citystringCity, town or village.
order.shipping_address.provincestringProvince or city name.
order.shipping_address.province_codestringProvince code; matches list_provinces.
order.shipping_address.districtstringWard name under the two-level model (district name before).
order.shipping_address.district_codestringWard code; matches list_wards.
order.shipping_address.wardstringWard name under the three-level model; usually empty now.
order.shipping_address.ward_codestringWard code under the three-level model; usually empty now.
order.shipping_address.countrystringCountry name.
order.shipping_address.country_codestringTwo-letter country code, e.g. VN.
order.shipping_address.zipstringPostal code.
order.shipping_address.latitudenumberLatitude, if known.
order.shipping_address.longitudenumberLongitude, if known.
order.shipping_address.defaultbooleanTrue when this is the default address.
order.customerobjectThe customer; null for some POS orders.
order.customer.idintegerCustomer id.
order.customer.emailstring | nullEmail.
order.customer.phonestring | nullPhone number.
order.customer.first_namestring | nullFirst name.
order.customer.last_namestring | nullLast name.
order.customer.accepts_marketingbooleanWhether the customer accepts marketing.
order.customer.tagsstring | nullComma-separated tags.
order.customer.notestring | nullNote about the customer.
order.customer.statestringAccount state.
order.customer.orders_countintegerNumber of orders.
order.customer.total_spentnumberTotal spent, VND.
order.customer.last_order_idinteger | nullLatest order id.
order.customer.last_order_namestring | nullLatest order name.
order.customer.default_addressobjectDefault address.
order.customer.default_address.idintegerAddress id.
order.customer.default_address.namestringFull name of the person at this address.
order.customer.default_address.first_namestringFirst name.
order.customer.default_address.last_namestringLast name.
order.customer.default_address.companystringCompany name.
order.customer.default_address.phonestringPhone number.
order.customer.default_address.address1stringStreet address: house number and street.
order.customer.default_address.address2stringSecond address line.
order.customer.default_address.citystringCity, town or village.
order.customer.default_address.provincestringProvince or city name.
order.customer.default_address.province_codestringProvince code; matches list_provinces.
order.customer.default_address.districtstringWard name under the two-level model (district name before).
order.customer.default_address.district_codestringWard code; matches list_wards.
order.customer.default_address.wardstringWard name under the three-level model; usually empty now.
order.customer.default_address.ward_codestringWard code under the three-level model; usually empty now.
order.customer.default_address.countrystringCountry name.
order.customer.default_address.country_codestringTwo-letter country code, e.g. VN.
order.customer.default_address.zipstringPostal code.
order.customer.default_address.latitudenumberLatitude, if known.
order.customer.default_address.longitudenumberLongitude, if known.
order.customer.default_address.defaultbooleanTrue when this is the default address.
order.customer.addressesarray of objectAll addresses.
order.customer.addresses[].idintegerAddress id.
order.customer.addresses[].namestringFull name of the person at this address.
order.customer.addresses[].first_namestringFirst name.
order.customer.addresses[].last_namestringLast name.
order.customer.addresses[].companystringCompany name.
order.customer.addresses[].phonestringPhone number.
order.customer.addresses[].address1stringStreet address: house number and street.
order.customer.addresses[].address2stringSecond address line.
order.customer.addresses[].citystringCity, town or village.
order.customer.addresses[].provincestringProvince or city name.
order.customer.addresses[].province_codestringProvince code; matches list_provinces.
order.customer.addresses[].districtstringWard name under the two-level model (district name before).
order.customer.addresses[].district_codestringWard code; matches list_wards.
order.customer.addresses[].wardstringWard name under the three-level model; usually empty now.
order.customer.addresses[].ward_codestringWard code under the three-level model; usually empty now.
order.customer.addresses[].countrystringCountry name.
order.customer.addresses[].country_codestringTwo-letter country code, e.g. VN.
order.customer.addresses[].zipstringPostal code.
order.customer.addresses[].latitudenumberLatitude, if known.
order.customer.addresses[].longitudenumberLongitude, if known.
order.customer.addresses[].defaultbooleanTrue when this is the default address.
order.customer.created_atstringWhen it was created (ISO 8601).
order.customer.updated_atstringWhen it was last updated (ISO 8601).
order.line_itemsarray of objectItems ordered.
order.line_items[].idintegerLine item id.
order.line_items[].product_idinteger | nullProduct id; null when the product was deleted later.
order.line_items[].variant_idintegerVariant id.
order.line_items[].titlestringProduct title.
order.line_items[].variant_titlestringVariant title.
order.line_items[].namestringProduct and variant name.
order.line_items[].skustring | nullSKU of the variant.
order.line_items[].barcodestring | nullBarcode of the variant.
order.line_items[].vendorstringSupplier of the item.
order.line_items[].typestringProduct type.
order.line_items[].quantityintegerQuantity ordered.
order.line_items[].fulfillable_quantityintegerQuantity still available to fulfill.
order.line_items[].pricenumberUnit price before discounts, VND.
order.line_items[].price_originalnumberUnit price before any promotion, VND.
order.line_items[].price_promotionnumberPromotion discount per unit, VND.
order.line_items[].total_discountnumberTotal discount on this line, VND.
order.line_items[].gramsnumberWeight in grams.
order.line_items[].requires_shippingbooleanWhether the item needs shipping.
order.line_items[].taxablebooleanWhether the item is taxable.
order.line_items[].gift_cardbooleanWhether the item is a gift card.
order.line_items[].product_existsbooleanFalse when the product has been deleted.
order.line_items[].fulfillment_servicestring | nullWho fulfills the item.
order.line_items[].fulfillment_statusstring | nullFulfillment status of this line.
order.line_items[].propertiesarray | nullCustom properties of the line item.
order.line_items[].imageobjectVariant image.
order.line_items[].image.srcstringImage URL.
order.shipping_linesarray of objectShipping methods used.
order.shipping_lines[].codestring | nullShipping method reference.
order.shipping_lines[].titlestring | nullShipping method title.
order.shipping_lines[].pricenumberShipping price, VND.
order.shipping_lines[].sourcestring | nullSource of the shipping method.
order.discount_codesarray of objectDiscount codes applied.
order.discount_codes[].codestringThe code.
order.discount_codes[].amountnumberDiscount amount.
order.discount_codes[].typestringpercentage, shipping or fixed_amount.
order.fulfillmentsarray of objectShipments of the order.
order.fulfillments[].idintegerFulfillment id.
order.fulfillments[].order_idintegerOrder id.
order.fulfillments[].statusstringFulfillment status, e.g. success.
order.fulfillments[].tracking_companystring | nullCarrier name.
order.fulfillments[].tracking_company_codestring | nullCarrier code.
order.fulfillments[].tracking_numberstring | nullTracking number.
order.fulfillments[].tracking_numbersarray of stringTracking numbers.
order.fulfillments[].tracking_urlstring | nullTracking URL.
order.fulfillments[].tracking_urlsarray of stringTracking URLs.
order.fulfillments[].carrier_status_codestring | nullCarrier delivery status code.
order.fulfillments[].carrier_status_namestring | nullCarrier delivery status.
order.fulfillments[].carrier_cod_status_codestring | nullCash-on-delivery status code.
order.fulfillments[].carrier_cod_status_namestring | nullCash-on-delivery status.
order.fulfillments[].cod_amountnumberCash on delivery amount to collect, VND.
order.fulfillments[].real_shipping_feenumberActual shipping fee, VND.
order.fulfillments[].total_weightnumberPackage weight in grams.
order.fulfillments[].location_idinteger | nullLocation the order shipped from.
order.fulfillments[].notify_customerbooleanWhether the customer was notified.
order.fulfillments[].notestring | nullFulfillment note.
order.fulfillments[].created_atstringWhen it was created (ISO 8601).
order.fulfillments[].updated_atstringWhen it was last updated (ISO 8601).
order.fulfillments[].line_itemsarray of objectItems in this fulfillment.
order.fulfillments[].line_items[].idintegerLine item id.
order.fulfillments[].line_items[].product_idinteger | nullProduct id; null when the product was deleted later.
order.fulfillments[].line_items[].variant_idintegerVariant id.
order.fulfillments[].line_items[].titlestringProduct title.
order.fulfillments[].line_items[].variant_titlestringVariant title.
order.fulfillments[].line_items[].namestringProduct and variant name.
order.fulfillments[].line_items[].skustring | nullSKU of the variant.
order.fulfillments[].line_items[].barcodestring | nullBarcode of the variant.
order.fulfillments[].line_items[].vendorstringSupplier of the item.
order.fulfillments[].line_items[].typestringProduct type.
order.fulfillments[].line_items[].quantityintegerQuantity ordered.
order.fulfillments[].line_items[].fulfillable_quantityintegerQuantity still available to fulfill.
order.fulfillments[].line_items[].pricenumberUnit price before discounts, VND.
order.fulfillments[].line_items[].price_originalnumberUnit price before any promotion, VND.
order.fulfillments[].line_items[].price_promotionnumberPromotion discount per unit, VND.
order.fulfillments[].line_items[].total_discountnumberTotal discount on this line, VND.
order.fulfillments[].line_items[].gramsnumberWeight in grams.
order.fulfillments[].line_items[].requires_shippingbooleanWhether the item needs shipping.
order.fulfillments[].line_items[].taxablebooleanWhether the item is taxable.
order.fulfillments[].line_items[].gift_cardbooleanWhether the item is a gift card.
order.fulfillments[].line_items[].product_existsbooleanFalse when the product has been deleted.
order.fulfillments[].line_items[].fulfillment_servicestring | nullWho fulfills the item.
order.fulfillments[].line_items[].fulfillment_statusstring | nullFulfillment status of this line.
order.fulfillments[].line_items[].propertiesarray | nullCustom properties of the line item.
order.fulfillments[].line_items[].imageobjectVariant image.
order.fulfillments[].line_items[].image.srcstringImage URL.
order.transactionsarray of objectPayments on the order.
order.transactions[].idintegerTransaction id.
order.transactions[].order_idintegerOrder the transaction belongs to.
order.transactions[].parent_idinteger | nullId of the transaction this one follows.
order.transactions[].kindstringKind: pending, authorization, capture, sale, void or refund (case varies).
order.transactions[].statusstring | nullStatus: pending, failure, success or error; some shops return a Vietnamese label.
order.transactions[].amountnumberAmount, VND; negative for refunds.
order.transactions[].currencystring | nullCurrency code, e.g. VND.
order.transactions[].gatewaystringName of the payment gateway.
order.transactions[].is_cod_gatewaybooleanTrue when the gateway is cash on delivery.
order.transactions[].authorizationstring | nullAuthorization code.
order.transactions[].receiptstring | nullReceipt.
order.transactions[].testbooleanTrue for a test transaction.
order.transactions[].user_idinteger | nullStaff who recorded it; 0 for the system.
order.transactions[].location_idinteger | nullLocation id.
order.transactions[].device_idinteger | nullDevice id.
order.transactions[].created_atstringWhen it was created (ISO 8601).
order.transactions[].external_transaction_idstring | nullId at the payment provider.
order.transactions[].haravan_transaction_idstring | nullHaravan payment reference.
order.transactions[].payment_detailsobject | nullPayment details, if any.
order.transactions[].send_emailbooleanWhether an email was sent.
order.refundsarray of objectRefunds on the order.
order.refunds[].idintegerRefund id.
order.refunds[].order_idintegerOrder id.
order.refunds[].notestring | nullNote attached to the refund.
order.refunds[].restockboolean | nullWhether items went back to stock.
order.refunds[].user_idinteger | nullStaff who made the refund.
order.refunds[].location_idinteger | nullLocation items were returned to.
order.refunds[].created_atstringWhen it was created (ISO 8601).
order.refunds[].refund_line_itemsarray of objectItems returned or refunded.
order.refunds[].refund_line_items[].idintegerRefund line item id.
order.refunds[].refund_line_items[].line_item_idintegerOrder line item it refers to.
order.refunds[].refund_line_items[].quantityintegerQuantity refunded.
order.refunds[].refund_line_items[].line_itemobjectThe order line item.
order.refunds[].refund_line_items[].line_item.idintegerLine item id.
order.refunds[].refund_line_items[].line_item.product_idinteger | nullProduct id; null when the product was deleted later.
order.refunds[].refund_line_items[].line_item.variant_idintegerVariant id.
order.refunds[].refund_line_items[].line_item.titlestringProduct title.
order.refunds[].refund_line_items[].line_item.variant_titlestringVariant title.
order.refunds[].refund_line_items[].line_item.namestringProduct and variant name.
order.refunds[].refund_line_items[].line_item.skustring | nullSKU of the variant.
order.refunds[].refund_line_items[].line_item.barcodestring | nullBarcode of the variant.
order.refunds[].refund_line_items[].line_item.vendorstringSupplier of the item.
order.refunds[].refund_line_items[].line_item.typestringProduct type.
order.refunds[].refund_line_items[].line_item.quantityintegerQuantity ordered.
order.refunds[].refund_line_items[].line_item.fulfillable_quantityintegerQuantity still available to fulfill.
order.refunds[].refund_line_items[].line_item.pricenumberUnit price before discounts, VND.
order.refunds[].refund_line_items[].line_item.price_originalnumberUnit price before any promotion, VND.
order.refunds[].refund_line_items[].line_item.price_promotionnumberPromotion discount per unit, VND.
order.refunds[].refund_line_items[].line_item.total_discountnumberTotal discount on this line, VND.
order.refunds[].refund_line_items[].line_item.gramsnumberWeight in grams.
order.refunds[].refund_line_items[].line_item.requires_shippingbooleanWhether the item needs shipping.
order.refunds[].refund_line_items[].line_item.taxablebooleanWhether the item is taxable.
order.refunds[].refund_line_items[].line_item.gift_cardbooleanWhether the item is a gift card.
order.refunds[].refund_line_items[].line_item.product_existsbooleanFalse when the product has been deleted.
order.refunds[].refund_line_items[].line_item.fulfillment_servicestring | nullWho fulfills the item.
order.refunds[].refund_line_items[].line_item.fulfillment_statusstring | nullFulfillment status of this line.
order.refunds[].refund_line_items[].line_item.propertiesarray | nullCustom properties of the line item.
order.refunds[].refund_line_items[].line_item.imageobjectVariant image.
order.refunds[].refund_line_items[].line_item.image.srcstringImage URL.
order.refunds[].transactionsarray of objectMoney returned, as refund transactions.
order.refunds[].transactions[].idintegerTransaction id.
order.refunds[].transactions[].order_idintegerOrder the transaction belongs to.
order.refunds[].transactions[].parent_idinteger | nullId of the transaction this one follows.
order.refunds[].transactions[].kindstringKind: pending, authorization, capture, sale, void or refund (case varies).
order.refunds[].transactions[].statusstring | nullStatus: pending, failure, success or error; some shops return a Vietnamese label.
order.refunds[].transactions[].amountnumberAmount, VND; negative for refunds.
order.refunds[].transactions[].currencystring | nullCurrency code, e.g. VND.
order.refunds[].transactions[].gatewaystringName of the payment gateway.
order.refunds[].transactions[].is_cod_gatewaybooleanTrue when the gateway is cash on delivery.
order.refunds[].transactions[].authorizationstring | nullAuthorization code.
order.refunds[].transactions[].receiptstring | nullReceipt.
order.refunds[].transactions[].testbooleanTrue for a test transaction.
order.refunds[].transactions[].user_idinteger | nullStaff who recorded it; 0 for the system.
order.refunds[].transactions[].location_idinteger | nullLocation id.
order.refunds[].transactions[].device_idinteger | nullDevice id.
order.refunds[].transactions[].created_atstringWhen it was created (ISO 8601).
order.refunds[].transactions[].external_transaction_idstring | nullId at the payment provider.
order.refunds[].transactions[].haravan_transaction_idstring | nullHaravan payment reference.
order.refunds[].transactions[].payment_detailsobject | nullPayment details, if any.
order.refunds[].transactions[].send_emailbooleanWhether an email was sent.

Reopen order — haravan.open_order ​

Reopen a closed order.

Side effectRiskNeeds approvalIdempotentScopes
WRITEmediumyesnocom.write_orders

Input

FieldTypeRequiredDescription
order_idintegeryesHaravan order id. Min 1.

Extra fields: ignored.

Output

FieldTypeDescription
orderobjectThe order.
order.idintegerOrder id used by the API.
order.namestringOrder name shown to the shop and customer, e.g. #100020.
order.order_numberstringOrder number shown to the shop and customer.
order.numberintegerPosition of the order in the shop's order count.
order.tokenstringUnique token of the order.
order.emailstring | nullCustomer email.
order.contact_emailstring | nullContact email of the buyer.
order.notestring | nullOrder note.
order.note_attributesarray of objectExtra name/value details added to the order.
order.note_attributes[].namestringName.
order.note_attributes[].valuestringValue.
order.tagsstring | nullComma-separated tags.
order.currencystringCurrency code, e.g. VND.
order.total_pricenumberTotal of items, discounts, shipping and tax, VND.
order.subtotal_pricenumberPrice after discounts, before shipping and tax, VND.
order.total_line_items_pricenumberSum of line item prices, VND.
order.total_discountsnumberTotal discounts, VND.
order.total_taxnumberTotal tax, VND.
order.total_weightnumberTotal weight in grams.
order.taxes_includedboolean | nullWhether tax is included in the subtotal.
order.financial_statusstringPayment status: pending, authorized, partially_paid, paid, partially_refunded, refunded or voided.
order.fulfillment_statusstring | nullDelivery status: fulfilled, partial, restocked, or null/notfulfilled when nothing shipped.
order.gatewaystring | nullPayment gateway name.
order.gateway_codestring | nullPayment gateway code, e.g. COD.
order.processing_methodstring | nullHow the payment was processed: checkout, direct, manual or offsite.
order.closed_statusstringunclosed or closed.
order.cancelled_statusstringuncancelled or cancelled.
order.confirmed_statusstringunconfirmed or confirmed.
order.cancel_reasonstring | nullWhy it was cancelled: customer, fraud, inventory, declined or other.
order.created_atstringWhen the order was created (ISO 8601).
order.updated_atstringWhen the order was last updated (ISO 8601).
order.closed_atstring | nullWhen the order was closed (ISO 8601).
order.cancelled_atstring | nullWhen the order was cancelled (ISO 8601).
order.confirmed_atstring | nullWhen the order was confirmed (ISO 8601).
order.source_namestring | nullWhere the order came from, e.g. web or pos.
order.sourcestring | nullChannel that created the order.
order.landing_sitestring | nullPage where the buyer entered the shop.
order.landing_site_refstring | nullRef of the landing page.
order.referring_sitestring | nullSite that referred the buyer.
order.utm_sourcestring | nullUTM source.
order.utm_mediumstring | nullUTM medium.
order.utm_campaignstring | nullUTM campaign.
order.utm_termstring | nullUTM term.
order.utm_contentstring | nullUTM content.
order.buyer_accepts_marketingbooleanWhether the buyer accepts marketing.
order.browser_ipstring | nullBuyer's IP address.
order.cart_tokenstring | nullToken of the cart behind the order.
order.checkout_tokenstring | nullToken of the checkout behind the order.
order.user_idinteger | nullStaff who processed the order; 0 if none.
order.location_idinteger | nullLocation where the order was processed.
order.location_namestring | nullName of that location.
order.assigned_location_idinteger | nullLocation assigned to handle it.
order.assigned_location_namestring | nullName of the assigned location.
order.assigned_location_atstring | nullWhen the location was assigned.
order.client_detailsobjectBrowser the customer used.
order.client_details.accept_languagestring | nullBrowser languages.
order.client_details.browser_ipstring | nullIP address.
order.client_details.browser_heightinteger | nullScreen height in pixels.
order.client_details.browser_widthinteger | nullScreen width in pixels.
order.client_details.session_hashstring | nullSession hash.
order.client_details.user_agentstring | nullBrowser user agent.
order.billing_addressobjectBilling address.
order.billing_address.idintegerAddress id.
order.billing_address.namestringFull name of the person at this address.
order.billing_address.first_namestringFirst name.
order.billing_address.last_namestringLast name.
order.billing_address.companystringCompany name.
order.billing_address.phonestringPhone number.
order.billing_address.address1stringStreet address: house number and street.
order.billing_address.address2stringSecond address line.
order.billing_address.citystringCity, town or village.
order.billing_address.provincestringProvince or city name.
order.billing_address.province_codestringProvince code; matches list_provinces.
order.billing_address.districtstringWard name under the two-level model (district name before).
order.billing_address.district_codestringWard code; matches list_wards.
order.billing_address.wardstringWard name under the three-level model; usually empty now.
order.billing_address.ward_codestringWard code under the three-level model; usually empty now.
order.billing_address.countrystringCountry name.
order.billing_address.country_codestringTwo-letter country code, e.g. VN.
order.billing_address.zipstringPostal code.
order.billing_address.latitudenumberLatitude, if known.
order.billing_address.longitudenumberLongitude, if known.
order.billing_address.defaultbooleanTrue when this is the default address.
order.shipping_addressobjectDelivery address.
order.shipping_address.idintegerAddress id.
order.shipping_address.namestringFull name of the person at this address.
order.shipping_address.first_namestringFirst name.
order.shipping_address.last_namestringLast name.
order.shipping_address.companystringCompany name.
order.shipping_address.phonestringPhone number.
order.shipping_address.address1stringStreet address: house number and street.
order.shipping_address.address2stringSecond address line.
order.shipping_address.citystringCity, town or village.
order.shipping_address.provincestringProvince or city name.
order.shipping_address.province_codestringProvince code; matches list_provinces.
order.shipping_address.districtstringWard name under the two-level model (district name before).
order.shipping_address.district_codestringWard code; matches list_wards.
order.shipping_address.wardstringWard name under the three-level model; usually empty now.
order.shipping_address.ward_codestringWard code under the three-level model; usually empty now.
order.shipping_address.countrystringCountry name.
order.shipping_address.country_codestringTwo-letter country code, e.g. VN.
order.shipping_address.zipstringPostal code.
order.shipping_address.latitudenumberLatitude, if known.
order.shipping_address.longitudenumberLongitude, if known.
order.shipping_address.defaultbooleanTrue when this is the default address.
order.customerobjectThe customer; null for some POS orders.
order.customer.idintegerCustomer id.
order.customer.emailstring | nullEmail.
order.customer.phonestring | nullPhone number.
order.customer.first_namestring | nullFirst name.
order.customer.last_namestring | nullLast name.
order.customer.accepts_marketingbooleanWhether the customer accepts marketing.
order.customer.tagsstring | nullComma-separated tags.
order.customer.notestring | nullNote about the customer.
order.customer.statestringAccount state.
order.customer.orders_countintegerNumber of orders.
order.customer.total_spentnumberTotal spent, VND.
order.customer.last_order_idinteger | nullLatest order id.
order.customer.last_order_namestring | nullLatest order name.
order.customer.default_addressobjectDefault address.
order.customer.default_address.idintegerAddress id.
order.customer.default_address.namestringFull name of the person at this address.
order.customer.default_address.first_namestringFirst name.
order.customer.default_address.last_namestringLast name.
order.customer.default_address.companystringCompany name.
order.customer.default_address.phonestringPhone number.
order.customer.default_address.address1stringStreet address: house number and street.
order.customer.default_address.address2stringSecond address line.
order.customer.default_address.citystringCity, town or village.
order.customer.default_address.provincestringProvince or city name.
order.customer.default_address.province_codestringProvince code; matches list_provinces.
order.customer.default_address.districtstringWard name under the two-level model (district name before).
order.customer.default_address.district_codestringWard code; matches list_wards.
order.customer.default_address.wardstringWard name under the three-level model; usually empty now.
order.customer.default_address.ward_codestringWard code under the three-level model; usually empty now.
order.customer.default_address.countrystringCountry name.
order.customer.default_address.country_codestringTwo-letter country code, e.g. VN.
order.customer.default_address.zipstringPostal code.
order.customer.default_address.latitudenumberLatitude, if known.
order.customer.default_address.longitudenumberLongitude, if known.
order.customer.default_address.defaultbooleanTrue when this is the default address.
order.customer.addressesarray of objectAll addresses.
order.customer.addresses[].idintegerAddress id.
order.customer.addresses[].namestringFull name of the person at this address.
order.customer.addresses[].first_namestringFirst name.
order.customer.addresses[].last_namestringLast name.
order.customer.addresses[].companystringCompany name.
order.customer.addresses[].phonestringPhone number.
order.customer.addresses[].address1stringStreet address: house number and street.
order.customer.addresses[].address2stringSecond address line.
order.customer.addresses[].citystringCity, town or village.
order.customer.addresses[].provincestringProvince or city name.
order.customer.addresses[].province_codestringProvince code; matches list_provinces.
order.customer.addresses[].districtstringWard name under the two-level model (district name before).
order.customer.addresses[].district_codestringWard code; matches list_wards.
order.customer.addresses[].wardstringWard name under the three-level model; usually empty now.
order.customer.addresses[].ward_codestringWard code under the three-level model; usually empty now.
order.customer.addresses[].countrystringCountry name.
order.customer.addresses[].country_codestringTwo-letter country code, e.g. VN.
order.customer.addresses[].zipstringPostal code.
order.customer.addresses[].latitudenumberLatitude, if known.
order.customer.addresses[].longitudenumberLongitude, if known.
order.customer.addresses[].defaultbooleanTrue when this is the default address.
order.customer.created_atstringWhen it was created (ISO 8601).
order.customer.updated_atstringWhen it was last updated (ISO 8601).
order.line_itemsarray of objectItems ordered.
order.line_items[].idintegerLine item id.
order.line_items[].product_idinteger | nullProduct id; null when the product was deleted later.
order.line_items[].variant_idintegerVariant id.
order.line_items[].titlestringProduct title.
order.line_items[].variant_titlestringVariant title.
order.line_items[].namestringProduct and variant name.
order.line_items[].skustring | nullSKU of the variant.
order.line_items[].barcodestring | nullBarcode of the variant.
order.line_items[].vendorstringSupplier of the item.
order.line_items[].typestringProduct type.
order.line_items[].quantityintegerQuantity ordered.
order.line_items[].fulfillable_quantityintegerQuantity still available to fulfill.
order.line_items[].pricenumberUnit price before discounts, VND.
order.line_items[].price_originalnumberUnit price before any promotion, VND.
order.line_items[].price_promotionnumberPromotion discount per unit, VND.
order.line_items[].total_discountnumberTotal discount on this line, VND.
order.line_items[].gramsnumberWeight in grams.
order.line_items[].requires_shippingbooleanWhether the item needs shipping.
order.line_items[].taxablebooleanWhether the item is taxable.
order.line_items[].gift_cardbooleanWhether the item is a gift card.
order.line_items[].product_existsbooleanFalse when the product has been deleted.
order.line_items[].fulfillment_servicestring | nullWho fulfills the item.
order.line_items[].fulfillment_statusstring | nullFulfillment status of this line.
order.line_items[].propertiesarray | nullCustom properties of the line item.
order.line_items[].imageobjectVariant image.
order.line_items[].image.srcstringImage URL.
order.shipping_linesarray of objectShipping methods used.
order.shipping_lines[].codestring | nullShipping method reference.
order.shipping_lines[].titlestring | nullShipping method title.
order.shipping_lines[].pricenumberShipping price, VND.
order.shipping_lines[].sourcestring | nullSource of the shipping method.
order.discount_codesarray of objectDiscount codes applied.
order.discount_codes[].codestringThe code.
order.discount_codes[].amountnumberDiscount amount.
order.discount_codes[].typestringpercentage, shipping or fixed_amount.
order.fulfillmentsarray of objectShipments of the order.
order.fulfillments[].idintegerFulfillment id.
order.fulfillments[].order_idintegerOrder id.
order.fulfillments[].statusstringFulfillment status, e.g. success.
order.fulfillments[].tracking_companystring | nullCarrier name.
order.fulfillments[].tracking_company_codestring | nullCarrier code.
order.fulfillments[].tracking_numberstring | nullTracking number.
order.fulfillments[].tracking_numbersarray of stringTracking numbers.
order.fulfillments[].tracking_urlstring | nullTracking URL.
order.fulfillments[].tracking_urlsarray of stringTracking URLs.
order.fulfillments[].carrier_status_codestring | nullCarrier delivery status code.
order.fulfillments[].carrier_status_namestring | nullCarrier delivery status.
order.fulfillments[].carrier_cod_status_codestring | nullCash-on-delivery status code.
order.fulfillments[].carrier_cod_status_namestring | nullCash-on-delivery status.
order.fulfillments[].cod_amountnumberCash on delivery amount to collect, VND.
order.fulfillments[].real_shipping_feenumberActual shipping fee, VND.
order.fulfillments[].total_weightnumberPackage weight in grams.
order.fulfillments[].location_idinteger | nullLocation the order shipped from.
order.fulfillments[].notify_customerbooleanWhether the customer was notified.
order.fulfillments[].notestring | nullFulfillment note.
order.fulfillments[].created_atstringWhen it was created (ISO 8601).
order.fulfillments[].updated_atstringWhen it was last updated (ISO 8601).
order.fulfillments[].line_itemsarray of objectItems in this fulfillment.
order.fulfillments[].line_items[].idintegerLine item id.
order.fulfillments[].line_items[].product_idinteger | nullProduct id; null when the product was deleted later.
order.fulfillments[].line_items[].variant_idintegerVariant id.
order.fulfillments[].line_items[].titlestringProduct title.
order.fulfillments[].line_items[].variant_titlestringVariant title.
order.fulfillments[].line_items[].namestringProduct and variant name.
order.fulfillments[].line_items[].skustring | nullSKU of the variant.
order.fulfillments[].line_items[].barcodestring | nullBarcode of the variant.
order.fulfillments[].line_items[].vendorstringSupplier of the item.
order.fulfillments[].line_items[].typestringProduct type.
order.fulfillments[].line_items[].quantityintegerQuantity ordered.
order.fulfillments[].line_items[].fulfillable_quantityintegerQuantity still available to fulfill.
order.fulfillments[].line_items[].pricenumberUnit price before discounts, VND.
order.fulfillments[].line_items[].price_originalnumberUnit price before any promotion, VND.
order.fulfillments[].line_items[].price_promotionnumberPromotion discount per unit, VND.
order.fulfillments[].line_items[].total_discountnumberTotal discount on this line, VND.
order.fulfillments[].line_items[].gramsnumberWeight in grams.
order.fulfillments[].line_items[].requires_shippingbooleanWhether the item needs shipping.
order.fulfillments[].line_items[].taxablebooleanWhether the item is taxable.
order.fulfillments[].line_items[].gift_cardbooleanWhether the item is a gift card.
order.fulfillments[].line_items[].product_existsbooleanFalse when the product has been deleted.
order.fulfillments[].line_items[].fulfillment_servicestring | nullWho fulfills the item.
order.fulfillments[].line_items[].fulfillment_statusstring | nullFulfillment status of this line.
order.fulfillments[].line_items[].propertiesarray | nullCustom properties of the line item.
order.fulfillments[].line_items[].imageobjectVariant image.
order.fulfillments[].line_items[].image.srcstringImage URL.
order.transactionsarray of objectPayments on the order.
order.transactions[].idintegerTransaction id.
order.transactions[].order_idintegerOrder the transaction belongs to.
order.transactions[].parent_idinteger | nullId of the transaction this one follows.
order.transactions[].kindstringKind: pending, authorization, capture, sale, void or refund (case varies).
order.transactions[].statusstring | nullStatus: pending, failure, success or error; some shops return a Vietnamese label.
order.transactions[].amountnumberAmount, VND; negative for refunds.
order.transactions[].currencystring | nullCurrency code, e.g. VND.
order.transactions[].gatewaystringName of the payment gateway.
order.transactions[].is_cod_gatewaybooleanTrue when the gateway is cash on delivery.
order.transactions[].authorizationstring | nullAuthorization code.
order.transactions[].receiptstring | nullReceipt.
order.transactions[].testbooleanTrue for a test transaction.
order.transactions[].user_idinteger | nullStaff who recorded it; 0 for the system.
order.transactions[].location_idinteger | nullLocation id.
order.transactions[].device_idinteger | nullDevice id.
order.transactions[].created_atstringWhen it was created (ISO 8601).
order.transactions[].external_transaction_idstring | nullId at the payment provider.
order.transactions[].haravan_transaction_idstring | nullHaravan payment reference.
order.transactions[].payment_detailsobject | nullPayment details, if any.
order.transactions[].send_emailbooleanWhether an email was sent.
order.refundsarray of objectRefunds on the order.
order.refunds[].idintegerRefund id.
order.refunds[].order_idintegerOrder id.
order.refunds[].notestring | nullNote attached to the refund.
order.refunds[].restockboolean | nullWhether items went back to stock.
order.refunds[].user_idinteger | nullStaff who made the refund.
order.refunds[].location_idinteger | nullLocation items were returned to.
order.refunds[].created_atstringWhen it was created (ISO 8601).
order.refunds[].refund_line_itemsarray of objectItems returned or refunded.
order.refunds[].refund_line_items[].idintegerRefund line item id.
order.refunds[].refund_line_items[].line_item_idintegerOrder line item it refers to.
order.refunds[].refund_line_items[].quantityintegerQuantity refunded.
order.refunds[].refund_line_items[].line_itemobjectThe order line item.
order.refunds[].refund_line_items[].line_item.idintegerLine item id.
order.refunds[].refund_line_items[].line_item.product_idinteger | nullProduct id; null when the product was deleted later.
order.refunds[].refund_line_items[].line_item.variant_idintegerVariant id.
order.refunds[].refund_line_items[].line_item.titlestringProduct title.
order.refunds[].refund_line_items[].line_item.variant_titlestringVariant title.
order.refunds[].refund_line_items[].line_item.namestringProduct and variant name.
order.refunds[].refund_line_items[].line_item.skustring | nullSKU of the variant.
order.refunds[].refund_line_items[].line_item.barcodestring | nullBarcode of the variant.
order.refunds[].refund_line_items[].line_item.vendorstringSupplier of the item.
order.refunds[].refund_line_items[].line_item.typestringProduct type.
order.refunds[].refund_line_items[].line_item.quantityintegerQuantity ordered.
order.refunds[].refund_line_items[].line_item.fulfillable_quantityintegerQuantity still available to fulfill.
order.refunds[].refund_line_items[].line_item.pricenumberUnit price before discounts, VND.
order.refunds[].refund_line_items[].line_item.price_originalnumberUnit price before any promotion, VND.
order.refunds[].refund_line_items[].line_item.price_promotionnumberPromotion discount per unit, VND.
order.refunds[].refund_line_items[].line_item.total_discountnumberTotal discount on this line, VND.
order.refunds[].refund_line_items[].line_item.gramsnumberWeight in grams.
order.refunds[].refund_line_items[].line_item.requires_shippingbooleanWhether the item needs shipping.
order.refunds[].refund_line_items[].line_item.taxablebooleanWhether the item is taxable.
order.refunds[].refund_line_items[].line_item.gift_cardbooleanWhether the item is a gift card.
order.refunds[].refund_line_items[].line_item.product_existsbooleanFalse when the product has been deleted.
order.refunds[].refund_line_items[].line_item.fulfillment_servicestring | nullWho fulfills the item.
order.refunds[].refund_line_items[].line_item.fulfillment_statusstring | nullFulfillment status of this line.
order.refunds[].refund_line_items[].line_item.propertiesarray | nullCustom properties of the line item.
order.refunds[].refund_line_items[].line_item.imageobjectVariant image.
order.refunds[].refund_line_items[].line_item.image.srcstringImage URL.
order.refunds[].transactionsarray of objectMoney returned, as refund transactions.
order.refunds[].transactions[].idintegerTransaction id.
order.refunds[].transactions[].order_idintegerOrder the transaction belongs to.
order.refunds[].transactions[].parent_idinteger | nullId of the transaction this one follows.
order.refunds[].transactions[].kindstringKind: pending, authorization, capture, sale, void or refund (case varies).
order.refunds[].transactions[].statusstring | nullStatus: pending, failure, success or error; some shops return a Vietnamese label.
order.refunds[].transactions[].amountnumberAmount, VND; negative for refunds.
order.refunds[].transactions[].currencystring | nullCurrency code, e.g. VND.
order.refunds[].transactions[].gatewaystringName of the payment gateway.
order.refunds[].transactions[].is_cod_gatewaybooleanTrue when the gateway is cash on delivery.
order.refunds[].transactions[].authorizationstring | nullAuthorization code.
order.refunds[].transactions[].receiptstring | nullReceipt.
order.refunds[].transactions[].testbooleanTrue for a test transaction.
order.refunds[].transactions[].user_idinteger | nullStaff who recorded it; 0 for the system.
order.refunds[].transactions[].location_idinteger | nullLocation id.
order.refunds[].transactions[].device_idinteger | nullDevice id.
order.refunds[].transactions[].created_atstringWhen it was created (ISO 8601).
order.refunds[].transactions[].external_transaction_idstring | nullId at the payment provider.
order.refunds[].transactions[].haravan_transaction_idstring | nullHaravan payment reference.
order.refunds[].transactions[].payment_detailsobject | nullPayment details, if any.
order.refunds[].transactions[].send_emailbooleanWhether an email was sent.

Cancel order — haravan.cancel_order ​

Cancel an order, optionally restocking items and refunding an amount.

Side effectRiskNeeds approvalIdempotentScopes
WRITEhighyesnocom.write_orders

Input

FieldTypeRequiredDescription
order_idintegeryesHaravan order id. Min 1.
reasonstringyesWhy the order is cancelled. One of: customer, inventory, fraud, declined, other.
amountstringnoAmount to refund, VND, e.g. '520000'.
restockbooleannoPut items back in stock.
emailbooleannoEmail the customer about it.
notestringnoInternal note.

Extra fields: ignored.

Output

FieldTypeDescription
orderobjectThe order.
order.idintegerOrder id used by the API.
order.namestringOrder name shown to the shop and customer, e.g. #100020.
order.order_numberstringOrder number shown to the shop and customer.
order.numberintegerPosition of the order in the shop's order count.
order.tokenstringUnique token of the order.
order.emailstring | nullCustomer email.
order.contact_emailstring | nullContact email of the buyer.
order.notestring | nullOrder note.
order.note_attributesarray of objectExtra name/value details added to the order.
order.note_attributes[].namestringName.
order.note_attributes[].valuestringValue.
order.tagsstring | nullComma-separated tags.
order.currencystringCurrency code, e.g. VND.
order.total_pricenumberTotal of items, discounts, shipping and tax, VND.
order.subtotal_pricenumberPrice after discounts, before shipping and tax, VND.
order.total_line_items_pricenumberSum of line item prices, VND.
order.total_discountsnumberTotal discounts, VND.
order.total_taxnumberTotal tax, VND.
order.total_weightnumberTotal weight in grams.
order.taxes_includedboolean | nullWhether tax is included in the subtotal.
order.financial_statusstringPayment status: pending, authorized, partially_paid, paid, partially_refunded, refunded or voided.
order.fulfillment_statusstring | nullDelivery status: fulfilled, partial, restocked, or null/notfulfilled when nothing shipped.
order.gatewaystring | nullPayment gateway name.
order.gateway_codestring | nullPayment gateway code, e.g. COD.
order.processing_methodstring | nullHow the payment was processed: checkout, direct, manual or offsite.
order.closed_statusstringunclosed or closed.
order.cancelled_statusstringuncancelled or cancelled.
order.confirmed_statusstringunconfirmed or confirmed.
order.cancel_reasonstring | nullWhy it was cancelled: customer, fraud, inventory, declined or other.
order.created_atstringWhen the order was created (ISO 8601).
order.updated_atstringWhen the order was last updated (ISO 8601).
order.closed_atstring | nullWhen the order was closed (ISO 8601).
order.cancelled_atstring | nullWhen the order was cancelled (ISO 8601).
order.confirmed_atstring | nullWhen the order was confirmed (ISO 8601).
order.source_namestring | nullWhere the order came from, e.g. web or pos.
order.sourcestring | nullChannel that created the order.
order.landing_sitestring | nullPage where the buyer entered the shop.
order.landing_site_refstring | nullRef of the landing page.
order.referring_sitestring | nullSite that referred the buyer.
order.utm_sourcestring | nullUTM source.
order.utm_mediumstring | nullUTM medium.
order.utm_campaignstring | nullUTM campaign.
order.utm_termstring | nullUTM term.
order.utm_contentstring | nullUTM content.
order.buyer_accepts_marketingbooleanWhether the buyer accepts marketing.
order.browser_ipstring | nullBuyer's IP address.
order.cart_tokenstring | nullToken of the cart behind the order.
order.checkout_tokenstring | nullToken of the checkout behind the order.
order.user_idinteger | nullStaff who processed the order; 0 if none.
order.location_idinteger | nullLocation where the order was processed.
order.location_namestring | nullName of that location.
order.assigned_location_idinteger | nullLocation assigned to handle it.
order.assigned_location_namestring | nullName of the assigned location.
order.assigned_location_atstring | nullWhen the location was assigned.
order.client_detailsobjectBrowser the customer used.
order.client_details.accept_languagestring | nullBrowser languages.
order.client_details.browser_ipstring | nullIP address.
order.client_details.browser_heightinteger | nullScreen height in pixels.
order.client_details.browser_widthinteger | nullScreen width in pixels.
order.client_details.session_hashstring | nullSession hash.
order.client_details.user_agentstring | nullBrowser user agent.
order.billing_addressobjectBilling address.
order.billing_address.idintegerAddress id.
order.billing_address.namestringFull name of the person at this address.
order.billing_address.first_namestringFirst name.
order.billing_address.last_namestringLast name.
order.billing_address.companystringCompany name.
order.billing_address.phonestringPhone number.
order.billing_address.address1stringStreet address: house number and street.
order.billing_address.address2stringSecond address line.
order.billing_address.citystringCity, town or village.
order.billing_address.provincestringProvince or city name.
order.billing_address.province_codestringProvince code; matches list_provinces.
order.billing_address.districtstringWard name under the two-level model (district name before).
order.billing_address.district_codestringWard code; matches list_wards.
order.billing_address.wardstringWard name under the three-level model; usually empty now.
order.billing_address.ward_codestringWard code under the three-level model; usually empty now.
order.billing_address.countrystringCountry name.
order.billing_address.country_codestringTwo-letter country code, e.g. VN.
order.billing_address.zipstringPostal code.
order.billing_address.latitudenumberLatitude, if known.
order.billing_address.longitudenumberLongitude, if known.
order.billing_address.defaultbooleanTrue when this is the default address.
order.shipping_addressobjectDelivery address.
order.shipping_address.idintegerAddress id.
order.shipping_address.namestringFull name of the person at this address.
order.shipping_address.first_namestringFirst name.
order.shipping_address.last_namestringLast name.
order.shipping_address.companystringCompany name.
order.shipping_address.phonestringPhone number.
order.shipping_address.address1stringStreet address: house number and street.
order.shipping_address.address2stringSecond address line.
order.shipping_address.citystringCity, town or village.
order.shipping_address.provincestringProvince or city name.
order.shipping_address.province_codestringProvince code; matches list_provinces.
order.shipping_address.districtstringWard name under the two-level model (district name before).
order.shipping_address.district_codestringWard code; matches list_wards.
order.shipping_address.wardstringWard name under the three-level model; usually empty now.
order.shipping_address.ward_codestringWard code under the three-level model; usually empty now.
order.shipping_address.countrystringCountry name.
order.shipping_address.country_codestringTwo-letter country code, e.g. VN.
order.shipping_address.zipstringPostal code.
order.shipping_address.latitudenumberLatitude, if known.
order.shipping_address.longitudenumberLongitude, if known.
order.shipping_address.defaultbooleanTrue when this is the default address.
order.customerobjectThe customer; null for some POS orders.
order.customer.idintegerCustomer id.
order.customer.emailstring | nullEmail.
order.customer.phonestring | nullPhone number.
order.customer.first_namestring | nullFirst name.
order.customer.last_namestring | nullLast name.
order.customer.accepts_marketingbooleanWhether the customer accepts marketing.
order.customer.tagsstring | nullComma-separated tags.
order.customer.notestring | nullNote about the customer.
order.customer.statestringAccount state.
order.customer.orders_countintegerNumber of orders.
order.customer.total_spentnumberTotal spent, VND.
order.customer.last_order_idinteger | nullLatest order id.
order.customer.last_order_namestring | nullLatest order name.
order.customer.default_addressobjectDefault address.
order.customer.default_address.idintegerAddress id.
order.customer.default_address.namestringFull name of the person at this address.
order.customer.default_address.first_namestringFirst name.
order.customer.default_address.last_namestringLast name.
order.customer.default_address.companystringCompany name.
order.customer.default_address.phonestringPhone number.
order.customer.default_address.address1stringStreet address: house number and street.
order.customer.default_address.address2stringSecond address line.
order.customer.default_address.citystringCity, town or village.
order.customer.default_address.provincestringProvince or city name.
order.customer.default_address.province_codestringProvince code; matches list_provinces.
order.customer.default_address.districtstringWard name under the two-level model (district name before).
order.customer.default_address.district_codestringWard code; matches list_wards.
order.customer.default_address.wardstringWard name under the three-level model; usually empty now.
order.customer.default_address.ward_codestringWard code under the three-level model; usually empty now.
order.customer.default_address.countrystringCountry name.
order.customer.default_address.country_codestringTwo-letter country code, e.g. VN.
order.customer.default_address.zipstringPostal code.
order.customer.default_address.latitudenumberLatitude, if known.
order.customer.default_address.longitudenumberLongitude, if known.
order.customer.default_address.defaultbooleanTrue when this is the default address.
order.customer.addressesarray of objectAll addresses.
order.customer.addresses[].idintegerAddress id.
order.customer.addresses[].namestringFull name of the person at this address.
order.customer.addresses[].first_namestringFirst name.
order.customer.addresses[].last_namestringLast name.
order.customer.addresses[].companystringCompany name.
order.customer.addresses[].phonestringPhone number.
order.customer.addresses[].address1stringStreet address: house number and street.
order.customer.addresses[].address2stringSecond address line.
order.customer.addresses[].citystringCity, town or village.
order.customer.addresses[].provincestringProvince or city name.
order.customer.addresses[].province_codestringProvince code; matches list_provinces.
order.customer.addresses[].districtstringWard name under the two-level model (district name before).
order.customer.addresses[].district_codestringWard code; matches list_wards.
order.customer.addresses[].wardstringWard name under the three-level model; usually empty now.
order.customer.addresses[].ward_codestringWard code under the three-level model; usually empty now.
order.customer.addresses[].countrystringCountry name.
order.customer.addresses[].country_codestringTwo-letter country code, e.g. VN.
order.customer.addresses[].zipstringPostal code.
order.customer.addresses[].latitudenumberLatitude, if known.
order.customer.addresses[].longitudenumberLongitude, if known.
order.customer.addresses[].defaultbooleanTrue when this is the default address.
order.customer.created_atstringWhen it was created (ISO 8601).
order.customer.updated_atstringWhen it was last updated (ISO 8601).
order.line_itemsarray of objectItems ordered.
order.line_items[].idintegerLine item id.
order.line_items[].product_idinteger | nullProduct id; null when the product was deleted later.
order.line_items[].variant_idintegerVariant id.
order.line_items[].titlestringProduct title.
order.line_items[].variant_titlestringVariant title.
order.line_items[].namestringProduct and variant name.
order.line_items[].skustring | nullSKU of the variant.
order.line_items[].barcodestring | nullBarcode of the variant.
order.line_items[].vendorstringSupplier of the item.
order.line_items[].typestringProduct type.
order.line_items[].quantityintegerQuantity ordered.
order.line_items[].fulfillable_quantityintegerQuantity still available to fulfill.
order.line_items[].pricenumberUnit price before discounts, VND.
order.line_items[].price_originalnumberUnit price before any promotion, VND.
order.line_items[].price_promotionnumberPromotion discount per unit, VND.
order.line_items[].total_discountnumberTotal discount on this line, VND.
order.line_items[].gramsnumberWeight in grams.
order.line_items[].requires_shippingbooleanWhether the item needs shipping.
order.line_items[].taxablebooleanWhether the item is taxable.
order.line_items[].gift_cardbooleanWhether the item is a gift card.
order.line_items[].product_existsbooleanFalse when the product has been deleted.
order.line_items[].fulfillment_servicestring | nullWho fulfills the item.
order.line_items[].fulfillment_statusstring | nullFulfillment status of this line.
order.line_items[].propertiesarray | nullCustom properties of the line item.
order.line_items[].imageobjectVariant image.
order.line_items[].image.srcstringImage URL.
order.shipping_linesarray of objectShipping methods used.
order.shipping_lines[].codestring | nullShipping method reference.
order.shipping_lines[].titlestring | nullShipping method title.
order.shipping_lines[].pricenumberShipping price, VND.
order.shipping_lines[].sourcestring | nullSource of the shipping method.
order.discount_codesarray of objectDiscount codes applied.
order.discount_codes[].codestringThe code.
order.discount_codes[].amountnumberDiscount amount.
order.discount_codes[].typestringpercentage, shipping or fixed_amount.
order.fulfillmentsarray of objectShipments of the order.
order.fulfillments[].idintegerFulfillment id.
order.fulfillments[].order_idintegerOrder id.
order.fulfillments[].statusstringFulfillment status, e.g. success.
order.fulfillments[].tracking_companystring | nullCarrier name.
order.fulfillments[].tracking_company_codestring | nullCarrier code.
order.fulfillments[].tracking_numberstring | nullTracking number.
order.fulfillments[].tracking_numbersarray of stringTracking numbers.
order.fulfillments[].tracking_urlstring | nullTracking URL.
order.fulfillments[].tracking_urlsarray of stringTracking URLs.
order.fulfillments[].carrier_status_codestring | nullCarrier delivery status code.
order.fulfillments[].carrier_status_namestring | nullCarrier delivery status.
order.fulfillments[].carrier_cod_status_codestring | nullCash-on-delivery status code.
order.fulfillments[].carrier_cod_status_namestring | nullCash-on-delivery status.
order.fulfillments[].cod_amountnumberCash on delivery amount to collect, VND.
order.fulfillments[].real_shipping_feenumberActual shipping fee, VND.
order.fulfillments[].total_weightnumberPackage weight in grams.
order.fulfillments[].location_idinteger | nullLocation the order shipped from.
order.fulfillments[].notify_customerbooleanWhether the customer was notified.
order.fulfillments[].notestring | nullFulfillment note.
order.fulfillments[].created_atstringWhen it was created (ISO 8601).
order.fulfillments[].updated_atstringWhen it was last updated (ISO 8601).
order.fulfillments[].line_itemsarray of objectItems in this fulfillment.
order.fulfillments[].line_items[].idintegerLine item id.
order.fulfillments[].line_items[].product_idinteger | nullProduct id; null when the product was deleted later.
order.fulfillments[].line_items[].variant_idintegerVariant id.
order.fulfillments[].line_items[].titlestringProduct title.
order.fulfillments[].line_items[].variant_titlestringVariant title.
order.fulfillments[].line_items[].namestringProduct and variant name.
order.fulfillments[].line_items[].skustring | nullSKU of the variant.
order.fulfillments[].line_items[].barcodestring | nullBarcode of the variant.
order.fulfillments[].line_items[].vendorstringSupplier of the item.
order.fulfillments[].line_items[].typestringProduct type.
order.fulfillments[].line_items[].quantityintegerQuantity ordered.
order.fulfillments[].line_items[].fulfillable_quantityintegerQuantity still available to fulfill.
order.fulfillments[].line_items[].pricenumberUnit price before discounts, VND.
order.fulfillments[].line_items[].price_originalnumberUnit price before any promotion, VND.
order.fulfillments[].line_items[].price_promotionnumberPromotion discount per unit, VND.
order.fulfillments[].line_items[].total_discountnumberTotal discount on this line, VND.
order.fulfillments[].line_items[].gramsnumberWeight in grams.
order.fulfillments[].line_items[].requires_shippingbooleanWhether the item needs shipping.
order.fulfillments[].line_items[].taxablebooleanWhether the item is taxable.
order.fulfillments[].line_items[].gift_cardbooleanWhether the item is a gift card.
order.fulfillments[].line_items[].product_existsbooleanFalse when the product has been deleted.
order.fulfillments[].line_items[].fulfillment_servicestring | nullWho fulfills the item.
order.fulfillments[].line_items[].fulfillment_statusstring | nullFulfillment status of this line.
order.fulfillments[].line_items[].propertiesarray | nullCustom properties of the line item.
order.fulfillments[].line_items[].imageobjectVariant image.
order.fulfillments[].line_items[].image.srcstringImage URL.
order.transactionsarray of objectPayments on the order.
order.transactions[].idintegerTransaction id.
order.transactions[].order_idintegerOrder the transaction belongs to.
order.transactions[].parent_idinteger | nullId of the transaction this one follows.
order.transactions[].kindstringKind: pending, authorization, capture, sale, void or refund (case varies).
order.transactions[].statusstring | nullStatus: pending, failure, success or error; some shops return a Vietnamese label.
order.transactions[].amountnumberAmount, VND; negative for refunds.
order.transactions[].currencystring | nullCurrency code, e.g. VND.
order.transactions[].gatewaystringName of the payment gateway.
order.transactions[].is_cod_gatewaybooleanTrue when the gateway is cash on delivery.
order.transactions[].authorizationstring | nullAuthorization code.
order.transactions[].receiptstring | nullReceipt.
order.transactions[].testbooleanTrue for a test transaction.
order.transactions[].user_idinteger | nullStaff who recorded it; 0 for the system.
order.transactions[].location_idinteger | nullLocation id.
order.transactions[].device_idinteger | nullDevice id.
order.transactions[].created_atstringWhen it was created (ISO 8601).
order.transactions[].external_transaction_idstring | nullId at the payment provider.
order.transactions[].haravan_transaction_idstring | nullHaravan payment reference.
order.transactions[].payment_detailsobject | nullPayment details, if any.
order.transactions[].send_emailbooleanWhether an email was sent.
order.refundsarray of objectRefunds on the order.
order.refunds[].idintegerRefund id.
order.refunds[].order_idintegerOrder id.
order.refunds[].notestring | nullNote attached to the refund.
order.refunds[].restockboolean | nullWhether items went back to stock.
order.refunds[].user_idinteger | nullStaff who made the refund.
order.refunds[].location_idinteger | nullLocation items were returned to.
order.refunds[].created_atstringWhen it was created (ISO 8601).
order.refunds[].refund_line_itemsarray of objectItems returned or refunded.
order.refunds[].refund_line_items[].idintegerRefund line item id.
order.refunds[].refund_line_items[].line_item_idintegerOrder line item it refers to.
order.refunds[].refund_line_items[].quantityintegerQuantity refunded.
order.refunds[].refund_line_items[].line_itemobjectThe order line item.
order.refunds[].refund_line_items[].line_item.idintegerLine item id.
order.refunds[].refund_line_items[].line_item.product_idinteger | nullProduct id; null when the product was deleted later.
order.refunds[].refund_line_items[].line_item.variant_idintegerVariant id.
order.refunds[].refund_line_items[].line_item.titlestringProduct title.
order.refunds[].refund_line_items[].line_item.variant_titlestringVariant title.
order.refunds[].refund_line_items[].line_item.namestringProduct and variant name.
order.refunds[].refund_line_items[].line_item.skustring | nullSKU of the variant.
order.refunds[].refund_line_items[].line_item.barcodestring | nullBarcode of the variant.
order.refunds[].refund_line_items[].line_item.vendorstringSupplier of the item.
order.refunds[].refund_line_items[].line_item.typestringProduct type.
order.refunds[].refund_line_items[].line_item.quantityintegerQuantity ordered.
order.refunds[].refund_line_items[].line_item.fulfillable_quantityintegerQuantity still available to fulfill.
order.refunds[].refund_line_items[].line_item.pricenumberUnit price before discounts, VND.
order.refunds[].refund_line_items[].line_item.price_originalnumberUnit price before any promotion, VND.
order.refunds[].refund_line_items[].line_item.price_promotionnumberPromotion discount per unit, VND.
order.refunds[].refund_line_items[].line_item.total_discountnumberTotal discount on this line, VND.
order.refunds[].refund_line_items[].line_item.gramsnumberWeight in grams.
order.refunds[].refund_line_items[].line_item.requires_shippingbooleanWhether the item needs shipping.
order.refunds[].refund_line_items[].line_item.taxablebooleanWhether the item is taxable.
order.refunds[].refund_line_items[].line_item.gift_cardbooleanWhether the item is a gift card.
order.refunds[].refund_line_items[].line_item.product_existsbooleanFalse when the product has been deleted.
order.refunds[].refund_line_items[].line_item.fulfillment_servicestring | nullWho fulfills the item.
order.refunds[].refund_line_items[].line_item.fulfillment_statusstring | nullFulfillment status of this line.
order.refunds[].refund_line_items[].line_item.propertiesarray | nullCustom properties of the line item.
order.refunds[].refund_line_items[].line_item.imageobjectVariant image.
order.refunds[].refund_line_items[].line_item.image.srcstringImage URL.
order.refunds[].transactionsarray of objectMoney returned, as refund transactions.
order.refunds[].transactions[].idintegerTransaction id.
order.refunds[].transactions[].order_idintegerOrder the transaction belongs to.
order.refunds[].transactions[].parent_idinteger | nullId of the transaction this one follows.
order.refunds[].transactions[].kindstringKind: pending, authorization, capture, sale, void or refund (case varies).
order.refunds[].transactions[].statusstring | nullStatus: pending, failure, success or error; some shops return a Vietnamese label.
order.refunds[].transactions[].amountnumberAmount, VND; negative for refunds.
order.refunds[].transactions[].currencystring | nullCurrency code, e.g. VND.
order.refunds[].transactions[].gatewaystringName of the payment gateway.
order.refunds[].transactions[].is_cod_gatewaybooleanTrue when the gateway is cash on delivery.
order.refunds[].transactions[].authorizationstring | nullAuthorization code.
order.refunds[].transactions[].receiptstring | nullReceipt.
order.refunds[].transactions[].testbooleanTrue for a test transaction.
order.refunds[].transactions[].user_idinteger | nullStaff who recorded it; 0 for the system.
order.refunds[].transactions[].location_idinteger | nullLocation id.
order.refunds[].transactions[].device_idinteger | nullDevice id.
order.refunds[].transactions[].created_atstringWhen it was created (ISO 8601).
order.refunds[].transactions[].external_transaction_idstring | nullId at the payment provider.
order.refunds[].transactions[].haravan_transaction_idstring | nullHaravan payment reference.
order.refunds[].transactions[].payment_detailsobject | nullPayment details, if any.
order.refunds[].transactions[].send_emailbooleanWhether an email was sent.

Add order tags — haravan.add_order_tags ​

Add tags to an order; existing tags are kept.

Side effectRiskNeeds approvalIdempotentScopes
WRITEmediumyesnocom.write_orders

Input

FieldTypeRequiredDescription
order_idintegeryesHaravan order id. Min 1.
tagsstringyesComma-separated tags, e.g. 'vip,zalo'.

Extra fields: ignored.

Output

FieldTypeDescription
tagsstring | nullOrder tags after the change.

Remove order tags — haravan.remove_order_tags ​

Remove tags from an order.

Side effectRiskNeeds approvalIdempotentScopes
WRITEmediumyesyescom.write_orders

Input

FieldTypeRequiredDescription
order_idintegeryesHaravan order id. Min 1.
tagsstringyesComma-separated tags, e.g. 'vip,zalo'.

Extra fields: ignored.

Output

FieldTypeDescription
tagsstring | nullOrder tags after the change.

Assign order — haravan.assign_order ​

Assign staff to handle an order (advanced order processing only).

Side effectRiskNeeds approvalIdempotentScopes
WRITEmediumyesnocom.write_orders

Input

FieldTypeRequiredDescription
order_idintegeryesHaravan order id. Min 1.
user_idsarray of integernoStaff ids from list_staff.
group_user_idsarray of integernoStaff group ids.
location_idintegernoLocation 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 effectRiskNeeds approvalIdempotentScopes
NONElownoyescom.read_orders

Input

FieldTypeRequiredDescription
order_idintegeryesHaravan order id. Min 1.

Extra fields: ignored.

Output

FieldTypeDescription
eventsarray of objectWhat happened to the order.
events[].idintegerEvent id.
events[].subject_idintegerId of the resource that produced the event.
events[].subject_typestringType of that resource: Article, Blog, Collection, Comment, Order, Page or Product.
events[].verbstringWhat happened, e.g. create, update, destroy or confirmed.
events[].messagestringHuman-readable text of the event; may contain HTML links.
events[].descriptionstring | nullPlain-text description.
events[].bodystring | nullExtra text about the event.
events[].argumentsarray of stringValues the message was built from.
events[].authorstringWho caused the event.
events[].pathstring | nullRelative admin URL of the resource.
events[].created_atstringWhen it happened (ISO 8601).

List order payments — haravan.list_order_transactions ​

List payment transactions of an order.

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyescom.read_orders

Input

FieldTypeRequiredDescription
order_idintegeryesHaravan order id. Min 1.

Extra fields: ignored.

Output

FieldTypeDescription
transactionsarray of objectPayment transactions of the order.
transactions[].idintegerTransaction id.
transactions[].order_idintegerOrder the transaction belongs to.
transactions[].parent_idinteger | nullId of the transaction this one follows.
transactions[].kindstringKind: pending, authorization, capture, sale, void or refund (case varies).
transactions[].statusstring | nullStatus: pending, failure, success or error; some shops return a Vietnamese label.
transactions[].amountnumberAmount, VND; negative for refunds.
transactions[].currencystring | nullCurrency code, e.g. VND.
transactions[].gatewaystringName of the payment gateway.
transactions[].is_cod_gatewaybooleanTrue when the gateway is cash on delivery.
transactions[].authorizationstring | nullAuthorization code.
transactions[].receiptstring | nullReceipt.
transactions[].testbooleanTrue for a test transaction.
transactions[].user_idinteger | nullStaff who recorded it; 0 for the system.
transactions[].location_idinteger | nullLocation id.
transactions[].device_idinteger | nullDevice id.
transactions[].created_atstringWhen it was created (ISO 8601).
transactions[].external_transaction_idstring | nullId at the payment provider.
transactions[].haravan_transaction_idstring | nullHaravan payment reference.
transactions[].payment_detailsobject | nullPayment details, if any.
transactions[].send_emailbooleanWhether 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 effectRiskNeeds approvalIdempotentScopes
WRITEhighyesnocom.write_orders

Input

FieldTypeRequiredDescription
order_idintegeryesHaravan order id. Min 1.
transactionobjectyesThe payment.
transaction.amountnumberyesAmount, VND.
transaction.kindstringyesTransaction kind, e.g. capture.

Extra fields: ignored.

Output

FieldTypeDescription
transactionobjectThe transaction that was recorded.
transaction.idintegerTransaction id.
transaction.order_idintegerOrder the transaction belongs to.
transaction.parent_idinteger | nullId of the transaction this one follows.
transaction.kindstringKind: pending, authorization, capture, sale, void or refund (case varies).
transaction.statusstring | nullStatus: pending, failure, success or error; some shops return a Vietnamese label.
transaction.amountnumberAmount, VND; negative for refunds.
transaction.currencystring | nullCurrency code, e.g. VND.
transaction.gatewaystringName of the payment gateway.
transaction.is_cod_gatewaybooleanTrue when the gateway is cash on delivery.
transaction.authorizationstring | nullAuthorization code.
transaction.receiptstring | nullReceipt.
transaction.testbooleanTrue for a test transaction.
transaction.user_idinteger | nullStaff who recorded it; 0 for the system.
transaction.location_idinteger | nullLocation id.
transaction.device_idinteger | nullDevice id.
transaction.created_atstringWhen it was created (ISO 8601).
transaction.external_transaction_idstring | nullId at the payment provider.
transaction.haravan_transaction_idstring | nullHaravan payment reference.
transaction.payment_detailsobject | nullPayment details, if any.
transaction.send_emailbooleanWhether an email was sent.

List order refunds — haravan.list_order_refunds ​

List refunds of an order.

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyescom.read_orders

Input

FieldTypeRequiredDescription
order_idintegeryesHaravan order id. Min 1.

Extra fields: ignored.

Output

FieldTypeDescription
refundsarray of objectRefunds of the order.
refunds[].idintegerRefund id.
refunds[].order_idintegerOrder id.
refunds[].notestring | nullNote attached to the refund.
refunds[].restockboolean | nullWhether items went back to stock.
refunds[].user_idinteger | nullStaff who made the refund.
refunds[].location_idinteger | nullLocation items were returned to.
refunds[].created_atstringWhen it was created (ISO 8601).
refunds[].refund_line_itemsarray of objectItems returned or refunded.
refunds[].refund_line_items[].idintegerRefund line item id.
refunds[].refund_line_items[].line_item_idintegerOrder line item it refers to.
refunds[].refund_line_items[].quantityintegerQuantity refunded.
refunds[].refund_line_items[].line_itemobjectThe order line item.
refunds[].refund_line_items[].line_item.idintegerLine item id.
refunds[].refund_line_items[].line_item.product_idinteger | nullProduct id; null when the product was deleted later.
refunds[].refund_line_items[].line_item.variant_idintegerVariant id.
refunds[].refund_line_items[].line_item.titlestringProduct title.
refunds[].refund_line_items[].line_item.variant_titlestringVariant title.
refunds[].refund_line_items[].line_item.namestringProduct and variant name.
refunds[].refund_line_items[].line_item.skustring | nullSKU of the variant.
refunds[].refund_line_items[].line_item.barcodestring | nullBarcode of the variant.
refunds[].refund_line_items[].line_item.vendorstringSupplier of the item.
refunds[].refund_line_items[].line_item.typestringProduct type.
refunds[].refund_line_items[].line_item.quantityintegerQuantity ordered.
refunds[].refund_line_items[].line_item.fulfillable_quantityintegerQuantity still available to fulfill.
refunds[].refund_line_items[].line_item.pricenumberUnit price before discounts, VND.
refunds[].refund_line_items[].line_item.price_originalnumberUnit price before any promotion, VND.
refunds[].refund_line_items[].line_item.price_promotionnumberPromotion discount per unit, VND.
refunds[].refund_line_items[].line_item.total_discountnumberTotal discount on this line, VND.
refunds[].refund_line_items[].line_item.gramsnumberWeight in grams.
refunds[].refund_line_items[].line_item.requires_shippingbooleanWhether the item needs shipping.
refunds[].refund_line_items[].line_item.taxablebooleanWhether the item is taxable.
refunds[].refund_line_items[].line_item.gift_cardbooleanWhether the item is a gift card.
refunds[].refund_line_items[].line_item.product_existsbooleanFalse when the product has been deleted.
refunds[].refund_line_items[].line_item.fulfillment_servicestring | nullWho fulfills the item.
refunds[].refund_line_items[].line_item.fulfillment_statusstring | nullFulfillment status of this line.
refunds[].refund_line_items[].line_item.propertiesarray | nullCustom properties of the line item.
refunds[].refund_line_items[].line_item.imageobjectVariant image.
refunds[].refund_line_items[].line_item.image.srcstringImage URL.
refunds[].transactionsarray of objectMoney returned, as refund transactions.
refunds[].transactions[].idintegerTransaction id.
refunds[].transactions[].order_idintegerOrder the transaction belongs to.
refunds[].transactions[].parent_idinteger | nullId of the transaction this one follows.
refunds[].transactions[].kindstringKind: pending, authorization, capture, sale, void or refund (case varies).
refunds[].transactions[].statusstring | nullStatus: pending, failure, success or error; some shops return a Vietnamese label.
refunds[].transactions[].amountnumberAmount, VND; negative for refunds.
refunds[].transactions[].currencystring | nullCurrency code, e.g. VND.
refunds[].transactions[].gatewaystringName of the payment gateway.
refunds[].transactions[].is_cod_gatewaybooleanTrue when the gateway is cash on delivery.
refunds[].transactions[].authorizationstring | nullAuthorization code.
refunds[].transactions[].receiptstring | nullReceipt.
refunds[].transactions[].testbooleanTrue for a test transaction.
refunds[].transactions[].user_idinteger | nullStaff who recorded it; 0 for the system.
refunds[].transactions[].location_idinteger | nullLocation id.
refunds[].transactions[].device_idinteger | nullDevice id.
refunds[].transactions[].created_atstringWhen it was created (ISO 8601).
refunds[].transactions[].external_transaction_idstring | nullId at the payment provider.
refunds[].transactions[].haravan_transaction_idstring | nullHaravan payment reference.
refunds[].transactions[].payment_detailsobject | nullPayment details, if any.
refunds[].transactions[].send_emailbooleanWhether an email was sent.

Refund order — haravan.create_order_refund ​

Refund items or an amount on an order, optionally restocking.

Side effectRiskNeeds approvalIdempotentScopes
WRITEhighyesnocom.write_orders

Input

FieldTypeRequiredDescription
order_idintegeryesHaravan order id. Min 1.
refundobjectyesThe refund.
refund.restockbooleannoPut items back in stock.
refund.notifybooleannoNotify the customer.
refund.notestringnoRefund note.
refund.refund_line_itemsarray of objectnoItems to refund: line_item_id and quantity.
refund.transactionsarray of objectnoRefund transactions: amount, kind 'refund'.

Extra fields: ignored.

Output

FieldTypeDescription
refundobjectThe refund that was created.
refund.idintegerRefund id.
refund.order_idintegerOrder id.
refund.notestring | nullNote attached to the refund.
refund.restockboolean | nullWhether items went back to stock.
refund.user_idinteger | nullStaff who made the refund.
refund.location_idinteger | nullLocation items were returned to.
refund.created_atstringWhen it was created (ISO 8601).
refund.refund_line_itemsarray of objectItems returned or refunded.
refund.refund_line_items[].idintegerRefund line item id.
refund.refund_line_items[].line_item_idintegerOrder line item it refers to.
refund.refund_line_items[].quantityintegerQuantity refunded.
refund.refund_line_items[].line_itemobjectThe order line item.
refund.refund_line_items[].line_item.idintegerLine item id.
refund.refund_line_items[].line_item.product_idinteger | nullProduct id; null when the product was deleted later.
refund.refund_line_items[].line_item.variant_idintegerVariant id.
refund.refund_line_items[].line_item.titlestringProduct title.
refund.refund_line_items[].line_item.variant_titlestringVariant title.
refund.refund_line_items[].line_item.namestringProduct and variant name.
refund.refund_line_items[].line_item.skustring | nullSKU of the variant.
refund.refund_line_items[].line_item.barcodestring | nullBarcode of the variant.
refund.refund_line_items[].line_item.vendorstringSupplier of the item.
refund.refund_line_items[].line_item.typestringProduct type.
refund.refund_line_items[].line_item.quantityintegerQuantity ordered.
refund.refund_line_items[].line_item.fulfillable_quantityintegerQuantity still available to fulfill.
refund.refund_line_items[].line_item.pricenumberUnit price before discounts, VND.
refund.refund_line_items[].line_item.price_originalnumberUnit price before any promotion, VND.
refund.refund_line_items[].line_item.price_promotionnumberPromotion discount per unit, VND.
refund.refund_line_items[].line_item.total_discountnumberTotal discount on this line, VND.
refund.refund_line_items[].line_item.gramsnumberWeight in grams.
refund.refund_line_items[].line_item.requires_shippingbooleanWhether the item needs shipping.
refund.refund_line_items[].line_item.taxablebooleanWhether the item is taxable.
refund.refund_line_items[].line_item.gift_cardbooleanWhether the item is a gift card.
refund.refund_line_items[].line_item.product_existsbooleanFalse when the product has been deleted.
refund.refund_line_items[].line_item.fulfillment_servicestring | nullWho fulfills the item.
refund.refund_line_items[].line_item.fulfillment_statusstring | nullFulfillment status of this line.
refund.refund_line_items[].line_item.propertiesarray | nullCustom properties of the line item.
refund.refund_line_items[].line_item.imageobjectVariant image.
refund.refund_line_items[].line_item.image.srcstringImage URL.
refund.transactionsarray of objectMoney returned, as refund transactions.
refund.transactions[].idintegerTransaction id.
refund.transactions[].order_idintegerOrder the transaction belongs to.
refund.transactions[].parent_idinteger | nullId of the transaction this one follows.
refund.transactions[].kindstringKind: pending, authorization, capture, sale, void or refund (case varies).
refund.transactions[].statusstring | nullStatus: pending, failure, success or error; some shops return a Vietnamese label.
refund.transactions[].amountnumberAmount, VND; negative for refunds.
refund.transactions[].currencystring | nullCurrency code, e.g. VND.
refund.transactions[].gatewaystringName of the payment gateway.
refund.transactions[].is_cod_gatewaybooleanTrue when the gateway is cash on delivery.
refund.transactions[].authorizationstring | nullAuthorization code.
refund.transactions[].receiptstring | nullReceipt.
refund.transactions[].testbooleanTrue for a test transaction.
refund.transactions[].user_idinteger | nullStaff who recorded it; 0 for the system.
refund.transactions[].location_idinteger | nullLocation id.
refund.transactions[].device_idinteger | nullDevice id.
refund.transactions[].created_atstringWhen it was created (ISO 8601).
refund.transactions[].external_transaction_idstring | nullId at the payment provider.
refund.transactions[].haravan_transaction_idstring | nullHaravan payment reference.
refund.transactions[].payment_detailsobject | nullPayment details, if any.
refund.transactions[].send_emailbooleanWhether an email was sent.

Get shipping rates — haravan.get_shipping_rates ​

Shipping rates for a destination, order value and weight.

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyescom.read_orders

Input

FieldTypeRequiredDescription
country_idintegernoCountry id, 704 for Vietnam. Min 1.
province_idintegernoProvince id from list_provinces. Min 1.
district_idintegernoWard id from list_wards. Min 1.
total_pricenumbernoOrder value, VND.
total_weightnumbernoTotal weight in grams.

Extra fields: ignored.

Output

FieldTypeDescription
shipping_ratesarray of objectShipping methods available for the destination.
shipping_rates[].idintegerShipping rate id.
shipping_rates[].titlestringRate title.
shipping_rates[].pricenumberPrice, VND.