Create a purchased product

post

/services/rest/connect/v1.4/purchasedProducts

Request

Body ()
The information about a purchased product.
Root Schema : purchasedProducts
Type: object
The information about a purchased product.
Show Source
Nested Schema : namedIDs-purchasedProducts-mailing
Type: object
An ID which has an associated name string. These IDs can be set by either value or name. If the name cannot uniquely determine the value, an error is generated.
Show Source
Nested Schema : purchasedProducts-price
Type: object
The monetary value that consists of currency, exchange rate, and value.
Show Source
Nested Schema : namedIDs-purchasedProducts-price-currency
Type: object
An ID which has an associated name string. These IDs can be set by either value or name. If the name cannot uniquely determine the value, an error is generated.
Show Source
Nested Schema : namedIDs-purchasedProducts-price-exchangeRate
Type: object
An ID which has an associated name string. These IDs can be set by either value or name. If the name cannot uniquely determine the value, an error is generated.
Show Source
Back to Top

Response

Default Response

Body ()
Root Schema : purchasedProducts
Type: object
The information about a purchased product.
Show Source
Nested Schema : namedIDs-purchasedProducts-mailing
Type: object
An ID which has an associated name string. These IDs can be set by either value or name. If the name cannot uniquely determine the value, an error is generated.
Show Source
Nested Schema : purchasedProducts-price
Type: object
The monetary value that consists of currency, exchange rate, and value.
Show Source
Nested Schema : namedIDs-purchasedProducts-price-currency
Type: object
An ID which has an associated name string. These IDs can be set by either value or name. If the name cannot uniquely determine the value, an error is generated.
Show Source
Nested Schema : namedIDs-purchasedProducts-price-exchangeRate
Type: object
An ID which has an associated name string. These IDs can be set by either value or name. If the name cannot uniquely determine the value, an error is generated.
Show Source
Back to Top

Examples

Use POST with the following syntax to create a new purchased product object:

https://your_site_interface/services/rest/connect/version/purchasedProducts

Request URI example

https://mysite.example.com/services/rest/connect/v1.4/purchasedProducts

Request body example

{
"salesProduct":
    {
    "id": 4
    },
"serialNumber": "SN0007",
"price":
    {"currency":
        {
        "id": 1
        },
    "value": 750
    }
}

Response body example

{
  "id": 6,
  "lookupName": "6",
  "campaign": null,
  "comment": null,
  "contact": null,
  "customFields": {
    "c": {}
  },
  "finalizedByAccount": null,
  "licenseEndTime": null,
  "licenseStartTime": null,
  "mailing": null,
  "opportunity": null,
  "organization": null,
  "price": {
    "currency": {
      "id": 1,
      "lookupName": "USD"
    },
    "exchangeRate": null,
    "value": 750
  },
  "purchaseTime": null,
  "salesProduct": {
    "links": [
      {
        "rel": "self",
        "href": "https://mysite.example.com/services/rest/connect/v1.4/salesProducts/4"
      },
      {
        "rel": "canonical",
        "href": "https://mysite.example.com/services/rest/connect/v1.4/salesProducts/4"
      },
      {
        "rel": "describedby",
        "href": "https://mysite.example.com/services/rest/connect/v1.4/metadata-catalog/salesProducts",
        "mediaType": "application/schema+json"
      }
    ]
  },
  "serialNumber": "SN0006",
  "links": [
    {
      "rel": "self",
      "href": "https://mysite.example.com/services/rest/connect/v1.4/purchasedProducts/5"
    },
    {
      "rel": "canonical",
      "href": "https://mysite.example.com/services/rest/connect/v1.4/purchasedProducts/5"
    },
    {
      "rel": "describedby",
      "href": "https://mysite.example.com/services/rest/connect/v1.4/metadata-catalog/purchasedProducts",
      "mediaType": "application/schema+json"
    }
  ]
}
Back to Top