Skip to main content

Additional subscription change examples

Several examples of changes to subscriptions are included below. The requests often only vary by the payment plan, which represents the edition of the product being purchased, or a number of units, but the responses may contain very different information depending on how the edition is configured.

Changing a subscription - upgrade free trial to paid

Below is an example of changing a subscription from a free trial edition to the same edition, but paid.

Request

  • JSON
{
"id":"6b9804cd-b2b9-45c2-8487-1e8b9d5fa667",
"order":{
"paymentPlanId" : 552
"activated" : true
}
}
  • XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<subscription>
<id>6b9804cd-b2b9-45c2-8487-1e8b9d5fa667</id>
<order>
<paymentPlanId>552</paymentPlanId>
<activated>true</activated>
</order>
</subscription>

Response

  • JSON
Status Code: 200 OK
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Encoding: gzip
Content-Length: 1281
Content-Type: application/xml;charset=UTF-8
Date: Sun, 16 Aug 2015 22:42:03 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
Vary: Accept-Encoding
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
{
"id": "efc58da2-d957-46d7-988b-48c7419a8c58",
"creationDate": "2015-08-12T11:18:59-06:00",
"externalAccountId": "2217d789-bdce-4c01-bebe-431b44cab478",
"status": "FREE_TRIAL",
"maxUsers": "1",
"order": {
"id": "1585",
"startDate": "2015-08-27T00:00:00-06:00",
"nextBillingDate": "2015-08-27T00:00:00-06:00",
"status": "FREE_TRIAL",
"frequency": "MONTHLY",
"currency": "USD",
"type": "NEW",
"totalPrice": "0.0000000000",
"user": {
"-id": "3d4d2342-b7c4-4865-85bd-842f269adae6",
"-href": "http://localhost:8080/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"
},
"company": {
"-id": "a012bb88-c2c5-40a1-b140-ec6ed4593b78",
"-href": "http://localhost:8080/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"
},
"paymentPlan": {
"-href": "http://localhost:8080/api/marketplace/v1/products/78/editions/450/paymentPlans/552",
"id": "552",
"uuid": "78941742-43e6-4a85-b656-65b2727d515c",
"frequency": "MONTHLY",
"contract": {
"blockContractDowngrades": "false",
"blockContractUpgrades": "false",
"blockSwitchToShorterContract": "false"
},
"allowCustomUsage": "false",
"keepBillDateOnUsageChange": "false",
"separatePrepaid": "false",
"isPrimaryPrice": "false"
},
"paymentPlanId": "552",
"activated": "false",
"orderLines": {[
{
"description": "LATEST AUTO_WEBAPP_NEW - Free Trial 15 Days No Grace Period - Monthly Fee",
"id": "2430",
"price": "0.0000000000",
"quantity": "1.0000000000",
"totalPrice": "0.0000000000",
"type": "ITEM",
"unit": "NOT_APPLICABLE"
},
{
"description": "Sales Tax",
"id": "2431",
"percentage": "0.0000000000",
"quantity": "1.0000000000",
"totalPrice": "0.0000000000",
"type": "TAX"
}
]
}
},
"user": {
"-id": "3d4d2342-b7c4-4865-85bd-842f269adae6",
"-href": "http://localhost:8080/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"
},
"company": {
"-id": "a012bb88-c2c5-40a1-b140-ec6ed4593b78",
"-href": "http://localhost:8080/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"
},
"product": {
"-id": "78",
"-href": "http://localhost:8080/api/marketplace/v1/products/78"
},
"edition": {
"-id": "450",
"-href": "http://localhost:8080/api/marketplace/v1/products/78/editions/450"
}
}
  • XML
Status Code: 200 OK
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Encoding: gzip
Content-Length: 1281
Content-Type: application/xml;charset=UTF-8
Date: Sun, 16 Aug 2015 22:42:03 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
Vary: Accept-Encoding
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
<?xml version="1.0" encoding="UTF-8" standalone="yes"?--><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<subscription xmlns:atom="http://www.w3.org/2005/Atom">
<id>efc58da2-d957-46d7-988b-48c7419a8c58</id>
<creationDate>2015-08-12T11:18:59-06:00</creationDate>
<externalAccountId>2217d789-bdce-4c01-bebe-431b44cab478</externalAccountId>
<status>FREE_TRIAL</status>
<maxUsers>1</maxUsers>
<order>
<id>1585</id>
<startDate>2015-08-27T00:00:00-06:00</startDate>
<nextBillingDate>2015-08-27T00:00:00-06:00</nextBillingDate>
<status>ACTIVE</status>>
<frequency>MONTHLY</frequency>
<currency>USD</currency>
<type>NEW</type>
<totalPrice>0.0000000000</totalPrice>
<user id="3d4d2342-b7c4-4865-85bd-842f269adae6" href="http://localhost:8080/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"/>
<company id="a012bb88-c2c5-40a1-b140-ec6ed4593b78" href="http://localhost:8080/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"/>
<paymentPlan href="http://localhost:8080/api/marketplace/v1/products/78/editions/450/paymentPlans/552">
<id>552</id>
<uuid>78941742-43e6-4a85-b656-65b2727d515c</uuid>
<frequency>MONTHLY</frequency>
<contract>
<blockContractDowngrades>false</blockContractDowngrades>
<blockContractUpgrades>false</blockContractUpgrades>
<blockSwitchToShorterContract>false</blockSwitchToShorterContract>
</contract>
<allowCustomUsage>false</allowCustomUsage>
<keepBillDateOnUsageChange>false</keepBillDateOnUsageChange>
<separatePrepaid>false</separatePrepaid>
<isPrimaryPrice>false</isPrimaryPrice>
<costs/>>
</paymentPlan>
<paymentPlanId>552</paymentPlanId>
<activated>false</activated>
<oneTimeOrders/>
<orderLines>
<orderLine>
<description>LATEST AUTO_WEBAPP_NEW - Free Trial 15 Days No Grace Period - Monthly Fee</description>
<id>2430</id>
<price>0.0000000000</price>
<quantity>1.0000000000</quantity>
<totalPrice>0.0000000000</totalPrice>
<type>ITEM</type>
<unit>NOT_APPLICABLE</unit>
</orderLine>
<orderLine>
<description>Sales Tax</description>
<id>2431</id>
<percentage>0.0000000000</percentage>
<quantity>1.0000000000</quantity>
<totalPrice>0.0000000000</totalPrice>
<type>TAX</type>
</orderLine>
</orderLines>
<parameters/>
</order>
<user id="3d4d2342-b7c4-4865-85bd-842f269adae6" href="http://localhost:8080/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"/>
<company id="a012bb88-c2c5-40a1-b140-ec6ed4593b78" href="http://localhost:8080/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"/>
<product id="78" href="http://localhost:8080/api/marketplace/v1/products/78"/>
<edition id="450" href="http://localhost:8080/api/marketplace/v1/products/78/editions/450"/>
</subscription>

Changing a subscription - upgrade free trial to a paid edition

Below is an example of changing a subscription from a free trial edition to a different edition that is paid.

Request

  • JSON
{
"id":"6b9804cd-b2b9-45c2-8487-1e8b9d5fa667",
"order":{
"paymentPlanId":541
}
}
  • XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<subscription>
<id>6b9804cd-b2b9-45c2-8487-1e8b9d5fa667</id>
<order>
<paymentPlanId>541</paymentPlanId>
</order>
</subscription>

Response

  • JSON
