作业任务

操作员可以授权第三方平台管理属于自己的作业任务、任务地块数据,也可以接收来自第三方平台分派的作业任务。

  • 作业任务信息

  • 作业任务中的地块信息

  • 分派作业任务

作业任务信息

获取授权用户参与的作业任务信息

GET https://open.xag.cn/v1/orders/

接口请求参数

请求参数

是否必填

类型

说明

access_token

string

接口调用凭证

offset

integer

记录游标

count

integer

获取记录数

返回示例

{
    "next_offset": 1,
    "data": [{
        "order_uuid": "",
        "name": "",
        "start_time": 1547815463,
        "day_limit": 2,
        "content": "",
        "address": "",
        "lat": 123.1,
        "lng": 24.2,
        "customer_name": "",
        "customer_mobile": ""
    }]
}

返回字段说明

字段

类型

说明

next_offset

integer

下一批数据的起始偏移量

data

array

作业任务对象数组

其中,data数组中的作业任务对象字段说明

字段

类型

说明

order_uuid

string

作业任务唯一标识

name

string

作业任务名称

start_time

timestamp

开始时间

day_limit

integer

作业时间

content

string

任务描述

address

string

作业地点

lat

float

作业地点纬度

lng

float

作业地点经度

customer_name

string

客户联系人

customer_mobile

string

客户联系电话

作业任务中的地块信息

根据作业任务唯一标识获取作业任务中,授权用户创建或作业过的地块信息

GET https://open.xag.cn/v1/order/lands

接口请求参数

请求参数

是否必填

类型

说明

access_token

string

接口调用凭证

order_uuid

string

任务唯一标识

offset

integer

记录游标

count

count

获取记录数

返回示例

{
    "next_offset": 1,
    "data": [{
        "land_uuid": "",
        "area_size": 123.45,
        "center_lat": 123.45,
        "center_lng": 23.45
    }]
}

返回字段说明

字段

类型

说明

land_uuid

string

地块唯一标识

area_size

float

地块面积,单位:平方米

center_lat

float

地块中心点纬度

center_lng

float

地块中心点经度

可以根据地块唯一标识,获取地块详细数据

GET https://open.xag.cn/v1/land

接口请求参数

请求参数

是否必填

类型

说明

access_token

string

接口调用凭证

land_uuid

string

地块唯一标识

output_type

string

返回数据格式,可选geojson或normal

返回示例(output_type 为 normal)

