AppDirect Subscriptions API
The Subscriptions API from AppDirect — 19 operation(s) for subscriptions.
The Subscriptions API from AppDirect — 19 operation(s) for subscriptions.
openapi: 3.0.0
info:
description: The Companies API allows developers to manage marketplace companies and their user memberships.
title: Companies AI Embed Subscriptions API
license:
name: Apache License, Version 2.0
url: http://www.apache.org/licenses/LICENSE-2.0
version: v296.0-SNAPSHOT
servers:
- url: https://marketplace.appdirect.com/api
- url: https://virtserver.swaggerhub.com
tags:
- name: Subscriptions
x-displayName: Subscriptions
paths:
/account/v2/subscriptions/{subscriptionUuid}/reactivationRequest:
post:
description: 'Send a subscription reactivation request.
This endpoint sends a notification to the subscription owner.
If company-wide billing is enabled, this endpoint also sends a notification to all company administrators (Company Admin and Billing Admin).'
tags:
- Subscriptions
summary: Subscription reactivation request
operationId: resource_Subscription_requestSubscriptionReactivation_POST
x-appdirect-required-scopes:
ROLE_USER:
- Allows access as a member of the company that owns the subscription.
ROLE_CHANNEL_ADMIN:
- Allows access as a Marketplace Manager for the marketplace.
ROLE_CORPORATE_ADMIN:
- Allows access as a Network Manager for the marketplace.
parameters:
- description: Unique identifier of company subscription in the API request
name: subscriptionUuid
in: path
required: true
schema:
type: string
responses:
'200':
description: Success
'401':
description: Unauthorized or subscription not found
x-codeSamples:
- lang: Shell + Curl
source: "curl --request POST \\\n --url https://marketplace.appdirect.com/api/account/v2/subscriptions/%7BsubscriptionUuid%7D/reactivationRequest"
- lang: Node + Request
source: "const request = require('request');\n\nconst options = {\n method: 'POST',\n url: 'https://marketplace.appdirect.com/api/account/v2/subscriptions/%7BsubscriptionUuid%7D/reactivationRequest'\n};\n\nrequest(options, function (error, response, body) {\n if (error) throw new Error(error);\n\n console.log(body);\n});\n"
- lang: Java + Okhttp
source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://marketplace.appdirect.com/api/account/v2/subscriptions/%7BsubscriptionUuid%7D/reactivationRequest\")\n .post(null)\n .build();\n\nResponse response = client.newCall(request).execute();"
/account/v2/subscriptions/{subscriptionUuid}/saml/certificate:
get:
description: Retrieve a subscriptions's public SAML verification certificate.
tags:
- Subscriptions
summary: Read subscription SAML Certificate
operationId: resource_Subscription_readSamlCertificate_GET
x-appdirect-required-scopes:
ROLE_USER:
- Allows access as the user that owns the subscription.
ROLE_BILLING_ADMIN:
- Allows access as a Billing Admin of the company that owns the subscription.
ROLE_CHANNEL_ADMIN:
- Allows access as a Marketplace Manager for the marketplace.
ROLE_CORPORATE_ADMIN:
- Allows access as a Network Manager for the marketplace.
ROLE_PARTNER_READ:
- Allows read access to all marketplace data.
ROLE_CHANNEL_PRODUCT_SUPPORT:
- Allows access as a Product Support agent for the marketplace.
ROLE_APPLICATION:
- Allows access as the Developer that owns the Product.
parameters:
- description: Unique identifier of company subscription in the API request
name: subscriptionUuid
in: path
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
examples:
response:
value: '-----BEGIN CERTIFICATE-----
MIICyDCCAbCgAwIBAgIGAWF7mAIjMA0GCSqGSIb3DQEBBQUAMCUxIzAhBgNVBAoM
GkNPTVBBTllfRU5USVRMRU1FTlQtNzQ1NzI5MB4XDTE4MDIwODE3MjMzNVoXDTIz
MDIwOTE3MjMzNVowJTEjMCEGA1UECgwaQ09NUEFOWV9FTlRJVExFTUVOVC03NDU3
MjkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCQvnSC76Jwsrjw0FDO
MzutqNLyrlww86LiEcDiaGn/Ms6cASbpQFJiA7f5BVbTHCAS4fPQnLcBoZs25OwP
69ibm5hrJlfmZwPVU0Odqd9M/kGmV4U4EDgieH6BcF0cXwpJ8OeXLhf8N+9tr9sN
7MvkvMgGqpjwXAwYDFZWxBf0+k6O+rO/XuCuIKtc4eD0jPIS6NfxD5DvXNGc83ro
ffgjM0HNq41jieDAhmAAnj12LoRE4V3qQwqbE3p5JBHsmjOJ2/kGoZdkorf3oSuT
jlsLooDi/NTKlWxnlIvnlNSBnlfzpZl6yQIW4j8FDe/4p02G6VMYIozTB37OM98j
4USHAgMBAAEwDQYJKoZIhvcNAQEFBQADggEBAHrlJjQs05EykfyuvUFZUOjAiqwN
M/1WHW8xtCA/qa7H1PJQ6B7xyJcmw/ad23ui74sycfkmCLMACP1tb0M8CJ6/rsZH
ltUy8sXSGg3fyTA9Ff8sJiMs0nCw0Wzkk+P5JGig7kPBi1W7gSFTP4tfrktp65sU
xefLNh/axCHE2C5lxrYtwsE8ocSqNZwPDIWihcaapvdxDyr8l62F2dL3NXulLVRW
OV4G+KGVwCCEswjTN3idyGjknBCgaiFmKMPFeZm5feUE6f2D40Z/CLrcaB1HV5/q
MBljuA6qKsDLaABwtxvviQ18p2GYmfpXv5mLJlSNSRnzH9zQzjGsqV09x7U=
-----END CERTIFICATE-----
'
'401':
description: Unauthorized
'500':
description: Subscription not found
x-codeSamples:
- lang: Shell + Curl
source: "curl --request GET \\\n --url https://marketplace.appdirect.com/api/account/v2/subscriptions/%7BsubscriptionUuid%7D/saml/certificate"
- lang: Node + Request
source: "const request = require('request');\n\nconst options = {\n method: 'GET',\n url: 'https://marketplace.appdirect.com/api/account/v2/subscriptions/%7BsubscriptionUuid%7D/saml/certificate'\n};\n\nrequest(options, function (error, response, body) {\n if (error) throw new Error(error);\n\n console.log(body);\n});\n"
- lang: Java + Okhttp
source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://marketplace.appdirect.com/api/account/v2/subscriptions/%7BsubscriptionUuid%7D/saml/certificate\")\n .get()\n .build();\n\nResponse response = client.newCall(request).execute();"
/account/v2/subscriptions/{subscriptionUuid}/saml:
get:
description: Retrieve a subscription's SAML metadata.
tags:
- Subscriptions
summary: Read SAML metadata for subscription
operationId: resource_Subscription_readSamlInfo_GET
x-appdirect-required-scopes:
ROLE_USER:
- Allows access as the user that owns the subscription.
ROLE_BILLING_ADMIN:
- Allows access as a Billing Admin of the company that owns the subscription.
ROLE_CHANNEL_ADMIN:
- Allows access as a Marketplace Manager for the marketplace.
ROLE_CORPORATE_ADMIN:
- Allows access as a Network Manager for the marketplace.
ROLE_PARTNER_READ:
- Allows read access to all marketplace data.
ROLE_CHANNEL_PRODUCT_SUPPORT:
- Allows access as a Product Support agent for the marketplace.
ROLE_APPLICATION:
- Allows access as the Developer that owns the Product.
parameters:
- description: Unique identifier of company subscription in the API request
name: subscriptionUuid
in: path
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
examples:
response:
value:
version: '2.0'
uuid: 8ae5c488-9d5b-4867-a944-78b6afbb9c82
idpIdentifier: https://test.marketplace.com/saml/8ae5c488-9d5b-4867-a944-78b6afbb9c82
assertionConsumerServiceUrl: https://www.example.com/saml/acs
spLaunchUrl: https://www.example.com/saml/login
audienceUrl: https://www.example.com
loginUrl: https://test.marketplace.com/saml/idp/login/8ae5c488-9d5b-4867-a944-78b6afbb9c82
relayState: null
nameIdType: urn:oasis:names:tc:SAML:2.0:nameid-format:persistent
nameId: '{user.uuid}'
notBeforeMinutes: 5
notAfterMinutes: 5
attributes:
FirstName:
name: FirstName
type: '{http://www.w3.org/2001/XMLSchema}string'
value: '{user.firstName}'
Email:
name: Email
type: '{http://www.w3.org/2001/XMLSchema}string'
value: '{user.emailAddress}'
LastName:
name: LastName
type: '{http://www.w3.org/2001/XMLSchema}string'
value: '{user.lastName}'
certificate:
uuid: 6bd1d10c-ddb8-4908-a5a7-0e918f28a2ae
publicCertificate: '-----BEGIN CERTIFICATE-----
MIICyDCCAbCgAwIBAgIGAWF7mAIjMA0GCSqGSIb3DQEBBQUAMCUxIzAhBgNVBAoM
GkNPTVBBTllfRU5USVRMRU1FTlQtNzQ1NzI5MB4XDTE4MDIwODE3MjMzNVoXDTIz
MDIwOTE3MjMzNVowJTEjMCEGA1UECgwaQ09NUEFOWV9FTlRJVExFTUVOVC03NDU3
MjkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCQvnSC76Jwsrjw0FDO
MzutqNLyrlww86LiEcDiaGn/Ms6cASbpQFJiA7f5BVbTHCAS4fPQnLcBoZs25OwP
69ibm5hrJlfmZwPVU0Odqd9M/kGmV4U4EDgieH6BcF0cXwpJ8OeXLhf8N+9tr9sN
7MvkvMgGqpjwXAwYDFZWxBf0+k6O+rO/XuCuIKtc4eD0jPIS6NfxD5DvXNGc83ro
ffgjM0HNq41jieDAhmAAnj12LoRE4V3qQwqbE3p5JBHsmjOJ2/kGoZdkorf3oSuT
jlsLooDi/NTKlWxnlIvnlNSBnlfzpZl6yQIW4j8FDe/4p02G6VMYIozTB37OM98j
4USHAgMBAAEwDQYJKoZIhvcNAQEFBQADggEBAHrlJjQs05EykfyuvUFZUOjAiqwN
M/1WHW8xtCA/qa7H1PJQ6B7xyJcmw/ad23ui74sycfkmCLMACP1tb0M8CJ6/rsZH
ltUy8sXSGg3fyTA9Ff8sJiMs0nCw0Wzkk+P5JGig7kPBi1W7gSFTP4tfrktp65sU
xefLNh/axCHE2C5lxrYtwsE8ocSqNZwPDIWihcaapvdxDyr8l62F2dL3NXulLVRW
OV4G+KGVwCCEswjTN3idyGjknBCgaiFmKMPFeZm5feUE6f2D40Z/CLrcaB1HV5/q
MBljuA6qKsDLaABwtxvviQ18p2GYmfpXv5mLJlSNSRnzH9zQzjGsqV09x7U=
-----END CERTIFICATE-----
'
publicKey: '-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkL50gu+icLK48NBQzjM7
rajS8q5cMPOi4hHA4mhp/zLOnAEm6UBSYgO3+QVW0xwgEuHz0Jy3AaGbNuTsD+vY
m5uYayZX5mcD1VNDnanfTP5BpleFOBA4Inh+gXBdHF8KSfDnly4X/Dfvba/bDezL
5LzIBqqY8FwMGAxWVsQX9PpOjvqzv17griCrXOHg9IzyEujX8Q+Q71zRnPN66H34
IzNBzauNY4ngwIZgAJ49di6EROFd6kMKmxN6eSQR7Jozidv5BqGXZKK396Erk45b
C6KA4vzUypVsZ5SL55TUgZ5X86WZeskCFuI/BQ3v+KdNhulTGCKM0wd+zjPfI+FE
hwIDAQAB
-----END PUBLIC KEY-----
'
fingerprint: 6D:44:10:BF:DD:D6:B9:46:ED:CB:05:B6:96:C4:07:5E:02:C0:27:E6
expirationDate: 1676872384000
partner: APPDIRECT
label: AD Cert
defaultCertificate: true
subjectDN: O=COMPANY_ENTITLEMENT-1893
keySize: 2048
needsRenewal: false
certificateUsage: PER_RELYING_PARTY
encodeResponse: true
responseParameterName: SAMLResponse
signingSource: RESPONSE
signingAlgorithm: SHA256
'401':
description: Unauthorized
'404':
description: Subscription not found
x-codeSamples:
- lang: Shell + Curl
source: "curl --request GET \\\n --url https://marketplace.appdirect.com/api/account/v2/subscriptions/%7BsubscriptionUuid%7D/saml"
- lang: Node + Request
source: "const request = require('request');\n\nconst options = {\n method: 'GET',\n url: 'https://marketplace.appdirect.com/api/account/v2/subscriptions/%7BsubscriptionUuid%7D/saml'\n};\n\nrequest(options, function (error, response, body) {\n if (error) throw new Error(error);\n\n console.log(body);\n});\n"
- lang: Java + Okhttp
source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://marketplace.appdirect.com/api/account/v2/subscriptions/%7BsubscriptionUuid%7D/saml\")\n .get()\n .build();\n\nResponse response = client.newCall(request).execute();"
/billing/v1/companies/{companyId}/subscriptions:
get:
description: List all of the subscriptions for the given company
tags:
- Subscriptions
summary: List all subscriptions for a company
operationId: resource_Other_readCompanySubscriptions_GET
parameters:
- description: Company ID
name: companyId
in: path
required: true
schema:
type: string
- description: Filters results to only include subscriptions that were created on or after the specified date in yyyy/MM/DD HH:mm:ss format
name: fromDate
in: query
schema:
type: string
- description: Filters results to only include subscriptions that were created on or before the specified date in yyyy/MM/DD HH:mm:ss format
name: toDate
in: query
schema:
type: string
- description: Filters subscriptions by internal discount ID
name: discountId
in: query
schema:
type: number
- description: Filters subscriptions by status
name: status
in: query
schema:
type: string
items:
enum:
- INITIALIZED
- FAILED
- FREE_TRIAL
- FREE_TRIAL_EXPIRED
- ACTIVE
- SUSPENDED
- CANCELLED
type: string
- description: Filters subscriptions by internal edition ID
name: editionId
in: query
schema:
type: number
- description: Filters subscriptions by internal payment plan ID
name: paymentPlanId
in: query
schema:
type: number
- description: Filters subscriptions by last modified date
name: lastModified
in: query
schema:
type: number
- description: Filters subscriptions by internal application ID
name: applicationIds
in: query
schema:
type: number
- description: Filters subscriptions by internal bundle ID
name: bundleApplicationId
in: query
schema:
type: number
- description: Expands filtered subscription results to include details about the specified query parameters, one or more of "order", "product", or "edition".
name: expand
in: query
schema:
type: string
- description: Filters subscriptions by order reference code
name: orderReferenceCode
in: query
schema:
type: string
- description: Number of results to fetch. Used for paging.
name: count
in: query
schema:
type: integer
default: 250
- description: Sort field
name: sortField
in: query
schema:
type: string
enum:
- APPLICATION
- COMPANY
- DATE
- OWNER
- STATUS
- SUBSCRIPTION_ID
default: DATE
- description: Sort order
name: sortOrder
in: query
schema:
type: string
enum:
- ASC
- DESC
default: ASC
- description: First result index. Used for paging.
name: start
in: query
schema:
type: integer
default: 0
responses:
'200':
description: OK
content:
application/json:
schema:
description: OK
type: array
items:
$ref: '#/components/schemas/SubscriptionListingWS'
examples:
response:
value:
- creationDate: 1481002406580
endDate: null
externalAccountId: d2f4acf1-fb5a-4c4a-921f-75c4b6bfff08
status: ACTIVE
suspensionReason: API
maxUsers: 1
assignmentCount: 1
parentSubscriptionId: null
order:
id: '1'
href: http://appdirect/api/billing/v1/orders/1
user:
id: c47d0fd7-b67a-4e07-84f8-f93dfafbeecc
href: http://appdirect/api/account/v1/users/c47d0fd7-b67a-4e07-84f8-f93dfafbeecc
company:
id: e83cd3d6-7865-4fc2-9d7c-603ad17dd639
href: http://appdirect/api/account/v1/companies/e83cd3d6-7865-4fc2-9d7c-603ad17dd639
product:
id: '2'
href: http://appdirect/api/marketplace/v1/products/2
edition:
id: '2'
href: http://appdirect/api/marketplace/v1/products/2/editions/2
links: []
id: 1b577640-9b77-47bc-beb8-ed59accb4836
application/xml:
schema:
description: OK
type: array
items:
$ref: '#/components/schemas/SubscriptionListingWS'
'404':
description: Not Found
x-codeSamples:
- lang: Shell + Curl
source: "curl --request GET \\\n --url 'https://marketplace.appdirect.com/api/billing/v1/companies/%7BcompanyId%7D/subscriptions?fromDate=SOME_STRING_VALUE&toDate=SOME_STRING_VALUE&discountId=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&editionId=SOME_NUMBER_VALUE&paymentPlanId=SOME_NUMBER_VALUE&lastModified=SOME_NUMBER_VALUE&applicationIds=SOME_NUMBER_VALUE&bundleApplicationId=SOME_NUMBER_VALUE&expand=SOME_STRING_VALUE&orderReferenceCode=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE&sortField=SOME_STRING_VALUE&sortOrder=SOME_STRING_VALUE&start=SOME_INTEGER_VALUE'"
- lang: Node + Request
source: "const request = require('request');\n\nconst options = {\n method: 'GET',\n url: 'https://marketplace.appdirect.com/api/billing/v1/companies/%7BcompanyId%7D/subscriptions',\n qs: {\n fromDate: 'SOME_STRING_VALUE',\n toDate: 'SOME_STRING_VALUE',\n discountId: 'SOME_NUMBER_VALUE',\n status: 'SOME_STRING_VALUE',\n editionId: 'SOME_NUMBER_VALUE',\n paymentPlanId: 'SOME_NUMBER_VALUE',\n lastModified: 'SOME_NUMBER_VALUE',\n applicationIds: 'SOME_NUMBER_VALUE',\n bundleApplicationId: 'SOME_NUMBER_VALUE',\n expand: 'SOME_STRING_VALUE',\n orderReferenceCode: 'SOME_STRING_VALUE',\n count: 'SOME_INTEGER_VALUE',\n sortField: 'SOME_STRING_VALUE',\n sortOrder: 'SOME_STRING_VALUE',\n start: 'SOME_INTEGER_VALUE'\n }\n};\n\nrequest(options, function (error, response, body) {\n if (error) throw new Error(error);\n\n console.log(body);\n});\n"
- lang: Java + Okhttp
source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://marketplace.appdirect.com/api/billing/v1/companies/%7BcompanyId%7D/subscriptions?fromDate=SOME_STRING_VALUE&toDate=SOME_STRING_VALUE&discountId=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&editionId=SOME_NUMBER_VALUE&paymentPlanId=SOME_NUMBER_VALUE&lastModified=SOME_NUMBER_VALUE&applicationIds=SOME_NUMBER_VALUE&bundleApplicationId=SOME_NUMBER_VALUE&expand=SOME_STRING_VALUE&orderReferenceCode=SOME_STRING_VALUE&count=SOME_INTEGER_VALUE&sortField=SOME_STRING_VALUE&sortOrder=SOME_STRING_VALUE&start=SOME_INTEGER_VALUE\")\n .get()\n .build();\n\nResponse response = client.newCall(request).execute();"
/billing/v1/companies/{companyId}/users/{userId}/subscriptions/{subscriptionId}:
put:
description: Change the specified subscription for the specified user and company with the provided data.</br>You cannot perform assisted sales, in which the buyer purchases a product for or on behalf of someone else, through the API.</br>When you use the Change Subscription Details request to update a subscription that was created though the user interface as an assisted sale, a new order is created for the specified user ID and company. Because the new order is not created as an assisted sale, the salesSupportUser parameter is returned with a value of null.
tags:
- Subscriptions
summary: Change subscription details
operationId: resource_Other_changeSubscription_PUT
parameters:
- description: User's company ID
name: companyId
in: path
required: true
schema:
type: string
- description: Subscription ID
name: subscriptionId
in: path
required: true
schema:
type: string
- description: User ID
name: userId
in: path
required: true
schema:
type: string
- description: Send notification of the subscription's creation. Default value is true.
name: sendNotification
in: query
schema:
type: boolean
default: true
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionWS'
application/xml:
schema:
$ref: '#/components/schemas/SubscriptionWS'
description: Subscription data object
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionWS'
examples:
response:
value:
id: 1b577640-9b77-47bc-beb8-ed59accb4836
creationDate: 1481002406580
endDate: null
externalAccountId: fdad1b12-c13f-416e-97a2-6330451da1b9
status: ACTIVE
maxUsers: 10
assignedUsers: 1
order:
startDate: 1480921200000
endDate: null
nextBillingDate: 1483599600000
endOfDiscountDate: null
status: ACTIVE
frequency: MONTHLY
currency: USD
type: MIGRATION
totalPrice: 0
user:
id: c47d0fd7-b67a-4e07-84f8-f93dfafbeecc
href: http://appdirect/api/account/v1/users/c47d0fd7-b67a-4e07-84f8-f93dfafbeecc
salesSupportUser: null
company:
id: e83cd3d6-7865-4fc2-9d7c-603ad17dd639
href: http://appdirect/api/account/v1/companies/e83cd3d6-7865-4fc2-9d7c-603ad17dd639
referenceCode: null
paymentPlan:
href: http://appdirect/api/marketplace/v1/products/2/editions/2/paymentPlans/2
id: 2
uuid: eaca1aa5-4c4f-44cb-8cf4-eb0aa9267273
frequency: MONTHLY
contract:
minimumServiceLength: null
cancellationPeriodLimit: null
endOfContractGracePeriod: null
blockSwitchToShorterContract: false
blockContractDowngrades: false
blockContractUpgrades: false
alignWithParentCycleStartDate: false
gracePeriod: null
terminationFee: null
autoExtensionPricingId: null
allowCustomUsage: false
keepBillDateOnUsageChange: false
separatePrepaid: false
isPrimaryPrice: false
costs:
- id: 2
unit: USER
unitDependency: null
minUnits: 0
maxUnits: null
meteredUsage: false
increment: 1
pricePerIncrement: false
blockContractDecrease: false
blockContractIncrease: false
blockOriginalContractDecrease: false
amount:
USD: 10
pricingStrategy: UNIT
discount: null
primaryPrice: false
contract: null
previousOrder:
id: '1'
href: http://appdirect/api/billing/v1/orders/1
nextOrder: null
discount: null
paymentPlanId: 2
discountId: null
activated: false
oneTimeOrders:
- startDate: 1480921200000
endDate: 1483599600000
nextBillingDate: 1483599600000
endOfDiscountDate: null
status: ONE_TIME
frequency: MONTHLY
currency: USD
type: CREDIT
totalPrice: 0
user: null
salesSupportUser: null
company: null
referenceCode: null
paymentPlan:
id: '2'
href: http://appdirect/api/marketplace/v1/products/2/editions/2/paymentPlans/2
links: []
id: 2
orderLines:
- id: 3
type: ITEM
unit: USER
quantity: 10
price: 10
listingPrice: 10
totalPrice: 100
description: Test App 1 - null - Per User Fee
parameters: []
links:
- rel: subscription
href: http://appdirect/api/billing/v1/subscriptions/1b577640-9b77-47bc-beb8-ed59accb4836
id: 3
upcomingOrder: null
user:
id: c47d0fd7-b67a-4e07-84f8-f93dfafbeecc
href: http://appdirect/api/account/v1/users/c47d0fd7-b67a-4e07-84f8-f93dfafbeecc
company:
id: e83cd3d6-7865-4fc2-9d7c-603ad17dd639
href: http://appdirect/api/account/v1/companies/e83cd3d6-7865-4fc2-9d7c-603ad17dd639
product:
id: '2'
href: http://appdirect/api/marketplace/v1/products/2
edition:
id: '2'
href: http://appdirect/api/marketplace/v1/products/2/editions/2
redirectUrl: null
application/xml:
schema:
$ref: '#/components/schemas/SubscriptionWS'
'400':
description: Bad Request
'404':
description: Not Found
'409':
description: Conflict
x-codeSamples:
- lang: Shell + Curl
source: "curl --request PUT \\\n --url 'https://marketplace.appdirect.com/api/billing/v1/companies/%7BcompanyId%7D/users/%7BuserId%7D/subscriptions/%7BsubscriptionId%7D?sendNotification=SOME_BOOLEAN_VALUE' \\\n --data '{\"assignedUsers\":12345,\"bundleApplicationId\":12345,\"company\":{\"href\":\"...\",\"id\":\"...\"},\"creationDate\":12345,\"edition\":{\"href\":\"...\",\"id\":\"...\"},\"endDate\":12345,\"externalAccountId\":\"...\",\"id\":\"...\",\"internalId\":\"...\",\"maxUsers\":12345,\"order\":{\"_embedded\":{\"property1\":{},\"property2\":{}},\"activated\":true,\"company\":{\"href\":\"...\",\"id\":\"...\"},\"contract\":{\"minimumServiceLength\":24,\"endOfContractDate\":123451232,\"gracePeriodEndDate\":null,\"cancellationPeriodLimit\":null,\"endOfContractGracePeriod\":null,\"terminationFee\":{\"type\":\"PERCENTAGE\",\"description\":\"Fee\",\"percentage\":100,\"price\":null,\"estimatedCost\":324.56},\"renewal\":null},\"currency\":\"...\",\"customAttributes\":[{\"attributeType\":\"TEXT\",\"name\":\"...\",\"value\":\"...\",\"valueKeys\":[\"...\",\"...\"]},{\"attributeType\":\"TEXT\",\"name\":\"...\",\"value\":\"...\",\"valueKeys\":[\"...\",\"...\"]}],\"discount\":{\"href\":\"...\",\"id\":\"...\"},\"discountId\":12345,\"endDate\":12345,\"endOfDiscountDate\":12345,\"frequency\":\"...\",\"id\":12345,\"links\":[{\"href\":\"...\",\"rel\":\"...\"},{\"href\":\"...\",\"rel\":\"...\"}],\"nextBillingDate\":12345,\"nextOrder\":{\"href\":\"...\",\"id\":\"...\"},\"oneTimeOrders\":[{\"_embedded\":{\"property1\":{},\"property2\":{}},\"company\":{},\"currency\":\"...\",\"endDate\":12345,\"endOfDiscountDate\":12345,\"frequency\":\"...\",\"id\":12345,\"links\":[{},{}],\"nextBillingDate\":12345,\"paymentPlan\":{},\"referenceCode\":\"...\",\"salesSupportUser\":{},\"startDate\":12345,\"status\":\"...\",\"totalPrice\":12345,\"type\":\"...\",\"user\":{}},{\"_embedded\":{\"property1\":{},\"property2\":{}},\"company\":{},\"currency\":\"...\",\"endDate\":12345,\"endOfDiscountDate\":12345,\"frequency\":\"...\",\"id\":12345,\"links\":[{},{}],\"nextBillingDate\":12345,\"paymentPlan\":{},\"referenceCode\":\"...\",\"salesSupportUser\":{},\"startDate\":12345,\"status\":\"...\",\"totalPrice\":12345,\"type\":\"...\",\"user\":{}}],\"orderLines\":[{},{}],\"parameters\":[{\"name\":\"...\",\"value\":\"...\"},{\"name\":\"...\",\"value\":\"...\"}],\"paymentPlan\":{\"allowCustomUsage\":true,\"contract\":{},\"cost\":[{},{}],\"discount\":{},\"frequency\":\"...\",\"href\":\"...\",\"id\":12345,\"isPrimaryPrice\":true,\"keepBillDateOnUsageChange\":true,\"primaryPrice\":true,\"separatePrepaid\":true,\"tld\":\"...\",\"uuid\":\"...\"},\"paymentPlanId\":12345,\"previousOrder\":{\"href\":\"...\",\"id\":\"...\"},\"referenceCode\":\"...\",\"salesSupportUser\":{\"href\":\"...\",\"id\":\"...\"},\"startDate\":12345,\"status\":\"...\",\"totalPrice\":12345,\"type\":\"...\",\"user\":{\"href\":\"...\",\"id\":\"...\"}},\"product\":{\"href\":\"...\",\"id\":\"...\"},\"redirectUrl\":\"...\",\"status\":\"...\",\"upcomingOrder\":{\"_embedded\":{\"property1\":{},\"property2\":{}},\"activated\":true,\"company\":{\"href\":\"...\",\"id\":\"...\"},\"contract\":{},\"currency\":\"...\",\"customAttributes\":[{\"attributeType\":\"TEXT\",\"name\":\"...\",\"value\":\"...\",\"valueKeys\":[\"...\",\"...\"]},{\"attributeType\":\"TEXT\",\"name\":\"...\",\"value\":\"...\",\"valueKeys\":[\"...\",\"...\"]}],\"discount\":{\"href\":\"...\",\"id\":\"...\"},\"discountId\":12345,\"endDate\":12345,\"endOfDiscountDate\":12345,\"frequency\":\"...\",\"id\":12345,\"links\":[{\"href\":\"...\",\"rel\":\"...\"},{\"href\":\"...\",\"rel\":\"...\"}],\"nextBillingDate\":12345,\"nextOrder\":{\"href\":\"...\",\"id\":\"...\"},\"oneTimeOrders\":[{\"_embedded\":{\"property1\":{},\"property2\":{}},\"company\":{},\"currency\":\"...\",\"endDate\":12345,\"endOfDiscountDate\":12345,\"frequency\":\"...\",\"id\":12345,\"links\":[{},{}],\"nextBillingDate\":12345,\"paymentPlan\":{},\"referenceCode\":\"...\",\"salesSupportUser\":{},\"startDate\":12345,\"status\":\"...\",\"totalPrice\":12345,\"type\":\"...\",\"user\":{}},{\"_embedded\":{\"property1\":{},\"property2\":{}},\"company\":{},\"currency\":\"...\",\"endDate\":12345,\"endOfDiscountDate\":12345,\"frequency\":\"...\",\"id\":12345,\"links\":[{},{}],\"nextBillingDate\":12345,\"paymentPlan\":{},\"referenceCode\":\"...\",\"s
# --- truncated at 32 KB (315 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/appdirect/refs/heads/main/openapi/appdirect-subscriptions-api-openapi.yml