用户创建服务需求。需求发布后会出现其他用户的商机列表上,他们可对其进行竞标出价并胜出(成为该需求的服务提供者)。
Request
HTTP Request
POST /api/service/v2/demand/
授权
需要用户登录认证
Request body
Property name | Value | Description | Notes |
---|---|---|---|
Required Properties | | | |
title | string | 服务需求的标题 | |
description | string | 服务需求的描述 | |
service_type | string | 服务类型,分别为online(在线)、workplace(工作场所)、on_site(上门/现场服务) | |
service_address | dict | 服务地址,当服务类型为workplace或on_site,才需要填service_address。范例:{ “address”: “服务地址”, “lat”: 20, “lng”: 110, “contact_name”: “联系人名字”, “phone”: “联系电话号码” } | |
service_length | integer | 服务时长,目前计时单位为:小时。如果service_length提交为null,则表示该服务需求为不限时服务 | |
start_time | datetime | 服务开始时间。如果start_time为null,则表示该服务需求为即时服务(一旦服务订单创建后,就立即进入激活)。 | |
Optional Properties | |||
ref_price | decimal | 参考价格,提供给竞标参与者作为出价参考 | |
preset_close_time | datetime | 服务需求的预设截止时间,在服务需求到达了预设截止时间后,其他用户就无法再提交出价或者改变出价 |
Response
201
返回:
{
"id": 123,
"owner": {
"uid": 9223372036854776000,
"avatar": "/media/7815769374283/avatar/blob_wkEsRbY",
"expertise": "P2P专家",
"firstname": "WenWei",
"lastname": "Yang",
"username": "WenWei Yang",
"timezone": "America/New_York",
"timezone_utc_offset": "-04:00",
"is_online": true,
"location": "New York",
"avatars": {...}
},
"status": "new",
"title": "I need a cook.",
"description": "I need a cook.",
"service_type": "online",
"service_address": null,
"service_length": 1,
"service_length_unit": "hours",
"currency": "CNY",
"images": [],
"ref_price": "3149.06",
"preset_close_time": "2025-06-23T06:54:38.912Z",
"winner": null,
"start_time": "2025-06-26T06:54:38.912Z",
"end_time": "2025-06-26T07:54:38.912Z",
"created_at": "2025-06-23T06:54:38.912Z"
}