Skip to main content

Order

Version: 1.0

An order is a customer's request to purchase one or more products from a shop. You can create, retrieve, update, and delete orders using the Order resource.

omni_api_comment_img01

You should note that orders can be created through the API, but no payment information will be collected, and no transaction performed. You can mark the order with any payment status. Orders cannot be created through the store's admin panel. The only way to create an order and accept payments via haravan is by entering the storefront, adding items to the cart, and completing checkout.

You should also note that you can change only a few of an order's attributes using the API. You cannot change the items or the quantities in an order.

Orders that have been created via the haravan POS will not necessarily have customer information attached to them.

Authenticated access scopes: com.read_orders , com.write_orders

What you can do with Orders

The Haravan API lets you do the following with the Order resource.

Properties


billing_address : array

"billing_address": {

"address1": "182 Lê Đại Hành",

"address2": null,

"city": null,

"company": null,

"country": "Vietnam",

"first_name": "Haravan Demo",

"id": 1036847352,

"last_name": null,

"phone": null,

"province": "Hồ Chí Minh",

"zip": null,

"name": " Haravan Demo",

"province_code": "HC",

"country_code": "VN",

"default": true,

"district": "Quận 11",

"district_code": "HC476",

"ward": "Phường 15",

"ward_code": "27208"

}

The mailing address is associated with the payment method. This address is an optional field that won't be available on orders that do not require a payment method. It has the following properties:

  • address1: The street address of the billing address.
  • address2: An optional additional field for the street address of the billing address.
  • city: The city, town, or village of the billing address.
  • company: The company of the person associated with the billing address.
  • country: The name of the country of the billing address.
  • country_code: The two-letter code (ISO 3166-1 format) for the country of the billing address.
  • first_name: The first name of the person associated with the payment method.
  • last_name: The last name of the person associated with the payment method.
  • latitude: The latitude of the billing address.
  • longitude: The longitude of the billing address.
  • name: The full name of the person associated with the payment method.
  • phone: The phone number at the billing address.
  • province: The name of the region (for example, province, state, or prefecture) of the billing address.
  • province_code: The two-letter abbreviation of the region of the billing address.
  • zip: The postal code (for example, zip, postcode, or Eircode) of the billing address.

browser_ip: string

"browser_ip":  null

Whether the customer consented to receive email updates from the shop.

cancel_reason: string

"cancel_reason":  "customer"

The reason why the order was cancelled. If the order was not cancelled, this value is "null." If the order was cancelled, the value will be one of the following:

  • customer: The customer changed or cancelled the order.
  • fraud: The order was fraudulent.
  • inventory: Items in the order were not in inventory.
  • declined: The payment was declined.
  • other: The order was cancelled for a reason not in the list above.

cancelled_at: string

"cancelled_at":  null

The date and time when the order was cancelled. If the order was cancelled, the API returns this value in ISO 8601 format. If the order was not cancelled, this value is "null".

cart_token: string

"cart_token":  "68778783ad298f1c80c3bafcddeea"

Unique identifier for a particular cart that is attached to a particular order.

checkout_token: string

"checkout_token":  "bd5a8aa1ecd019dd3520ff791ee3a24c"

A unique value when referencing the checkout that's associated with the order.

client_details: array

"client_details": {

"accept_language": null,

"browser_ip": null,

"session_hash": null,

"user_agent": null,

"browser_height": null,

"browser_width": null

}

Information about the browser that the customer used when they placed their order:

  • accept_language: The languages and locales that the browser understands.
  • browser_height: The browser screen height in pixels, if available.
  • browser_ip: The browser IP address.
  • browser_width: The browser screen width in pixels, if available.
  • session_hash: A hash of the session.
  • user_agent: Details of the browsing client, including software and operating versions.

closed_at: string

"closed_at": "2021-05-13T07:29:20.1Z"

The date and time (ISO 8601 format) when the order was closed. Returns null if the order isn't closed.

created_at: string

"created_at": "2021-05-13T07:29:20.1Z"

The date and time (ISO 8601 format) when the order was created.

currency: string

"currency": "VND"

The three-letter code (ISO 4217 format) for the shop currency.

customer: array

"customer": {

"accepts_marketing": false,

"addresses": [

{

"address1": "182 Lê Đại Hành",

"address2": null,

"city": null,

"company": null,

"country": "Vietnam",

"first_name": "Haravan Demo",

"id": 1056185840,

"last_name": null,

"phone": null,

"province": "Hồ Chí Minh",

"zip": null,

"name": " Haravan Demo",

"province_code": "HC",

"country_code": "vn",

"default": true,

"district": "Quận 11",

"district_code": "HC476",

"ward": "Phường 15",

"ward_code": "27208"

}

],

"created_at": "2020-09-18T04:12:10.236Z",

"default_address": {

"address1": "182 Lê Đại Hành",

"address2": null,

"city": null,

"company": null,

"country": "Vietnam",

"first_name": "Haravan Demo",

"id": 1056185840,

"last_name": null,

"phone": null,

"province": "Hồ Chí Minh",

"zip": null,

"name": " Haravan Demo",

"province_code": "HC",

"country_code": "vn",

"default": true,

"district": "Quận 11",

"district_code": "HC476",

"ward": "Phường 15",

"ward_code": "27208"

},

"email": "[email protected]",

"phone": null,

"first_name": "Haravan Demo",

"id": 1036847352,

"multipass_identifier": null,

"last_name": null,

"last_order_id": 1138637123,

"last_order_name": "#100027",

"note": "Demo ",

"orders_count": 28,

"state": "Disabled",

"tags": null,

"total_spent": 261380000.0000,

"total_paid": 0.0,

"updated_at": "2021-01-04T22:00:52.558Z",

"verified_email": false,

"send_email_invite": false,

"send_email_welcome": false,

"password": null,

"password_confirmation": null,

"group_name": null,

"birthday": null,

"gender": null,

"last_order_date": null

}

