/purchase: Purchase Listing

URL:
https://[root]/content/listings/[itemID]/purchase
Methods:
POST

Example usage

URL for Purchase Listing:

Use dark colors for code blocksCopy
1
https://www.arcgis.com/sharing/rest/content/listings/b512083cd1b64e2da1d3f66dbb135956/purchase

Description

Depending on the type of listing, the purchaser or the vendor can complete a marketplace listing purchase by invoking this operation (POST ONLY).

For free listings, this call must be made by the purchasing org admin or members with request purchase information privilege. The purchaserOrgId parameter is not required in this case.

For all other listings, this call must be made by the vendor org admin or members with request purchase information privilege. The purchaserOrgId parameter is required in this case, and this call will succeed only if that purchaser has already either expressed interest or started a trial.

In some cases the vendor may provision a different item from the one listed. They can specify the provisioned item using the provisionedItemId parameter.

This operation cannot be invoked if the item has already been purchased.

Request parameters

ParameterDetails

[Common Parameters]

For a complete listing, see Common parameters.

[Purchaser Parameters]

For a complete list of purchaser parameters, see Purchaser parameters. Note that all purchaser parameters are optional.

purchaserOrgId

The org ID of the purchaser organization. This parameter is required only when the call is made by the vendor. It is ignored otherwise.

provisionedItemId

The ID of the item to be provisioned if different from the one listed.

Note that the listed item and the provisioned item must be related by the Listed2Provisioned relationship otherwise it will result in an error.

This parameter is allowed only when the call is made by the vendor. It is ignored otherwise.

endDate

The end/expiry date of this purchase if any. If this parameter is not specified, it implies an unexpiring purchase. The end date specified should be in milliseconds from epoch.

Example:

Use dark colors for code blocksCopy
1
endDate=1378501088700 //(Fri, 06 Sep 2013 20:58:08 GMT)

JSON response syntax

Use dark colors for code blocksCopy
1
{<provision>}

JSON response example

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
  "itemId": "b512083cd1b64e2da1d3f66dbb135956",
  "orgId": "org1",
  "purchaserOrgId": "org2",
  "purchaserUsername": "org2user",
  "purchaserFullName": "Test Full Name",
  "purchaserEmail": "test@email.com",
  "purchaserPhone": null,
  "startDate": 1378227269000,
  "endDate": -1,
  "purchased": true,
  "trial": false,
  "interested": false,
  "created": 1378227262000,
  "modified": 1378227269000
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.