This is used to return abandoned checkouts. A checkout is considered abandoned when a customer has entered their billing & shipping info, but has yet to complete the purchase.

Authenticated access scopes: com.read_orders, com.write_orders

Checkout properties

abandoned_checkout_url

"abandoned_checkout_url": ""

The full recovery URL is to be sent to a customer to recover their abandoned checkout.

billing_address

"billing_address": {

    "address1""-",

    "address2"null,

    "city"null,

    "company"null,

    "country""Vietnam",

    "first_name"null,

    "id"1047131466,

    "last_name""Minh",

    "phone""43434343",

    "province""Hồ Chí Minh",

    "zip""",

    "name""Minh",

    "province_code"null,

    "country_code""VN",

    "default"true,

    "district"null,

    "district_code"null,

    "ward"null,

    "ward_code"null

}

The mailing address is associated with the payment method. References to object properties in Order API

buyer_accepts_marketing

"buyer_accepts_marketing":false

Indicates whether or not the person who placed the order would like to receive email updates from the shop. This is set when checking the "I want to receive occasional emails about new products, promotions, and other news" checkbox during checkout. Valid values are "true" and "false".

cancel_reason

"cancel_reason":null

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.
  • other: The order was cancelled for a reason not in the list above.

cart_token

"cart_token":"68778783ad298f1c80c3bafcddeea"

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

closed_at

"closed_at":null

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

completed_at

"completed_at": null

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

created_at

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

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

currency

"currency": "VND"

The three letter code (ISO 4217) for the currency used for the payment.

customer

"customer": {

    "accepts_marketing"false,

    "addresses": [

        {

            "address1""-",

            "address2"null,

            "city"null,

            "company"null,

            "country""Vietnam",

            "first_name"null,

            "id"1079581288,

            "last_name""Minh",

            "phone""0123456789",

            "province""Hồ Chí Minh",

            "zip""70000",

            "name""Minh",

            "province_code""HC",

            "country_code""vn",

            "default"true,

            "district""Quận 1",

            "district_code""HC466",

            "ward"null,

            "ward_code"null

        }

    ],

    "created_at""2021-06-10T03:13:52.46Z",

    "default_address": {

        "address1""-",

        "address2"null,

        "city"null,

        "company"null,

        "country""Vietnam",

        "first_name"null,

        "id"1079581288,

        "last_name""fdsfdsg",

        "phone""043434343",

        "province""Hồ Chí Minh",

        "zip""70000",

        "name""fdsfdsg ",

        "province_code""HC",

        "country_code""vn",

        "default"true,

        "district""Quận 1",

        "district_code""HC466",

        "ward"null,

        "ward_code"null

    },

    "email""minh@yopmail.com",

    "phone""043434343",

    "first_name"null,

    "id"1047131466,

    "multipass_identifier"null,

    "last_name""Minh",

    "last_order_id"null,

    "last_order_name"null,

    "note"null,

    "orders_count"0,

    "state""Disabled",

    "tags"null,

    "total_spent"0.0000,

    "total_paid"0.0,

    "updated_at""2021-06-10T03:13:52.46Z",

    "verified_email"false,

    "send_email_invite"false,

    "send_email_welcome"false,

    "password"null,

    "password_confirmation"null,

    "group_name""",

    "metafields"null,

    "birthday"null,

    "gender"null,

    "last_order_date"null

}

An object containing information about the customer.. References to object properties in Customer API

discount_codes

"discount_codes":[]

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

"email":"bob.norman@hostmail.com"

The customer's email address.

gateway

"gateway": null

The payment gateway used.

id

"id": 1204360781

The unique numeric identifier for the order. This one is used for API purposes. This is different from the order_number property (see below), which is also a unique numeric identifier for the order, but used by the shop owner and customer.

landing_site

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

The URL for the page where the buyer landed when entering the shop.

line_items

"line_items": [

    {

        "fulfillment_service"null,

        "fulfillment_status"null,

        "grams"0.0000,

        "price"10000000.0000,

        "product_id"1033378739,

        "quantity"1,

        "requires_shipping"false,

        "sku""SKU",

        "title""Tivi 10 triệu",

        "variant_id"1073427693,

        "variant_title""Default Title",

        "vendor""Khác",

        "name""Tivi 10 triệu - Default Title",

        "id"1244113167,

        "barcode""10000",

        "properties": []

    }

]

A list of line item objects, each one containing information about an item in the order. References to object properties in Order API

note

"note": ""

The text of an optional note that a shopowner can attach to the order.

referring_site

"referring_site": "http://www.anexample.com"

The website that the customer clicked on to come to the shop.

shipping_address

"shipping_address": {

    "address1""",

    "address2""",

    "city"null,

    "company""",

    "country""Vietnam",

    "first_name""",

    "last_name""",

    "latitude"null,

    "longitude"null,

    "phone""",

    "province""Hồ Chí Minh",

    "zip""",

    "name""",

    "province_code"null,

    "country_code""VN",

    "district_code"null,

    "district"null,

    "ward_code"null,

    "ward"null

}

The mailing address to where the order will be shipped. References to object properties in Order API

shipping_lines

"shipping_lines": []

