• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Edit
Show / Hide Table of Contents

PUT Sale/{id}

Some tooltip text!
• 16 minutes to read
 • 16 minutes to read
PUT /api/v1/Sale/{id}

Updates the existing SaleEntity

Path Part Type Description
id int32 The SaleEntity id to update. Required

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.
PUT /api/v1/Sale/{id}?$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: entity

The SaleEntity to be saved.

Property Name Type Description
Appointment Appointment Simple read-only appointment data. Carrier object for Appointment. Services for the Appointment Carrier is available from the Appointment Agent.
Associate Associate The sale owner Use MDO List name "associate" to get list items.
UpdatedBy Associate Who updated the sale
CreatedBy Associate Who created to sale
Contact Contact The contact associated with the sale. It may also be 0 if no contact is associated with the sale. Use MDO List name "contact" to get list items.
Project Project A sale may also be connected to a project, so you see the sale both on the company card, and on the project card. This does not mean that a project is required. Use MDO List name "project" to get list items.
SaleText String Text describing the sale
Person Person A sale may also be connected to a person - this must be a contact person registered on the current contact. This does not mean that a person is required. Use MDO List name "person" to get list items.
Currency Currency The currency the sale object was sold in Use MDO List name "currency" to get list items.
Competitor Competitor List of all possible competitors. Use MDO List name "comptr" to get list items.
Credited Credited List of who is to be credited for the sale. Use MDO List name "credited" to get list items.
Rating Rating The sale rating Use MDO List name "prob" to get list items.
Reason Reason The sale reason Use MDO List name "reason" to get list items.
Source Source The sale source Use MDO List name "source" to get list items.
Status String The state of the Sale: Open / Sold / Lost / Stalled
Saledate String (expected / lost / won) sales date
Amount Number Total sale amount
SaleId Integer Primary key
Earning Number Earning on sale
EarningPercent Number Earning as percent of total
Heading String Sale heading (short description?)
Number String Alphanumeric user field
Probability Integer Actual probability, may differ from the one in the list
CreatedDate String Registered date in UTC.
UpdatedDate String Last updated in UTC.
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.
ActiveLinks Integer Number of active links to sale, document, appointment.
Links Array List of all elements linked to the sale.
NextDueDate String 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.
Postit String The actual text, max 2047 significant characters even though it is stored as a larger data type on some databases
SaleType SaleType Use MDO List name "saletype" to get list items.
ReasonSold ReasonSold Use MDO List name "reasonsold" to get list items.
ReasonStalled ReasonStalled Use MDO List name "reasonstalled" to get list items.
ReopenDate String Date the sale is to be reopened; valid only for status=stalled. Not necessarily the same as the nextDueDate.
SaleStakeholders Array
ActiveErpLinks Integer The number of active erp links
UserDefinedFields Object Deprecated: Use {SuperOffice.CRM.Services.SaleEntity.CustomFields} instead. Dictionary of user defined field data. The key string is the ProgId of the UdefField, or if the ProgId is empty it is a string of the format "SuperOffice:[UdefFieldIdentity]", e.g. "SuperOffice:1234"
ExtraFields Object Deprecated: Use {SuperOffice.CRM.Services.SaleEntity.CustomFields} instead. Extra fields added to the carrier. This could be data from Plug-ins, the foreign key system, external applications, etc.
CustomFields Object Udef + Extra fields added to the carrier. Extra fields as defined by changes to database schema + user-defined fields as defined by admin. Custom fields combines user defined fields and extra fields into one bucket. The individual {SuperOffice.CRM.Services.SaleEntity.ExtraFields} and UserDefinedFields properties are deprecated in favor of this combined collection.
PublishEventDate String Publish event date
PublishTo String Publication valid to (inclusive)
PublishFrom String Publication valid from (inclusive)
IsPublished Boolean Publication is published
VisibleFor Array The set of users or groups the record is visible for

Response:

SaleEntity updated.

