Sales statuses lookup list
Parameter | Mandatory | Description | Examples | More Info |
---|---|---|---|---|
API | Yes | The API area | jobs.json | |
General | Yes | Parameters described in overview | user=user&password=user | 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:
http://<SERVER>/jsonapi/jobs.json?user=user&password=user&action=salesstatuses&version=3.9&company=1
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
},
]
}