GET api/order/buyer/{uid}?offset={offset}&count={count}&viewer_uid={viewer_uid}

Get List of Orders from input Buyer Orders are sorted according to Orders's Creation Date

Request Information

URI Parameters

NameDescriptionTypeAdditional information
uid

ID of the Buyer

integer

Required

offset

Offset of the list, default is 0

integer

Default value is 0

count

Number of product in the list, default is 10

integer

Default value is 10

viewer_uid

viewer user uid. will update 'read' flag.

integer

None.

Body Parameters

None.

Response Information

Resource Description

The List of Orders of input Buyer

Collection of YSHOrderDTO
NameDescriptionTypeAdditional information
order_uid

ID of the Order

integer

None.

product_uid

Product ID of this Order

integer

None.

product_name

Name of the Product

string

None.

product_image_name

Image Path of the Product

string

None.

product_create_date

Create date of the Product

date

None.

product_expiry_date

Expiry date of the Product

date

None.

actual_price

Price of Each Product Actually Sold

decimal number

None.

current_state_uid

Current State of the order

integer

None.

buyer_uid

ID of the Buyer of the Order

integer

None.

buyer_display_name

Display Name of the Buyer

string

None.

buyer_fb_picture

URL of Buyer Profile Picture

string

None.

seller_uid

ID of the Seller of the Order

integer

None.

seller_display_name

Display Name of the Seller

string

None.

order_create_date

Record Create Date

date

None.

order_last_update_date

Record Last Update Date

date

None.

order_finish_date

Order Finish Date

date

None.

is_buyer_read

Is buyer read flag

boolean

None.

is_seller_read

Is seller read flag

boolean

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "order_uid": 1,
    "product_uid": 2,
    "product_name": "sample string 3",
    "product_image_name": "sample string 4",
    "product_create_date": "2018-01-22T02:02:22.0348126+08:00",
    "product_expiry_date": "2018-01-22T02:02:22.0348126+08:00",
    "actual_price": 7.1,
    "current_state_uid": 8,
    "buyer_uid": 9,
    "buyer_display_name": "sample string 10",
    "buyer_fb_picture": "sample string 11",
    "seller_uid": 12,
    "seller_display_name": "sample string 13",
    "order_create_date": "2018-01-22T02:02:22.0348126+08:00",
    "order_last_update_date": "2018-01-22T02:02:22.0348126+08:00",
    "order_finish_date": "2018-01-22T02:02:22.0348126+08:00",
    "is_buyer_read": true,
    "is_seller_read": true
  },
  {
    "order_uid": 1,
    "product_uid": 2,
    "product_name": "sample string 3",
    "product_image_name": "sample string 4",
    "product_create_date": "2018-01-22T02:02:22.0348126+08:00",
    "product_expiry_date": "2018-01-22T02:02:22.0348126+08:00",
    "actual_price": 7.1,
    "current_state_uid": 8,
    "buyer_uid": 9,
    "buyer_display_name": "sample string 10",
    "buyer_fb_picture": "sample string 11",
    "seller_uid": 12,
    "seller_display_name": "sample string 13",
    "order_create_date": "2018-01-22T02:02:22.0348126+08:00",
    "order_last_update_date": "2018-01-22T02:02:22.0348126+08:00",
    "order_finish_date": "2018-01-22T02:02:22.0348126+08:00",
    "is_buyer_read": true,
    "is_seller_read": true
  }
]