Response Description
200 SaleEntity updated.
412 Update stopped because SaleEntity has changed since the requested If-Unmodified-Since timestamp.
400 Bad request. Entity to save is not in request body.

Response body: SaleEntityWithLinks

Property Name Type Description
Appointment Appointment Simple read-only appointment data. Carrier object for Appointment. Services for the Appointment Carrier is available from the Appointment Agent.
Associate Associate The sale owner Use MDO List name "associate" to get list items.
UpdatedBy Associate Who updated the sale
CreatedBy Associate Who created to sale
Contact Contact The contact associated with the sale. It may also be 0 if no contact is associated with the sale. Use MDO List name "contact" to get list items.
Project Project A sale may also be connected to a project, so you see the sale both on the company card, and on the project card. This does not mean that a project is required. Use MDO List name "project" to get list items.
SaleText string Text describing the sale
Person Person A sale may also be connected to a person - this must be a contact person registered on the current contact. This does not mean that a person is required. Use MDO List name "person" to get list items.
Currency Currency The currency the sale object was sold in Use MDO List name "currency" to get list items.
Competitor Competitor List of all possible competitors. Use MDO List name "comptr" to get list items.
Credited Credited List of who is to be credited for the sale. Use MDO List name "credited" to get list items.
Rating Rating The sale rating Use MDO List name "prob" to get list items.
Reason Reason The sale reason Use MDO List name "reason" to get list items.
Source Source The sale source Use MDO List name "source" to get list items.
Status string The state of the Sale: Open / Sold / Lost / Stalled
Saledate date-time (expected / lost / won) sales date
Amount double Total sale amount
SaleId int32 Primary key
Earning double Earning on sale
EarningPercent double Earning as percent of total
Heading string Sale heading (short description?)
Number string Alphanumeric user field
Probability int32 Actual probability, may differ from the one in the list
CreatedDate date-time Registered date in UTC.
UpdatedDate date-time Last updated in UTC.
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.
ActiveLinks int32 Number of active links to sale, document, appointment.
Links array List of all elements linked to the sale.
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.
Postit string The actual text, max 2047 significant characters even though it is stored as a larger data type on some databases
SaleType SaleType Use MDO List name "saletype" to get list items.
ReasonSold ReasonSold Use MDO List name "reasonsold" to get list items.
ReasonStalled ReasonStalled Use MDO List name "reasonstalled" to get list items.
ReopenDate date-time Date the sale is to be reopened; valid only for status=stalled. Not necessarily the same as the nextDueDate.
SaleStakeholders array
ActiveErpLinks int32 The number of active erp links
UserDefinedFields object Deprecated: Use {SuperOffice.CRM.Services.SaleEntity.CustomFields} instead. Dictionary of user defined field data. The key string is the ProgId of the UdefField, or if the ProgId is empty it is a string of the format "SuperOffice:[UdefFieldIdentity]", e.g. "SuperOffice:1234"
ExtraFields object Deprecated: Use {SuperOffice.CRM.Services.SaleEntity.CustomFields} instead. Extra fields added to the carrier. This could be data from Plug-ins, the foreign key system, external applications, etc.
CustomFields object Udef + Extra fields added to the carrier. Extra fields as defined by changes to database schema + user-defined fields as defined by admin. Custom fields combines user defined fields and extra fields into one bucket. The individual {SuperOffice.CRM.Services.SaleEntity.ExtraFields} and UserDefinedFields properties are deprecated in favor of this combined collection.
PublishEventDate date-time Publish event date
PublishTo date-time Publication valid to (inclusive)
PublishFrom date-time Publication valid from (inclusive)
IsPublished bool Publication is published
VisibleFor array The set of users or groups the record is visible for
TableRight TableRight The carrier's table right
FieldProperties object Field property dictionary mapping field names to field access rights.
_Links object

Sample request

PUT /api/v1/Sale/{id}
Authorization: Basic dGplMDpUamUw
Accept: application/json; charset=utf-8
Accept-Language: *
Content-Type: application/json; charset=utf-8