Information about the customer. The order might not have a customer and apps should not depend on the existence of a customer object. This value might be null if the order was created through Haravan POS. For more information about the customer object, see the Customer resource.

discount_codes: array

"discount_codes": [

{

"code": "SPRING30",

"amount": 300000.0000,

"type": "fixed_amount"

}

]

Applicable discount codes that can be applied to the order. If no codes exist the value will default to blank.A Discount code will include the following fields:

  • amount: The amount of the discount.
  • code: The discount code.
  • type: The type of discount. Can be one of: "percentage", "shipping", "fixed_amount" (default).

email:string

The customer's email address.

financial_status: string

"financial_status": "paid"

The status of payments associated with the order. Can only be set when the order is created. Valid values:

  • pending: The payments are pending. Payment might fail in this state. Check again to confirm whether the payments have been paid successfully.
  • authorized: The payments have been authorized.
  • partially_paid: The order has been partially paid.
  • paid: The payments have been paid.
  • partially_refunded: The payments have been partially refunded.
  • refunded: The payments have been refunded.
  • voided: The payments have been voided.

fulfillments: array

"fulfillments": []

An array of fulfillments associated with the order.

fulfillment_status: string

"fulfillment_status": "partial"

The order's status in terms of fulfilled line items. Valid values:

  • fulfilled: Every line item in the order has been fulfilled.
  • null: None of the line items in the order have been fulfilled.
  • partial: At least one line item in the order has been fulfilled.
  • restocked: Every line item in the order has been restocked and the order canceled.

tags: string

"tags": null

Tags are additional short descriptors, commonly used for filtering and searching, formatted as a string of comma-separated values. For example, if an order has three tags: tag1, tag2, tag3. Each individual tag is limited to 40 characters in length.

gateway: string

"gateway": "Thanh toán khi giao hàng (COD)"

The payment gateway used.

gateway_code: string

"gateway_code": "COD"

The unique identifier for the payment gateway used.

id: number

"id": 632910392

The ID of the order, used for API purposes. This is different from the order_number property, which is the ID used by the shop owner and customer.

landing_site: string

"landing_site": "http://www.example.com?source=abc"

The URL for the page where the buyer landed when they entered the shop.

landing_site_ref: string

"landing_site_ref": "haravan"

The ref for the page where the buyer landed when they entered the shop.

line_items: array

"line_items": [

{

"fulfillable_quantity": 22,

"fulfillment_service": null,

"fulfillment_status": "notfulfilled",

"grams": 0.0000,

"id": 1160828322,

"price": 600000.0000,

"price_original": 600000.0000,

"price_promotion": 0.0,

"product_id": 1028183659,

"quantity": 22,

"requires_shipping": true,

"sku": null,

"title": "Đầm babydoll tay lỡ khoét lỗ",

"variant_id": 1061514693,

"variant_title": "Default Title",

"vendor": "Khác",

"type": "Khác",

"name": "Đầm babydoll tay lỡ khoét lỗ - Default Title",

"gift_card": false,

"taxable": true,

"tax_lines": null,

"product_exists": true,

"barcode": null,

"properties": null,

"total_discount": 0.0000,

"applied_discounts": [],

"image": {

"src": "https://product.hstatic.net/200000219339/product/odette-baby-doll-dress-by-s.wallis-1_41912496455f423391fc4330cdf52dc3.jpg",

"attactment": null,

"filename": null

},

"not_allow_promotion": false,

"ma_cost_amount": 0.00

}

]

A list of line item objects, each containing information about an item in the order. Each object has the following properties:

  • fulfillable_quantity: The amount available to fulfill. This is the quantity - max(refunded_quantity, fulfilled_quantity) - pending_fulfilled_quantity.
  • fulfillment_service: Service provider who is doing the fulfillment. Valid values are either "manual" or the name of the provider. eg: "amazon", "shipwire", etc.
  • fulfillment_status: How far along an order is in terms line items fulfilled. Valid values are: fulfilled, null or partial.
  • grams: The weight of the item in grams.
  • id: The id of the line item.
  • price: The price of the item before discounts have been applied.
  • product_id: The unique numeric identifier for the product in the fulfillment. Can be null if the original product associated with the order is deleted at a later date.
  • quantity: The number of products that were purchased.
  • requires_shipping: States whether or not the fulfillment requires shipping. Values are: true or false.
  • sku: A unique identifier of the item in the fulfillment.
  • title: The title of the product.
  • variant_id: The id of the product variant.
  • variant_title: The title of the product variant.
  • vendor: The name of the supplier of the item.
  • name: The name of the product variant.
  • gift_card: States wether or not the line_item is a gift card. If so, the item is not taxed or considered for shipping charges.
  • taxable: States whether or not the product was taxable. Values are: true or false.
  • tax_lines: A list of tax_line objects, each of which details the taxes applicable to this line_item.
  • total_discount: The total discount amount applied to this line item. This value is not subtracted in the line item price.

name: string

"name": "#100020"

The order name, generated by combining the order_number property with the order prefix and suffix that are set in the merchant's general settings. This is different from the id property, which is the ID of the order used by the API. This field can also be set by the API to be any string value.

note: string

"note":"Customer changed their mind."

An optional note that a shop owner can attach to the order.

number: number

"number": 1138637099

The order's position in the shop's count of orders.

order_number: string

"order_number": "#100020"