Status Code: 200 OK
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Encoding: gzip
Content-Length: 1281
Content-Type: application/xml;charset=UTF-8
Date: Sun, 16 Aug 2015 22:42:03 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
Vary: Accept-Encoding
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
{
"id": "6b9804cd-b2b9-45c2-8487-1e8b9d5fa667",
"creationDate": "2015-08-16T15:56:27-06:00",
"externalAccountId": "5f5aee55-e45d-44c3-bc34-1fd1486f4dbf",
"status": "ACTIVE",
"maxUsers": "1",
"order": {
"id": "1616",
"startDate": "2015-08-16T00:00:00-06:00",
"nextBillingDate": "2015-09-01T00:00:00-06:00",
"status": "ACTIVE",
"frequency": "MONTHLY",
"currency": "USD",
"type": "MIGRATION",
"totalPrice": "10.6300000000",
"user": {
"-id": "3d4d2342-b7c4-4865-85bd-842f269adae6",
"-href": "http://localhost:8080/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"
},
"company": {
"-id": "a012bb88-c2c5-40a1-b140-ec6ed4593b78",
"-href": "http://localhost:8080/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"
},
"paymentPlan": {
"-href": "http://localhost:8080/api/marketplace/v1/products/78/editions/440/paymentPlans/541",
"id": "541",
"uuid": "dcdf76e8-e7d2-4fe3-bc12-f6d03bb4c8b0",
"frequency": "MONTHLY",
"contract": {
"blockContractDowngrades": "false",
"blockContractUpgrades": "false",
"blockSwitchToShorterContract": "false"
},
"allowCustomUsage": "false",
"keepBillDateOnUsageChange": "false",
"separatePrepaid": "false",
"isPrimaryPrice": "false",
"costs": {[
{
"unit": "NOT_APPLICABLE",
"minUnits": "0.0000000000",
"meteredUsage": "false",
"increment": "1.0000000000",
"pricePerIncrement": "false",
"blockContractDecrease": "false",
"blockContractIncrease": "false",
"blockOriginalContractDecrease": "false",
"amount": {
"CAD": "10",
"CHF": "10",
"SEK": "10",
"USD": "10"
}
},
{
"unit": "ONE_TIME_SETUP",
"minUnits": "0.0000000000",
"meteredUsage": "false",
"increment": "1.0000000000",
"pricePerIncrement": "false",
"blockContractDecrease": "false",
"blockContractIncrease": "false",
"blockOriginalContractDecrease": "false",
"amount": {
"CAD": "1.5",
"CHF": "1.5",
"SEK": "1.5",
"USD": "1.5"
}
},
{
"unit": "USER",
"minUnits": "0.0000000000",
"meteredUsage": "false",
"pricePerIncrement": "false",
"blockContractDecrease": "false",
"blockContractIncrease": "false",
"blockOriginalContractDecrease": "false",
"amount": {
"CAD": "5",
"CHF": "5",
"SEK": "5",
"USD": "5"
}
},
{
"unit": "ONE_TIME_SETUP",
"unitDependency": "USER",
"minUnits": "0.0000000000",
"meteredUsage": "false",
"increment": "1.0000000000",
"pricePerIncrement": "false",
"blockContractDecrease": "false",
"blockContractIncrease": "false",
"blockOriginalContractDecrease": "false",
"amount": {
"CAD": "2",
"CHF": "2",
"SEK": "2",
"USD": "2"
}
}
]
}
},
"previousOrder": {
"-id": "1614",
"-href": "http://localhost:8080/api/billing/v1/orders/1614"
},
"paymentPlanId": "541",
"activated": "false",
"oneTimeOrders": {
"oneTimeOrder": {
"id": "1615",
"startDate": "2015-08-16T00:00:00-06:00",
"endDate": "2015-08-16T00:00:00-06:00",
"nextBillingDate": "2015-08-16T16:42:03-06:00",
"status": "ONE_TIME",
"frequency": "ONE_TIME",
"currency": "USD",
"type": "ONE_TIME_FEE",
"totalPrice": "1.5900000000",
"paymentPlan": {
"-id": "541",
"-href": "http://localhost:8080/api/marketplace/v1/products/78/editions/440/paymentPlans/541"
}
}
},
"orderLines": {[
{
"description": "LATEST AUTO_WEBAPP_NEW - Recurring edition all fees except contract - Monthly Fee",
"id": "2509",
"price": "10.0000000000",
"quantity": "1.0000000000",
"totalPrice": "10.0000000000",
"type": "ITEM",
"unit": "NOT_APPLICABLE"
},
{
"description": "Sales Tax",
"id": "2510",
"percentage": "6.3000000000",
"quantity": "1.0000000000",
"totalPrice": "0.6300000000",
"type": "TAX"
}
]
}
},
"user": {
"-id": "3d4d2342-b7c4-4865-85bd-842f269adae6",
"-href": "http://localhost:8080/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"
},
"company": {
"-id": "a012bb88-c2c5-40a1-b140-ec6ed4593b78",
"-href": "http://localhost:8080/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"
},
"product": {
"-id": "78",
"-href": "http://localhost:8080/api/marketplace/v1/products/78"
},
"edition": {
"-id": "440",
"-href": "http://localhost:8080/api/marketplace/v1/products/78/editions/440"
}
}
  • XML
Status Code: 200 OK
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Encoding: gzip
Content-Length: 1281
Content-Type: application/xml;charset=UTF-8
Date: Sun, 16 Aug 2015 22:42:03 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
Vary: Accept-Encoding
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
<?xml version="1.0" encoding="UTF-8" standalone="yes"?--><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<subscription xmlns:atom="https://www.w3.org/2005/Atom">
<id>6b9804cd-b2b9-45c2-8487-1e8b9d5fa667</id>
<creationDate>2015-08-16T15:56:27-06:00</creationDate>
<externalAccountId>5f5aee55-e45d-44c3-bc34-1fd1486f4dbf</externalAccountId>
<status>ACTIVE</status>
<maxUsers>1</maxUsers>
<order>
<id>1616</id>
<startDate>2015-08-16T00:00:00-06:00</startDate>
<nextBillingDate>2015-09-01T00:00:00-06:00</nextBillingDate>
<status>ACTIVE</status>
<frequency>MONTHLY</frequency>
<currency>USD</currency>
<type>MIGRATION</type>
<totalPrice>10.6300000000</totalPrice>
<user id="3d4d2342-b7c4-4865-85bd-842f269adae6" href="https://www.appdirect.com/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"/>
<company id="a012bb88-c2c5-40a1-b140-ec6ed4593b78" href="https://www.appdirect.com/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"/>
<paymentPlan href="https://www.appdirect.com/api/marketplace/v1/products/78/editions/440/paymentPlans/541">
<id>541</id>
<uuid>dcdf76e8-e7d2-4fe3-bc12-f6d03bb4c8b0</uuid>
<frequency>MONTHLY</frequency>
<contract>
<blockContractDowngrades>false</blockContractDowngrades>
<blockContractUpgrades>false</blockContractUpgrades>
<blockSwitchToShorterContract>false</blockSwitchToShorterContract>
</contract>
<allowCustomUsage>false</allowCustomUsage>
<keepBillDateOnUsageChange>false</keepBillDateOnUsageChange>
<separatePrepaid>false</separatePrepaid>
<isPrimaryPrice>false</isPrimaryPrice>
<costs>
<cost>
<unit>NOT_APPLICABLE</unit>
<minUnits>0.0000000000</minUnits>
<meteredUsage>false</meteredUsage>
<increment>1.0000000000</increment>
<pricePerIncrement>false</pricePerIncrement>
<blockContractDecrease>false</blockContractDecrease>
<blockContractIncrease>false</blockContractIncrease>
<blockOriginalContractDecrease>false</blockOriginalContractDecrease>
<amount>
<CAD>10</CAD>
<CHF>10</CHF>
<SEK>10</SEK>
<USD>10</USD>
</amount>
</cost>
<cost>
<unit>ONE_TIME_SETUP</unit>
<minUnits>0.0000000000</minUnits>
<meteredUsage>false</meteredUsage>
<increment>1.0000000000</increment>
<pricePerIncrement>false</pricePerIncrement>
<blockContractDecrease>false</blockContractDecrease>
<blockContractIncrease>false</blockContractIncrease>
<blockOriginalContractDecrease>false</blockOriginalContractDecrease>
<amount>
<CAD>1.5</CAD>
<CHF>1.5</CHF>
<SEK>1.5</SEK>
<USD>1.5</USD>
</amount>
</cost>
<cost>
<unit>USER</unit>
<minUnits>0.0000000000</minUnits>
<meteredUsage>false</meteredUsage>
<pricePerIncrement>false</pricePerIncrement>
<blockContractDecrease>false</blockContractDecrease>
<blockContractIncrease>false</blockContractIncrease>
<blockOriginalContractDecrease>false</blockOriginalContractDecrease>
<amount>
<CAD>5</CAD>
<CHF>5</CHF>
<SEK>5</SEK>
<USD>5</USD>
</amount>
</cost>
<cost>
<unit>ONE_TIME_SETUP</unit>
<unitDependency>USER</unitDependency>
<minUnits>0.0000000000</minUnits>
<meteredUsage>false</meteredUsage>
<increment>1.0000000000</increment>
<pricePerIncrement>false</pricePerIncrement>
<blockContractDecrease>false</blockContractDecrease>
<blockContractIncrease>false</blockContractIncrease>
<blockOriginalContractDecrease>false</blockOriginalContractDecrease>
<amount>
<CAD>2</CAD>
<CHF>2</CHF>
<SEK>2</SEK>
<USD>2</USD>
</amount>
</cost>
</costs>
</paymentPlan>
<previousOrder id="1614" href="https://www.appdirect.com/api/billing/v1/orders/1614"/>
<paymentPlanId>541</paymentPlanId>
<activated>false</activated>
<oneTimeOrders>
<oneTimeOrder>
<id>1615</id>
<startDate>2015-08-16T00:00:00-06:00</startDate>
<endDate>2015-08-16T00:00:00-06:00</endDate>
<nextBillingDate>2015-08-16T16:42:03-06:00</nextBillingDate>
<status>ONE_TIME</status>
<frequency>ONE_TIME</frequency>
<currency>USD</currency>
<type>ONE_TIME_FEE</type>
<totalPrice>1.5900000000</totalPrice>
<paymentPlan id="541" href="https://www.appdirect.com/api/marketplace/v1/products/78/editions/440/paymentPlans/541"/>
</oneTimeOrder>
</oneTimeOrders>
<orderLines>
<orderLine>
<description>LATEST AUTO_WEBAPP_NEW - Recurring edition all fees except contract - Monthly Fee</description>
<id>2509</id>
<price>10.0000000000</price>
<quantity>1.0000000000</quantity>
<totalPrice>10.0000000000</totalPrice>
<type>ITEM</type>
<unit>NOT_APPLICABLE</unit>
</orderLine>
<orderLine>
<description>Sales Tax</description>
<id>2510</id>
<percentage>6.3000000000</percentage>
<quantity>1.0000000000</quantity>
<totalPrice>0.6300000000</totalPrice>
<type>TAX</type>
</orderLine>
</orderLines>
<parameters/>
</order>
<user id="3d4d2342-b7c4-4865-85bd-842f269adae6" href="https://www.appdirect.com/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"/>
<company id="a012bb88-c2c5-40a1-b140-ec6ed4593b78" href="https://www.appdirect.com/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"/>
<product id="78" href="https://www.appdirect.com/api/marketplace/v1/products/78"/>
<edition id="440" href="https://www.appdirect.com/api/marketplace/v1/products/78/editions/440"/>
</subscription>

Changing a free trial subscription to a different free trial

Below is an example of changing a free trial (15 days) subscription to a subscription with a different free trial (10 days). Note that an error is returned because a free trial edition has already been purchased for this product.

Request

  • JSON
{
"order": {
"paymentPlanId": "553"
}
}
  • XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<subscription>
<order>
<paymentPlanId>553</paymentPlanId>
</order>
</subscription>

Response

  • JSON
