Skip to content

Quotation

Zed edited this page Mar 31, 2020 · 1 revision

Quotation

Post Quotation

Endpoint: POST - http://localhost:8080/api/v1/quotations

Description: N/A

Header

{
	Authorization: Bearer 
	Content-Type: application/json; charset=utf-8
}

Body

{
	"openType": "FRIENDS",
	"handlingFee": 100000,
	"type": "SELL",
	"price": 40,
	"passCode": "56HMS"
}

Response

HTTP/1.1 201 Created
Date: Tue, 31 Mar 2020 14:54:24 GMT
Content-Length: 0
Connection: close

Get Quotations

Endpoint: GET - http://localhost:8080/api/v1/quotations?type=SELL&isValid=false&openType=PASS_CODE

Description: N/A

Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Date: Tue, 31 Mar 2020 14:06:15 GMT
Content-Length: 1290
Connection: close

[
  {
    "id": "5e8300cd6dab4e49d227ca6b",
    "type": "SELL",
    "price": 40,
    "author": {
      "id": "5e82ffb52fc4557c9d343b46",
      "nickname": "张豆",
      "jikeId": "张豆"
    },
    "validCount": 0,
    "invalidCount": 0,
    "openType": "PASS_CODE",
    "handlingFee": 100000,
    "lastModified": "2020-03-31T08:35:25.963Z"
  }
]

Get My Quotation

Endpoint: GET - http://localhost:8080/api/v1/quotations/my

Description: N/A

Header

{
	Authorization: Bearer 
}

Body


Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Date: Tue, 31 Mar 2020 14:55:09 GMT
Content-Length: 257
Connection: close


[
  {
    "id": "5e8359a0f2f2d8c751c92b39",
    "type": "SELL",
    "price": 40,
    "author": {
      "id": "5e82ffb52fc4557c9d343b46",
      "nickname": "张豆",
      "jikeId": "张豆"
    },
    "validCount": 0,
    "invalidCount": 0,
    "openType": "FRIENDS",
    "handlingFee": 100000,
    "lastModified": "2020-03-31T14:54:24.143Z"
  }
]

Update Quotation

Endpoint: PUT - http://localhost:8080/api/v1/quotations/5e83014354b5b56804e5b19b

Description: N/A

Header

{
	Authorization: Bearer 
	Content-Type: application/json; charset=utf-8
}

Body

{
	"price": 90,
	"handlingFee": 0,
	"openType": "FRIENDS"
}

Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Date: Tue, 31 Mar 2020 08:56:40 GMT
Content-Length: 269
Connection: close

{
  "id": "5e83014354b5b56804e5b19b",
  "type": "SELL",
  "price": 90,
  "author": {
    "id": "5e82ffb52fc4557c9d343b46",
    "nickname": "张豆",
    "jikeId": "张豆"
  },
  "validCount": 0,
  "invalidCount": 0,
  "openType": "FRIENDS",
  "passCode": "56HMS",
  "handlingFee": 0,
  "lastModified": "2020-03-31T08:37:23.553Z"
}
Clone this wiki locally