A unique numeric identifier for the order. This one is used by the shop owner and customer. This is different from the id property, which is also a unique numeric identifier for the order, but used for API purposes.

processing_method: string

"processing_method": null

How the payment was processed. It has the following valid values:

  • checkout: The order was processed using the Haravan checkout.
  • direct: The order was processed using a direct payment provider.
  • manual: The order was processed using a manual payment method.
  • offsite: The order was processed by an external payment provider to the Haravan checkout.

referring_site: array

"refunds":[]

A list of refunds applied to the order. For more information, see the Refund API.

shipping_address: array

"shipping_address": {

"address1": "182 Lê Đại Hành",

"address2": null,

"city": null,

"company": null,

"country": "Vietnam",

"first_name": "Haravan Demo",

"last_name": null,

"latitude": 0.00000000,

"longitude": 0.00000000,

"phone": null,

"province": "Hồ Chí Minh",

"zip": null,

"name": " Haravan Demo",

"province_code": "HC",

"country_code": "VN",

"district_code": "HC476",

"district": "Quận 11",

"ward_code": "27208",

"ward": "Phường 15"

}

The mailing address to where the order will be shipped. This address is optional and will not be available on orders that do not require shipping. It has the following properties:

  • address1: The street address of the shipping address.
  • address2: An optional additional field for the street address of the shipping address.
  • city: The city, town, or village of the shipping address.
  • company: The company of the person associated with the shipping address.
  • country: The name of the country of the shipping address.
  • country_code: The two-letter code (ISO 3166-1 format) for the country of the shipping address.
  • first_name: The first name of the person associated with the shipping address.
  • last_name: The last name of the person associated with the shipping address.
  • latitude: The latitude of the shipping address.
  • longitude: The longitude of the shipping address.
  • name: The full name of the person associated with the payment method.
  • phone: The phone number at the shipping address.
  • province: The name of the region (for example, province, state, or prefecture) of the shipping address.
  • province_code: The two-letter abbreviation of the region of the shipping address.
  • zip: The postal code (for example, zip, postcode, or Eircode) of the shipping address.

fishipping_lineseld: array

    
"shipping_lines": [

{

"code": null,

"price": 0.0000,

"source": null,

"title": null

}

]

An array of objects, each of which details a shipping method used. Each object has the following properties:

  • code: A reference to the shipping method.
  • price: The price of this shipping method.
  • source: The source of the shipping method.
  • title: The title of the shipping method.
  • tax_lines: A list of tax_line objects, each of which details the taxes applicable to this shipping_line.

source_name: string

"source_name":"web"

Where the order originated. Can be set only during order creation, and is not writeable afterwards. Values for haravan channels are protected and cannot be assigned by other API clients: web, pos, haravan_draft_order, iphone, and android. Orders created via the API can be assigned any other string of your choice. If unspecified, then new orders are assigned the value of your app's ID.

subtotal_price: number

"subtotal_price":100000.0000

The price of the order in the shop currency after discounts but before shipping, duties, taxes, and tips.

tax_lines: string

"tax_lines":null

An array of tax_line objects, each of which details the total taxes applicable to the order. Each tax_line has the following properties:

  • price: The amount of tax to be charged.
  • rate: The rate of tax to be applied.
  • title: The name of the tax.

taxes_included: string

"taxes_included":null

States whether or not taxes are included in the order subtotal. Valid values are "true" or "false".

token: string

"token":"19627118f2e844ddb3a0c8d73f99a580"

A unique value when referencing the order.

total_discounts: number

"total_discounts":0.0000

The total discounts applied to the price of the order in the shop currency.

total_line_items_price: number

"total_line_items_price":13200000.0000

The sum of all line item prices in the shop currency.

total_price: number

"total_price":13200000.0000

The sum of all line item prices, discounts, shipping, taxes, and tips in the shop currency. Must be positive.

total_tax: number

"total_tax":0.0000

The sum of all the taxes applied to the order in the shop currency. Must be positive.

image_id: number

"image_id":null

The unique numeric identifier for one of the product's images.

total_weight: number

"total_weight":0.0000

The sum of all line item weights in grams. The sum is not adjusted as items are removed from the order.

updated_at: string

"updated_at": "2021-05-13T07:29:20.1Z"

The date and time (ISO 8601 format) when the order was updated.

transactions: array

"transactions":[]

Information about the transaction. For more information about the transaction object, see the resource.

note_attributes: array

    
"note_attributes": [

{

"name": "custom name",

"value": "custom value"

}

]

Extra information that is added to the order. Appears in the Additional details section of an order details page. Each array entry must contain a hash with name and value keys.

confirmed_at: string

"confirmed_at": "2021-05-13T07:29:20.1Z"

The date and time (ISO 8601 format) when the order was confirmed.

closed_status: string

"closed_status":"unclosed"

Status when order has been closed.

cancelled_status: string

"cancelled_status":"uncancelled"

Status when order has been cancelled.

confirmed_status: string

"confirmed_status":"unconfirmed"

Status when order has been confirmed.

user_id: number

"user_id":31522279

The ID of the user logged into Haravan POS who processed the order, if applicable.

location_id: number

"location_id":963414

The ID of the physical location where the order was processed.

contact_email: string

"contact_email":[email protected]

The contact email of the buyer.

Retrieves a list of orders

GET
https://apis.haravan.com/com/orders.json

Retrieves a list of orders. You can filter resources by params.

Parameters


ids

A comma-separated list of order ids.


limit integer ≤50 default 50

The maximum number of results to show on a page.


page

Page to show the result.


since_id

Restrict results to after the specified ID.


created_at_min

Show orders created after date. (format: 2021-10-20T14:07:45.084Z)