Status Code: 400 Bad Request
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Connection: close
Content-Length: 191
Content-Type: application/json;charset=UTF-8
Date: Mon, 17 Aug 2015 15:19:44 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
{
"code": "FREE_TRIAL_EDITION_NOT_AVAILABLE",
"message": "Company has already purchased an edition with free trial."
}
  • XML
Status Code: 400 Bad Request
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Connection: close
Content-Length: 191
Content-Type: application/xml;charset=UTF-8
Date: Mon, 17 Aug 2015 15:19:44 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
<?xml version="1.0" encoding="UTF-8" standalone="yes"?--><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<error>
<code>FREE_TRIAL_EDITION_NOT_AVAILABLE</code>
<message>Company has already purchased an edition with free trial.</message>
</error>

Changing a subscription to a one time edition

Below is an example of changing a subscription to one time, flat rate edition.

Request

  • JSON
{
"id": "7845d75c-0fc0-4ec3-ac17-df95a746eff9",
"order": {
"paymentPlanId": "568"
}
}
  • XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<subscription>
<id>7845d75c-0fc0-4ec3-ac17-df95a746eff9</id>
<order>
<paymentPlanId>568</paymentPlanId>
</order>
</subscription>

Response

  • JSON
Status Code: 200 OK
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Encoding: gzip
Content-Length: 1115
Content-Type: application/json;charset=UTF-8
Date: Mon, 17 Aug 2015 16:22:28 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=DE50B3B7CB909A3EE747624B195C2CA3; Path=/; HttpOnly
Vary: Accept-Encoding
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
{
"id": "7845d75c-0fc0-4ec3-ac17-df95a746eff9",
"creationDate": "2015-08-16T17:12:53-06:00",
"externalAccountId": "9fb3765a-1271-4fe3-aa72-92b3468995d6",
"status": "ACTIVE",
"order": {
"id": "1618",
"startDate": "2015-08-17T00:00:00-06:00",
"endDate": "2015-08-17T00:00:00-06:00",
"nextBillingDate": "2015-08-17T10:22:28-06:00",
"status": "ONE_TIME",
"frequency": "ONE_TIME",
"currency": "USD",
"type": "MIGRATION",
"totalPrice": "10.6300000000",
"user": {
"-id": "3d4d2342-b7c4-4865-85bd-842f269adae6",
"-href": "http://localhost:8080/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"
},
"company": {
"-id": "a012bb88-c2c5-40a1-b140-ec6ed4593b78",
"-href": "http://localhost:8080/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"
},
"paymentPlan": {
"-href": "http://localhost:8080/api/marketplace/v1/products/78/editions/465/paymentPlans/568",
"id": "568",
"uuid": "e52ff207-2a17-4c58-85f3-6d49a23136af",
"frequency": "ONE_TIME",
"contract": {
"blockContractDowngrades": "false",
"blockContractUpgrades": "false",
"blockSwitchToShorterContract": "false"
},
"allowCustomUsage": "false",
"keepBillDateOnUsageChange": "false",
"separatePrepaid": "false",
"isPrimaryPrice": "false",
"costs": {
"cost": {
"unit": "NOT_APPLICABLE",
"minUnits": "0.0000000000",
"meteredUsage": "false",
"increment": "1.0000000000",
"pricePerIncrement": "false",
"blockContractDecrease": "false",
"blockContractIncrease": "false",
"blockOriginalContractDecrease": "false",
"amount": {
"CAD": "10",
"CHF": "10",
"EUR": "1",
"SEK": "10",
"USD": "10"
}
}
}
},
"previousOrder": {
"-id": "1617",
"-href": "http://localhost:8080/api/billing/v1/orders/1617"
},
"paymentPlanId": "568",
"activated": "false",
"orderLines": {[
{
"description": "LATEST AUTO_WEBAPP_NEW - One Time - Flat Rate Price - One Time Fee",
"id": "2513",
"price": "10.0000000000",
"quantity": "1.0000000000",
"totalPrice": "10.0000000000",
"type": "ITEM",
"unit": "NOT_APPLICABLE"
},
{
"description": "Sales Tax",
"id": "2514",
"percentage": "6.3000000000",
"quantity": "1.0000000000",
"totalPrice": "0.6300000000",
"type": "TAX"
}
]
}
},
"user": {
"-id": "3d4d2342-b7c4-4865-85bd-842f269adae6",
"-href": "http://localhost:8080/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"
},
"company": {
"-id": "a012bb88-c2c5-40a1-b140-ec6ed4593b78",
"-href": "http://localhost:8080/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"
},
"product": {
"-id": "78",
"-href": "http://localhost:8080/api/marketplace/v1/products/78"
},
"edition": {
"-id": "465",
"-href": "http://localhost:8080/api/marketplace/v1/products/78/editions/465"
}
}
  • XML
Status Code: 200 OK
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Encoding: gzip
Content-Length: 1115
Content-Type: application/xml;charset=UTF-8
Date: Mon, 17 Aug 2015 16:22:28 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=DE50B3B7CB909A3EE747624B195C2CA3; Path=/; HttpOnly
Vary: Accept-Encoding
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
<?xml version="1.0" encoding="UTF-8" standalone="yes"?--><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<subscription xmlns:atom="https://www.w3.org/2005/Atom">
<id>7845d75c-0fc0-4ec3-ac17-df95a746eff9</id>
<creationDate>2015-08-16T17:12:53-06:00</creationDate>
<externalAccountId>9fb3765a-1271-4fe3-aa72-92b3468995d6</externalAccountId>
<status>ACTIVE</status>
<order>
<id>1618</id>
<startDate>2015-08-17T00:00:00-06:00</startDate>
<endDate>2015-08-17T00:00:00-06:00</endDate>
<nextBillingDate>2015-08-17T10:22:28-06:00</nextBillingDate>
<status>ONE_TIME</status>
<frequency>ONE_TIME</frequency>
<currency>USD</currency>
<type>MIGRATION</type>
<totalPrice>10.6300000000</totalPrice>
<user id="3d4d2342-b7c4-4865-85bd-842f269adae6" href="https://www.appdirect.com/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"/>
<company id="a012bb88-c2c5-40a1-b140-ec6ed4593b78" href="https://www.appdirect.com/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"/>
<paymentPlan href="https://www.appdirect.com/api/marketplace/v1/products/78/editions/465/paymentPlans/568">
<id>568</id>
<uuid>e52ff207-2a17-4c58-85f3-6d49a23136af</uuid>
<frequency>ONE_TIME</frequency>
<contract>
<blockContractDowngrades>false</blockContractDowngrades>
<blockContractUpgrades>false</blockContractUpgrades>
<blockSwitchToShorterContract>false</blockSwitchToShorterContract>
</contract>
<allowCustomUsage>false</allowCustomUsage>
<keepBillDateOnUsageChange>false</keepBillDateOnUsageChange>
<separatePrepaid>false</separatePrepaid>
<isPrimaryPrice>false</isPrimaryPrice>
<costs>
<cost>
<unit>NOT_APPLICABLE</unit>
<minUnits>0.0000000000</minUnits>
<meteredUsage>false</meteredUsage>
<increment>1.0000000000</increment>
<pricePerIncrement>false</pricePerIncrement>
<blockContractDecrease>false</blockContractDecrease>
<blockContractIncrease>false</blockContractIncrease>
<blockOriginalContractDecrease>false</blockOriginalContractDecrease>
<amount>
<CAD>10</CAD>
<CHF>10</CHF>
<EUR>1</EUR>
<SEK>10</SEK>
<USD>10</USD>
</amount>
</cost>
</costs>
</paymentPlan>
<previousOrder id="1617" href="https://www.appdirect.com/api/billing/v1/orders/1617"/>
<paymentPlanId>568</paymentPlanId>
<activated>false</activated>
<oneTimeOrders/>
<orderLines>
<orderLine>
<description>LATEST AUTO_WEBAPP_NEW - One Time - Flat Rate Price - One Time Fee</description>
<id>2513</id>
<price>10.0000000000</price>
<quantity>1.0000000000</quantity>
<totalPrice>10.0000000000</totalPrice>
<type>ITEM</type>
<unit>NOT_APPLICABLE</unit>
</orderLine>
<orderLine>
<description>Sales Tax</description>
<id>2514</id>
<percentage>6.3000000000</percentage>
<quantity>1.0000000000</quantity>
<totalPrice>0.6300000000</totalPrice>
<type>TAX</type>
</orderLine>
</orderLines>
<parameters/>
</order>
<user id="3d4d2342-b7c4-4865-85bd-842f269adae6" href="https://www.appdirect.com/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"/>
<company id="a012bb88-c2c5-40a1-b140-ec6ed4593b78" href="https://www.appdirect.com/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"/>
<product id="78" href="https://www.appdirect.com/api/marketplace/v1/products/78"/>
<edition id="465" href="https://www.appdirect.com/api/marketplace/v1/products/78/editions/465"/>
</subscription>

Changing to a recurring subscription with price per unit

Below is an example of changing to a subscription for a recurring edition with USER as a price per unit.

Request

  • JSON
{
"id": "7845d75c-0fc0-4ec3-ac17-df95a746eff9",
"order": {
"paymentPlanId": "565",
"orderLines": [
{
"unit": "USER",
"quantity": 5
}
]
}
}
  • XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<subscription>
<id>7845d75c-0fc0-4ec3-ac17-df95a746eff9</id>
<order>
<paymentPlanId>565</paymentPlanId>
<orderLines>
<orderLine>
<unit>USER</unit>
<quantity>5</quantity>
</orderLine>
</orderLines>
</order>
</subscription>

Response

  • JSON