An array of shipping_line objects, each of which details the shipping methods used. References to object properties in Order API  

source_name

"source_name": "web"

Where the checkout originated. Possible values are: "web", "pos", "iphone", and "android".

subtotal_price

"subtotal_price": 10000000.0000

Price of the order before shipping and taxes. 

token

"token": "b1946ac92492d2347c6235b4d2611184"

Unique identifier for a particular order.

total_discounts

"total_discounts": 0.0

The total amount of the discounts is to be applied to the price of the order.

total_line_items_price

"total_line_items_price":100000.0000

The sum of all the prices of all the items in the order.

total_price

"total_price": 100000.0000

The sum of all the prices of all the items in the order, taxes, and discounts included.

total_weight

"total_weight": 0.0

The sum of all the weights of the line items in the order, in grams.

updated_at

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

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

location_id

"location_id": null

The unique identifier of location.

Endpoints

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

Retrieves a list of all refunds of order. You can filter resources by params.

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)

fields

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

Retrieve all checkouts.

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

View response

				

HTTP/1.1 200 OK

{ "checkouts": [ { "abandoned_checkout_url": "http://haravanshop.myharavan.com/checkouts/02abbaa9f0a14d69ad4a8bd6ee54f150/recover", "billing_address": { "address1": "Hồ Chí Minh", "address2": null, "city": null, "company": null, "country": "Vietnam", "first_name": "Thanh", "id": 1047004563, "last_name": "Thanh", "phone": "969696969", "province": "Cà Mau", "zip": "", "name": "Thanh Thanh", "province_code": null, "country_code": "VN", "default": true, "district": null, "district_code": null, "ward": null, "ward_code": null }, "buyer_accepts_marketing": false, "cancel_reason": null, "cart_token": "266251a49f9e405d9ded10d5d50b5537", "closed_at": null, "completed_at": null, "created_at": "2021-06-07T13:20:41.815Z", "currency": "VND", "customer": { "accepts_marketing": false, "addresses": [ { "address1": "Hồ Chí Minh", "address2": null, "city": null, "company": null, "country": "Vietnam", "first_name": "t", "id": 1079395393, "last_name": "t", "phone": "0969696969", "province": "Cà Mau", "zip": "70000", "name": "t t", "province_code": "CM", "country_code": "vn", "default": true, "district": "Thành phố Cà Mau", "district_code": "CM666", "ward": null, "ward_code": null } ], "created_at": "2021-06-07T13:20:41.749Z", "default_address": { "address1": "Hồ Chí Minh", "address2": null, "city": null, "company": null, "country": "Vietnam", "first_name": "Thanh", "id": 1079395393, "last_name": "Thanh", "phone": "0969696969", "province": "Cà Mau", "zip": "70000", "name": "Thanh Thanh", "province_code": "CM", "country_code": "vn", "default": true, "district": "Thành phố Cà Mau", "district_code": "CM666", "ward": null, "ward_code": null }, "email": null, "phone": "0969696969", "first_name": "Thanh", "id": 1047004563, "multipass_identifier": null, "last_name": "Thanh", "last_order_id": null, "last_order_name": null, "note": null, "orders_count": 0, "state": "Disabled", "tags": null, "total_spent": 0.0000, "total_paid": 0.0, "updated_at": "2021-06-07T13:20:41.749Z", "verified_email": false, "send_email_invite": false, "send_email_welcome": false, "password": null, "password_confirmation": null, "group_name": "", "metafields": null, "birthday": null, "gender": null, "last_order_date": null }, "discount_codes": [], "email": null, "gateway": null, "id": 1203691418, "landing_site": "/collections/all", "line_items": [ { "fulfillment_service": null, "fulfillment_status": null, "grams": 0.0000, "price": 18990000.0000, "product_id": 1033237559, "quantity": 1, "requires_shipping": false, "sku": null, "title": "Điện thoại Samsung Galaxy S21 5G", "variant_id": 1073121320, "variant_title": "Tím", "vendor": "Khác", "name": "Điện thoại Samsung Galaxy S21 5G - Tím", "id": 1243058450, "barcode": null, "properties": [] } ], "note": "", "referring_site": "", "shipping_address": { "address1": "", "address2": "", "city": null, "company": "", "country": "Vietnam", "first_name": "", "last_name": "", "latitude": null, "longitude": null, "phone": "", "province": "Cà Mau", "zip": "", "name": "", "province_code": null, "country_code": "VN", "district_code": null, "district": null, "ward_code": null, "ward": null }, "shipping_lines": [], "source_name": "web", "subtotal_price": 18990000.0000, "taxe_lines": null, "taxes_included": false, "token": "266251a49f9e405d9ded10d5d50b5537", "total_discounts": 0.0, "total_line_items_price": 18990000.0000, "total_price": 18990000.0000, "total_tax": 0.0, "total_weight": 0.0000, "updated_at": "2021-06-07T13:20:41.815Z", "note_attributes": [], "name": "#1000000448", "landing_site_ref": null, "source": "checkout_next", "location_id": null } ] }

Get a count of checkouts.

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

View response

				

HTTP/1.1 200 OK

{ "count": 11 }