{
    "version": 4,
    "id": 1337015,
    "guid": "bbecb807-da21-42a6-8f95-d37e89ae75fb",
    "name": "航线201810191020",
    "create_at": 1539915603000,
    "user_uid": "66A3A32A-AE26-2B1F-D2EB-F4CA303DCB0E",
    "tags": [],
    "type": 1,
    "source": 1,
    "bounds_area_size": 0,
    "bounds": [
        {
            "id": 1,
            "name": "",
            "type": 2,
            "area_size": null,
            "points": [
                {
                    "lat": 23.17714393397992,
                    "lng": 113.41128587722778,
                    "alt": 0,
                    "source": 1,
                    "basepoint": null,
                    "create_at": 1539917550,
                    "create_by": "66A3A32A-AE26-2B1F-D2EB-F4CA303DCB0E"
                },
                {
                    "lat": 23.177083523473428,
                    "lng": 113.41137338429689,
                    "alt": 0,
                    "source": 1,
                    "basepoint": null,
                    "create_at": 1539917551,
                    "create_by": "66A3A32A-AE26-2B1F-D2EB-F4CA303DCB0E"
                },
                {
                    "lat": 23.177082598822608,
                    "lng": 113.41155242174864,
                    "alt": 0,
                    "source": 1,
                    "basepoint": null,
                    "create_at": 1539917551,
                    "create_by": "66A3A32A-AE26-2B1F-D2EB-F4CA303DCB0E"
                },
                {
                    "lat": 23.177319617440787,
                    "lng": 113.41153968125582,
                    "alt": 0,
                    "source": 1,
                    "basepoint": null,
                    "create_at": 1539917552,
                    "create_by": "66A3A32A-AE26-2B1F-D2EB-F4CA303DCB0E"
                },
                {
                    "lat": 23.177433657458607,
                    "lng": 113.41135192662477,
                    "alt": 0,
                    "source": 1,
                    "basepoint": null,
                    "create_at": 1539917553,
                    "create_by": "66A3A32A-AE26-2B1F-D2EB-F4CA303DCB0E"
                },
                {
                    "lat": 23.177440438213381,
                    "lng": 113.41121111065149,
                    "alt": 0,
                    "source": 1,
                    "basepoint": null,
                    "create_at": 1539917554,
                    "create_by": "66A3A32A-AE26-2B1F-D2EB-F4CA303DCB0E"
                }
            ],
            "extends": {
                "area_size": 0
            }
        }
    ],
    "records": [],
    "obstacles": [],
    "nosprays": [],
    "markers": [],
    "homepoints": [],
    "extends": {
        "bound_safe_distance": 1.5,
        "directLine": [
            {
                "alt": 0,
                "lat": 23.177440438213381,
                "lng": 113.41121111065149,
                "type": 0
            },
            {
                "alt": 0,
                "lat": 23.17714393397992,
                "lng": 113.41128587722778,
                "type": 0
            }
        ],
        "is_spray_width_self_adjust": false,
        "noSpray_bound_safe_distance": 1.5,
        "obstacle_bound_safe_distance": 1.5,
        "reference_lines": [
            {
                "id": 0,
                "points": [
                    {
                        "alt": 0,
                        "lat": 23.177333845922828,
                        "lng": 113.4114887505383,
                        "type": 1
                    },
                    {
                        "alt": 0,
                        "lat": 23.177157516294173,
                        "lng": 113.41153321385835,
                        "type": 1
                    }
                ],
                "type": 0
            },
            {
                "id": 0,
                "points": [
                    {
                        "alt": 0,
                        "lat": 23.177096713265005,
                        "lng": 113.41151842134252,
                        "type": 1
                    },
                    {
                        "alt": 0,
                        "lat": 23.17735545252474,
                        "lng": 113.41145317759076,
                        "type": 1
                    }
                ],
                "type": 0
            },
            {
                "id": 0,
                "points": [
                    {
                        "alt": 0,
                        "lat": 23.177377059126652,
                        "lng": 113.41141760464323,
                        "type": 1
                    },
                    {
                        "alt": 0,
                        "lat": 23.177096869048491,
                        "lng": 113.41148825743834,
                        "type": 1
                    }
                ],
                "type": 0
            },
            {
                "id": 0,
                "points": [
                    {
                        "alt": 0,
                        "lat": 23.17709702483198,
                        "lng": 113.41145809353415,
                        "type": 1
                    },
                    {
                        "alt": 0,
                        "lat": 23.177398665728568,
                        "lng": 113.41138203169569,
                        "type": 1
                    }
                ],
                "type": 0
            },
            {
                "id": 0,
                "points": [
                    {
                        "alt": 0,
                        "lat": 23.177419959218994,
                        "lng": 113.41134653770243,
                        "type": 1
                    },
                    {
                        "alt": 0,
                        "lat": 23.177097180615469,
                        "lng": 113.41142792962998,
                        "type": 1
                    }
                ],
                "type": 0
            },
            {
                "id": 0,
                "points": [
                    {
                        "alt": 0,
                        "lat": 23.177097336398955,
                        "lng": 113.41139776572579,
                        "type": 1
                    },
                    {
                        "alt": 0,
                        "lat": 23.177421427649346,
                        "lng": 113.41131604280092,
                        "type": 1
                    }
                ],
                "type": 0
            },
            {
                "id": 0,
                "points": [
                    {
                        "alt": 0,
                        "lat": 23.177422896079694,
                        "lng": 113.4112855478994,
                        "type": 1
                    },
                    {
                        "alt": 0,
                        "lat": 23.177106517885868,
                        "lng": 113.41136532589815,
                        "type": 1
                    }
                ],
                "type": 0
            },
            {
                "id": 0,
                "points": [
                    {
                        "alt": 0,
                        "lat": 23.177131697689468,
                        "lng": 113.41132885193124,
                        "type": 1
                    },
                    {
                        "alt": 0,
                        "lat": 23.177424364510046,
                        "lng": 113.41125505299789,
                        "type": 1
                    }
                ],
                "type": 0
            }
        ],
        "spray_width": 3
    }
}

分派作业任务

第三方平台向授权用户分派作业任务

POST https://open.xag.cn/v1/order

接口请求参数

请求参数

是否必填

类型

说明

access_token

string

接口调用凭证

uuid

string

第三方平台分配的任务唯一标识

name

string

任务名称

start_time

datetime

开始时间

day_limit

integer

要求作业天数

content

string

任务描述

address

string

作业地点

lat

float

作业地点纬度

lng

float

作业地点经度

customer_name

string

客户名称

customer_mobile

string

客户联系手机号码

assign_to

array

接收任务的操作员账号唯一标识(union_id)集合

通过参数assign_to,可以将任务分派给多位已授权的操作员。

返回数据示例

作业任务成功分派后,接口会返回该任务在极飞云中的唯一标识。

{
    "order_uuid": "544fe5b4faa47fd32e4393d5fa581e61"
}

向作业任务添加地块

第三方平台向已经分派给授权用户的作业任务添加地块。

POST https://open.xag.cn/v1/order/{order_uuid}/land

URL请求参数

请求参数

是否必填

类型

说明

order_uuid

string

作业任务唯一标识

post_type

string

提交的地块数据格式,可选geojson或normal

POST提交的Body内容,采用 application/json 格式提交。

地块数据格式(Normal)

Last updated

Was this helpful?