created_at_max

Show orders created before date. (format: 2021-10-20T14:07:45.084Z)


updated_at_min

Show orders last updated after date. (format: 2021-10-20T14:07:45.084Z)


updated_at_max

Show orders last updated before date. (format: 2021-10-20T14:07:45.084Z)


processed_at_min

Show orders imported after date. (format: 2021-10-20T14:07:45.084Z)


processed_at_max

Show orders imported before date. (format: 2021-10-20T14:07:45.084Z)


financial_status

The current payment status.

  • pending: Show only pending orders.

  • paid: Show only paid orders.

  • partially_paid: Show only partially paid orders.

  • refunded: Show only refunded orders.

  • voided: Show only voided orders.

  • partially_refunded: Show only partially refunded orders.


fulfillment_status

The current fulfillment status of the order.

  • unshipped: Show orders that haven't been shipped.

  • shipped: Show orders that have been shipped.

  • partial: Show partially shipped orders.


status

The current orders status of the order.

  • open: Show only open orders.

  • closed: Show only closed orders.

  • cancelled: Show only canceled orders.

  • any: Show orders of any status, including archived orders.


fields

comma-separated list of fields to include in the response.


order

Sort response data. The fields that can sort by are created_at and updated_at

Sort ascending:

  &order=created_at%20asc  
&order=updated_at%20asc

Sort descending:

  &order=created_at%20desc  
&order=updated_at%20desc

Retrieve all orders by page number. By default, the number of resources on the page is 50.

  • GET https://apis.haravan.com/com/orders.json?page=1
Details
HTTP/1.1 200 OK