{
  "Appointment": null,
  "Associate": null,
  "UpdatedBy": null,
  "CreatedBy": null,
  "Contact": null,
  "Project": null,
  "SaleText": "in",
  "Person": null,
  "Currency": null,
  "Competitor": null,
  "Credited": null,
  "Rating": null,
  "Reason": null,
  "Source": null,
  "Status": "Lost",
  "Saledate": "1999-08-29T17:54:08.5076972+02:00",
  "Amount": 4600.7119999999995,
  "SaleId": 313,
  "Earning": 14055.99,
  "EarningPercent": 21408.354,
  "Heading": "numquam",
  "Number": "439093",
  "Probability": 386,
  "CreatedDate": "1999-12-21T17:54:08.5076972+01:00",
  "UpdatedDate": "2010-10-07T17:54:08.5076972+02:00",
  "Completed": "Completed",
  "ActiveLinks": 550,
  "Links": [
    {
      "EntityName": "Kerluke Inc and Sons",
      "Id": 183,
      "Description": "Profit-focused assymetric budgetary management",
      "ExtraInfo": "voluptatibus",
      "LinkId": 686
    },
    {
      "EntityName": "Kerluke Inc and Sons",
      "Id": 183,
      "Description": "Profit-focused assymetric budgetary management",
      "ExtraInfo": "voluptatibus",
      "LinkId": 686
    }
  ],
  "NextDueDate": "2001-02-05T17:54:08.5076972+01:00",
  "Postit": "nulla",
  "SaleType": null,
  "ReasonSold": null,
  "ReasonStalled": null,
  "ReopenDate": "2011-05-23T17:54:08.5076972+02:00",
  "SaleStakeholders": [
    {
      "StakeholderRoleName": "Quitzon Inc and Sons",
      "Comment": "aut",
      "StakeholderRoleId": 211,
      "CountryId": 450,
      "PersonId": 594,
      "EmailDescription": "karen_kerluke@dach.ca",
      "EmailId": 639,
      "EmailAddress": "jaden@bosco.biz",
      "PhoneId": 143,
      "ContactName": "Dare Group",
      "ContactId": 905,
      "SaleId": 951,
      "Mrmrs": "possimus",
      "Firstname": "Leon",
      "MiddleName": "Auer-Ryan",
      "Lastname": "Oberbrunner",
      "SaleStakeholderId": 778,
      "Rank": 43,
      "Phone": "(876)431-1126"
    }
  ],
  "ActiveErpLinks": 260,
  "UserDefinedFields": {
    "SuperOffice:1": "Ms. Randal West DDS",
    "SuperOffice:2": "Mr. Korbin Nikolaus"
  },
  "ExtraFields": {
    "ExtraFields1": "praesentium",
    "ExtraFields2": "sint"
  },
  "CustomFields": {
    "CustomFields1": "cupiditate",
    "CustomFields2": "sequi"
  },
  "PublishEventDate": "2015-01-23T17:54:08.5076972+01:00",
  "PublishTo": "2025-03-20T17:54:08.5076972+01:00",
  "PublishFrom": "2002-09-12T17:54:08.5076972+02:00",
  "IsPublished": true,
  "VisibleFor": [
    {
      "VisibleId": 31,
      "Visibility": "All",
      "DisplayValue": "quos"
    },
    {
      "VisibleId": 31,
      "Visibility": "All",
      "DisplayValue": "quos"
    }
  ]
}

Sample response

HTTP/1.1 200 SaleEntity updated.
Content-Type: application/json; charset=utf-8

