POST Agents/Sale/GetUpcomingSales
Some tooltip text!
• 4 minutes to read
• 4 minutes to read
POST /api/v1/Agents/Sale/GetUpcomingSales
Returns all open sales, sorted descending with the latest first.
If the weigthed amount is -1, the amount restriction is omitted. NsApiSlow threshold: 2000 ms.
Query String Parameters
| Parameter Name | Type | Description |
|---|---|---|
| $select | string | Optional comma separated list of properties to include in the result. Other fields are then nulled out to reduce payload size: "Name,department,category". Default = show all fields. |
POST /api/v1/Agents/Sale/GetUpcomingSales?$select=name,department,category/id
Request Headers
| Parameter Name | Description |
|---|---|
| Authorization | Supports 'Basic', 'SoTicket' and 'Bearer' schemes, depending on installation type. |
| X-XSRF-TOKEN | If not using Authorization header, you must provide XSRF value from cookie or hidden input field |
| Content-Type | Content-type of the request body: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded, application/json-patch+json, application/merge-patch+json |
| Accept | Content-type(s) you would like the response in: application/json, text/json, application/xml, text/xml, application/json-patch+json, application/merge-patch+json |
| Accept-Language | Convert string references and multi-language values into a specified language (iso2) code. |
| SO-Language | Convert string references and multi-language values into a specified language (iso2) code. Overrides Accept-Language value. |
| SO-Culture | Number, date formatting in a specified culture (iso2 language) code. Partially overrides SO-Language/Accept-Language value. Ignored if no Language set. |
| SO-TimeZone | Specify the timezone code that you would like date/time responses converted to. |
| SO-AppToken | The application token that identifies the partner app. Used when calling Online WebAPI from a server. |
Request Body: request
WeightedAmountLimit, Count
| Property Name | Type | Description |
|---|---|---|
| WeightedAmountLimit | Integer | |
| Count | Integer |
Response:array
OK
| Response | Description |
|---|---|
| 200 | OK |
Response body: array
| Property Name | Type | Description |
|---|---|---|
| ContactName | string | Contact name |
| SaleDate | date-time | (expected / lost / won) sales date |
| SaleId | int32 | Primary key |
| Probability | int32 | Actual probability, may differ from the one in the list |
| Title | string | Sale heading (short description?) |
| Amount | double | Total sale amount |
| Currency | string | Currency the sale was made in. |
| ProjectName | string | Project name |
| AssociateFullName | string | The sale's owner |
| Description | string | The sales description |
| Status | string | The sale's status, indicating wether the sale is open, sold or lost. |
| WeightedAmount | double | The weighted amount ( amount * probability / 100) |
| ProjectId | int32 | Optional project reference |
| EarningPercent | double | Earning as percent of total |
| Earning | double | Earning on sale |
| ContactId | int32 | Optional contact reference |
| AssociateId | int32 | The sale's owner id |
| PersonId | int32 | The sale's contact persons id |
| SaleTypeId | int32 | The sale's type id |
| SaleTypeName | string | The sale's type name |
| PersonFullName | string | The name of the person this sale belongs to. |
| Completed | string | The Sale completed state. The completed state is either Started or Completed. NotStarted is treated as Started. The value maps to the Done database field. |
| ActiveErpLinks | int32 | The number of active erp links |
| NextDueDate | date-time | Next due date, this is a denormalization of 'closest future activity date, or most recent if no future activities'. Maintained by the system, but very convenient for searching. |
| Number | string | Alphanumeric user field |
| TableRight | TableRight | The carrier's table right |
| FieldProperties | object | Field property dictionary mapping field names to field access rights. |
Sample request
POST /api/v1/Agents/Sale/GetUpcomingSales
Authorization: Basic dGplMDpUamUw
Accept: application/json; charset=utf-8
Accept-Language: sv
Content-Type: application/json; charset=utf-8
{
"WeightedAmountLimit": 861,
"Count": 165
}
Sample response
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
[
{
"ContactName": "Strosin LLC",
"SaleDate": "2008-01-12T10:11:01.1067442+01:00",
"SaleId": 536,
"Probability": 659,
"Title": "illo",
"Amount": 24965.444,
"Currency": "adipisci",
"ProjectName": "Connelly-Orn",
"AssociateFullName": "Mrs. Maynard Huels Jr.",
"Description": "Stand-alone intermediate concept",
"Status": "Lost",
"WeightedAmount": 19885.23,
"ProjectId": 120,
"EarningPercent": 29920.298,
"Earning": 8941.302,
"ContactId": 153,
"AssociateId": 280,
"PersonId": 212,
"SaleTypeId": 242,
"SaleTypeName": "Kris Inc and Sons",
"PersonFullName": "Alta Funk",
"Completed": "Completed",
"ActiveErpLinks": 473,
"NextDueDate": "1999-11-14T10:11:01.1067442+01:00",
"Number": "1622206",
"TableRight": null,
"FieldProperties": {
"fieldName": {
"FieldRight": null,
"FieldType": "System.Int32",
"FieldLength": 928
}
}
}
]