{
"orders": [
{
"billing_address": {
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1036847352,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "VN",
"default": true,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
"browser_ip": null,
"buyer_accepts_marketing": false,
"cancel_reason": null,
"cancelled_at": null,
"cart_token": "19627118f2e844ddb3a0c8d73f99a580",
"checkout_token": "19627118f2e844ddb3a0c8d73f99a580",
"client_details": {
"accept_language": null,
"browser_ip": null,
"session_hash": null,
"user_agent": null,
"browser_height": null,
"browser_width": null
},
"closed_at": null,
"created_at": "2020-09-19T01:12:10.062Z",
"currency": "VND",
"customer": {
"accepts_marketing": false,
"addresses": [
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185840,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": true,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185854,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185852,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185851,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185850,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185849,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185847,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185845,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185844,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185843,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
}
],
"created_at": "2020-09-18T04:12:10.236Z",
"default_address": {
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185840,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": true,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
"email": "[email protected]",
"phone": null,
"first_name": "Haravan Demo",
"id": 1036847352,
"multipass_identifier": null,
"last_name": null,
"last_order_id": 1138637123,
"last_order_name": "#100027",
"note": "Demo ",
"orders_count": 28,
"state": "Disabled",
"tags": null,
"total_spent": 261380000.0000,
"total_paid": 0.0,
"updated_at": "2021-01-04T22:00:52.558Z",
"verified_email": false,
"send_email_invite": false,
"send_email_welcome": false,
"password": null,
"password_confirmation": null,
"group_name": null,
"birthday": null,
"gender": null,
"last_order_date": null
},
"discount_codes": [],
"email": "[email protected]",
"financial_status": "paid",
"fulfillments": [],
"fulfillment_status": "notfulfilled",
"tags": null,
"gateway": "COD",
"gateway_code": null,
"id": 1138637099,
"landing_site": null,
"landing_site_ref": null,
"source": "web",
"line_items": [
{
"fulfillable_quantity": 22,
"fulfillment_service": null,
"fulfillment_status": "notfulfilled",
"grams": 0.0000,
"id": 1160828322,
"price": 600000.0000,
"price_original": 600000.0000,
"price_promotion": 0.0,
"product_id": 1028183659,
"quantity": 22,
"requires_shipping": true,
"sku": null,
"title": "Đầm babydoll tay lỡ khoét lỗ",
"variant_id": 1061514693,
"variant_title": "Default Title",
"vendor": "Khác",
"type": "Khác",
"name": "Đầm babydoll tay lỡ khoét lỗ - Default Title",
"gift_card": false,
"taxable": true,
"tax_lines": null,
"product_exists": true,
"barcode": null,
"properties": null,
"total_discount": 0.0000,
"applied_discounts": [],
"image": {
"src": "https://product.hstatic.net/200000219339/product/odette-baby-doll-dress-by-s.wallis-1_41912496455f423391fc4330cdf52dc3.jpg",
"attactment": null,
"filename": null
},
"not_allow_promotion": false,
"ma_cost_amount": 0.00
}
],
"name": "#100020",
"note": null,
"number": 1138637099,
"order_number": "#100020",
"processing_method": null,
"referring_site": null,
"refunds": [],
"shipping_address": {
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"last_name": null,
"latitude": 0.00000000,
"longitude": 0.00000000,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "VN",
"district_code": "HC476",
"district": "Quận 11",
"ward_code": "27208",
"ward": "Phường 15"
},
"shipping_lines": [
{
"code": null,
"price": 0.0000,
"source": null,
"title": null
}
],
"source_name": "web",
"subtotal_price": 13200000.0000,
"tax_lines": null,
"taxes_included": false,
"token": "19627118f2e844ddb3a0c8d73f99a580",
"total_discounts": 0.0000,
"total_line_items_price": 13200000.0000,
"total_price": 13200000.0000,
"total_tax": 0.0,
"total_weight": 0.0000,
"updated_at": "2020-09-18T04:12:21.837Z",
"transactions": [
{
"amount": 13200000.0000,
"authorization": null,
"created_at": "2020-09-19T01:12:10.062Z",
"device_id": null,
"gateway": "COD",
"id": 1055329694,
"kind": "capture",
"order_id": 1138637099,
"receipt": null,
"status": null,
"test": false,
"user_id": 0,
"location_id": 963414,
"payment_details": null,
"parent_id": 1055329693,
"currency": "VND",
"haravan_transaction_id": null,
"external_transaction_id": null,
"send_email": false
},
{
"amount": 13200000.0000,
"authorization": null,
"created_at": "2020-09-19T01:12:10.062Z",
"device_id": null,
"gateway": "COD",
"id": 1055329693,
"kind": "pending",
"order_id": 1138637099,
"receipt": null,
"status": null,
"test": false,
"user_id": 0,
"location_id": 963414,
"payment_details": null,
"parent_id": null,
"currency": "VND",
"haravan_transaction_id": null,
"external_transaction_id": null,
"send_email": false
}
],
"note_attributes": [],
"confirmed_at": null,
"closed_status": "unclosed",
"cancelled_status": "uncancelled",
"confirmed_status": "unconfirmed",
"user_id": 0,
"device_id": null,
"location_id": 963414,
"ref_order_id": 0,
"ref_order_number": null,
"utm_source": null,
"utm_medium": null,
"utm_campaign": null,
"utm_term": null,
"utm_content": null,
"redeem_model": null,
"omni_order_status": 0,
"omni_order_status_name": null,
"location_assigned_at": null,
"in_stock_at": null,
"out_of_stock_at": null,
"export_at": null,
"complete_at": null,
"payment_url": null,
"contact_email": "[email protected]"
}
]
}

Retrieve orders last updated after 2021-01-04T00:00:00.000Z.

  • GET https://apis.haravan.com/com/orders.json?updated_at_min=2021-01-04T00:00:00.000Z
Details
HTTP/1.1 200 OK

{
"order": {
"billing_address": {
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1036847352,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "VN",
"default": true,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
"browser_ip": null,
"buyer_accepts_marketing": false,
"cancel_reason": null,
"cancelled_at": null,
"cart_token": "19627118f2e844ddb3a0c8d73f99a580",
"checkout_token": "19627118f2e844ddb3a0c8d73f99a580",
"client_details": {
"accept_language": null,
"browser_ip": null,
"session_hash": null,
"user_agent": null,
"browser_height": null,
"browser_width": null
},
"closed_at": null,
"created_at": "2020-09-19T01:12:10.062Z",
"currency": "VND",
"customer": {
"accepts_marketing": false,
"addresses": [
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185840,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": true,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185854,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185852,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185851,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185850,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185849,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185847,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185845,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185844,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185843,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
}
],
"created_at": "2020-09-18T04:12:10.236Z",
"default_address": {
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185840,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": true,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
"email": "[email protected]",
"phone": null,
"first_name": "Haravan Demo",
"id": 1036847352,
"multipass_identifier": null,
"last_name": null,
"last_order_id": 1138637123,
"last_order_name": "#100027",
"note": "Demo ",
"orders_count": 28,
"state": "Disabled",
"tags": null,
"total_spent": 261380000.0000,
"total_paid": 0.0,
"updated_at": "2021-01-04T22:00:52.558Z",
"verified_email": false,
"send_email_invite": false,
"send_email_welcome": false,
"password": null,
"password_confirmation": null,
"group_name": null,
"birthday": null,
"gender": null,
"last_order_date": null
},
"discount_codes": [],
"email": "[email protected]",
"financial_status": "paid",
"fulfillments": [],
"fulfillment_status": "notfulfilled",
"tags": null,
"gateway": "COD",
"gateway_code": null,
"id": 1138637099,
"landing_site": null,
"landing_site_ref": null,
"source": "web",
"line_items": [
{
"fulfillable_quantity": 22,
"fulfillment_service": null,
"fulfillment_status": "notfulfilled",
"grams": 0.0000,
"id": 1160828322,
"price": 600000.0000,
"price_original": 600000.0000,
"price_promotion": 0.0,
"product_id": 1028183659,
"quantity": 22,
"requires_shipping": true,
"sku": null,
"title": "Đầm babydoll tay lỡ khoét lỗ",
"variant_id": 1061514693,
"variant_title": "Default Title",
"vendor": "Khác",
"type": "Khác",
"name": "Đầm babydoll tay lỡ khoét lỗ - Default Title",
"gift_card": false,
"taxable": true,
"tax_lines": null,
"product_exists": true,
"barcode": null,
"properties": null,
"total_discount": 0.0000,
"applied_discounts": [],
"image": {
"src": "https://product.hstatic.net/200000219339/product/odette-baby-doll-dress-by-s.wallis-1_41912496455f423391fc4330cdf52dc3.jpg",
"attactment": null,
"filename": null
},
"not_allow_promotion": false,
"ma_cost_amount": 0.00
}
],
"name": "#100020",
"note": null,
"number": 1138637099,
"order_number": "#100020",
"processing_method": null,
"referring_site": null,
"refunds": [],
"shipping_address": {
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"last_name": null,
"latitude": 0.00000000,
"longitude": 0.00000000,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "VN",
"district_code": "HC476",
"district": "Quận 11",
"ward_code": "27208",
"ward": "Phường 15"
},
"shipping_lines": [
{
"code": null,
"price": 0.0000,
"source": null,
"title": null
}
],
"source_name": "web",
"subtotal_price": 13200000.0000,
"tax_lines": null,
"taxes_included": false,
"token": "19627118f2e844ddb3a0c8d73f99a580",
"total_discounts": 0.0000,
"total_line_items_price": 13200000.0000,
"total_price": 13200000.0000,
"total_tax": 0.0,
"total_weight": 0.0000,
"updated_at": "2020-09-18T04:12:21.837Z",
"transactions": [
{
"amount": 13200000.0000,
"authorization": null,
"created_at": "2020-09-19T01:12:10.062Z",
"device_id": null,
"gateway": "COD",
"id": 1055329694,
"kind": "capture",
"order_id": 1138637099,
"receipt": null,
"status": null,
"test": false,
"user_id": 0,
"location_id": 963414,
"payment_details": null,
"parent_id": 1055329693,
"currency": "VND",
"haravan_transaction_id": null,
"external_transaction_id": null,
"send_email": false
},
{
"amount": 13200000.0000,
"authorization": null,
"created_at": "2020-09-19T01:12:10.062Z",
"device_id": null,
"gateway": "COD",
"id": 1055329693,
"kind": "pending",
"order_id": 1138637099,
"receipt": null,
"status": null,
"test": false,
"user_id": 0,
"location_id": 963414,
"payment_details": null,
"parent_id": null,
"currency": "VND",
"haravan_transaction_id": null,
"external_transaction_id": null,
"send_email": false
}
],
"note_attributes": [],
"confirmed_at": null,
"closed_status": "unclosed",
"cancelled_status": "uncancelled",
"confirmed_status": "unconfirmed",
"user_id": 0,
"device_id": null,
"location_id": 963414,
"ref_order_id": 0,
"ref_order_number": null,
"utm_source": null,
"utm_medium": null,
"utm_campaign": null,
"utm_term": null,
"utm_content": null,
"redeem_model": null,
"omni_order_status": 0,
"omni_order_status_name": null,
"location_assigned_at": null,
"in_stock_at": null,
"out_of_stock_at": null,
"export_at": null,
"complete_at": null,
"payment_url": null,
"contact_email": "[email protected]"
}
]
}

Retrieve all orders but show only certain properties

  • GET https://apis.haravan.com/com/orders.json?fields=id,name,created_at
Details
HTTP/1.1 200 OK

{
"orders": [
{
"created_at": "2020-09-19T01:12:10.062Z",
"id": 1138637099,
"name": "#100020"
}
]
}

Retrieve all orders after the specified ID.

  • GET https://apis.haravan.com/com/orders.json?since_id=1138637000
Details
HTTP/1.1 200 OK

{
"order": {
"billing_address": {
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1036847352,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "VN",
"default": true,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
"browser_ip": null,
"buyer_accepts_marketing": false,
"cancel_reason": null,
"cancelled_at": null,
"cart_token": "19627118f2e844ddb3a0c8d73f99a580",
"checkout_token": "19627118f2e844ddb3a0c8d73f99a580",
"client_details": {
"accept_language": null,
"browser_ip": null,
"session_hash": null,
"user_agent": null,
"browser_height": null,
"browser_width": null
},
"closed_at": null,
"created_at": "2020-09-19T01:12:10.062Z",
"currency": "VND",
"customer": {
"accepts_marketing": false,
"addresses": [
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185840,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": true,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185854,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185852,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185851,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185850,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185849,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185847,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185845,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185844,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185843,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
}
],
"created_at": "2020-09-18T04:12:10.236Z",
"default_address": {
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185840,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": true,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
"email": "[email protected]",
"phone": null,
"first_name": "Haravan Demo",
"id": 1036847352,
"multipass_identifier": null,
"last_name": null,
"last_order_id": 1138637123,
"last_order_name": "#100027",
"note": "Demo ",
"orders_count": 28,
"state": "Disabled",
"tags": null,
"total_spent": 261380000.0000,
"total_paid": 0.0,
"updated_at": "2021-01-04T22:00:52.558Z",
"verified_email": false,
"send_email_invite": false,
"send_email_welcome": false,
"password": null,
"password_confirmation": null,
"group_name": null,
"birthday": null,
"gender": null,
"last_order_date": null
},
"discount_codes": [],
"email": "[email protected]",
"financial_status": "paid",
"fulfillments": [],
"fulfillment_status": "notfulfilled",
"tags": null,
"gateway": "COD",
"gateway_code": null,
"id": 1138637099,
"landing_site": null,
"landing_site_ref": null,
"source": "web",
"line_items": [
{
"fulfillable_quantity": 22,
"fulfillment_service": null,
"fulfillment_status": "notfulfilled",
"grams": 0.0000,
"id": 1160828322,
"price": 600000.0000,
"price_original": 600000.0000,
"price_promotion": 0.0,
"product_id": 1028183659,
"quantity": 22,
"requires_shipping": true,
"sku": null,
"title": "Đầm babydoll tay lỡ khoét lỗ",
"variant_id": 1061514693,
"variant_title": "Default Title",
"vendor": "Khác",
"type": "Khác",
"name": "Đầm babydoll tay lỡ khoét lỗ - Default Title",
"gift_card": false,
"taxable": true,
"tax_lines": null,
"product_exists": true,
"barcode": null,
"properties": null,
"total_discount": 0.0000,
"applied_discounts": [],
"image": {
"src": "https://product.hstatic.net/200000219339/product/odette-baby-doll-dress-by-s.wallis-1_41912496455f423391fc4330cdf52dc3.jpg",
"attactment": null,
"filename": null
},
"not_allow_promotion": false,
"ma_cost_amount": 0.00
}
],
"name": "#100020",
"note": null,
"number": 1138637099,
"order_number": "#100020",
"processing_method": null,
"referring_site": null,
"refunds": [],
"shipping_address": {
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"last_name": null,
"latitude": 0.00000000,
"longitude": 0.00000000,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "VN",
"district_code": "HC476",
"district": "Quận 11",
"ward_code": "27208",
"ward": "Phường 15"
},
"shipping_lines": [
{
"code": null,
"price": 0.0000,
"source": null,
"title": null
}
],
"source_name": "web",
"subtotal_price": 13200000.0000,
"tax_lines": null,
"taxes_included": false,
"token": "19627118f2e844ddb3a0c8d73f99a580",
"total_discounts": 0.0000,
"total_line_items_price": 13200000.0000,
"total_price": 13200000.0000,
"total_tax": 0.0,
"total_weight": 0.0000,
"updated_at": "2020-09-18T04:12:21.837Z",
"transactions": [
{
"amount": 13200000.0000,
"authorization": null,
"created_at": "2020-09-19T01:12:10.062Z",
"device_id": null,
"gateway": "COD",
"id": 1055329694,
"kind": "capture",
"order_id": 1138637099,
"receipt": null,
"status": null,
"test": false,
"user_id": 0,
"location_id": 963414,
"payment_details": null,
"parent_id": 1055329693,
"currency": "VND",
"haravan_transaction_id": null,
"external_transaction_id": null,
"send_email": false
},
{
"amount": 13200000.0000,
"authorization": null,
"created_at": "2020-09-19T01:12:10.062Z",
"device_id": null,
"gateway": "COD",
"id": 1055329693,
"kind": "pending",
"order_id": 1138637099,
"receipt": null,
"status": null,
"test": false,
"user_id": 0,
"location_id": 963414,
"payment_details": null,
"parent_id": null,
"currency": "VND",
"haravan_transaction_id": null,
"external_transaction_id": null,
"send_email": false
}
],
"note_attributes": [],
"confirmed_at": null,
"closed_status": "unclosed",
"cancelled_status": "uncancelled",
"confirmed_status": "unconfirmed",
"user_id": 0,
"device_id": null,
"location_id": 963414,
"ref_order_id": 0,
"ref_order_number": null,
"utm_source": null,
"utm_medium": null,
"utm_campaign": null,
"utm_term": null,
"utm_content": null,
"redeem_model": null,
"omni_order_status": 0,
"omni_order_status_name": null,
"location_assigned_at": null,
"in_stock_at": null,
"out_of_stock_at": null,
"export_at": null,
"complete_at": null,
"payment_url": null,
"contact_email": "[email protected]"
}
]
}

Retrieve a count of the orders

GET
https://apis.haravan.com/com/orders/count.json

Retrieve the count of resources of the orders.

  • GET https://apis.haravan.com/com/orders/count.json
Details
HTTP/1.1 200 OK

{
"count": 500
}

Retrieve the count of resources of the cancelled orders.

  • GET https://apis.haravan.com/com/orders/count.json?status=cancelled
Details
HTTP/1.1 200 OK

{
"count": 33
}

Retrieves single the order

GET
https://apis.haravan.com/com/orders/{order_id}.json

Retrieves single the order by ID.

  • GET https://apis.haravan.com/com/orders/1075012798.json
Details
HTTP/1.1 200 OK

{
"order": {
"billing_address": {
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1036847352,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "VN",
"default": true,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
"browser_ip": null,
"buyer_accepts_marketing": false,
"cancel_reason": null,
"cancelled_at": null,
"cart_token": "19627118f2e844ddb3a0c8d73f99a580",
"checkout_token": "19627118f2e844ddb3a0c8d73f99a580",
"client_details": {
"accept_language": null,
"browser_ip": null,
"session_hash": null,
"user_agent": null,
"browser_height": null,
"browser_width": null
},
"closed_at": null,
"created_at": "2020-09-19T01:12:10.062Z",
"currency": "VND",
"customer": {
"accepts_marketing": false,
"addresses": [
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185840,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": true,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185854,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185852,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185851,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185850,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185849,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185847,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185845,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185844,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
{
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185843,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": false,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
}
],
"created_at": "2020-09-18T04:12:10.236Z",
"default_address": {
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"id": 1056185840,
"last_name": null,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "vn",
"default": true,
"district": "Quận 11",
"district_code": "HC476",
"ward": "Phường 15",
"ward_code": "27208"
},
"email": "[email protected]",
"phone": null,
"first_name": "Haravan Demo",
"id": 1036847352,
"multipass_identifier": null,
"last_name": null,
"last_order_id": 1138637123,
"last_order_name": "#100027",
"note": "Demo ",
"orders_count": 28,
"state": "Disabled",
"tags": null,
"total_spent": 261380000.0000,
"total_paid": 0.0,
"updated_at": "2021-01-04T22:00:52.558Z",
"verified_email": false,
"send_email_invite": false,
"send_email_welcome": false,
"password": null,
"password_confirmation": null,
"group_name": null,
"birthday": null,
"gender": null,
"last_order_date": null
},
"discount_codes": [],
"email": "[email protected]",
"financial_status": "paid",
"fulfillments": [],
"fulfillment_status": "notfulfilled",
"tags": null,
"gateway": "COD",
"gateway_code": null,
"id": 1138637099,
"landing_site": null,
"landing_site_ref": null,
"source": "web",
"line_items": [
{
"fulfillable_quantity": 22,
"fulfillment_service": null,
"fulfillment_status": "notfulfilled",
"grams": 0.0000,
"id": 1160828322,
"price": 600000.0000,
"price_original": 600000.0000,
"price_promotion": 0.0,
"product_id": 1028183659,
"quantity": 22,
"requires_shipping": true,
"sku": null,
"title": "Đầm babydoll tay lỡ khoét lỗ",
"variant_id": 1061514693,
"variant_title": "Default Title",
"vendor": "Khác",
"type": "Khác",
"name": "Đầm babydoll tay lỡ khoét lỗ - Default Title",
"gift_card": false,
"taxable": true,
"tax_lines": null,
"product_exists": true,
"barcode": null,
"properties": null,
"total_discount": 0.0000,
"applied_discounts": [],
"image": {
"src": "https://product.hstatic.net/200000219339/product/odette-baby-doll-dress-by-s.wallis-1_41912496455f423391fc4330cdf52dc3.jpg",
"attactment": null,
"filename": null
},
"not_allow_promotion": false,
"ma_cost_amount": 0.00
}
],
"name": "#100020",
"note": null,
"number": 1138637099,
"order_number": "#100020",
"processing_method": null,
"referring_site": null,
"refunds": [],
"shipping_address": {
"address1": "182 Lê Đại Hành",
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "Haravan Demo",
"last_name": null,
"latitude": 0.00000000,
"longitude": 0.00000000,
"phone": null,
"province": "Hồ Chí Minh",
"zip": null,
"name": " Haravan Demo",
"province_code": "HC",
"country_code": "VN",
"district_code": "HC476",
"district": "Quận 11",
"ward_code": "27208",
"ward": "Phường 15"
},
"shipping_lines": [
{
"code": null,
"price": 0.0000,
"source": null,
"title": null
}
],
"source_name": "web",
"subtotal_price": 13200000.0000,
"tax_lines": null,
"taxes_included": false,
"token": "19627118f2e844ddb3a0c8d73f99a580",
"total_discounts": 0.0000,
"total_line_items_price": 13200000.0000,
"total_price": 13200000.0000,
"total_tax": 0.0,
"total_weight": 0.0000,
"updated_at": "2020-09-18T04:12:21.837Z",
"transactions": [
{
"amount": 13200000.0000,
"authorization": null,
"created_at": "2020-09-19T01:12:10.062Z",
"device_id": null,
"gateway": "COD",
"id": 1055329694,
"kind": "capture",
"order_id": 1138637099,
"receipt": null,
"status": null,
"test": false,
"user_id": 0,
"location_id": 963414,
"payment_details": null,
"parent_id": 1055329693,
"currency": "VND",
"haravan_transaction_id": null,
"external_transaction_id": null,
"send_email": false
},
{
"amount": 13200000.0000,
"authorization": null,
"created_at": "2020-09-19T01:12:10.062Z",
"device_id": null,
"gateway": "COD",
"id": 1055329693,
"kind": "pending",
"order_id": 1138637099,
"receipt": null,
"status": null,
"test": false,
"user_id": 0,
"location_id": 963414,
"payment_details": null,
"parent_id": null,
"currency": "VND",
"haravan_transaction_id": null,
"external_transaction_id": null,
"send_email": false
}
],
"note_attributes": [],
"confirmed_at": null,
"closed_status": "unclosed",
"cancelled_status": "uncancelled",
"confirmed_status": "unconfirmed",
"user_id": 0,
"device_id": null,
"location_id": 963414,
"ref_order_id": 0,
"ref_order_number": null,
"utm_source": null,
"utm_medium": null,
"utm_campaign": null,
"utm_term": null,
"utm_content": null,
"redeem_model": null,
"omni_order_status": 0,
"omni_order_status_name": null,
"location_assigned_at": null,
"in_stock_at": null,
"out_of_stock_at": null,
"export_at": null,
"complete_at": null,
"payment_url": null,
"contact_email": "[email protected]"
}
}

Create a new order

POST
https://apis.haravan.com/com/orders.json

Create a simple order with only a product variant ID and no optional parameters.

  • POST https://apis.haravan.com/com/orders.json

    {
    "order": {
    "line_items": [
    {
    "variant_id": 1061514693,
    "quantity": 1
    }
    ]
    }
    }
Details
HTTP/1.1 201 Created

{
"order": {
"billing_address": {
"address1": null,
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": null,
"id": 1043680707,
"last_name": null,
"phone": null,
"province": null,
"zip": null,
"name": " ",
"province_code": null,
"country_code": "VN",
"default": true,
"district": null,
"district_code": null,
"ward": null,
"ward_code": null
},
"browser_ip": null,
"buyer_accepts_marketing": false,
"cancel_reason": null,
"cancelled_at": null,
"cart_token": "3340f74c1d084bf2a51e1c654ceeba25",
"checkout_token": "3340f74c1d084bf2a51e1c654ceeba25",
"client_details": {
"accept_language": null,
"browser_ip": null,
"session_hash": null,
"user_agent": null,
"browser_height": null,
"browser_width": null
},
"closed_at": null,
"created_at": "2021-09-08T18:39:41.567Z",
"currency": "VND",
"customer": {
"accepts_marketing": false,
"addresses": [
{
"address1": null,
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "---",
"id": 1081844056,
"last_name": null,
"phone": null,
"province": null,
"zip": null,
"name": " ---",
"province_code": null,
"country_code": "vn",
"default": true,
"district": null,
"district_code": null,
"ward": null,
"ward_code": null
}
],
"created_at": "2021-03-21T11:23:42.56Z",
"default_address": {
"address1": null,
"address2": null,
"city": null,
"company": null,
"country": "Vietnam",
"first_name": "---",
"id": 1081844056,
"last_name": null,
"phone": null,
"province": null,
"zip": null,
"name": " ---",
"province_code": null,
"country_code": "vn",
"default": true,
"district": null,
"district_code": null,
"ward": null,
"ward_code": null
},
"email": "[email protected]",
"phone": null,
"first_name": null,
"id": 1043680707,
"multipass_identifier": null,
"last_name": null,