Status Code: 200 OK
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Encoding: gzip
Content-Length: 1109
Content-Type: application/json;charset=UTF-8
Date: Mon, 17 Aug 2015 17:28:23 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
Vary: Accept-Encoding
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
{
"id": "7845d75c-0fc0-4ec3-ac17-df95a746eff9",
"creationDate": "2015-08-16T17:12:53-06:00",
"externalAccountId": "a2d2d90d-d58e-46b9-bdc8-20e33e289415",
"status": "ACTIVE",
"maxUsers": "6",
"order": {
"id": "1620",
"startDate": "2015-08-17T00:00:00-06:00",
"nextBillingDate": "2015-09-01T00:00:00-06:00",
"status": "ACTIVE",
"frequency": "MONTHLY",
"currency": "USD",
"type": "MIGRATION",
"totalPrice": "53.1300000000",
"user": {
"-id": "3d4d2342-b7c4-4865-85bd-842f269adae6",
"-href": "http://localhost:8080/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"
},
"company": {
"-id": "a012bb88-c2c5-40a1-b140-ec6ed4593b78",
"-href": "http://localhost:8080/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"
},
"paymentPlan": {
"-href": "http://localhost:8080/api/marketplace/v1/products/78/editions/462/paymentPlans/565",
"id": "565",
"uuid": "a8c0b5d3-640f-4389-ba48-962a29934c06",
"frequency": "MONTHLY",
"contract": {
"blockContractDowngrades": "false",
"blockContractUpgrades": "false",
"blockSwitchToShorterContract": "false"
},
"allowCustomUsage": "false",
"keepBillDateOnUsageChange": "false",
"separatePrepaid": "false",
"isPrimaryPrice": "false",
"costs": {
"cost": {
"unit": "USER",
"minUnits": "0.0000000000",
"meteredUsage": "false",
"pricePerIncrement": "false",
"blockContractDecrease": "false",
"blockContractIncrease": "false",
"blockOriginalContractDecrease": "false",
"amount": {
"CAD": "10",
"CHF": "10",
"EUR": "1",
"SEK": "10",
"USD": "10"
}
}
}
},
"previousOrder": {
"-id": "1619",
"-href": "http://localhost:8080/api/billing/v1/orders/1619"
},
"paymentPlanId": "565",
"activated": "false",
"orderLines": [
{
"description": "LATEST AUTO_WEBAPP_NEW - Recurring Edition - Price Per Unit - Per User Fee",
"id": "2518",
"price": "10.0000000000",
"quantity": "5.0000000000",
"totalPrice": "50.0000000000",
"type": "ITEM",
"unit": "USER"
},
{
"description": "Sales Tax",
"id": "2519",
"percentage": "6.2600000000",
"quantity": "1.0000000000",
"totalPrice": "3.1300000000",
"type": "TAX"
}
]
},
"user": {
"-id": "3d4d2342-b7c4-4865-85bd-842f269adae6",
"-href": "http://localhost:8080/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"
},
"company": {
"-id": "a012bb88-c2c5-40a1-b140-ec6ed4593b78",
"-href": "http://localhost:8080/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"
},
"product": {
"-id": "78",
"-href": "http://localhost:8080/api/marketplace/v1/products/78"
},
"edition": {
"-id": "462",
"-href": "http://localhost:8080/api/marketplace/v1/products/78/editions/462"
}
}
  • XML
Status Code: 200 OK
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Encoding: gzip
Content-Length: 1109
Content-Type: application/xml;charset=UTF-8
Date: Mon, 17 Aug 2015 17:28:23 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
Vary: Accept-Encoding
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
<?xml version="1.0" encoding="UTF-8" standalone="yes"?--><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<subscription xmlns:atom="https://www.w3.org/2005/Atom">
<id>7845d75c-0fc0-4ec3-ac17-df95a746eff9</id>
<creationDate>2015-08-16T17:12:53-06:00</creationDate>
<externalAccountId>a2d2d90d-d58e-46b9-bdc8-20e33e289415</externalAccountId>
<status>ACTIVE</status>
<maxUsers>6</maxUsers>
<order>
<id>1620</id>
<startDate>2015-08-17T00:00:00-06:00</startDate>
<nextBillingDate>2015-09-01T00:00:00-06:00</nextBillingDate>
<status>ACTIVE</status>
<frequency>MONTHLY</frequency>
<currency>USD</currency>
<type>MIGRATION</type>
<totalPrice>53.1300000000</totalPrice>
<user id="3d4d2342-b7c4-4865-85bd-842f269adae6" href="https://www.appdirect.com/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"/>
<company id="a012bb88-c2c5-40a1-b140-ec6ed4593b78" href="https://www.appdirect.com/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"/>
<paymentPlan href="https://www.appdirect.com/api/marketplace/v1/products/78/editions/462/paymentPlans/565">
<id>565</id>
<uuid>a8c0b5d3-640f-4389-ba48-962a29934c06</uuid>
<frequency>MONTHLY</frequency>
<contract>
<blockContractDowngrades>false</blockContractDowngrades>
<blockContractUpgrades>false</blockContractUpgrades>
<blockSwitchToShorterContract>false</blockSwitchToShorterContract>
</contract>
<allowCustomUsage>false</allowCustomUsage>
<keepBillDateOnUsageChange>false</keepBillDateOnUsageChange>
<separatePrepaid>false</separatePrepaid>
<isPrimaryPrice>false</isPrimaryPrice>
<costs>
<cost>
<unit>USER</unit>
<minUnits>0.0000000000</minUnits>
<meteredUsage>false</meteredUsage>
<pricePerIncrement>false</pricePerIncrement>
<blockContractDecrease>false</blockContractDecrease>
<blockContractIncrease>false</blockContractIncrease>
<blockOriginalContractDecrease>false</blockOriginalContractDecrease>
<amount>
<CAD>10</CAD>
<CHF>10</CHF>
<EUR>1</EUR>
<SEK>10</SEK>
<USD>10</USD>
</amount>
</cost>
</costs>
</paymentPlan>
<previousOrder id="1619" href="https://www.appdirect.com/api/billing/v1/orders/1619"/>
<paymentPlanId>565</paymentPlanId>
<activated>false</activated>
<oneTimeOrders/>
<orderLines>
<orderLine>
<description>LATEST AUTO_WEBAPP_NEW - Recurring Edition - Price Per Unit - Per User Fee</description>
<id>2518</id>
<price>10.0000000000</price>
<quantity>5.0000000000</quantity>
<totalPrice>50.0000000000</totalPrice>
<type>ITEM</type>
<unit>USER</unit>
</orderLine>
<orderLine>
<description>Sales Tax</description>
<id>2519</id>
<percentage>6.2600000000</percentage>
<quantity>1.0000000000</quantity>
<totalPrice>3.1300000000</totalPrice>
<type>TAX</type>
</orderLine>
</orderLines>
<parameters/>
</order>
<user id="3d4d2342-b7c4-4865-85bd-842f269adae6" href="https://www.appdirect.com/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"/>
<company id="a012bb88-c2c5-40a1-b140-ec6ed4593b78" href="https://www.appdirect.com/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"/>
<product id="78" href="https://www.appdirect.com/api/marketplace/v1/products/78"/>
<edition id="462" href="https://www.appdirect.com/api/marketplace/v1/products/78/editions/462"/>
</subscription>

Changing a subscription with price per unit - upgrade

Below is an example of changing a subscription for a recurring price per unit edition upgrading (increasing) the number of users.

Request

  • JSON
{
"id": "7845d75c-0fc0-4ec3-ac17-df95a746eff9",
"order": {
"paymentPlanId": "565",
"orderLines": [
{
"unit": "USER",
"quantity": 10
}
]
}
}
  • XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<subscription>
<id>7845d75c-0fc0-4ec3-ac17-df95a746eff9</id>
<order>
<paymentPlanId>565</paymentPlanId>
<orderLines>
<orderLine>
<unit>USER</unit>
<quantity>10</quantity>
</orderLine>
</orderLines>
</order>
</subscription>

Response

  • JSON
