Sales statuses lookup list
Job Sales Status
| Parameter | Mandatory | Description | Examples | More Info |
|---|---|---|---|---|
| API | Yes | The API area | jobs.json | |
| General | Yes | Parameters described in overview | Authorization: Bearer <access_token> header — see Synergist API Authentication | Structure of an API call |
| Company | Yes | The company number | company=1 | |
| Action | Yes | The action to perform | action=salesstatuses |
The main sales statuses are 1 (open), 2 (lost) and 3 (promoted). Each of these codes is associated with a set of 'sales reason' descriptions. Therefore a combined code that must be used when promoting a job or changing its status. This is the salesreasonSalesStatus plus the salesreasonReasonId. e.g. "3-6" is "Promoted - In Progress"
Example request (OAuth 2.0):
Authorization: Bearer <access_token>
http://<SERVER>/jsonapi/jobs.json?&action=salesstatuses&version=6&company=1
Example request (legacy username/password):
http://<SERVER>/jsonapi/jobs.json?&action=salesstatuses&version=6&company=1&user=<username>&password=<password>
Example response:
{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"totalrows": 19,
"totalpages": 1,
"responsemessage": "",
"pagerows": 0,
"pagenumber": 1,
"success": true,
"data": [
{
"salesreasonStatusReason": "1-2",
"salesreasonStatusReasonDesc": "Open - Contacted",
"salesreasonStatusReasonId": 2,
"salesreasonStatusStatus": 1
},
{
"salesreasonStatusReason": "2-101",
"salesreasonStatusReasonDesc": "Lost - Price too high",
"salesreasonStatusReasonId": 101,
"salesreasonStatusStatus": 2
},
{
"salesreasonStatusReason": "3-6",
"salesreasonStatusReasonDesc": "Promoted - In Progress",
"salesreasonStatusReasonId": 6,
"salesreasonStatusStatus": 3
}
]
}