{
  "Appointment": null,
  "Associate": null,
  "UpdatedBy": null,
  "CreatedBy": null,
  "Contact": null,
  "Project": null,
  "SaleText": "qui",
  "Person": null,
  "Currency": null,
  "Competitor": null,
  "Credited": null,
  "Rating": null,
  "Reason": null,
  "Source": null,
  "Status": "Lost",
  "Saledate": "2004-11-17T17:54:08.5076972+01:00",
  "Amount": 8013.638,
  "SaleId": 975,
  "Earning": 11918.601999999999,
  "EarningPercent": 29979.843999999997,
  "Heading": "vitae",
  "Number": "1346310",
  "Probability": 928,
  "CreatedDate": "1999-05-06T17:54:08.5076972+02:00",
  "UpdatedDate": "2010-02-22T17:54:08.5076972+01:00",
  "Completed": "Completed",
  "ActiveLinks": 989,
  "Links": [
    {
      "EntityName": "Lynch-Prosacco",
      "Id": 907,
      "Description": "Cross-group homogeneous data-warehouse",
      "ExtraInfo": "impedit",
      "LinkId": 695,
      "TableRight": null,
      "FieldProperties": {
        "fieldName": {
          "FieldRight": null,
          "FieldType": "System.Int32",
          "FieldLength": 330
        }
      }
    }
  ],
  "NextDueDate": "2011-06-10T17:54:08.5076972+02:00",
  "Postit": "et",
  "SaleType": null,
  "ReasonSold": null,
  "ReasonStalled": null,
  "ReopenDate": "2015-09-04T17:54:08.5076972+02:00",
  "SaleStakeholders": [
    {
      "StakeholderRoleName": "Gutkowski-Barton",
      "Comment": "earum",
      "StakeholderRoleId": 978,
      "CountryId": 231,
      "PersonId": 392,
      "EmailDescription": "dortha@wisozk.name",
      "EmailId": 11,
      "EmailAddress": "favian_anderson@dubuque.uk",
      "PhoneId": 202,
      "ContactName": "Ortiz, Lesch and Trantow",
      "ContactId": 969,
      "SaleId": 76,
      "Mrmrs": "at",
      "Firstname": "Hardy",
      "MiddleName": "Douglas, Jast and Hodkiewicz",
      "Lastname": "Daugherty",
      "SaleStakeholderId": 743,
      "Rank": 817,
      "Phone": "199.595.1923 x0990",
      "TableRight": null,
      "FieldProperties": {
        "fieldName": {
          "FieldRight": null,
          "FieldType": "System.String",
          "FieldLength": 940
        }
      }
    }
  ],
  "ActiveErpLinks": 327,
  "UserDefinedFields": {
    "SuperOffice:1": "True",
    "SuperOffice:2": "Bridie Romaguera"
  },
  "ExtraFields": {
    "ExtraFields1": "magnam",
    "ExtraFields2": "nulla"
  },
  "CustomFields": {
    "CustomFields1": "aut",
    "CustomFields2": "corporis"
  },
  "PublishEventDate": "2014-11-30T17:54:08.5076972+01:00",
  "PublishTo": "2018-05-18T17:54:08.5076972+02:00",
  "PublishFrom": "2013-04-23T17:54:08.5076972+02:00",
  "IsPublished": false,
  "VisibleFor": [
    {
      "VisibleId": 811,
      "Visibility": "All",
      "DisplayValue": "consequuntur",
      "TableRight": null,
      "FieldProperties": {
        "fieldName": {
          "FieldRight": null,
          "FieldType": "System.Int32",
          "FieldLength": 297
        }
      }
    },
    {
      "VisibleId": 811,
      "Visibility": "All",
      "DisplayValue": "consequuntur",
      "TableRight": null,
      "FieldProperties": {
        "fieldName": {
          "FieldRight": null,
          "FieldType": "System.Int32",
          "FieldLength": 297
        }
      }
    }
  ],
  "TableRight": null,
  "FieldProperties": {
    "fieldName": {
      "FieldRight": null,
      "FieldType": "System.String",
      "FieldLength": 472
    }
  },
  "_Links": {
    "Self": "https://www.example.com/api/v1/contact/321",
    "Archive": "https://www.example.com/api/v1/contact"
  }
}
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top