Status Code: 200 OK
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Encoding: gzip
Content-Length: 1109
Content-Type: application/json;charset=UTF-8
Date: Mon, 17 Aug 2015 17:28:23 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
Vary: Accept-Encoding
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
{
"id": "7845d75c-0fc0-4ec3-ac17-df95a746eff9",
"creationDate": "2015-08-16T17:12:53-06:00",
"externalAccountId": "930f48bf-0aac-41fb-a6e9-58df4f573d72",
"status": "ACTIVE",
"maxUsers": "11",
"order": {
"id": "1622",
"startDate": "2015-08-17T00:00:00-06:00",
"nextBillingDate": "2015-09-01T00:00:00-06:00",
"status": "ACTIVE",
"frequency": "MONTHLY",
"currency": "USD",
"type": "MIGRATION",
"totalPrice": "106.2500000000",
"user": {
"-id": "3d4d2342-b7c4-4865-85bd-842f269adae6",
"-href": "http://localhost:8080/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"
},
"company": {
"-id": "a012bb88-c2c5-40a1-b140-ec6ed4593b78",
"-href": "http://localhost:8080/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"
},
"paymentPlan": {
"-href": "http://localhost:8080/api/marketplace/v1/products/78/editions/462/paymentPlans/565",
"id": "565",
"uuid": "a8c0b5d3-640f-4389-ba48-962a29934c06",
"frequency": "MONTHLY",
"contract": {
"blockContractDowngrades": "false",
"blockContractUpgrades": "false",
"blockSwitchToShorterContract": "false"
},
"allowCustomUsage": "false",
"keepBillDateOnUsageChange": "false",
"separatePrepaid": "false",
"isPrimaryPrice": "false",
"costs": {
"cost": {
"unit": "USER",
"minUnits": "0.0000000000",
"meteredUsage": "false",
"pricePerIncrement": "false",
"blockContractDecrease": "false",
"blockContractIncrease": "false",
"blockOriginalContractDecrease": "false",
"amount": {
"CAD": "10",
"CHF": "10",
"EUR": "1",
"SEK": "10",
"USD": "10"
}
}
}
},
"previousOrder": {
"-id": "1620",
"-href": "http://localhost:8080/api/billing/v1/orders/1620"
},
"paymentPlanId": "565",
"activated": "false",
"oneTimeOrders": {
"oneTimeOrder": {
"id": "1621",
"startDate": "2015-08-17T00:00:00-06:00",
"endDate": "2015-09-01T00:00:00-06:00",
"nextBillingDate": "2015-09-01T00:00:00-06:00",
"status": "ONE_TIME",
"frequency": "MONTHLY",
"currency": "USD",
"type": "CREDIT",
"totalPrice": "-53.1300000000",
"paymentPlan": {
"-id": "565",
"-href": "http://localhost:8080/api/marketplace/v1/products/78/editions/462/paymentPlans/565"
}
}
},
"orderLines": [
{
"description": "LATEST AUTO_WEBAPP_NEW - Recurring Edition - Price Per Unit - Per User Fee",
"id": "2522",
"price": "10.0000000000",
"quantity": "10.0000000000",
"totalPrice": "100.0000000000",
"type": "ITEM",
"unit": "USER"
},
{
"description": "Sales Tax",
"id": "2523",
"percentage": "6.2500000000",
"quantity": "1.0000000000",
"totalPrice": "6.2500000000",
"type": "TAX"
}
]
},
"user": {
"-id": "3d4d2342-b7c4-4865-85bd-842f269adae6",
"-href": "http://localhost:8080/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"
},
"company": {
"-id": "a012bb88-c2c5-40a1-b140-ec6ed4593b78",
"-href": "http://localhost:8080/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"
},
"product": {
"-id": "78",
"-href": "http://localhost:8080/api/marketplace/v1/products/78"
},
"edition": {
"-id": "462",
"-href": "http://localhost:8080/api/marketplace/v1/products/78/editions/462"
}
}
  • XML
Status Code: 200 OK
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Encoding: gzip
Content-Length: 1161
Content-Type: application/xml;charset=UTF-8
Date: Mon, 17 Aug 2015 17:28:23 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
Vary: Accept-Encoding
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
<?xml version="1.0" encoding="UTF-8" standalone="yes"?--><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<subscription xmlns:atom="http://www.w3.org/2005/Atom">
<id>7845d75c-0fc0-4ec3-ac17-df95a746eff9</id>
<creationDate>2015-08-16T17:12:53-06:00</creationDate>
<externalAccountId>930f48bf-0aac-41fb-a6e9-58df4f573d72</externalAccountId>
<status>ACTIVE</status>
<maxUsers>11</maxUsers>
<order>
<id>1622</id>
<startDate>2015-08-17T00:00:00-06:00</startDate>
<nextBillingDate>2015-09-01T00:00:00-06:00</nextBillingDate>
<status>ACTIVE</status>
<frequency>MONTHLY</frequency>
<currency>USD</currency>
<type>MIGRATION</type>
<totalPrice>106.2500000000</totalPrice>
<user id="3d4d2342-b7c4-4865-85bd-842f269adae6" href="https://www.appdirect.com/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"/>
<company id="a012bb88-c2c5-40a1-b140-ec6ed4593b78" href="https://www.appdirect.com/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"/>
<paymentPlan href="https://www.appdirect.com/api/marketplace/v1/products/78/editions/462/paymentPlans/565">
<id>565</id>
<uuid>a8c0b5d3-640f-4389-ba48-962a29934c06</uuid>
<frequency>MONTHLY</frequency>
<contract>
<blockContractDowngrades>false</blockContractDowngrades>
<blockContractUpgrades>false</blockContractUpgrades>
<blockSwitchToShorterContract>false</blockSwitchToShorterContract>
</contract>
<allowCustomUsage>false</allowCustomUsage>
<keepBillDateOnUsageChange>false</keepBillDateOnUsageChange>
<separatePrepaid>false</separatePrepaid>
<isPrimaryPrice>false</isPrimaryPrice>
<costs>
<cost>
<unit>USER</unit>
<minUnits>0.0000000000</minUnits>
<meteredUsage>false</meteredUsage>
<pricePerIncrement>false</pricePerIncrement>
<blockContractDecrease>false</blockContractDecrease>
<blockContractIncrease>false</blockContractIncrease>
<blockOriginalContractDecrease>false</blockOriginalContractDecrease>
<amount>
<CAD>10</CAD>
<CHF>10</CHF>
<EUR>1</EUR>
<SEK>10</SEK>
<USD>10</USD>
</amount>
</cost>
</costs>
</paymentPlan>
<previousOrder id="1620" href="https://www.appdirect.com/api/billing/v1/orders/1620"/>
<paymentPlanId>565</paymentPlanId>
<activated>false</activated>
<oneTimeOrders>
<oneTimeOrder>
<id>1621</id>
<startDate>2015-08-17T00:00:00-06:00</startDate>
<endDate>2015-09-01T00:00:00-06:00</endDate>
<nextBillingDate>2015-09-01T00:00:00-06:00</nextBillingDate>
<status>ONE_TIME</status>
<frequency>MONTHLY</frequency>
<currency>USD</currency>
<type>CREDIT</type>
<totalPrice>-53.1300000000</totalPrice>
<paymentPlan id="565" href="https://www.appdirect.com/api/marketplace/v1/products/78/editions/462/paymentPlans/565"/>
</oneTimeOrder>
</oneTimeOrders>
<orderLines>
<orderLine>
<description>LATEST AUTO_WEBAPP_NEW - Recurring Edition - Price Per Unit - Per User Fee</description>
<id>2522</id>
<price>10.0000000000</price>
<quantity>10.0000000000</quantity>
<totalPrice>100.0000000000</totalPrice>
<type>ITEM</type>
<unit>USER</unit>
</orderLine>
<orderLine>
<description>Sales Tax</description>
<id>2523</id>
<percentage>6.2500000000</percentage>
<quantity>1.0000000000</quantity>
<totalPrice>6.2500000000</totalPrice>
<type>TAX</type>
</orderLine>
</orderLines>
<parameters/>
</order>
<user id="3d4d2342-b7c4-4865-85bd-842f269adae6" href="https://www.appdirect.com/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"/>
<company id="a012bb88-c2c5-40a1-b140-ec6ed4593b78" href="https://www.appdirect.com/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"/>
<product id="78" href="https://www.appdirect.com/api/marketplace/v1/products/78"/>
<edition id="462" href="https://www.appdirect.com/api/marketplace/v1/products/78/editions/462"/>
</subscription>

Changing a subscription with price per unit - downgrade

Below is an example of changing a subscription for a recurring price per unit edition downgrading (descreasing) the number of users.

Request

  • JSON
{
"id": "7845d75c-0fc0-4ec3-ac17-df95a746eff9",
"order": {
"paymentPlanId": "565",
"orderLines": [
{
"unit": "USER",
"quantity": 3
}
]
}
}
  • XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<subscription>
<id>7845d75c-0fc0-4ec3-ac17-df95a746eff9</id>
<order>
<paymentPlanId>565</paymentPlanId>
<orderLines>
<orderLine>
<unit>USER</unit>
<quantity>3</quantity>
</orderLine>
</orderLines>
</order>
</subscription>

Response

  • JSON
