交易Unqualified Reasons
The Deal Unqualified Reasons API provides a simple interface to manage deal unqualified reasons. The API allows you to create, delete and update unqualified reasons. You can retrieve a single unqualified reason as well as list of all reasons.
JSON format
Name | Read Only | Type | Description |
---|---|---|---|
id |
true | number | Unique identifier of the deal unqualified reason. |
creator_id |
true | number | Unique identifier of the user the deal unqualified reason was created by. |
name |
false | string | Human-friendly unqualified reason explanation. |
created_at |
true | string | Date and time of creation in UTC ISO8601 format. |
updated_at |
true | string | Date and time of the last update in UTC ISO8601 format. |
Retrieve all deal unqualified reasons
GET/v2/deal_unqualified_reasons
Returns all deal unqualified reasons available to the user according to the parameters provided.
Parameters
Name | Required | Type | In | Description |
---|---|---|---|---|
page |
false | number | 查询 | Page number to start from. Page numbering is 1-based and omittingpage parameter will return the first page. |
per_page |
false | number | 查询 | Number of records to return per page. Default limit is25and maximum number that can be returned is100. |
sort_by |
false | string | 查询 | A field to sort by.Defaultordering isascending. If you want to change the sort ordering to descending, append:desc to the field e.g.sort_by=name:desc . Possible values:id ,name ,updated_at ,created_at |
ids |
false | string | 查询 | Comma separated list of deal unqualified reasons unique identifiers to be returned in a request. |
name |
false | string | 查询 | Name of the unqualified reason to search for. This parameter is used in a strict sense. |
Allowed for
- Agents
Using cURL
旋度-v -X GET https://api.getbase.com/v2/deal_unqualified_reasons\
-H"Accept: application/json"\
-H"Authorization: Bearer$ACCESS_TOKEN"
Example response
HTTP/1.1200OK
Content-Type:application/json; charset=utf-8
Content-Language:en
{
"items":[
{
"data":{
"id":2871117,
"created_at":"2016-08-30T15:04:32Z",
"updated_at":"2016-08-30T15:04:32Z",
"name":"No need",
"creator_id":911978
},
"meta":{
"type":"deal_unqualified_reason"
}
},
{
"data":{
"id":2871118,
"created_at":"2016-08-30T15:04:32Z",
"updated_at":"2016-08-30T15:04:32Z",
"name":"Not the decision maker",
"creator_id":911978
},
"meta":{
"type":"deal_unqualified_reason"
}
}
],
"meta":{
"type":"collection",
"count":2,
"links":{
"self":"https://api.getbase.com/v2/deal_unqualified_reasons"
}
}
}
Create a deal unqualified reason
POST/v2/deal_unqualified_reasons
Create a new deal unqualified reason. Unqualified reason's namemustbe unique.
Parameters
Name | Required | Type | In | Description |
---|---|---|---|---|
name |
true | string | Body | Mustbe unique. |
Allowed for
- Agents
Using cURL
旋度-v -X POST https://api.getbase.com/v2/deal_unqualified_reasons\
-H"Accept: application/json"\
-H"Content-Type: application/json"\
-H"Authorization: Bearer$ACCESS_TOKEN"\
-d'{
"data": {
"name": "Other"
},
"meta": {
"type": "deal_unqualified_reason"
}
}'
Example response
HTTP/1.1200OK
Content-Type:application/json; charset=utf-8
Content-Language:en
{
"data":{
"id":4,
"creator_id":1,
"name":"Other",
"created_at":"2014-08-27T16:33:00Z",
"updated_at":"2014-08-27T16:33:00Z"
},
"meta":{
"type":"deal_unqualified_reason"
}
}
Retrieve a single deal unqualified reason
GET/v2/deal_unqualified_reasons/:id
Returns a single unqualified reason available to the user by the provided id. If a unqualified reason with the supplied unique identifier does not exist, it returns an error.
Parameters
Name | Required | Type | In | Description |
---|---|---|---|---|
id |
true | number | 查询 | Unique identifier of the unqualified reason. |
Allowed for
- Agents
Using cURL
旋度-v -X GET https://api.getbase.com/v2/deal_unqualified_reasons/4\
-H"Accept: application/json"\
-H"Authorization: Bearer$ACCESS_TOKEN"
Example response
HTTP/1.1200OK
Content-Type:application/json; charset=utf-8
Content-Language:en
{
"data":{
"id":4,
"creator_id":1,
"name":"Other",
"created_at":"2014-08-27T16:33:00Z",
"updated_at":"2014-08-27T16:33:00Z"
},
"meta":{
"type":"deal_unqualified_reason"
}
}
Update a deal unqualified reason
PUT/v2/deal_unqualified_reasons/:id
Updates a unqualified reason information. If the specified unqualified reason does not exist, the request will return an error.
If you want to update unqualified reason youmustmake sure name of the reason is unique.
Parameters
Name | Required | Type | In | Description |
---|---|---|---|---|
id |
true | number | 查询 | Unique identifier of the unqualified reason. |
name |
false | string | Body | Mustbe unique. |
Allowed for
- Agents
Using cURL
旋度-v -X PUT https://api.getbase.com/v2/deal_unqualified_reasons/4\
-H"Accept: application/json"\
-H"Content-Type: application/json"\
-H"Authorization: Bearer$ACCESS_TOKEN"\
-d'{
"data": {
"name": "Not the right timing"
}
}'
Example response
HTTP/1.1200OK
Content-Type:application/json; charset=utf-8
Content-Language:en
{
"data":{
"id":4,
"creator_id":1,
"name":"Not the right timing",
"created_at":"2014-08-27T16:33:00Z",
"updated_at":"2014-08-27T16:33:01Z"
},
"meta":{
"type":"deal_unqualified_reason"
}
}
Delete a reason
DELETE/v2/deal_unqualified_reasons/:id
Delete an existing unqualified reason. If the reason with supplied unique identifier does not exist it returns an error. This operation cannot be undone.
Parameters
Name | Required | Type | In | Description |
---|---|---|---|---|
id |
true | number | 查询 | Unique identifier of the unqualified reason. |
Allowed for
- Agents
Using cURL
旋度-v -X DELETE https://api.getbase.com/v2/deal_unqualified_reasons/1\
-H"Authorization: Bearer$ACCESS_TOKEN"
Example response
HTTP/1.1204NoContent