Status Code: 200 OK
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Encoding: gzip
Content-Length: 1109
Content-Type: application/json;charset=UTF-8
Date: Mon, 17 Aug 2015 17:28:23 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
Vary: Accept-Encoding
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
{
"id": "7845d75c-0fc0-4ec3-ac17-df95a746eff9",
"creationDate": "2015-08-16T17:12:53-06:00",
"externalAccountId": "6b4a3289-c864-4f41-8a63-95e1abcacaea",
"status": "ACTIVE",
"maxUsers": "4",
"order": {
"id": "1624",
"startDate": "2015-08-17T00:00:00-06:00",
"nextBillingDate": "2015-09-01T00:00:00-06:00",
"status": "ACTIVE",
"frequency": "MONTHLY",
"currency": "USD",
"type": "MIGRATION",
"totalPrice": "31.8800000000",
"user": {
"-id": "3d4d2342-b7c4-4865-85bd-842f269adae6",
"-href": "http://localhost:8080/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"
},
"company": {
"-id": "a012bb88-c2c5-40a1-b140-ec6ed4593b78",
"-href": "http://localhost:8080/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"
},
"paymentPlan": {
"-href": "http://localhost:8080/api/marketplace/v1/products/78/editions/462/paymentPlans/565",
"id": "565",
"uuid": "a8c0b5d3-640f-4389-ba48-962a29934c06",
"frequency": "MONTHLY",
"contract": {
"blockContractDowngrades": "false",
"blockContractUpgrades": "false",
"blockSwitchToShorterContract": "false"
},
"allowCustomUsage": "false",
"keepBillDateOnUsageChange": "false",
"separatePrepaid": "false",
"isPrimaryPrice": "false",
"costs": {
"cost": {
"unit": "USER",
"minUnits": "0.0000000000",
"meteredUsage": "false",
"pricePerIncrement": "false",
"blockContractDecrease": "false",
"blockContractIncrease": "false",
"blockOriginalContractDecrease": "false",
"amount": {
"CAD": "10",
"CHF": "10",
"EUR": "1",
"SEK": "10",
"USD": "10"
}
}
}
},
"previousOrder": {
"-id": "1622",
"-href": "http://localhost:8080/api/billing/v1/orders/1622"
},
"paymentPlanId": "565",
"activated": "false",
"oneTimeOrders": {
"oneTimeOrder": {
"id": "1623",
"startDate": "2015-08-17T00:00:00-06:00",
"endDate": "2015-09-01T00:00:00-06:00",
"nextBillingDate": "2015-09-01T00:00:00-06:00",
"status": "ONE_TIME",
"frequency": "MONTHLY",
"currency": "USD",
"type": "CREDIT",
"totalPrice": "-106.2500000000",
"paymentPlan": {
"-id": "565",
"-href": "http://localhost:8080/api/marketplace/v1/products/78/editions/462/paymentPlans/565"
}
}
},
"orderLines": [
{
"description": "LATEST AUTO_WEBAPP_NEW - Recurring Edition - Price Per Unit - Per User Fee",
"id": "2526",
"price": "10.0000000000",
"quantity": "3.0000000000",
"totalPrice": "30.0000000000",
"type": "ITEM",
"unit": "USER"
},
{
"description": "Sales Tax",
"id": "2527",
"percentage": "6.2666666700",
"quantity": "1.0000000000",
"totalPrice": "1.8800000000",
"type": "TAX"
}
]
},
"user": {
"-id": "3d4d2342-b7c4-4865-85bd-842f269adae6",
"-href": "http://localhost:8080/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"
},
"company": {
"-id": "a012bb88-c2c5-40a1-b140-ec6ed4593b78",
"-href": "http://localhost:8080/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"
},
"product": {
"-id": "78",
"-href": "http://localhost:8080/api/marketplace/v1/products/78"
},
"edition": {
"-id": "462",
"-href": "http://localhost:8080/api/marketplace/v1/products/78/editions/462"

}
  • XML
Status Code: 200 OK
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Encoding: gzip
Content-Length: 1167
Content-Type: application/xml;charset=UTF-8
Date: Mon, 17 Aug 2015 19:05:34 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
Vary: Accept-Encoding
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
<?xml version="1.0" encoding="UTF-8" standalone="yes"?--><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<subscription xmlns:atom="http://www.w3.org/2005/Atom">
<id>7845d75c-0fc0-4ec3-ac17-df95a746eff9</id>
<creationDate>2015-08-16T17:12:53-06:00</creationDate>
<externalAccountId>6b4a3289-c864-4f41-8a63-95e1abcacaea</externalAccountId>
<status>ACTIVE</status>
<maxUsers>4</maxUsers>
<order>
<id>1624</id>
<startDate>2015-08-17T00:00:00-06:00</startDate>
<nextBillingDate>2015-09-01T00:00:00-06:00</nextBillingDate>
<status>ACTIVE</status>
<frequency>MONTHLY</frequency>
<currency>USD</currency>
<type>MIGRATION</type>
<totalPrice>31.8800000000</totalPrice>
<user id="3d4d2342-b7c4-4865-85bd-842f269adae6" href="https://www.appdirect.com/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"/>
<company id="a012bb88-c2c5-40a1-b140-ec6ed4593b78" href="https://www.appdirect.com/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"/>
<paymentPlan href="https://www.appdirect.com/api/marketplace/v1/products/78/editions/462/paymentPlans/565">
<id>565</id>
<uuid>a8c0b5d3-640f-4389-ba48-962a29934c06</uuid>
<frequency>MONTHLY</frequency>
<contract>
<blockContractDowngrades>false</blockContractDowngrades>
<blockContractUpgrades>false</blockContractUpgrades>
<blockSwitchToShorterContract>false</blockSwitchToShorterContract>
</contract>
<allowCustomUsage>false</allowCustomUsage>
<keepBillDateOnUsageChange>false</keepBillDateOnUsageChange>
<separatePrepaid>false</separatePrepaid>
<isPrimaryPrice>false</isPrimaryPrice>
<costs>
<cost>
<unit>USER</unit>
<minUnits>0.0000000000</minUnits>
<meteredUsage>false</meteredUsage>
<pricePerIncrement>false</pricePerIncrement>
<blockContractDecrease>false</blockContractDecrease>
<blockContractIncrease>false</blockContractIncrease>
<blockOriginalContractDecrease>false</blockOriginalContractDecrease>
<amount>
<CAD>10</CAD>
<CHF>10</CHF>
<EUR>1</EUR>
<SEK>10</SEK>
<USD>10</USD>
</amount>
</cost>
</costs>
</paymentPlan>
<previousOrder id="1622" href="https://www.appdirect.com/api/billing/v1/orders/1622"/>
<paymentPlanId>565</paymentPlanId>
<activated>false</activated>
<oneTimeOrders>
<oneTimeOrder>
<id>1623</id>
<startDate>2015-08-17T00:00:00-06:00</startDate>
<endDate>2015-09-01T00:00:00-06:00</endDate>
<nextBillingDate>2015-09-01T00:00:00-06:00</nextBillingDate>
<status>ONE_TIME</status>
<frequency>MONTHLY</frequency>
<currency>USD</currency>
<type>CREDIT</type>
<totalPrice>-106.2500000000</totalPrice>
<paymentPlan id="565" href="https://www.appdirect.com/api/marketplace/v1/products/78/editions/462/paymentPlans/565"/>
</oneTimeOrder>
</oneTimeOrders>
<orderLines>
<orderLine>
<description>LATEST AUTO_WEBAPP_NEW - Recurring Edition - Price Per Unit - Per User Fee</description>
<id>2526</id>
<price>10.0000000000</price>
<quantity>3.0000000000</quantity>
<totalPrice>30.0000000000</totalPrice>
<type>ITEM</type>
<unit>USER</unit>
</orderLine>
<orderLine>
<description>Sales Tax</description>
<id>2527</id>
<percentage>6.2666666700</percentage>
<quantity>1.0000000000</quantity>
<totalPrice>1.8800000000</totalPrice>
<type>TAX</type>
</orderLine>
</orderLines>
<parameters/>
</order>
<user id="3d4d2342-b7c4-4865-85bd-842f269adae6" href="https://www.appdirect.com/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"/>
<company id="a012bb88-c2c5-40a1-b140-ec6ed4593b78" href="https://www.appdirect.com/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"/>
<product id="78" href="https://www.appdirect.com/api/marketplace/v1/products/78"/>
<edition id="462" href="https://www.appdirect.com/api/marketplace/v1/products/78/editions/462"/>
</subscription>

Changing a subscription to add a discount

Below is an example of changing a subscription to apply a discount.

Request

  • JSON
{
"id": "7845d75c-0fc0-4ec3-ac17-df95a746eff9",
"order": {
"paymentPlanId": "565"
"discountId": "27"
}
}
  • XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<subscription>
<id>7845d75c-0fc0-4ec3-ac17-df95a746eff9</id>
<order>
<paymentPlanId>565</paymentPlanId>
<discountId>27</discountId>
</order>
</subscription>

Response

  • JSON
Status Code: 200 OK
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Encoding: gzip
Content-Length: 1136
Content-Type: application/json;charset=UTF-8
Date: Mon, 17 Aug 2015 16:50:46 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
Vary: Accept-Encoding
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
{
"id": "7845d75c-0fc0-4ec3-ac17-df95a746eff9",
"creationDate": "2015-08-16T17:12:53-06:00",
"externalAccountId": "906dc4e6-b2fe-4567-95a3-03c1bc4a99b3",
"status": "ACTIVE",
"maxUsers": "1",
"order": {
"id": "1626",
"startDate": "2015-08-17T00:00:00-06:00",
"nextBillingDate": "2015-09-01T00:00:00-06:00",
"status": "ACTIVE",
"frequency": "MONTHLY",
"currency": "USD",
"type": "MIGRATION",
"totalPrice": "-5.0000000000",
"user": {
"-id": "3d4d2342-b7c4-4865-85bd-842f269adae6",
"-href": "http://localhost:8080/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"
},
"company": {
"-id": "a012bb88-c2c5-40a1-b140-ec6ed4593b78",
"-href": "http://localhost:8080/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"
},
"paymentPlan": {
"-href": "http://localhost:8080/api/marketplace/v1/products/78/editions/462/paymentPlans/565",
"id": "565",
"uuid": "a8c0b5d3-640f-4389-ba48-962a29934c06",
"frequency": "MONTHLY",
"contract": {
"blockContractDowngrades": "false",
"blockContractUpgrades": "false",
"blockSwitchToShorterContract": "false"
},
"allowCustomUsage": "false",
"keepBillDateOnUsageChange": "false",
"separatePrepaid": "false",
"isPrimaryPrice": "false",
"costs": {
"cost": {
"unit": "USER",
"minUnits": "0.0000000000",
"meteredUsage": "false",
"pricePerIncrement": "false",
"blockContractDecrease": "false",
"blockContractIncrease": "false",
"blockOriginalContractDecrease": "false",
"amount": {
"CAD": "10",
"CHF": "10",
"EUR": "1",
"SEK": "10",
"USD": "10"
}
}
}
},
"previousOrder": {
"-id": "1624",
"-href": "http://localhost:8080/api/billing/v1/orders/1624"
},
"discount": {
"-id": "27",
"-href": "http://localhost:8080/api/channel/v1/discounts/27"
},
"paymentPlanId": "565",
"activated": "false",
"oneTimeOrders": {
"oneTimeOrder": {
"id": "1625",
"startDate": "2015-08-17T00:00:00-06:00",
"endDate": "2015-09-01T00:00:00-06:00",
"nextBillingDate": "2015-09-01T00:00:00-06:00",
"status": "ONE_TIME",
"frequency": "MONTHLY",
"currency": "USD",
"type": "CREDIT",
"totalPrice": "-31.8800000000",
"paymentPlan": {
"-id": "565",
"-href": "http://localhost:8080/api/marketplace/v1/products/78/editions/462/paymentPlans/565"
}
}
},
"orderLines":[
{
"description": "autoApply attribute is true",
"id": "2530",
"price": "-5.0000000000",
"quantity": "1.0000000000",
"totalPrice": "-5.0000000000",
"type": "DISCOUNT"
},
{
"description": "Sales Tax",
"id": "2531",
"percentage": "0.0000000000",
"quantity": "1.0000000000",
"totalPrice": "0.0000000000",
"type": "TAX"
}
]
},
"user": {
"-id": "3d4d2342-b7c4-4865-85bd-842f269adae6",
"-href": "http://localhost:8080/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"
},
"company": {
"-id": "a012bb88-c2c5-40a1-b140-ec6ed4593b78",
"-href": "http://localhost:8080/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"
},
"product": {
"-id": "78",
"-href": "http://localhost:8080/api/marketplace/v1/products/78"
},
"edition": {
"-id": "462",
"-href": "http://localhost:8080/api/marketplace/v1/products/78/editions/462"
}
}
  • XML
Status Code: 200 OK
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Encoding: gzip
Content-Length: 1183
Content-Type: application/xml;charset=UTF-8
Date: Mon, 17 Aug 2015 16:50:46 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
Vary: Accept-Encoding
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
<?xml version="1.0" encoding="UTF-8" standalone="yes"?--><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<subscription xmlns:atom="http://www.w3.org/2005/Atom">
<id>7845d75c-0fc0-4ec3-ac17-df95a746eff9</id>
<creationDate>2015-08-16T17:12:53-06:00</creationDate>
<externalAccountId>906dc4e6-b2fe-4567-95a3-03c1bc4a99b3</externalAccountId>
<status>ACTIVE</status>
<maxUsers>1</maxUsers>
<order>
<id>1626</id>
<startDate>2015-08-17T00:00:00-06:00</startDate>
<nextBillingDate>2015-09-01T00:00:00-06:00</nextBillingDate>
<status>ACTIVE</status>
<frequency>MONTHLY</frequency>
<currency>USD</currency>
<type>MIGRATION</type>
<totalPrice>-5.0000000000</totalPrice>
<user id="3d4d2342-b7c4-4865-85bd-842f269adae6" href="https://www.appdirect.com/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"/>
<company id="a012bb88-c2c5-40a1-b140-ec6ed4593b78" href="https://www.appdirect.com/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"/>
<paymentPlan href="https://www.appdirect.com/api/marketplace/v1/products/78/editions/462/paymentPlans/565">
<id>565</id>
<uuid>a8c0b5d3-640f-4389-ba48-962a29934c06</uuid>
<frequency>MONTHLY</frequency>
<contract>
<blockContractDowngrades>false</blockContractDowngrades>
<blockContractUpgrades>false</blockContractUpgrades>
<blockSwitchToShorterContract>false</blockSwitchToShorterContract>
</contract>
<allowCustomUsage>false</allowCustomUsage>
<keepBillDateOnUsageChange>false</keepBillDateOnUsageChange>
<separatePrepaid>false</separatePrepaid>
<isPrimaryPrice>false</isPrimaryPrice>
<costs>
<cost>
<unit>USER</unit>
<minUnits>0.0000000000</minUnits>
<meteredUsage>false</meteredUsage>
<pricePerIncrement>false</pricePerIncrement>
<blockContractDecrease>false</blockContractDecrease>
<blockContractIncrease>false</blockContractIncrease>
<blockOriginalContractDecrease>false</blockOriginalContractDecrease>
<amount>
<CAD>10</CAD>
<CHF>10</CHF>
<EUR>1</EUR>
<SEK>10</SEK>
<USD>10</USD>
</amount>
</cost>
</costs>
</paymentPlan>
<previousOrder id="1624" href="https://www.appdirect.com/api/billing/v1/orders/1624"/>
<discount id="27" href="https://www.appdirect.com/api/channel/v1/discounts/27"/>
<paymentPlanId>565</paymentPlanId>
<activated>false</activated>
<oneTimeOrders>
<oneTimeOrder>
<id>1625</id>
<startDate>2015-08-17T00:00:00-06:00</startDate>
<endDate>2015-09-01T00:00:00-06:00</endDate>
<nextBillingDate>2015-09-01T00:00:00-06:00</nextBillingDate>
<status>ONE_TIME</status>
<frequency>MONTHLY</frequency>
<currency>USD</currency>
<type>CREDIT</type>
<totalPrice>-31.8800000000</totalPrice>
<paymentPlan id="565" href="https://www.appdirect.com/api/marketplace/v1/products/78/editions/462/paymentPlans/565"/>
</oneTimeOrder>
</oneTimeOrders>
<orderLines>
<orderLine>
<description>autoApply attribute is true</description>
<id>2530</id>
<price>-5.0000000000</price>
<quantity>1.0000000000</quantity>
<totalPrice>-5.0000000000</totalPrice>
<type>DISCOUNT</type>
</orderLine>
<orderLine>
<description>Sales Tax</description>
<id>2531</id>
<percentage>0.0000000000</percentage>
<quantity>1.0000000000</quantity>
<totalPrice>0.0000000000</totalPrice>
<type>TAX</type>
</orderLine>
</orderLines>
<parameters/>
</order>
<user id="3d4d2342-b7c4-4865-85bd-842f269adae6" href="https://www.appdirect.com/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"/>
<company id="a012bb88-c2c5-40a1-b140-ec6ed4593b78" href="https://www.appdirect.com/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"/>
<product id="78" href="https://www.appdirect.com/api/marketplace/v1/products/78"/>
<edition id="462" href="https://www.appdirect.com/api/marketplace/v1/products/78/editions/462"/>
</subscription>

Changing a subscription to Microsoft products

Below is an example of changing a Microsoft product. The number of users and the edition (payment plan) are both updated.

Request

  • JSON
{
"id":"65c8b5fc-2563-4668-ac85-485b2e06aaac",
"order":{
"paymentPlanId":750,
"orderLines":[{
"unit":"USER",
"quantity":2
}]
}
}
  • XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<subscription>
<id>65c8b5fc-2563-4668-ac85-485b2e06aaac</id>
<order>
<paymentPlanId>750</paymentPlanId>
<orderLines>
<unit>USER</unit>
<quantity>2</quantity>
</orderLines>
</order>
</subscription>

Response

  • JSON
Status Code: 200 OK
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Encoding: gzip
Content-Length: 1088
Content-Type: application/json;charset=UTF-8
Date: Sun, 16 Aug 2015 21:03:06 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
Vary: Accept-Encoding
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
{
"id": "65c8b5fc-2563-4668-ac85-485b2e06aaac",
"creationDate": "2015-08-16T14:47:50-06:00",
"externalAccountId": "b21b8123-bc21-425e-9bbf-4672fc7c1340",
"status": "ACTIVE",
"maxUsers": "4",
"order": {
"id": "1611",
"startDate": "2015-08-16T00:00:00-06:00",
"nextBillingDate": "2015-09-01T00:00:00-06:00",
"status": "ACTIVE",
"frequency": "MONTHLY",
"currency": "USD",
"type": "NEW",
"totalPrice": "42.5100000000",
"user": {
"-id": "3d4d2342-b7c4-4865-85bd-842f269adae6",
"-href": "http://localhost:8080/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"
},
"company": {
"-id": "a012bb88-c2c5-40a1-b140-ec6ed4593b78",
"-href": "http://localhost:8080/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"
},
"paymentPlan": {
"-href": "http://localhost:8080/api/marketplace/v1/products/93/editions/612/paymentPlans/749",
"id": "749",
"uuid": "eb483983-ce47-41a7-b304-e5b6bb89d818",
"frequency": "MONTHLY",
"contract": {
"blockContractDowngrades": "false",
"blockContractUpgrades": "false",
"blockSwitchToShorterContract": "false"
},
"allowCustomUsage": "false",
"keepBillDateOnUsageChange": "false",
"separatePrepaid": "false",
"isPrimaryPrice": "false",
"costs": {
"cost": [
{
"unit": "USER",
"minUnits": "0.0000000000",
"meteredUsage": "false",
"pricePerIncrement": "false",
"blockContractDecrease": "false",
"blockContractIncrease": "false",
"blockOriginalContractDecrease": "false",
"amount": {
"CAD": "10.0000000000",
"CHF": "10.0000000000",
"USD": "10.0000000000"
}
},
{
"unit": "NOT_APPLICABLE",
"minUnits": "0.0000000000",
"meteredUsage": "false",
"pricePerIncrement": "false",
"blockContractDecrease": "false",
"blockContractIncrease": "false",
"blockOriginalContractDecrease": "false",
"amount": {
"CAD": "10.0000000000",
"CHF": "10.0000000000",
"USD": "10.0000000000"
}
}
]
}
},
"paymentPlanId": "749",
"activated": "false",
"orderLines": {[
{
"description": "Office 365 Web Apps - Plan 1 - Monthly Fee",
"id": "2496",
"price": "10.0000000000",
"quantity": "1.0000000000",
"totalPrice": "10.0000000000",
"type": "ITEM",
"unit": "NOT_APPLICABLE"
},
{
"description": "Office 365 Web Apps - Plan 1 - Per User Fee",
"id": "2497",
"price": "10.0000000000",
"quantity": "3.0000000000",
"totalPrice": "30.0000000000",
"type": "ITEM",
"unit": "USER"
},
{
"description": "Sales Tax",
"id": "2498",
"percentage": "6.2750000000",
"quantity": "1.0000000000",
"totalPrice": "2.5100000000",
"type": "TAX"
}
]
}
},
"user": {
"-id": "3d4d2342-b7c4-4865-85bd-842f269adae6",
"-href": "http://localhost:8080/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"
},
"company": {
"-id": "a012bb88-c2c5-40a1-b140-ec6ed4593b78",
"-href": "http://localhost:8080/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"
},
"product": {
"-id": "93",
"-href": "http://localhost:8080/api/marketplace/v1/products/93"
},
"edition": {
"-id": "612",
"-href": "http://localhost:8080/api/marketplace/v1/products/93/editions/612"
}
}
  • XML
Status Code: 200 OK
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Encoding: gzip
Content-Length: 1088
Content-Type: application/xml;charset=UTF-8
Date: Sun, 16 Aug 2015 21:03:06 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
Vary: Accept-Encoding
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<subscription xmlns:atom="https://www.w3.org/2005/Atom">
<id>65c8b5fc-2563-4668-ac85-485b2e06aaac</id>
<creationDate>2015-08-16T14:47:50-06:00</creationDate>
<externalAccountId>b21b8123-bc21-425e-9bbf-4672fc7c1340</externalAccountId>
<status>ACTIVE</status>
<maxUsers>4</maxUsers>
<order>
<id>1611</id>
<startDate>2015-08-16T00:00:00-06:00</startDate>
<nextBillingDate>2015-09-01T00:00:00-06:00</nextBillingDate>
<status>ACTIVE</status>
<frequency>MONTHLY</frequency>
<currency>USD</currency>
<type>NEW</type>
<totalPrice>42.5100000000</totalPrice>
<user id="3d4d2342-b7c4-4865-85bd-842f269adae6" href="https://www.appdirect.com/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"/>
<company id="a012bb88-c2c5-40a1-b140-ec6ed4593b78" href="https://www.appdirect.com/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"/>
<paymentPlan href="https://www.appdirect.com/api/marketplace/v1/products/93/editions/612/paymentPlans/749">
<id>749</id>
<uuid>eb483983-ce47-41a7-b304-e5b6bb89d818</uuid>
<frequency>MONTHLY</frequency>
<contract>
<blockContractDowngrades>false</blockContractDowngrades>
<blockContractUpgrades>false</blockContractUpgrades>
<blockSwitchToShorterContract>false</blockSwitchToShorterContract>
</contract>
<allowCustomUsage>false</allowCustomUsage>
<keepBillDateOnUsageChange>false</keepBillDateOnUsageChange>
<separatePrepaid>false</separatePrepaid>
<isPrimaryPrice>false</isPrimaryPrice>
<costs>
<cost>
<unit>USER</unit>
<minUnits>0.0000000000</minUnits>
<meteredUsage>false</meteredUsage>
<pricePerIncrement>false</pricePerIncrement>
<blockContractDecrease>false</blockContractDecrease>
<blockContractIncrease>false</blockContractIncrease>
<blockOriginalContractDecrease>false</blockOriginalContractDecrease>
<amount>
<CAD>10.0000000000</CAD>
<CHF>10.0000000000</CHF>
<USD>10.0000000000</USD>
</amount>
</cost>
<cost>
<unit>NOT_APPLICABLE</unit>
<minUnits>0.0000000000</minUnits>
<meteredUsage>false</meteredUsage>
<pricePerIncrement>false</pricePerIncrement>
<blockContractDecrease>false</blockContractDecrease>
<blockContractIncrease>false</blockContractIncrease>
<blockOriginalContractDecrease>false</blockOriginalContractDecrease>
<amount>
<CAD>10.0000000000</CAD>
<CHF>10.0000000000</CHF>
<USD>10.0000000000</USD>
</amount>
</cost>
</costs>
</paymentPlan>
<paymentPlanId>749</paymentPlanId>
<activated>false</activated>
<oneTimeOrders/>
<orderLines>
<orderLine>
<description>Office 365 Web Apps - Plan 1 - Monthly Fee</description>
<id>2496</id>
<price>10.0000000000</price>
<quantity>1.0000000000</quantity>
<totalPrice>10.0000000000</totalPrice>
<type>ITEM</type>
<unit>NOT_APPLICABLE</unit>
</orderLine>
<orderLine>
<description>Office 365 Web Apps - Plan 1 - Per User Fee</description>
<id>2497</id>
<price>10.0000000000</price>
<quantity>3.0000000000</quantity>
<totalPrice>30.0000000000</totalPrice>
<type>ITEM</type>
<unit>USER</unit>
</orderLine>
<orderLine>
<description>Sales Tax</description>
<id>2498</id>
<percentage>6.2750000000</percentage>
<quantity>1.0000000000</quantity>
<totalPrice>2.5100000000</totalPrice>
<type>TAX</type>
</orderLine>
</orderLines>
<parameters/>
</order>
<user id="3d4d2342-b7c4-4865-85bd-842f269adae6" href="https://www.appdirect.com/api/account/v1//users/3d4d2342-b7c4-4865-85bd-842f269adae6"/>
<company id="a012bb88-c2c5-40a1-b140-ec6ed4593b78" href="https://www.appdirect.com/api/account/v1//companies/a012bb88-c2c5-40a1-b140-ec6ed4593b78"/>
<product id="93" href="https://www.appdirect.com/api/marketplace/v1/products/93"/>
<edition id="612" href="https://www.appdirect.com/api/marketplace/v1/products/93/editions/612"/>
</subscription>

Changing a subscription invalid discount

Below is an example of changing a subscription with a bad request caused by invalid data, specifically the discount code not being valid for the application.

Request

  • JSON
{
"id": "902ac86e-89c2-4d02-8d2d-614d2117bd2c",
"order": {
"paymentPlanId": "541",
"discountId": "25"
}
}
  • XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<subscription>
<id>902ac86e-89c2-4d02-8d2d-614d2117bd2c</id>
<order>
<paymentPlanId>749</paymentPlanId>
<discountId>25</discountId>
</order>
</subscription>

Response

  • JSON
Status Code: 400 Bad Request
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Connection: close
Content-Length: 152
Content-Type: application/json;charset=UTF-8
Date: Thu, 13 Aug 2015 01:41:49 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
{
"code": "DISCOUNT_NOT_VALID",
"message": "Discount cannot apply to this order."
}
  • XML
Status Code: 400 Bad Request
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Connection: close
Content-Length: 152
Content-Type: application/xml;charset=UTF-8
Date: Thu, 13 Aug 2015 01:41:49 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<errors>
<error>
<code>DISCOUNT_NOT_VALID</code>
<message>Discount cannot apply to this order.</message>
</error>
</errors>

Changing a subscription missing required data

Below is an example of changing a subscription with a bad request caused by missing required data, specifically the subscription id field.

Request

  • JSON
{
"order": {
"paymentPlanId": "568"
}
}
  • XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<subscription>
<order>
<paymentPlanId>568</paymentPlanId>
</order>
</subscription>;

Response

  • JSON
Status Code: 400 Bad Request
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Connection: close
Content-Length: 152
Content-Type: application/json;charset=UTF-8
Date: Thu, 13 Aug 2015 01:41:49 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
{
"code": "INVALID_PARAMETER",
"message": "Subscription ID does not match."
}
  • XML
Status Code: 400 Bad Request
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Connection: close
Content-Length: 152
Content-Type: application/xml;charset=UTF-8
Date: Thu, 13 Aug 2015 01:41:49 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<errors>
<error>
<code>INVALID_PARAMETER</code>
<message>Subscription ID does not match.</message>
</error>
</errors>

Changing a subscription with a bad request

Below is an example of changing a subscription with a bad request. In this case, the JSON object is missing a curly brace, while the XML is missing a closing tag.

Request

  • JSON
{
"id": "902ac86e-89c2-4d02-8d2d-614d2117bd2c",
"order": {
"paymentPlanId": "568"
}
  • XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<subscription>
<order>
<paymentPlanId>568
</order>
</subscription>

Response

  • JSON
Status Code: 400 Bad Request
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Connection: close
Content-Length: 133
Content-Type: text/json;charset=UTF-8
Date: Thu, 13 Aug 2015 01:29:50 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=36AF57502F9FA7774A5C25DB732DD8BF; Path=/; HttpOnly
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
{
"code": "Bad Request",
"message": "Unexpected end-of-input: expected close marker for OBJECT (from [Source: org.apache.cxf.transport.http.AbstractHTTPDestination$1@41e290f5; line: 1, column: 0])"
}
  • XML
Status Code: 400 Bad Request
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Connection: close
Content-Length: 133
Content-Type: text/xml;charset=UTF-8
Date: Thu, 13 Aug 2015 01:29:50 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=36AF57502F9FA7774A5C25DB732DD8BF; Path=/; HttpOnly
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<errors>
<error>
<code>Bad Request</code>
<message>HTTP 400 Bad Request</message>
</error>
</errors>

Changing a subscription to the same thing

Below is an example of changing a subscription to the same edition with the same options.

Request

  • JSON
{
"id": "902ac86e-89c2-4d02-8d2d-614d2117bd2c",
"order": {
"paymentPlanId": "541",
"orderLines":[ {
"unit": "USER",
"quantity": "3"
}]
}
}
  • XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<subscription>
<id>902ac86e-89c2-4d02-8d2d-614d2117bd2c</id>
<order>
<paymentPlanId>541</paymentPlanId>
<orderLines>
<orderLine>
<unit>>USER</unit>
<quantity>3</quantity>
</orderLine>
</orderLines>
</order>
</subscription>;

Response

  • JSON
Status Code: 409 Conflict
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Length: 166
Content-Type: application/xml;charset=UTF-8
Date: Wed, 12 Aug 2015 23:28:03 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=5F84FC4F9EA36791D38C5E32869DBC29; Path=/; HttpOnly
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
{
"code": "409",
"message": "Already subscribed to this edition."
}
  • XML
Status Code: 409 Conflict
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Length: 140
Content-Type: application/xml;charset=UTF-8
Date: Sat, 15 Aug 2015 19:41:54 GMT
Expires: 0
Pragma: no-cache
Server: Apache-Coyote/1.1
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
x-content-type-options: nosniff
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<error>
<code>409</code>
<message>Already subscribed to this edition.</message>
</error>

Was this page helpful?