Loading...
NAV Navbar
Shell HTTP JavaScript Node.JS Python Ruby Java

AppDirect API Reference

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

The AppDirect API Reference lists various requests that you can use to manage and interact with your marketplace.

Use the following URL format to send API calls:

https://{marketplaceURL}/api/{endpoint}

For example:

https://myMarketplace.com/api/marketplace/v1/bundles

Generated on Thu Jan 18 2024 04:39:58 GMT-0500 (EST)

Bundles

Retrieve a bundle status

This call returns the current state of the bundle.

Example request

curl -X GET https://{marketplaceURL}/api/marketplace/v1/bundles/{bundleId}/status \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/marketplace/v1/bundles/{bundleId}/status HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/bundles/{bundleId}/status',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/bundles/{bundleId}/status',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/marketplace/v1/bundles/{bundleId}/status', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/marketplace/v1/bundles/{bundleId}/status',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/bundles/{bundleId}/status");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "assigned": false,
    "companyEntitlementId": null,
    "companyEntitlementPending": false,
    "companyWide": false,
    "editionId": null,
    "editionPricingId": null,
    "freeTrialAllowed": true,
    "freeTrialDaysLeft": 0,
    "ownerAdmin": false,
    "ownerFullName": null,
    "ownerId": null,
    "ownerUuid": null,
    "partOfExistingBundle": false,
    "pending": false,
    "pendingAppType": "REQUESTED",
    "requested": false
  }
]

GET/marketplace/v1/bundles/{bundleId}/status

Retrieve a bundle status This call returns the current state of the bundle.

Parameters

Parameter Type Data Type Default Description
*bundleId path number Bundle product id

Responses

Status Meaning Description Definition
200 OK Bundle application status read. array of UserAppInfo
404 Not Found Bundle application not found.

Retrieve a bundle

This call returns all details about a specific bundle.

Example request

curl -X GET https://{marketplaceURL}/api/marketplace/v1/bundles/{bundleId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/marketplace/v1/bundles/{bundleId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/bundles/{bundleId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/bundles/{bundleId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/marketplace/v1/bundles/{bundleId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/marketplace/v1/bundles/{bundleId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/bundles/{bundleId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "billingFrequency": null,
  "blurb": "Bundle Blurb",
  "bundledProducts": [],
  "buyable": false,
  "changeSubscriptionAllowed": true,
  "collectLeads": false,
  "collectLeadsWithPurchaseEnabled": false,
  "description": "Bundle Description",
  "discountDetails": null,
  "downloadFileSize": null,
  "featured": false,
  "featuredSliderPosition": null,
  "free": false,
  "freeTrialOrEditionPresent": false,
  "href": "http://localhost/api/marketplace/v1/bundles/245",
  "iconUrl": null,
  "id": 245,
  "lastModified": 1461792750786,
  "name": "MockApp-4393604041692298141",
  "newSubscriptionEnabled": true,
  "numRatings": null,
  "overview": null,
  "overviewImageUrl": null,
  "popular": false,
  "popularity": null,
  "productType": "BUNDLE",
  "profileLogoUrl": null,
  "provider": {
    "name": "Appdirect",
    "url": "appdirect.com",
    "uuid": "b863d403-f8a7-4d38-9f89-c5fa021c2b7e"
  },
  "publishedOn": 1461792750665,
  "rating": null,
  "referable": false,
  "staffPick": false,
  "staffPickSliderPosition": null,
  "startingPrice": null,
  "supportedLanguages": [
    "en"
  ],
  "tags": [],
  "url": "http://localhost/apps/245"
}

GET/marketplace/v1/bundles/{bundleId}

Retrieve a bundle This call returns all details about a specific bundle.

Parameters

Parameter Type Data Type Default Description
*bundleId path number Bundle product id

Responses

Status Meaning Description Definition
200 OK Bundle application read. Bundle
404 Not Found Bundle application not found.

List all bundles

This call lists all bundles on the marketplace.

Example request

curl -X GET https://{marketplaceURL}/api/marketplace/v1/bundles \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/marketplace/v1/bundles HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/bundles',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/bundles',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/marketplace/v1/bundles', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/marketplace/v1/bundles',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/bundles");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "addon": false,
    "billingFrequency": "MONTHLY",
    "blurb": "Bundle Blurb",
    "bundleUrls": [],
    "bundledProducts": [],
    "buyable": false,
    "collectLeads": false,
    "description": "Bundle Description",
    "developerName": "Appdirect",
    "discountDetails": null,
    "downloadFileSize": null,
    "featured": false,
    "featuredSliderPosition": null,
    "free": false,
    "freeTrialOrEditionPresent": true,
    "hasLyncToPhone": false,
    "hidePricings": false,
    "href": "http://localhost/api/marketplace/v1/bundles/257",
    "iconUrl": null,
    "id": 257,
    "lastModified": 1461792752644,
    "name": "MockApp3891706169852983393",
    "numRatings": null,
    "overview": null,
    "overviewImageUrl": null,
    "popular": false,
    "popularity": null,
    "productType": "BUNDLE",
    "profileLogoUrl": null,
    "publishedOn": 1461792752534,
    "rating": null,
    "referable": false,
    "sortRank": 5,
    "staffPick": false,
    "staffPickSliderPosition": null,
    "startingPrice": "$0.00/User/Mo",
    "supportedLanguages": [
      "en"
    ],
    "tags": [],
    "url": "http://localhost/apps/257",
    "uuid": "df44129f-3c03-40eb-a112-b04e455b8c3f",
    "vendorName": "Appdirect"
  }
]

GET/marketplace/v1/bundles

List all bundles This call lists all bundles on the marketplace.

Responses

Status Meaning Description Definition
200 OK List of product bundle. array of BundleListing

Checkout Items

Get item details

Example request

curl -X POST https://{marketplaceURL}/api/api/v3/checkout/items \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/api/v3/checkout/items HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/api/v3/checkout/items',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "bundleIds": [
    "300",
    "400"
  ],
  "buyerCompanyId": "6e5a0af2-e6be-4a86-a1b0-ffabcc2c6324",
  "buyerUserId": "55144410-a14a-43a1-9e0a-062c6cf31770",
  "currency": "USD",
  "ownerCompanyId": "b0410709-8333-43e2-84d6-3228f6b9998b",
  "ownerUserId": "19d7343b-b8ab-464a-a893-8b107d77137d",
  "pricingPlanIds": [
    "a12bcf2e-d27e-4808-aae0-6099cc828664",
    "3e0a22d3-dafb-4b3d-a487-7f4e7a94b32a"
  ],
  "productIds": [
    "100",
    "200"
  ],
  "subscriptionIds": [
    "915a6558-5a1b-446a-8ec6-334cc60e3d37",
    "8569269e-4c7f-4238-807c-513c718be135"
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/api/v3/checkout/items',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/api/v3/checkout/items', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/api/v3/checkout/items',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/api/v3/checkout/items");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "bundleIds": [
    "300",
    "400"
  ],
  "buyerCompanyId": "6e5a0af2-e6be-4a86-a1b0-ffabcc2c6324",
  "buyerUserId": "55144410-a14a-43a1-9e0a-062c6cf31770",
  "currency": "USD",
  "ownerCompanyId": "b0410709-8333-43e2-84d6-3228f6b9998b",
  "ownerUserId": "19d7343b-b8ab-464a-a893-8b107d77137d",
  "pricingPlanIds": [
    "a12bcf2e-d27e-4808-aae0-6099cc828664",
    "3e0a22d3-dafb-4b3d-a487-7f4e7a94b32a"
  ],
  "productIds": [
    "100",
    "200"
  ],
  "subscriptionIds": [
    "915a6558-5a1b-446a-8ec6-334cc60e3d37",
    "8569269e-4c7f-4238-807c-513c718be135"
  ]
}

Example response

{
  "branding": {
    "desc": "Sample Application description",
    "href": "https://marketplace.appdirect.com/api/marketplace/v1/products/1111",
    "iconUrl": "https://appdirect.cloudfront.net/app_resources/1111/thumbs_64/img1111.png",
    "name": "Sample Application",
    "storefrontUrl": "https://marketplace.appdirect.com/apps/1111",
    "vendor": "AppDirect"
  },
  "editions": [
    {
      "freeTrialTerms": {
        "freeTrialDuration": 1,
        "freeTrialDurationPeriod": "MONTH",
        "freeTrialGracePeriod": 10
      },
      "id": "45b79e06-1ac6-11e5-90d8-ca7e16f380a7",
      "name": "Sample Edition",
      "pricingPlans": [
        {
          "currency": "USD",
          "id": "b794c2a1-69a7-40bc-9bf7-75a2f945a5fc",
          "pricingPeriod": "MONTHLY",
          "pricingSources": [
            {
              "pricingDefinitions": [
                {
                  "allowsMeteredUsage": true,
                  "costType": "RECURRING_PER_UNIT",
                  "costTypeCategory": "RECURRING",
                  "displaysPricePerIncrement": true,
                  "increment": 5,
                  "priceRanges": [
                    {
                      "max": 5,
                      "min": 0,
                      "salePrice": "4.0000000000",
                      "wholeSalePrice": null
                    }
                  ],
                  "pricingStrategy": "UNIT",
                  "unit": "USER",
                  "unitAllowsDecimals": false
                }
              ],
              "source": "BASE_CATALOG"
            },
            {
              "pricingDefinitions": [
                {
                  "costType": "ONE_TIME_FLAT",
                  "costTypeCategory": "ONE_TIME",
                  "pricingStrategy": "FLAT",
                  "salePrice": "3.0000000000",
                  "wholeSalePrice": null
                }
              ],
              "source": "CHANNEL_CATALOG"
            }
          ]
        }
      ],
      "revenueModel": "RECURRING"
    }
  ],
  "id": "098357e5-7a88-45fe-82d3-843bfd6bcbd1",
  "stacked": false,
  "type": "PRODUCT"
}

POST/api/v3/checkout/items

Retrieves product details such as branding, pricing, and so on.

Body Parameters

CICheckoutItemsDetailsRequest object:

Property Type Description
bundleIds array of string

List of bundle IDs to retrieve details for. (Currently not supported)

buyerCompanyId string

The buyer's company's ID. In assisted sales or reseller scenarios, the buyer's company can be different than the owner's company.

buyerUserId string

The buyer user ID. The buyer is the person who is making the purchase. In assisted sales or reseller scenarios, the buyer can be different than the owner.

currency string

Three-letter code, such as USD, that determines the currency in which to display item pricing details.

ownerCompanyId string

The owner's company's ID.

ownerUserId string

The owner user ID. The owner owns the product after the purchase is complete.

pricingPlanIds array of string

List of pricing plan IDs to retrieve details for.

productIds array of string

List of product IDs to retrieve details for.

subscriptionIds array of string

List of subscription IDs to retrieve details for. (Currently not supported)

Responses

Status Meaning Description Definition
200 OK Item details retrieved successfully CICheckoutItemDetails

Companies

Create new company

Example request

curl -X POST https://{marketplaceURL}/api/account/v2/companies \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/account/v2/companies HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Payload for \"create company\" requests",
      "type": "object",
      "title": "CreateCompanyV2Request",
      "properties": {
        "address": {
          "allOf": [
            {
              "type": "object",
              "title": "CompanyAddress",
              "required": [
                "country",
                "city",
                "zip",
                "street1"
              ],
              "properties": {
                "city": {
                  "type": "string",
                  "maxLength": 255,
                  "minLength": 0
                },
                "country": {
                  "type": "string",
                  "maxLength": 255,
                  "minLength": 0
                },
                "state": {
                  "type": "string",
                  "maxLength": 255,
                  "minLength": 0
                },
                "street1": {
                  "type": "string",
                  "maxLength": 255,
                  "minLength": 0
                },
                "street2": {
                  "type": "string",
                  "maxLength": 255,
                  "minLength": 0
                },
                "zip": {
                  "type": "string",
                  "maxLength": 255,
                  "minLength": 0
                }
              },
              "example": {
                "city": "...",
                "country": "...",
                "state": "...",
                "street1": "...",
                "street2": "...",
                "zip": "..."
              }
            },
            {
              "description": "Company address"
            }
          ]
        },
        "allowLogin": {
          "description": "Optional. Default is \"true\".\n\nWhen set to \"true\", the marketplace company allows users, including the first user, to login to the marketplace and receive emails from the marketplace. Users can purchase and assign products within the company. Products can also be purchased on their behalf, and assigned to them.\n\nWhen set to \"false\", the marketplace company does not allow company members, including the first user, to login to the marketplace or receive email notifications from the marketplace. Products are purchased and assigned on users behalf, and they access those products directly through the product interface.",
          "type": "boolean"
        },
        "billingDayOfMonth": {
          "description": "(Optional) Use this property in company creation requests to set the billing cycle start date. The date applies to all purchases made through the specified company, and overrides the marketplace-level billing cycle date.",
          "type": "integer"
        },
        "channelAdmin": {
          "description": "Indicates whether the company has Channel Admin access",
          "type": "boolean"
        },
        "companySize": {
          "allOf": [
            {
              "description": "Company size types",
              "type": "string",
              "title": "CompanySizeType",
              "enum": [
                "SMALL",
                "MEDIUM",
                "ENTERPRISE"
              ]
            },
            {
              "description": "Company size"
            }
          ]
        },
        "countryCode": {
          "description": "Company country code defined by ISO ALPHA-2 standard",
          "type": "string"
        },
        "customAttributes": {
          "description": "Custom attributes",
          "type": "array",
          "items": {
            "description": "Custom attributes",
            "type": "object",
            "title": "CustomAttributeAccountV2Request",
            "properties": {
              "name": {
                "description": "Name",
                "type": "string"
              },
              "value": {
                "description": "Value",
                "type": "string"
              },
              "valueKeys": {
                "description": "Value keys",
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "example": {
              "name": "Company Details",
              "valueKeys": [
                "great option"
              ]
            }
          }
        },
        "dailyPurchaseLimitExempt": {
          "description": "Indicates if company is exempt from the marketplace default daily spend limit",
          "type": "boolean"
        },
        "dailyPurchaseLimitOverrideAmt": {
          "description": "Company-level override amount of marketplace default daily spend limit",
          "type": "number"
        },
        "defaultRole": {
          "description": "The default role newly created users receive",
          "type": "string"
        },
        "emailAddress": {
          "description": "Company email address",
          "type": "string"
        },
        "externalId": {
          "description": "Company external ID",
          "type": "string"
        },
        "firstUser": {
          "allOf": [
            {
              "allOf": [
                {
                  "description": "Represents the membership of the first user in a company, who also receives the Company Administrator role by default",
                  "type": "object",
                  "title": "CreateCompanyV2RequestFirstUser",
                  "properties": {
                    "email": {},
                    "firstName": {},
                    "lastName": {},
                    "position": {},
                    "roles": {}
                  },
                  "example": {
                    "email": "jude.doe@company8578572384.com",
                    "firstName": "Jude",
                    "lastName": "Doe",
                    "position": "Business Analyst",
                    "roles": []
                  }
                }
              ]
            },
            {
              "description": "First user of the newly created company"
            }
          ]
        },
        "idpUuid": {
          "description": "UUID of the identity provider that the user will always use to log in. Contact your AppDirect technical consultant or business consultant to obtain the UUID.",
          "type": "string"
        },
        "importAppsEnabled": {
          "description": "The import apps feature is enabled for this company",
          "type": "boolean"
        },
        "industry": {
          "description": "Company industry sector",
          "type": "string"
        },
        "name": {
          "description": "Company name",
          "type": "string",
          "nullable": true
        },
        "onlyAdminsCanBuy": {
          "description": "Indicates if only selected roles in company that can make purchases or all roles in company can make purchases",
          "type": "boolean"
        },
        "phoneNumber": {
          "description": "Company phone number",
          "type": "string",
          "nullable": true
        },
        "referral": {
          "description": "Indicates whether the company has Referral access",
          "type": "boolean"
        },
        "reseller": {
          "description": "Indicates whether the company has Reseller access",
          "type": "boolean"
        },
        "thirtyDaysPurchaseLimitExempt": {
          "description": "Indicates if company is exempt from the marketplace default thirty day spend limit",
          "type": "boolean"
        },
        "thirtyDaysPurchaseLimitOverrideAmt": {
          "description": "Company-level override amount of marketplace default thirty day spend limit",
          "type": "number"
        },
        "vendor": {
          "description": "Indicates whether the company has Vendor access",
          "type": "boolean"
        },
        "website": {
          "description": "Company website URL",
          "type": "string"
        }
      },
      "example": {
        "address": {
          "city": "New York",
          "country": "US",
          "state": "NY",
          "street1": "980 West 881st Street",
          "street2": "55AB",
          "zip": "12345"
        },
        "channelAdmin": false,
        "companySize": "SMALL",
        "countryCode": "US",
        "customAttributes": [
          {
            "name": "text_example",
            "value": "foo"
          },
          {
            "name": "multiselect_checkboxes_example",
            "valueKeys": [
              "ipsum",
              "fake"
            ]
          }
        ],
        "defaultRole": "USER",
        "emailAddress": "info@company12345.com",
        "externalId": "P02TSQ3YPZoykqx1a10",
        "firstUser": {
          "email": "john.smith@company12345.com",
          "firstName": "John",
          "lastName": "Smith",
          "roles": [
            "ROLE_SYS_ADMIN"
          ]
        },
        "industry": "Sales",
        "name": "Company Example",
        "phoneNumber": "11234567890",
        "reseller": false,
        "vendor": false,
        "website": "https://www.company12345.com"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/account/v2/companies', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/account/v2/companies',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "address": {
    "city": "New York",
    "country": "US",
    "state": "NY",
    "street1": "980 West 881st Street",
    "street2": "55AB",
    "zip": "12345"
  },
  "channelAdmin": false,
  "companySize": "SMALL",
  "countryCode": "US",
  "customAttributes": [
    {
      "name": "text_example",
      "value": "foo"
    },
    {
      "name": "multiselect_checkboxes_example",
      "valueKeys": [
        "ipsum",
        "fake"
      ]
    }
  ],
  "defaultRole": "USER",
  "emailAddress": "info@company12345.com",
  "externalId": "P02TSQ3YPZoykqx1a10",
  "firstUser": {
    "email": "john.smith@company12345.com",
    "firstName": "John",
    "lastName": "Smith",
    "roles": [
      "ROLE_SYS_ADMIN"
    ]
  },
  "industry": "Sales",
  "name": "Company Example",
  "phoneNumber": "11234567890",
  "reseller": false,
  "vendor": false,
  "website": "https://www.company12345.com"
}

Example response

{
  "allowLogin": true,
  "customAttributes": [
    {
      "attributeType": "TEXT",
      "hint": "US West, US Central, or US East",
      "label": "Geographic Region",
      "name": "Geographic Region",
      "value": "US"
    },
    {
      "attributeType": "MULTISELECT",
      "hint": "",
      "label": "Label Names",
      "name": "Company Details",
      "valueKeys": [
        "great option"
      ]
    }
  ],
  "defaultRole": "USER",
  "enabled": true,
  "firstUser": {
    "email": "john.simpson@company58330881985.com",
    "firstName": "John",
    "lastName": "Simpson",
    "roles": [
      "ROLE_USER"
    ]
  },
  "links": [
    {
      "href": "http://appdirect/api/account/v2/companies/d689b970-f3f9-42a6-a974-90e2bdadf860",
      "rel": "self"
    },
    {
      "href": "http://appdirect/api/account/v2/companies/d689b970-f3f9-42a6-a974-90e2bdadf860/memberships",
      "rel": "memberships"
    }
  ],
  "name": "Company 7078259907",
  "phoneNumber": "9259221234",
  "picture": "http://localhost:8080/profilePics/http://cdn/company.png",
  "reseller": false,
  "uuid": "d689b970-f3f9-42a6-a974-90e2bdadf860",
  "vendor": false
}

POST/account/v2/companies

Create a new marketplace company

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER Allows access to read and write all marketplace data.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.

Body Parameters

New marketplace company

CreateCompanyV2Request object:

Property Type Description
address CompanyAddress

Company address

allowLogin boolean

Optional. Default is "true".

When set to "true", the marketplace company allows users, including the first user, to login to the marketplace and receive emails from the marketplace. Users can purchase and assign products within the company. Products can also be purchased on their behalf, and assigned to them.

When set to "false", the marketplace company does not allow company members, including the first user, to login to the marketplace or receive email notifications from the marketplace. Products are purchased and assigned on users behalf, and they access those products directly through the product interface.

billingDayOfMonth integer

(Optional) Use this property in company creation requests to set the billing cycle start date. The date applies to all purchases made through the specified company, and overrides the marketplace-level billing cycle date.

channelAdmin boolean

Indicates whether the company has Channel Admin access

companySize CompanySizeType

Company size

countryCode string

Company country code defined by ISO ALPHA-2 standard

customAttributes array of CustomAttributeAccountV2Request

Custom attributes

dailyPurchaseLimitExempt boolean

Indicates if company is exempt from the marketplace default daily spend limit

dailyPurchaseLimitOverrideAmt number

Company-level override amount of marketplace default daily spend limit

defaultRole string

The default role newly created users receive

emailAddress string

Company email address

externalId string

Company external ID

firstUser CreateCompanyV2RequestFirstUser

First user of the newly created company

idpUuid string

UUID of the identity provider that the user will always use to log in. Contact your AppDirect technical consultant or business consultant to obtain the UUID.

importAppsEnabled boolean

The import apps feature is enabled for this company

industry string

Company industry sector

name string

Company name

onlyAdminsCanBuy boolean

Indicates if only selected roles in company that can make purchases or all roles in company can make purchases

phoneNumber string

Company phone number

referral boolean

Indicates whether the company has Referral access

reseller boolean

Indicates whether the company has Reseller access

thirtyDaysPurchaseLimitExempt boolean

Indicates if company is exempt from the marketplace default thirty day spend limit

thirtyDaysPurchaseLimitOverrideAmt number

Company-level override amount of marketplace default thirty day spend limit

vendor boolean

Indicates whether the company has Vendor access

website string

Company website URL

Responses

Status Meaning Description Definition
201 Created Created CreateCompanyV2Response
401 Unauthorized Unauthorized

Patch company

Example request

curl -X PATCH https://{marketplaceURL}/api/account/v2/companies/{companyUuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PATCH https://{marketplaceURL}/api/account/v2/companies/{companyUuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}',
  method: 'patch',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "address": {
    "city": "San Francisco",
    "country": "United Stated of America",
    "state": "California",
    "street1": "5th Ave",
    "street2": "#400",
    "zip": "32455"
  },
  "channelAdmin": false,
  "companySize": "SMALL",
  "countryCode": "US",
  "customAttributes": [
    {
      "attributeType": "TEXT",
      "hint": "US West, US Central, or US East",
      "label": "Geographic Region",
      "name": "Geographic Region",
      "value": "US"
    },
    {
      "attributeType": "MULTISELECT",
      "hint": "",
      "label": "Label Names",
      "name": "Company Details",
      "valueKeys": [
        "great option"
      ]
    }
  ],
  "dailyPurchaseLimitExempt": false,
  "dailyPurchaseLimitOverrideAmt": 10,
  "defaultRole": "USER",
  "emailAddress": "info@company.com",
  "enabled": true,
  "externalId": "d689b970-f3f9-42a6-a974-90e2bdadf860",
  "industry": "IT",
  "name": "Company 7078259907",
  "phoneNumber": "9259221234",
  "reseller": false,
  "thirtyDaysPurchaseLimitExempt": false,
  "thirtyDaysPurchaseLimitOverrideAmt": null,
  "vendor": false,
  "website": "http://www.company.com"
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.patch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.patch 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "address": {
    "city": "San Francisco",
    "country": "United Stated of America",
    "state": "California",
    "street1": "5th Ave",
    "street2": "#400",
    "zip": "32455"
  },
  "channelAdmin": false,
  "companySize": "SMALL",
  "countryCode": "US",
  "customAttributes": [
    {
      "attributeType": "TEXT",
      "hint": "US West, US Central, or US East",
      "label": "Geographic Region",
      "name": "Geographic Region",
      "value": "US"
    },
    {
      "attributeType": "MULTISELECT",
      "hint": "",
      "label": "Label Names",
      "name": "Company Details",
      "valueKeys": [
        "great option"
      ]
    }
  ],
  "dailyPurchaseLimitExempt": false,
  "dailyPurchaseLimitOverrideAmt": 10,
  "defaultRole": "USER",
  "emailAddress": "info@company.com",
  "enabled": true,
  "externalId": "d689b970-f3f9-42a6-a974-90e2bdadf860",
  "industry": "IT",
  "name": "Company 7078259907",
  "phoneNumber": "9259221234",
  "reseller": false,
  "thirtyDaysPurchaseLimitExempt": false,
  "thirtyDaysPurchaseLimitOverrideAmt": null,
  "vendor": false,
  "website": "http://www.company.com"
}

Example response

{
  "address": {
    "city": "Calgary",
    "country": "Canada",
    "state": "AB",
    "street1": "Stephen Ave",
    "street2": "12",
    "zip": "T22V34"
  },
  "allowLogin": true,
  "channelAdmin": true,
  "companySize": "SMALL",
  "countryCode": "US",
  "creationDate": 1457416568000,
  "customAttributes": [
    {
      "attributeType": "TEXT",
      "hint": "US West, US Central, or US East",
      "label": "Geographic Region",
      "name": "Geographic Region",
      "value": "US"
    },
    {
      "attributeType": "MULTISELECT",
      "hint": "",
      "label": "Label Names",
      "name": "Company Details",
      "valueKeys": [
        "great option"
      ]
    }
  ],
  "dailyPurchaseLimitExempt": false,
  "dailyPurchaseLimitOverrideAmt": 10,
  "defaultRole": "USER",
  "emailAddress": "john.smith@example.com",
  "enabled": true,
  "externalId": "37ac4899-0847-41ac-8e6b-adfde0363b37",
  "industry": "Finance",
  "links": [
    {
      "href": "http://appdirect/api/account/v2/companies/d689b970-f3f9-42a6-a974-90e2bdadf860",
      "rel": "self"
    },
    {
      "href": "http://appdirect/api/account/v2/companies/d689b970-f3f9-42a6-a974-90e2bdadf860/memberships",
      "rel": "memberships"
    }
  ],
  "name": "Company 7078259907",
  "phoneNumber": "888-888-8888",
  "picture": "http://localhost:8080/profilePics/http://cdn/company.png",
  "reseller": false,
  "salesAgent": {
    "href": "http://marketplace.local:8080/api/account/v2/users/a3f385be-e10b-444e-99d1-95cd7d4c1f5a",
    "rel": "salesRepLink"
  },
  "salesSupport": false,
  "thirtyDaysPurchaseLimitExempt": false,
  "thirtyDaysPurchaseLimitOverrideAmt": null,
  "uuid": "d689b970-f3f9-42a6-a974-90e2bdadf860",
  "vendor": true,
  "website": "example.com"
}

PATCH/account/v2/companies/{companyUuid}

Partially update marketplace company account information. This only adds or updates the values for the properties that you include in the call; all other properties are ignored.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER Allows access to read and write all marketplace data.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Company ID

Body Parameters

Marketplace company account information and settings

CompanyAccountV2Request object:

Property Type Description
address CompanyAddress

Company address

allowLogin boolean

Indicates whether a company's users are managed users (false) or not (true). Do not change the value with this request.

billingDayOfMonth integer

(Optional) Use this property in company creation requests to set the billing cycle start date. The date applies to all purchases made through the specified company, and overrides the marketplace-level billing cycle date.

channelAdmin boolean

Indicates whether the company has Channel Admin access

companySize CompanySizeType

Company size

countryCode string

Company country code defined by ISO ALPHA-2 standard

customAttributes array of CustomAttributeAccountV2

Custom attributes

dailyPurchaseLimitExempt boolean

Whether company is exempt from the marketplace default daily spend limit

dailyPurchaseLimitOverrideAmt number

Daily spend limit for this company (overrides marketplace default for daily company spend limit)

defaultRole string

The default role newly created users receive

emailAddress string

Company email address

enabled boolean

Indicates whether company is enabled

externalId string

Company external ID

industry string

Company industry sector

name string

Company name

phoneNumber string

Company phone number

referral boolean

Indicates whether the company has Referral access

reseller boolean

Indicates whether the company has Reseller access

thirtyDaysPurchaseLimitExempt boolean

Whether company is exempt from the marketplace default thirty-day spend limit

thirtyDaysPurchaseLimitOverrideAmt number

Thirty-day spend limit for this company (overrides marketplace default for thirty-day company spend limit)

vendor boolean

Indicates whether the company has Vendor access

website string

Company website URL

Responses

Status Meaning Description Definition
200 OK Success CompanyAccountV2
401 Unauthorized Unauthorized
404 Not Found Company not found

List all companies

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/companies \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/companies HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/companies', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/companies',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "address": {
        "city": "Calgary",
        "country": "Canada",
        "state": "AB",
        "street1": "Harris Place NW",
        "street2": "907",
        "zip": "T3B2V4"
      },
      "channelAdmin": true,
      "companySize": "SMALL",
      "countryCode": "US",
      "creationDate": 1457416568000,
      "customAttributes": [],
      "defaultRole": "USER",
      "emailAddress": "john.smith@example.com",
      "enabled": true,
      "externalId": "37ac4899-0847-41ac-8e6b-adfde0363b37",
      "industry": "Finance",
      "links": [
        {
          "href": "http://marketplace.local:8080/api/account/v2/companies/a3f385be-e10b-444e-99d1-95cd7d4c1f5a",
          "rel": "self"
        },
        {
          "href": "http://marketplace.local:8080/api/account/v2/companies/a3f385be-e10b-444e-99d1-95cd7d4c1f5a/memberships",
          "rel": "memberships"
        }
      ],
      "name": "John & Co",
      "phoneNumber": "888-888-8888",
      "picture": null,
      "reseller": false,
      "salesAgent": {
        "href": "http://marketplace.local:8080/api/account/v2/users/a3f385be-e10b-444e-99d1-95cd7d4c1f5a",
        "rel": "salesRepLink"
      },
      "salesSupport": false,
      "uuid": "a3f385be-e10b-444e-99d1-95cd7d4c1f5a",
      "vendor": true,
      "website": "example.com"
    },
    {
      "address": {
        "city": "Calgary",
        "country": "Canada",
        "state": "AB",
        "street1": "Harris Place NW",
        "street2": "907",
        "zip": "T3B2V4"
      },
      "channelAdmin": true,
      "companySize": "SMALL",
      "countryCode": "US",
      "creationDate": 1521573411000,
      "customAttributes": [
        {
          "attributeType": "TEXT",
          "hint": "",
          "label": "C1593404",
          "name": "C1593404",
          "value": "t1"
        }
      ],
      "defaultRole": "USER",
      "emailAddress": "john.smith@example.com",
      "enabled": false,
      "externalId": "b34974b2-f5d6-4326-9859-5247dc42ee60",
      "industry": "Finance",
      "links": [
        {
          "href": "http://marketplace.local:8080/api/account/v2/companies/42f4e0cd-0614-4695-87ba-fcaee49fb995",
          "rel": "self"
        },
        {
          "href": "http://marketplace.local:8080/api/account/v2/companies/42f4e0cd-0614-4695-87ba-fcaee49fb995/memberships",
          "rel": "memberships"
        }
      ],
      "name": "John & Co",
      "phoneNumber": "888-888-8888",
      "picture": null,
      "reseller": false,
      "salesAgent": {
        "href": "http://marketplace.local:8080/api/account/v2/users/a3f385be-e10b-444e-99d1-95cd7d4c1f5a",
        "rel": "salesRepLink"
      },
      "salesSupport": false,
      "uuid": "42f4e0cd-0614-4695-87ba-fcaee49fb995",
      "vendor": true,
      "website": "example.com"
    }
  ],
  "links": [],
  "page": {
    "number": 0,
    "size": 50,
    "totalElements": 2,
    "totalPages": 1
  }
}

GET/account/v2/companies

Retrieve all marketplace companies.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER_READ Allows access to read all marketplace data.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.

Parameters

Parameter Type Data Type Default Description
custom.customAttributeName query string Accepts a notIn filter in the form of ?custom.customAttributeName=notIn(customAttributeValue1, customAttributeValue2, customAttributeValueN...) that excludes companies with matching values. Before you can use the filter, you must first create "Text" type company custom attributes in the user interface. You can then specify the custom attribute name and values as customAttributeName and customAttributeValueN. See https://help.appdirect.com/platform/Default.htm#MarketplaceManager/MM-Setgscustui-create-attribs.html.
includeCustomAttributes query boolean Optional. Default is true. When set to true, company custom attributes are included in the API response. When set to false, company custom attributes are not included.
includePurchaseLimitData query boolean Optional. Default is true. When set to true, the purchase limit attributes are fetched, calculated and populated in the response. When set to false, the purchase limit attributes are not fetched.
name query string Company name
page query integer 0 Zero-based page index
size query integer 50 The number of search results to return per page
sortField query string of enum:
NAME
NAME The property to sort by
sortOrder query string of enum:
ASC
DESC
DESC Ordering type

Responses

Status Meaning Description Definition
200 OK Success PagedCompanyAccountV2
401 Unauthorized Unauthorized

Read activities

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/activities \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/activities HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/activities',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/activities',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/activities', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/activities',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/activities");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "actor": {
        "activated": false,
        "deleted": false,
        "email": "c2801919@appdirect.com",
        "externalId": null,
        "id": 1344,
        "name": "C2801919_first last",
        "personalInfoMasked": false,
        "profileLinkMasked": false,
        "roleChanges": null,
        "type": "USER",
        "userRemovedFromCompanyObject": false,
        "userRemovedFromCompanyTarget": false,
        "uuid": "966216bb-bb4e-4766-8849-fd72eead20ce"
      },
      "context": {
        "description": "Documentation Center 283",
        "header": "Documentation Center 283",
        "imageUrl": "https://d33na3ni6eqf5j.cloudfront.net/importable_app_resources/81858cea-627f-45ee-8906-67d5a23dd3bf/list.png?b5960593b97c0fdd95bc9b81c08e70bb"
      },
      "links": [],
      "object": {
        "companyLinkMasked": false,
        "externalId": null,
        "id": 26,
        "name": "Company 6032459369",
        "type": "COMPANY",
        "uuid": "222cf5ff-7795-4ece-b612-83ef6b72bb30"
      },
      "origin": "MARKETPLACE",
      "subject": {
        "activated": true,
        "deleted": false,
        "email": "susan.doe@company5087848592.com",
        "externalId": null,
        "id": 30,
        "name": "Susan Doe",
        "personalInfoMasked": false,
        "profileLinkMasked": false,
        "type": "USER",
        "userRemovedFromCompanyObject": false,
        "userRemovedFromCompanyTarget": false,
        "uuid": "8487f55b-05be-4c0e-97d8-021e5ca4008b"
      },
      "target": {
        "companyLinkMasked": false,
        "externalId": null,
        "id": 194379,
        "name": "Matts Company",
        "type": "COMPANY",
        "uuid": "a0504b87-f21f-40fe-9de1-e8479776a26f"
      },
      "timestamp": [
        2016,
        12,
        2,
        17,
        25,
        56,
        414
      ],
      "verb": "COMPANY_ACTIVATED"
    },
    {
      "actor": {
        "activated": false,
        "deleted": false,
        "email": "c3945627346@appdirect.com",
        "externalId": null,
        "id": 1434,
        "name": "Adam Smith",
        "personalInfoMasked": false,
        "profileLinkMasked": false,
        "roleChanges": null,
        "type": "USER",
        "userRemovedFromCompanyObject": false,
        "userRemovedFromCompanyTarget": false,
        "uuid": "ac6216bb-bb4e-4766-8849-fd72eead20ce"
      },
      "context": {
        "description": "Documentation Center 283",
        "header": "Documentation Center 283",
        "imageUrl": "https://d33na3ni6eqf5j.cloudfront.net/importable_app_resources/81858cea-627f-45ee-8906-67d5a23dd3bf/list.png?b5960593b97c0fdd95bc9b81c08e70bb"
      },
      "links": [],
      "object": {
        "companyLinkMasked": false,
        "externalId": null,
        "id": 26,
        "name": "Company 6032459369",
        "type": "COMPANY",
        "uuid": "222cf5ff-7795-4ece-b612-83ef6b72bb30"
      },
      "origin": null,
      "subject": {
        "activated": true,
        "deleted": false,
        "email": "susan.doe@company5087848592.com",
        "externalId": null,
        "id": 30,
        "name": "Susan Doe",
        "personalInfoMasked": false,
        "profileLinkMasked": false,
        "type": "USER",
        "userRemovedFromCompanyObject": false,
        "userRemovedFromCompanyTarget": false,
        "uuid": "8487f55b-05be-4c0e-97d8-021e5ca4008b"
      },
      "target": {
        "companyLinkMasked": false,
        "externalId": null,
        "id": 149379,
        "name": "Global Company",
        "type": "COMPANY",
        "uuid": "70904b87-a2bf-40fe-9de1-e8479776a26f"
      },
      "timestamp": [
        2016,
        12,
        2,
        17,
        25,
        56,
        401
      ],
      "verb": "USER_JOINED"
    }
  ],
  "links": [],
  "page": {
    "number": 0,
    "size": 2,
    "totalElements": 2,
    "totalPages": 1
  }
}

GET/account/v2/companies/{companyUuid}/activities

Retrieve company or user activities.

The displayType parameter dictates whether activities for the given user or activities for the whole company are returned.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER_READ Allows access to read all marketplace data.
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_USER Allows access as an end user in the company.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request
displayType query string of enum:
EVERYONE
ONLY_ME
ONLY_ME Scope
page query integer 0 Zero-based page index
size query integer 12 The size of the page to be returned

Responses

Status Meaning Description Definition
200 OK Success PagedActivityAccountV2
401 Unauthorized Unauthorized
404 Not Found Company not found

Read a company

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "address": {
    "city": "Calgary",
    "country": "Canada",
    "state": "AB",
    "street1": "Stephen Ave",
    "street2": "12",
    "zip": "T22V34"
  },
  "allowLogin": true,
  "channelAdmin": true,
  "companySize": "SMALL",
  "countryCode": "US",
  "creationDate": 1457416568000,
  "customAttributes": [
    {
      "attributeType": "TEXT",
      "hint": "US West, US Central, or US East",
      "label": "Geographic Region",
      "name": "Geographic Region",
      "value": "US"
    },
    {
      "attributeType": "MULTISELECT",
      "hint": "",
      "label": "Label Names",
      "name": "Company Details",
      "valueKeys": [
        "great option"
      ]
    }
  ],
  "dailyPurchaseLimitExempt": false,
  "dailyPurchaseLimitOverrideAmt": 10,
  "defaultRole": "USER",
  "emailAddress": "john.smith@example.com",
  "enabled": true,
  "externalId": "37ac4899-0847-41ac-8e6b-adfde0363b37",
  "industry": "Finance",
  "links": [
    {
      "href": "http://appdirect/api/account/v2/companies/d689b970-f3f9-42a6-a974-90e2bdadf860",
      "rel": "self"
    },
    {
      "href": "http://appdirect/api/account/v2/companies/d689b970-f3f9-42a6-a974-90e2bdadf860/memberships",
      "rel": "memberships"
    }
  ],
  "name": "Company 7078259907",
  "phoneNumber": "888-888-8888",
  "picture": "http://localhost:8080/profilePics/http://cdn/company.png",
  "reseller": false,
  "salesAgent": {
    "href": "http://marketplace.local:8080/api/account/v2/users/a3f385be-e10b-444e-99d1-95cd7d4c1f5a",
    "rel": "salesRepLink"
  },
  "salesSupport": false,
  "thirtyDaysPurchaseLimitExempt": false,
  "thirtyDaysPurchaseLimitOverrideAmt": null,
  "uuid": "d689b970-f3f9-42a6-a974-90e2bdadf860",
  "vendor": true,
  "website": "example.com"
}

GET/account/v2/companies/{companyUuid}

Retrieve a marketplace company by ID or external ID. If you use the ID, you can omit a prefix or use 'id:' as the prefix. If you use the external ID, you must always specify the 'externalId:' prefix.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER_READ Allows access to read all marketplace data.
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_USER Allows access as an end user in the company.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier (ID or external ID) of the company in the API request

Responses

Status Meaning Description Definition
200 OK Success CompanyAccountV2
401 Unauthorized Unauthorized
404 Not Found Company not found

Update company picture

Example request

curl -X PUT https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/picture \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/picture HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/picture',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "type": "object"
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/picture',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/picture', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/picture',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/picture");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "address": {
    "city": "Calgary",
    "country": "Canada",
    "state": "AB",
    "street1": "Stephen Ave",
    "street2": "12",
    "zip": "T22V34"
  },
  "allowLogin": true,
  "channelAdmin": true,
  "companySize": "SMALL",
  "countryCode": "US",
  "creationDate": 1457416568000,
  "customAttributes": [
    {
      "attributeType": "TEXT",
      "hint": "US West, US Central, or US East",
      "label": "Geographic Region",
      "name": "Geographic Region",
      "value": "US"
    },
    {
      "attributeType": "MULTISELECT",
      "hint": "",
      "label": "Label Names",
      "name": "Company Details",
      "valueKeys": [
        "great option"
      ]
    }
  ],
  "dailyPurchaseLimitExempt": false,
  "dailyPurchaseLimitOverrideAmt": 10,
  "defaultRole": "USER",
  "emailAddress": "john.smith@example.com",
  "enabled": true,
  "externalId": "37ac4899-0847-41ac-8e6b-adfde0363b37",
  "industry": "Finance",
  "links": [
    {
      "href": "http://appdirect/api/account/v2/companies/d689b970-f3f9-42a6-a974-90e2bdadf860",
      "rel": "self"
    },
    {
      "href": "http://appdirect/api/account/v2/companies/d689b970-f3f9-42a6-a974-90e2bdadf860/memberships",
      "rel": "memberships"
    }
  ],
  "name": "Company 7078259907",
  "phoneNumber": "888-888-8888",
  "picture": "http://localhost:8080/profilePics/http://cdn/company.png",
  "reseller": false,
  "salesAgent": {
    "href": "http://marketplace.local:8080/api/account/v2/users/a3f385be-e10b-444e-99d1-95cd7d4c1f5a",
    "rel": "salesRepLink"
  },
  "salesSupport": false,
  "thirtyDaysPurchaseLimitExempt": false,
  "thirtyDaysPurchaseLimitOverrideAmt": null,
  "uuid": "d689b970-f3f9-42a6-a974-90e2bdadf860",
  "vendor": true,
  "website": "example.com"
}

PUT/account/v2/companies/{companyUuid}/picture

Update a marketplace company’s profile picture, for example, with an image of a logo. This method requires a Content-Type request header with a value of “multipart/form-data”. The updated company resource is returned.

Required Scope and Authorization Rules

Scope Rule
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 Allows access to read and write all marketplace data.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request

Body Parameters

Image file that will be used as the profile picture.

Responses

Status Meaning Description Definition
200 OK Success CompanyAccountV2
401 Unauthorized Unauthorized
404 Not Found Company not found

Update company

Example request

curl -X PUT https://{marketplaceURL}/api/account/v2/companies/{companyUuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/account/v2/companies/{companyUuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "address": {
    "city": "San Francisco",
    "country": "United Stated of America",
    "state": "California",
    "street1": "5th Ave",
    "street2": "#400",
    "zip": "32455"
  },
  "channelAdmin": false,
  "companySize": "SMALL",
  "countryCode": "US",
  "customAttributes": [
    {
      "attributeType": "TEXT",
      "hint": "US West, US Central, or US East",
      "label": "Geographic Region",
      "name": "Geographic Region",
      "value": "US"
    },
    {
      "attributeType": "MULTISELECT",
      "hint": "",
      "label": "Label Names",
      "name": "Company Details",
      "valueKeys": [
        "Option 1"
      ]
    }
  ],
  "dailyPurchaseLimit": 1000,
  "dailyPurchaseLimitExempt": false,
  "dailyPurchaseLimitOverrideAmt": 100,
  "dailyPurchaseRemainingAmt": null,
  "defaultRole": "USER",
  "emailAddress": "info@company.com",
  "enabled": true,
  "externalId": "d689b970-f3f9-42a6-a974-90e2bdadf860",
  "industry": "IT",
  "name": "Company 7078259907",
  "phoneNumber": "9259221234",
  "reseller": false,
  "thirtyDaysPurchaseLimit": 0,
  "thirtyDaysPurchaseLimitExempt": false,
  "thirtyDaysPurchaseLimitOverrideAmt": null,
  "thirtyDaysPurchaseRemainingAmt": null,
  "vendor": false,
  "website": "http://www.company.com"
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "address": {
    "city": "San Francisco",
    "country": "United Stated of America",
    "state": "California",
    "street1": "5th Ave",
    "street2": "#400",
    "zip": "32455"
  },
  "channelAdmin": false,
  "companySize": "SMALL",
  "countryCode": "US",
  "customAttributes": [
    {
      "attributeType": "TEXT",
      "hint": "US West, US Central, or US East",
      "label": "Geographic Region",
      "name": "Geographic Region",
      "value": "US"
    },
    {
      "attributeType": "MULTISELECT",
      "hint": "",
      "label": "Label Names",
      "name": "Company Details",
      "valueKeys": [
        "Option 1"
      ]
    }
  ],
  "dailyPurchaseLimit": 1000,
  "dailyPurchaseLimitExempt": false,
  "dailyPurchaseLimitOverrideAmt": 100,
  "dailyPurchaseRemainingAmt": null,
  "defaultRole": "USER",
  "emailAddress": "info@company.com",
  "enabled": true,
  "externalId": "d689b970-f3f9-42a6-a974-90e2bdadf860",
  "industry": "IT",
  "name": "Company 7078259907",
  "phoneNumber": "9259221234",
  "reseller": false,
  "thirtyDaysPurchaseLimit": 0,
  "thirtyDaysPurchaseLimitExempt": false,
  "thirtyDaysPurchaseLimitOverrideAmt": null,
  "thirtyDaysPurchaseRemainingAmt": null,
  "vendor": false,
  "website": "http://www.company.com"
}

Example response

{
  "address": {
    "city": "Calgary",
    "country": "Canada",
    "state": "AB",
    "street1": "Stephen Ave",
    "street2": "12",
    "zip": "T22V34"
  },
  "allowLogin": true,
  "channelAdmin": true,
  "companySize": "SMALL",
  "countryCode": "US",
  "creationDate": 1457416568000,
  "customAttributes": [
    {
      "attributeType": "TEXT",
      "hint": "US West, US Central, or US East",
      "label": "Geographic Region",
      "name": "Geographic Region",
      "value": "US"
    },
    {
      "attributeType": "MULTISELECT",
      "hint": "",
      "label": "Label Names",
      "name": "Company Details",
      "valueKeys": [
        "great option"
      ]
    }
  ],
  "dailyPurchaseLimitExempt": false,
  "dailyPurchaseLimitOverrideAmt": 10,
  "defaultRole": "USER",
  "emailAddress": "john.smith@example.com",
  "enabled": true,
  "externalId": "37ac4899-0847-41ac-8e6b-adfde0363b37",
  "industry": "Finance",
  "links": [
    {
      "href": "http://appdirect/api/account/v2/companies/d689b970-f3f9-42a6-a974-90e2bdadf860",
      "rel": "self"
    },
    {
      "href": "http://appdirect/api/account/v2/companies/d689b970-f3f9-42a6-a974-90e2bdadf860/memberships",
      "rel": "memberships"
    }
  ],
  "name": "Company 7078259907",
  "phoneNumber": "888-888-8888",
  "picture": "http://localhost:8080/profilePics/http://cdn/company.png",
  "reseller": false,
  "salesAgent": {
    "href": "http://marketplace.local:8080/api/account/v2/users/a3f385be-e10b-444e-99d1-95cd7d4c1f5a",
    "rel": "salesRepLink"
  },
  "salesSupport": false,
  "thirtyDaysPurchaseLimitExempt": false,
  "thirtyDaysPurchaseLimitOverrideAmt": null,
  "uuid": "d689b970-f3f9-42a6-a974-90e2bdadf860",
  "vendor": true,
  "website": "example.com"
}

PUT/account/v2/companies/{companyUuid}

Update a marketplace company.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER Allows access to read and write all marketplace data.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Company ID

Body Parameters

Marketplace company details to be updated

UpdateCompanyAccountV2Request object:

Property Type Description
address CompanyAddress

Company address

allowLogin boolean

Indicates whether a company's users are managed users (false) or not (true). Do not change the value with this request

billingDayOfMonth integer

(Optional) Use this property in company creation requests to set the billing cycle start date. The date applies to all purchases made through the specified company, and overrides the marketplace-level billing cycle date.

channelAdmin boolean

Indicates whether the company has Channel Admin access

companySize CompanySizeType

Company size

countryCode string

Company country code defined by ISO ALPHA-2 standard

customAttributes array of CustomAttributeAccountV2

Custom attributes

dailyPurchaseLimit number

Daily spend limit used as the default limit for all companies in the marketplace

dailyPurchaseLimitExempt boolean

Whether company is exempt from the marketplace default daily spend limit

dailyPurchaseLimitOverrideAmt number

Daily spend limit for this company (overrides marketplace default for daily company spend limit)

dailyPurchaseRemainingAmt number

Remaining daily spending amount

defaultRole string

The default role newly created users receive

emailAddress string

Company email address

enabled boolean

Indicates whether company is enabled

externalId string

Company external ID

industry string

Company industry sector

name string

Company name

phoneNumber string

Company phone number

referral boolean

Indicates whether the company has Referral access

reseller boolean

Indicates whether the company has Reseller access

thirtyDaysPurchaseLimit number

Monthly spend limit used as the default limit for all companies in the marketplace

thirtyDaysPurchaseLimitExempt boolean

Whether company is exempt from the marketplace default thirty-day spend limit

thirtyDaysPurchaseLimitOverrideAmt number

Thirty-day spend limit for this company (overrides marketplace default for thirty-day company spend limit)

thirtyDaysPurchaseRemainingAmt number

Remaining monthly spending amount

vendor boolean

Indicates whether the company has Vendor access

website string

Company website URL

Responses

Status Meaning Description Definition
200 OK Success CompanyAccountV2
401 Unauthorized Unauthorized
404 Not Found Company not found

Companies (Reseller)

Company details

Example request

curl -X GET https://{marketplaceURL}/api/appReseller/v1/companies/{companyId}?context=type,string,enum,RESELLER%2C%20RESELLER_MANAGER \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/appReseller/v1/companies/{companyId}?context=type,string,enum,RESELLER%2C%20RESELLER_MANAGER HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appReseller/v1/companies/{companyId}',
  method: 'get',
  data: '?context=type,string,enum,RESELLER%2C%20RESELLER_MANAGER',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appReseller/v1/companies/{companyId}?context=type,string,enum,RESELLER%2C%20RESELLER_MANAGER',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/appReseller/v1/companies/{companyId}', params={
  'context': {
  "type": "string",
  "enum": [
    "RESELLER, RESELLER_MANAGER"
  ]
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/appReseller/v1/companies/{companyId}',
  params: {
  'context' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appReseller/v1/companies/{companyId}?context=type,string,enum,RESELLER%2C%20RESELLER_MANAGER");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "actions": [
    "JOIN_COMPANY",
    "DISABLE_COMPANY",
    "MANAGE_CUSTOM_ATTRIBUTES",
    "INVITE_USERS"
  ],
  "active": true,
  "availableAccesses": [],
  "availableRoles": [
    "USER"
  ],
  "availableTaxExemptions": [
    "FEDERAL_GOVERNMENT_US",
    "STATE_GOVERNMENT_US",
    "TRIBE_INDIAN",
    "FOREIGN_DIPLOMAT",
    "CHARITABLE_ORG",
    "RELIGIOUS_ORG",
    "RESALE",
    "COMMERCIAL_AGRICULTURAL",
    "INDUSTRIAL_PRODUCTION",
    "DIRECT_MAIL_US",
    "DIRECT_PAY_PERMIT_US",
    "OTHER",
    "LOCAL_GOVERNMENT_US",
    "COMMERCIAL_AQUACULTURE",
    "COMMERCIAL_FISHERY",
    "NON_RESIDENT_CAN",
    "MEDICAL_DEVICE_WITH_EXEMPT_SALES_TAX_US",
    "MEDICAL_DEVICE_WITH_TAXABLE_SALES_TAX_US"
  ],
  "createdOn": 1523007202000,
  "defaultRole": "USER",
  "enabled": true,
  "grantedAccesses": [],
  "id": "9e00b38b-7918-4a27-b2f6-123b77cfac0b",
  "idpConfigurations": [],
  "name": "C37719018",
  "settings": [],
  "stats": [
    {
      "children": "0",
      "unit": "Free Trials"
    },
    {
      "children": "0",
      "unit": "Expired Free Trials"
    },
    {
      "children": "0",
      "unit": "Purchased Products"
    },
    {
      "children": "0",
      "unit": "Suspended Products"
    },
    {
      "children": "0",
      "unit": "Unpaid Invoices"
    },
    {
      "children": "$0.00",
      "unit": "Total Spent"
    }
  ]
}

GET/appReseller/v1/companies/{companyId}

Retrieves the current reseller company details.

Required Scope and Authorization Rules

Scope Rule
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager for the company.

Parameters

Parameter Type Data Type Default Description
*companyId path string Company ID
*context query string of enum:
RESELLER, RESELLER_MANAGER
Supported AppReseller contexts

Responses

Status Meaning Description Definition
200 OK Success CompanyDetailsWS
401 Unauthorized Unauthorized
404 Not Found Not found

List companies

Example request

curl -X GET https://{marketplaceURL}/api/appReseller/v1/companies?context=type,string,enum,RESELLER%2C%20RESELLER_MANAGER \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/appReseller/v1/companies?context=type,string,enum,RESELLER%2C%20RESELLER_MANAGER HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appReseller/v1/companies',
  method: 'get',
  data: '?context=type,string,enum,RESELLER%2C%20RESELLER_MANAGER',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appReseller/v1/companies?context=type,string,enum,RESELLER%2C%20RESELLER_MANAGER',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/appReseller/v1/companies', params={
  'context': {
  "type": "string",
  "enum": [
    "RESELLER, RESELLER_MANAGER"
  ]
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/appReseller/v1/companies',
  params: {
  'context' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appReseller/v1/companies?context=type,string,enum,RESELLER%2C%20RESELLER_MANAGER");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "activated": true,
    "createdOn": 1519158286000,
    "externalId": "externalRandom",
    "grantedAccesses": [],
    "id": "386626c0-53e2-4515-8450-4a720bb5d029",
    "name": "Test Name",
    "numOfUsers": 1,
    "phone": "50505055"
  },
  {
    "activated": true,
    "createdOn": 1519158286000,
    "externalId": "externalRandom2",
    "grantedAccesses": [],
    "id": "296626c0-53e2-4515-8450-4a720bb5d040",
    "name": "Test Name 2",
    "numOfUsers": 1,
    "phone": "50505056"
  }
]

GET/appReseller/v1/companies

Retrieves companies depending on context: in the Reseller context, this endpoint lists all companies linked to the current reseller company; in the Reseller Manager context, it lists all referral and reseller companies in the current marketplace

Required Scope and Authorization Rules

Scope Rule
ROLE_RESELLER Allows access as a Reseller for the companies
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager for the companies

Parameters

Parameter Type Data Type Default Description
active query string User activation status
channelAdmin query string of enum:
ONLY_CHANNEL_ADMINS, ONLY_NON_CHANNEL_ADMINS
This enum filters companies that have (or not) permission to manage the marketplace.
*context query string of enum:
RESELLER, RESELLER_MANAGER
Supported AppReseller contexts
enabled query string User enablement status
fromDate query string From date, in timestamp format
page query integer Page number
searchText query string Search text
size query integer Number of results per page
sortField query string of enum:
COMPANY_ID
CREATED_ON
Field to sort by
sortOrder query string Sort order
toDate query string To date, in timestamp format
vendor query string of enum:
ONLY_VENDORS, ONLY_NON_VENDORS, ONLY_RESELLERS
This enum filters companies that can sell (or not) or resell products in the marketplace.

Responses

Status Meaning Description Definition
200 OK Success array of Company
401 Unauthorized Unauthorized

Create company

Example request

curl -X POST https://{marketplaceURL}/api/appReseller/v1/companies \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/appReseller/v1/companies HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appReseller/v1/companies',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "companyAccess": "RESELLER",
  "companySize": "SMALL",
  "createdByCompanyId": "386626c0-53e2-4515-8450-4a720bb5d029",
  "externalId": "externalRandom",
  "name": "Test Name",
  "phone": "50505055",
  "website": "www.new_company.com"
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appReseller/v1/companies',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/appReseller/v1/companies', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/appReseller/v1/companies',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appReseller/v1/companies");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "companyAccess": "RESELLER",
  "companySize": "SMALL",
  "createdByCompanyId": "386626c0-53e2-4515-8450-4a720bb5d029",
  "externalId": "externalRandom",
  "name": "Test Name",
  "phone": "50505055",
  "website": "www.new_company.com"
}

Example response

{
  "createdOn": 1519158286000,
  "externalId": "externalRandom",
  "id": "386626c0-53e2-4515-8450-4a720bb5d029",
  "name": "Test Name",
  "phone": "50505055"
}

POST/appReseller/v1/companies

Create a new company linked to the current reseller.

Required Scope and Authorization Rules

Scope Rule
ROLE_RESELLER Allows access as a Reseller for the company.

Body Parameters

Information about the new company that will be created

AppResellerAccountCompanyCreationRequest object:

Property Type Description
companyAccess AppResellerAccountCompanyApiContext

Context

companySize AppResellerAccountCompanySize

New company's size

createdByCompanyId string

Reseller's company UUID

externalId string

External ID used to identify the new company (must be unique)

name string

New company's name

phone string

New company's phone number

website string

New company's website

Responses

Status Meaning Description Definition
200 OK Success AccountCompanyWS
401 Unauthorized Unauthorized

List users

Example request

curl -X GET https://{marketplaceURL}/api/appReseller/v1/users?context=type,string,enum,RESELLER%2CRESELLER_MANAGER \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/appReseller/v1/users?context=type,string,enum,RESELLER%2CRESELLER_MANAGER HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appReseller/v1/users',
  method: 'get',
  data: '?context=type,string,enum,RESELLER%2CRESELLER_MANAGER',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appReseller/v1/users?context=type,string,enum,RESELLER%2CRESELLER_MANAGER',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/appReseller/v1/users', params={
  'context': {
  "type": "string",
  "enum": [
    "RESELLER",
    "RESELLER_MANAGER"
  ]
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/appReseller/v1/users',
  params: {
  'context' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appReseller/v1/users?context=type,string,enum,RESELLER%2CRESELLER_MANAGER");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "activated": false,
      "companyId": "0a357e6b-0000-000a-0000-680eabb9e322",
      "createdOn": 1525682872000,
      "email": "john@appdirect.com",
      "firstName": "John",
      "id": "0af398ee-0000-000a-0000-a83d70caeff8",
      "invitationRequired": false,
      "lastName": "Grande",
      "memberships": [
        {
          "company": {
            "createdOn": 1525682872000,
            "id": "0a357e6b-0000-000a-0000-680eabb9e322",
            "name": "TestCompany"
          },
          "enabled": true
        }
      ]
    },
    {
      "activated": false,
      "companyId": "a5811d92-0000-000a-0000-3c69e47fe126",
      "createdOn": 1461321550000,
      "email": "george@appdirect.com",
      "firstName": "George",
      "id": "47e70302-0000-000a-0000-a01cb6129c6c",
      "invitationRequired": false,
      "lastName": "Common",
      "memberships": [
        {
          "company": {
            "createdOn": 1461321550000,
            "id": "a5811d92-0000-000a-0000-3c69e47fe126",
            "name": "C4027287"
          },
          "enabled": true
        }
      ]
    }
  ],
  "page": {
    "number": 0,
    "size": 10,
    "totalElements": 2,
    "totalPages": 1
  }
}

GET/appReseller/v1/users

In the Reseller Manager context, this request retrieves all Resellers and Referral users. In the Reseller context, it retrieves all users that belong to companies linked to the reseller.

Required Scope and Authorization Rules

Scope Rule
ROLE_RESELLER Allows access as a Reseller for reading the users from companies that are linked to mine.
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager for reading the users whose company are Reseller or Referral.

Parameters

Parameter Type Data Type Default Description
active query array of string List of user activation status
companyId query string User company ID
*context query string of enum:
RESELLER
RESELLER_MANAGER
fromDate query string From date, in timestamp format
page query integer Page number
partner query string User partner
searchText query string Search text
size query integer Number of results per page
sortField query string of enum:
CUSTOMER_ID
EMAIL
FIRST_NAME
Field to sort by
sortOrder query string Sort order
toDate query string To date, in timestamp format

Responses

Status Meaning Description Definition
200 OK Success UserPagedReadResponse
401 Unauthorized Unauthorized

Create user

Example request

curl -X POST https://{marketplaceURL}/api/appReseller/v1/users?context=type,string,enum,RESELLER%2CRESELLER_MANAGER \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/appReseller/v1/users?context=type,string,enum,RESELLER%2CRESELLER_MANAGER HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appReseller/v1/users',
  method: 'post',
  data: '?context=type,string,enum,RESELLER%2CRESELLER_MANAGER',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "companyId": "4c00cad1-f741-0zf6-bb00-0000e73cec00",
  "createdByCompanyId": "386626c0-53e2-0000-0000-4a720bb5d000",
  "email": "user@appdirect.com",
  "externalId": "01",
  "firstName": "James",
  "lastName": "Smith"
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appReseller/v1/users?context=type,string,enum,RESELLER%2CRESELLER_MANAGER',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/appReseller/v1/users', params={
  'context': {
  "type": "string",
  "enum": [
    "RESELLER",
    "RESELLER_MANAGER"
  ]
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/appReseller/v1/users',
  params: {
  'context' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appReseller/v1/users?context=type,string,enum,RESELLER%2CRESELLER_MANAGER");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "companyId": "4c00cad1-f741-0zf6-bb00-0000e73cec00",
  "createdByCompanyId": "386626c0-53e2-0000-0000-4a720bb5d000",
  "email": "user@appdirect.com",
  "externalId": "01",
  "firstName": "James",
  "lastName": "Smith"
}

Example response

{
  "companyId": "460fad0d-19e2-4eec-a756-59c15dc7a56a",
  "email": "test4@yopmail.com",
  "firstName": "user4",
  "id": "6d375008-3b19-4cb8-bbb9-dcd9fce99432",
  "lastName": "user4",
  "memberships": [
    {
      "company": {
        "createdOn": 1525682872000,
        "externalId": "external11",
        "id": "460fad0d-19e2-4eec-a756-59c15dc7a56a",
        "name": "Company3",
        "phone": null
      }
    }
  ]
}

POST/appReseller/v1/users

Create a new user in a company linked to the Reseller company.

Required Scope and Authorization Rules

Scope Rule
ROLE_RESELLER Allows access as a Reseller for the company.

Parameters

Parameter Type Data Type Default Description
*context query string of enum:
RESELLER
RESELLER_MANAGER

Body Parameters

Information about the user to create

UserCreationRequest object:

Property Type Description
companyId string

New user's company ID

createdByCompanyId string

Reseller's company ID

email string

New user's email (must be unique)

externalId string

New user's external ID (must be unique)

firstName string

New user's First Name

lastName string

New user's Last Name

Responses

Status Meaning Description Definition
200 OK Success UserCreationResponse
401 Unauthorized Unauthorized
500 Internal Server Error User not created

User details

Example request

curl -X GET https://{marketplaceURL}/api/appReseller/v1/users/{userId}?context=type,string,enum,RESELLER%2CRESELLER_MANAGER&companyId=type,string \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/appReseller/v1/users/{userId}?context=type,string,enum,RESELLER%2CRESELLER_MANAGER&companyId=type,string HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appReseller/v1/users/{userId}',
  method: 'get',
  data: '?context=type,string,enum,RESELLER%2CRESELLER_MANAGER&companyId=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appReseller/v1/users/{userId}?context=type,string,enum,RESELLER%2CRESELLER_MANAGER&companyId=type,string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/appReseller/v1/users/{userId}', params={
  'context': {
  "type": "string",
  "enum": [
    "RESELLER",
    "RESELLER_MANAGER"
  ]
},  'companyId': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/appReseller/v1/users/{userId}',
  params: {
  'context' => 'string',
'companyId' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appReseller/v1/users/{userId}?context=type,string,enum,RESELLER%2CRESELLER_MANAGER&companyId=type,string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "actions": [
    "SEND_RESET_PASSWORD_EMAIL"
  ],
  "activated": true,
  "availableRoles": [
    {
      "name": "BILLING_ADMIN",
      "permission": "READ"
    },
    {
      "name": "SYS_ADMIN",
      "permission": "READ"
    }
  ],
  "companyId": "c5fe2ca9-3db1-0000-0000-0cf0a01bd437",
  "createdOn": 1465984400000,
  "customAttributes": [],
  "email": "c4201720@appdirect.com",
  "enabled": true,
  "firstName": "John",
  "id": "64535371-9e83-0000-0000-61cb17bc0c9e",
  "invitationRequired": false,
  "lastName": "Grande",
  "memberships": [
    {
      "company": {
        "id": "c5fe2ca9-0000-408c-0000-0cf0a01bd437",
        "name": "C4200000"
      },
      "enabled": true,
      "roles": [
        "BILLING_ADMIN",
        "SYS_ADMIN",
        "RESELLER"
      ]
    }
  ],
  "partner": "APPDIRECT",
  "settings": [
    {
      "permission": "READ",
      "setting": "SYS_ADMIN",
      "value": "true"
    },
    {
      "permission": "READ",
      "setting": "BILLING_ADMIN",
      "value": "true"
    }
  ]
}

GET/appReseller/v1/users/{userId}

Get a single user details

Required Scope and Authorization Rules

Scope Rule
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager for the company.

Parameters

Parameter Type Data Type Default Description
*companyId query string User's company ID (some user details depend on the specified company)
*context query string of enum:
RESELLER
RESELLER_MANAGER
*userId path string User ID

Responses

Status Meaning Description Definition
200 OK Success UserReadResponse
401 Unauthorized Unauthorized

Company Association

Remove company association

Example request

curl -X DELETE https://{marketplaceURL}/api/appReseller/v1/companyAssociations/{companyAssociationId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/appReseller/v1/companyAssociations/{companyAssociationId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appReseller/v1/companyAssociations/{companyAssociationId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appReseller/v1/companyAssociations/{companyAssociationId}',
{
  method: 'DELETE'

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/appReseller/v1/companyAssociations/{companyAssociationId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/appReseller/v1/companyAssociations/{companyAssociationId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appReseller/v1/companyAssociations/{companyAssociationId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE/appReseller/v1/companyAssociations/{companyAssociationId}

Deletes a company association.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_PARTNER Allows access to read and write all marketplace data.
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager for reading the users whose company are Reseller or Referral.

Parameters

Parameter Type Data Type Default Description
*companyAssociationId path string Company Association ID

Responses

Status Meaning Description Definition
204 No Content No Content

List company associations

Example request

curl -X GET https://{marketplaceURL}/api/appReseller/v1/companyAssociations?resellerCompanyId=type,string&customerCompanyId=type,string \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/appReseller/v1/companyAssociations?resellerCompanyId=type,string&customerCompanyId=type,string HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appReseller/v1/companyAssociations',
  method: 'get',
  data: '?resellerCompanyId=type,string&customerCompanyId=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appReseller/v1/companyAssociations?resellerCompanyId=type,string&customerCompanyId=type,string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/appReseller/v1/companyAssociations', params={
  'resellerCompanyId': {
  "type": "string"
},  'customerCompanyId': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/appReseller/v1/companyAssociations',
  params: {
  'resellerCompanyId' => 'string',
'customerCompanyId' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appReseller/v1/companyAssociations?resellerCompanyId=type,string&customerCompanyId=type,string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "createdOn": 1531839782000,
      "customerCompany": {
        "id": "0dc2860e-0000-40f7-0000-ef0000a30000",
        "name": "Customer1"
      },
      "id": "c39b8bcd-db7a-46d0-939f-facdeb1d6967",
      "resellerCompany": {
        "id": "0a69093c-0000-4f8d-0000-5e0000630000",
        "name": "Reseller1"
      }
    },
    {
      "createdOn": 1531839782000,
      "customerCompany": {
        "id": "0dc2860e-0000-40f7-0000-e0000600000a",
        "name": "Customer2"
      },
      "id": "c39b8bcd-db7a-46d0-939f-facdeb1d6967",
      "resellerCompany": {
        "id": "0a69093c-0000-4f8d-0000-5000020000ef",
        "name": "Reseller2"
      }
    }
  ],
  "page": {
    "number": 0,
    "size": 10,
    "totalElements": 2,
    "totalPages": 1
  }
}

GET/appReseller/v1/companyAssociations

Retrieves all customer company associations. This request requires either the Reseller company ID or the Customer company ID, which you can retrieve with the List companies request.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_PARTNER_READ Allows access to read all marketplace data.
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager for reading the users whose company are Reseller or Referral.

Parameters

Parameter Type Data Type Default Description
createdOn query string Date filter, defined by upper or lower inclusive or exclusive limits, in Unix timestamp format. Acceptable values are: gte([timestamp]) - 'greater than or equal to'; or lte([timestamp]) - 'less than or equal to'
*customerCompanyId query string Customer company ID. This field is required if you do not include the Reseller company ID
number query integer Page number
*resellerCompanyId query string Reseller company ID. This field is required if you do not include the Customer company ID
searchText query string Search term used to search on different fields of the customer company association.
size query integer Number of results per page
sort query string Sort field and order. For ascending sort order, use the '+[FieldName]' format. For descending order, use the '-[FieldName]' format.

Responses

Status Meaning Description Definition
200 OK Success CustomerCompanyAssociationPagedReadResponse

Create company association

Example request

curl -X POST https://{marketplaceURL}/api/appReseller/v1/companyAssociations \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/appReseller/v1/companyAssociations HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appReseller/v1/companyAssociations',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "type": "object",
  "title": "CustomerCompanyAssociationCreationRequest",
  "required": [
    "customerCompanyId",
    "resellerCompanyId"
  ],
  "properties": {
    "customerCompanyId": {
      "description": "Customer company ID",
      "type": "string"
    },
    "resellerCompanyId": {
      "description": "Reseller company ID",
      "type": "string"
    }
  }
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appReseller/v1/companyAssociations',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/appReseller/v1/companyAssociations', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/appReseller/v1/companyAssociations',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appReseller/v1/companyAssociations");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "createdOn": 1531839782000,
  "customerCompany": {
    "id": "0dc2860e-0000-40f7-0000-ef0000a30000",
    "name": "Customer"
  },
  "id": "c39b8bcd-db7a-46d0-939f-facdeb1d6967",
  "resellerCompany": {
    "id": "0a69093c-0000-4f8d-0000-5e0000630000",
    "name": "Reseller"
  }
}

POST/appReseller/v1/companyAssociations

Creates an association (link) between a customer company and a reseller company.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_PARTNER Allows access to read and write all marketplace data.
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager for the marketplace.

Body Parameters

Information about the association to create

CustomerCompanyAssociationCreationRequest object:

Property Type Description
customerCompanyId string

Customer company ID

resellerCompanyId string

Reseller company ID

Responses

Status Meaning Description Definition
200 OK Success CustomerCompanyAssociation
404 Not Found Resource does not exist
409 Conflict Conflict CustomerCompanyAssociationConflictResponse

Company Memberships

Create company membership (Add User)

Example request

curl -X POST https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/active \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/active HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/active',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Minimal data required to create a active user membership",
      "type": "object",
      "title": "ActiveUserCreationAccountV2",
      "properties": {
        "recipientEmails": {
          "description": "List of emails where the temporary password is sent",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "temporaryPassword": {
          "description": "Temporary password",
          "type": "string"
        },
        "user": {
          "allOf": [
            {
              "description": "User information (company)",
              "type": "object",
              "title": "ActiveUserAccountV2",
              "properties": {
                "email": {
                  "description": "Email address",
                  "type": "string"
                },
                "firstName": {
                  "description": "First name",
                  "type": "string"
                },
                "lastName": {
                  "description": "Last name",
                  "type": "string"
                },
                "roles": {
                  "description": "Roles for this membership. One or more of the following: ROLE_CHANNEL_ADMIN (Marketplace Manager), ROLE_CHANNEL_PRODUCT_SUPPORT (Product Support), ROLE_SALES_SUPPORT (Sales Support), ROLE_RESELLER_MANAGER (Reseller Manager), ROLE_RESELLER (Reseller), ROLE_CHANNEL_SUPPORT (Customer Support), ROLE_SYS_ADMIN (Company Admin), ROLE_BILLING_ADMIN (Billing Admin), ROLE_DEVELOPER (Developer). For user roles (not associated with membership), see [UserAccountV2](#useraccountv2).",
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "email": "jude.doe@company8578572384.com",
                "firstName": "Jude",
                "lastName": "Doe",
                "roles": [
                  "ROLE_USER"
                ]
              }
            },
            {
              "description": "User data"
            }
          ]
        }
      },
      "example": {
        "recipientEmails": [
          "manager@company9411805586.com",
          "itteam@company9411805586.com"
        ],
        "temporaryPassword": "Temporary Password",
        "user": {
          "email": "guy.smith@company9411805586.com",
          "firstName": "Guy",
          "lastName": "Smith",
          "roles": [
            "ROLE_DEVELOPER"
          ]
        }
      }
    },
    {
      "example": {
        "recipientEmails": [
          "manager@company9411805586.com",
          "itteam@company9411805586.com"
        ],
        "temporaryPassword": "Temporary Password",
        "user": {
          "email": "guy.smith@company9411805586.com",
          "firstName": "Guy",
          "lastName": "Smith",
          "roles": [
            "ROLE_DEVELOPER"
          ]
        }
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/active',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/active', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/active',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/active");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "recipientEmails": [
    "manager@company9411805586.com",
    "itteam@company9411805586.com"
  ],
  "temporaryPassword": "Temporary Password",
  "user": {
    "email": "guy.smith@company9411805586.com",
    "firstName": "Guy",
    "lastName": "Smith",
    "roles": [
      "ROLE_DEVELOPER"
    ]
  }
}

Example response

{
  "company": {
    "customAttributes": [
      {
        "attributeType": "TEXT",
        "hint": "US West, US Central, or US East",
        "label": "Geographic Region",
        "name": "Geographic Region",
        "value": "US"
      },
      {
        "attributeType": "MULTISELECT",
        "hint": "",
        "label": "Label Names",
        "name": "Company Details",
        "valueKeys": [
          "great option"
        ]
      }
    ],
    "defaultRole": "USER",
    "enabled": true,
    "links": [
      {
        "href": "http://appdirect/api/account/v2/companies/ece062bd-0c74-4d44-996c-743c3e71f8e1",
        "rel": "self"
      },
      {
        "href": "http://appdirect/api/account/v2/companies/ece062bd-0c74-4d44-996c-743c3e71f8e1/memberships",
        "rel": "memberships"
      }
    ],
    "name": "Company 4492834930",
    "phoneNumber": "9259221234",
    "picture": "http://localhost:8080/profilePics/http://cdn/company.png",
    "reseller": true,
    "uuid": "ece062bd-0c74-4d44-996c-743c3e71f8e1",
    "vendor": false
  },
  "enabled": true,
  "lastUsed": false,
  "links": [
    {
      "href": "http://appdirect/api/account/v2/companies/ece062bd-0c74-4d44-996c-743c3e71f8e1/memberships/e16171eb-d89c-4842-9550-2f9cf3ef4cee",
      "rel": "self"
    },
    {
      "href": "http://appdirect/api/account/v2/users/e16171eb-d89c-4842-9550-2f9cf3ef4cee",
      "rel": "user"
    },
    {
      "href": "http://appdirect/api/account/v2/companies/ece062bd-0c74-4d44-996c-743c3e71f8e1",
      "rel": "company"
    }
  ],
  "metadata": {
    "mosi_username": null
  },
  "mosiUser": null,
  "position": null,
  "roles": [
    "ROLE_USER"
  ],
  "user": {
    "activated": true,
    "allowLogin": true,
    "boostUser": null,
    "currency": null,
    "customAttributes": [],
    "email": "guy.smith@company9411805586.com",
    "firstName": "Guy",
    "lastName": "Smith",
    "ldapId": null,
    "links": [
      {
        "href": "http://appdirect/api/account/v2/users/e16171eb-d89c-4842-9550-2f9cf3ef4cee",
        "rel": "self"
      },
      {
        "href": "http://appdirect/api/account/v2/users/e16171eb-d89c-4842-9550-2f9cf3ef4cee/memberships",
        "rel": "memberships"
      }
    ],
    "metadata": {
      "apsUid": null
    },
    "picture": null,
    "roles": [
      "ROLE_USER"
    ],
    "userName": "guy.smith@company9411805586.com",
    "uuid": "e16171eb-d89c-4842-9550-2f9cf3ef4cee"
  }
}

POST/account/v2/companies/{companyUuid}/memberships/active

Create a marketplace user with membership in the given company.

The created user is active, and is associated with the specified company (membership). User is set with a temporary password; the password is emailed to the recipients specified in the request body.

The domain part of the user's email address must match one of the verified domains associated with the company the user will be created in.

Note: You cannot set the Marketplace Manager role through the API.

Required Scope and Authorization Rules

Scope Rule
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 Allows access to read and write all marketplace data.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request

Body Parameters

User creation data

ActiveUserCreationAccountV2 object:

Property Type Description
recipientEmails array of string

List of emails where the temporary password is sent

temporaryPassword string

Temporary password

user ActiveUserAccountV2

User data

Responses

Status Meaning Description Definition
200 OK Success UserCompanyMembershipAccountV2
401 Unauthorized Unauthorized
404 Not Found Company not found

Update company membership roles (bulk)

Example request

curl -X PATCH https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/roles \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PATCH https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/roles HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/roles',
  method: 'patch',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '[
  {
    "rolesToAdd": [
      "ROLE_DEVELOPER",
      "ROLE_RESELLER"
    ],
    "rolesToRemove": [
      "ROLE_CHANNEL_SUPPORT"
    ],
    "userUuid": "92a8d9f6-223d-11e8-a232-d879d2b204fc"
  },
  {
    "rolesToAdd": [
      "ROLE_SYS_ADMIN"
    ],
    "userUuid": "673d2cda-2d1a-11e8-a232-d879d2b204fc"
  }
]';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/roles',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.patch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/roles', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.patch 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/roles',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/roles");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

[
  {
    "rolesToAdd": [
      "ROLE_DEVELOPER",
      "ROLE_RESELLER"
    ],
    "rolesToRemove": [
      "ROLE_CHANNEL_SUPPORT"
    ],
    "userUuid": "92a8d9f6-223d-11e8-a232-d879d2b204fc"
  },
  {
    "rolesToAdd": [
      "ROLE_SYS_ADMIN"
    ],
    "userUuid": "673d2cda-2d1a-11e8-a232-d879d2b204fc"
  }
]

PATCH/account/v2/companies/{companyUuid}/memberships/roles

Update role assignments for one or more company memberships (users).

API clients acting on behalf of an end user must first call Read assignable roles for company membership to retrieve the list of roles they are allowed to update.

Note: You cannot set the Marketplace Manager role through the API.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER Allows access to read and write all marketplace data.
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request

Body Parameters

User company membership role data

Array of PatchUserCompanyMembershipsAccountV2

Property Type Description
rolesToAdd array of string

Roles to add to this membership. One or more of the following: ROLE_CHANNEL_PRODUCT_SUPPORT (Product Support), ROLE_SALES_SUPPORT (Sales Support), ROLE_RESELLER_MANAGER (Reseller Manager), ROLE_RESELLER (Reseller), ROLE_CHANNEL_SUPPORT (Customer Support), ROLE_SYS_ADMIN (Company Admin), ROLE_BILLING_ADMIN (Billing Admin), ROLE_DEVELOPER (Developer).

rolesToRemove array of string

Roles to remove from this membership. One or more of the following: ROLE_CHANNEL_ADMIN (Marketplace Manager), ROLE_CHANNEL_PRODUCT_SUPPORT (Product Support), ROLE_SALES_SUPPORT (Sales Support), ROLE_RESELLER_MANAGER (Reseller Manager), ROLE_RESELLER (Reseller), ROLE_CHANNEL_SUPPORT (Customer Support), ROLE_SYS_ADMIN (Company Admin), ROLE_BILLING_ADMIN (Billing Admin), ROLE_DEVELOPER (Developer).

userUuid string

UUID of the user whose membership roles need to be modified

Responses

Status Meaning Description Definition
200 OK Success
400 Bad Request Bad request
401 Unauthorized Unauthorized
404 Not Found Company not found

Create company membership

Example request

curl -X POST https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Represents a user membership to a company since a user can be a member of multiple companies ([Companies](#companies))",
      "type": "object",
      "title": "CreateUserCompanyMembershipAccountV2",
      "properties": {
        "roles": {
          "description": "Optional.  When not included the company default role will be used.\n\nRoles for this membership. One or more of the following: ROLE_USER (User), ROLE_CHANNEL_PRODUCT_SUPPORT (Product Support), ROLE_SALES_SUPPORT (Sales Support), ROLE_RESELLER_MANAGER (Reseller Manager), ROLE_RESELLER (Reseller), ROLE_CHANNEL_SUPPORT (Customer Support), ROLE_SYS_ADMIN (Company Admin), ROLE_BILLING_ADMIN (Billing Admin), ROLE_DEVELOPER (Developer). For user roles (not associated with membership), see [UserAccountV2](#useraccountv2).",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "user": {
          "allOf": [
            {
              "description": "User information data",
              "type": "object",
              "title": "CreateUserAccountV2",
              "properties": {
                "allowLogin": {
                  "description": "Optional. Default is \"true\".\n\nWhen set to \"true\", the user is invited to this marketplace company with login access. The user can purchase and assign products within the company. Products can also be purchased on their behalf, and assigned to them.\n\nWhen set to \"false\", the user is added to this marketplace company without login access. Products are purchased and assigned on their behalf, and they access those products directly through the product interface.\n\nNote: If a user already exists in the marketplace and is being added to an additional company, they must be added with the same login access as their other companies.  For example, if a user is currently a member of company A with login access then it's not allowed to add them to company B without login access.",
                  "type": "boolean"
                },
                "email": {
                  "description": "Email address of the user being added to this company.  Used to determine if user already exists in the marketplace and invite the user to the company when allowLogin=true.",
                  "type": "string"
                },
                "externalId": {
                  "description": "External identifier of the user",
                  "type": "string"
                },
                "firstName": {
                  "description": "First name of the user being added to this company.",
                  "type": "string"
                },
                "idpUuid": {
                  "description": "UUID of the identity provider that the user will always use to log in. Contact your AppDirect technical consultant or business consultant to obtain the UUID.",
                  "type": "string"
                },
                "lastName": {
                  "description": "Last name of the user being added to this company.",
                  "type": "string",
                  "nullable": true
                },
                "userName": {
                  "description": "User name.\nIf not provided, use the user's email address",
                  "type": "string",
                  "nullable": true
                }
              },
              "example": {
                "allowLogin": true,
                "email": "jude.doe@company8578572384.com",
                "externalId": "john.simpson",
                "firstName": "Jude",
                "idpUuid": "135e3a9f-7f86-46a6-a0af-47a7b3a8936d",
                "lastName": "Doe",
                "username": "john.simpson"
              }
            },
            {
              "description": "User data"
            }
          ]
        }
      },
      "example": {
        "roles": [
          "ROLE_USER"
        ],
        "user": {
          "allowLogin": true,
          "email": "jane.lee@company1151609035.com",
          "firstName": "Jane",
          "lastName": "Lee"
        }
      }
    },
    {
      "example": {
        "roles": [
          "ROLE_USER"
        ],
        "user": {
          "allowLogin": true,
          "email": "mary.gonsalez@company3157614232.com",
          "firstName": "Mary",
          "lastName": "Gonsalez"
        }
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "roles": [
    "ROLE_USER"
  ],
  "user": {
    "allowLogin": true,
    "email": "mary.gonsalez@company3157614232.com",
    "firstName": "Mary",
    "lastName": "Gonsalez"
  }
}

Example response

{
  "company": {
    "customAttributes": [
      {
        "attributeType": "TEXT",
        "hint": "US West, US Central, or US East",
        "label": "email",
        "name": "Geographic Region",
        "value": "US"
      }
    ],
    "defaultRole": "DEVELOPER",
    "enabled": true,
    "links": [
      {
        "href": "http://localhost:8080/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
        "rel": "self"
      },
      {
        "href": "http://localhost:8080/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/memberships",
        "rel": "memberships"
      }
    ],
    "name": "Appdirect",
    "phoneNumber": "9259221234",
    "picture": null,
    "reseller": true,
    "uuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
    "vendor": true
  },
  "enabled": true,
  "lastUsed": false,
  "links": [
    {
      "href": "http://localhost:8080/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/memberships/29c370c8-960a-43a0-8dc5-c09aadbaa101",
      "rel": "self"
    },
    {
      "href": "http://localhost:8080/api/account/v2/users/29c370c8-960a-43a0-8dc5-c09aadbaa101",
      "rel": "user"
    },
    {
      "href": "http://localhost:8080/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
      "rel": "company"
    }
  ],
  "metadata": {
    "mosi_username": null
  },
  "mosiUser": null,
  "position": null,
  "roles": [
    "ROLE_DEVELOPER"
  ],
  "user": {
    "activated": false,
    "allowLogin": true,
    "boostUser": null,
    "currency": null,
    "customAttributes": [],
    "email": "mary.gonsalez@company3157614232.com",
    "firstName": "Mary",
    "lastName": "Gonsalez",
    "ldapId": null,
    "links": [
      {
        "href": "http://localhost:8080/api/account/v2/users/29c370c8-960a-43a0-8dc5-c09aadbaa101",
        "rel": "self"
      },
      {
        "href": "http://localhost:8080/api/account/v2/users/29c370c8-960a-43a0-8dc5-c09aadbaa101/memberships",
        "rel": "memberships"
      }
    ],
    "metadata": {
      "apsUid": null
    },
    "picture": null,
    "roles": [
      "ROLE_USER"
    ],
    "userName": "mary.gonsalez@company3157614232.com",
    "uuid": "29c370c8-960a-43a0-8dc5-c09aadbaa101"
  }
}

POST/account/v2/companies/{companyUuid}/memberships

Add a new or existing user as a member of a marketplace company.

If no user exists with the given email address a new user account (Users) will be created. Use the allowLogin body parameter to control if a new user account should be invited to the marketplace with login access or created as a managed user without login access. See CreateUserAccountV2 for more information on the allowLogin parameter.

Depending on channel configuration, an invited membership is either created immediately, or when the invited user accepts the invitation.

Note: You cannot set the Marketplace Manager role through the API.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER Allows access to read and write all marketplace data.
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request
inviterUuid query string Unique identifier of the inviter in the API request. Required only when ROLE_PARTNER authority/scope is used to make the API request.

Body Parameters

User company membership data

CreateUserCompanyMembershipAccountV2 object:

Property Type Description
roles array of string

Optional. When not included the company default role will be used.

Roles for this membership. One or more of the following: ROLE_USER (User), ROLE_CHANNEL_PRODUCT_SUPPORT (Product Support), ROLE_SALES_SUPPORT (Sales Support), ROLE_RESELLER_MANAGER (Reseller Manager), ROLE_RESELLER (Reseller), ROLE_CHANNEL_SUPPORT (Customer Support), ROLE_SYS_ADMIN (Company Admin), ROLE_BILLING_ADMIN (Billing Admin), ROLE_DEVELOPER (Developer). For user roles (not associated with membership), see UserAccountV2.

user CreateUserAccountV2

User data

Responses

Status Meaning Description Definition
201 Created Success UserCompanyMembershipAccountV2
401 Unauthorized Unauthorized
404 Not Found Company/Inviter not found

Delete company membership

Example request

curl -X DELETE https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}',
{
  method: 'DELETE'

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE/account/v2/companies/{companyUuid}/memberships/{userUuid}

Delete a marketplace user's company membership.

If this is the only company the user was member of, user is marked as deleted. A user that has active entitlements, owns products or is externally managed can't be deleted.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER Allows access to read and write all marketplace data.
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request
*userUuid path string Unique identifier of user in the API request

Responses

Status Meaning Description Definition
204 No Content Success
401 Unauthorized Unauthorized
404 Not Found Company/User/Membership not found

Invite a managed user

Example request

curl -X POST https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/invite \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/invite HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/invite',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/invite',
{
  method: 'POST'

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/invite', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/invite',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/invite");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST/account/v2/companies/{companyUuid}/memberships/{userUuid}/invite

Invite a managed user as a member of a marketplace company. If the user is a member of a managed company, the managed company identifier must be used in this request. The operation will then also convert the managed company to a regular company.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER Allows access to read and write all marketplace data.
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request
inviterUuid query string Unique identifier of the inviter in the API request. Required only when ROLE_PARTNER authority/scope is used to make the API request.
*userUuid path string Unique identifier of user in the API request

Responses

Status Meaning Description Definition
204 No Content Success
401 Unauthorized Unauthorized
404 Not Found Company/ManagedUser/Inviter not found

Enable/Disable company membership

Example request

curl -X PATCH https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PATCH https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}',
  method: 'patch',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Represents partially updating a user membership to company",
      "type": "object",
      "title": "PatchUserCompanyMembershipAccountV2",
      "properties": {
        "enabled": {
          "description": "Indicates whether membership is enabled",
          "type": "boolean"
        }
      },
      "example": {
        "enabled": true
      }
    },
    {
      "example": {
        "enabled": true
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.patch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.patch 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "enabled": true
}

Example response

{
  "company": {
    "defaultRole": "USER",
    "enabled": true,
    "links": [
      {
        "href": "http://appdirect/api/account/v2/companies/88542fbc-f801-4588-9525-e615146889f7",
        "rel": "self"
      },
      {
        "href": "http://appdirect/api/account/v2/companies/88542fbc-f801-4588-9525-e615146889f7/memberships",
        "rel": "memberships"
      }
    ],
    "name": "Company 1079194187",
    "phoneNumber": "9259221234",
    "picture": "http://localhost:8080/profilePics/http://cdn/company.png",
    "uuid": "88542fbc-f801-4588-9525-e615146889f7",
    "vendor": false
  },
  "enabled": true,
  "lastUsed": false,
  "links": [
    {
      "href": "http://appdirect/api/account/v2/companies/88542fbc-f801-4588-9525-e615146889f7/memberships/9cc60e5e-5a46-4efb-9d53-afc6ee0586cd",
      "rel": "self"
    },
    {
      "href": "http://appdirect/api/account/v2/users/9cc60e5e-5a46-4efb-9d53-afc6ee0586cd",
      "rel": "user"
    },
    {
      "href": "http://appdirect/api/account/v2/companies/88542fbc-f801-4588-9525-e615146889f7",
      "rel": "company"
    }
  ],
  "metadata": {
    "mosi_username": null
  },
  "mosiUser": null,
  "position": null,
  "roles": [
    "ROLE_BILLING_ADMIN",
    "ROLE_SYS_ADMIN"
  ],
  "user": {
    "activated": true,
    "allowLogin": true,
    "boostUser": null,
    "email": "susan.gonsalez@company4486527851.com",
    "firstName": "Susan",
    "lastName": "Gonsalez",
    "ldapId": null,
    "links": [
      {
        "href": "http://appdirect/api/account/v2/users/9cc60e5e-5a46-4efb-9d53-afc6ee0586cd",
        "rel": "self"
      },
      {
        "href": "http://appdirect/api/account/v2/users/9cc60e5e-5a46-4efb-9d53-afc6ee0586cd/memberships",
        "rel": "memberships"
      }
    ],
    "metadata": {
      "apsUid": null
    },
    "picture": null,
    "roles": [
      "ROLE_USER"
    ],
    "userName": "susan.gonsalez",
    "uuid": "9cc60e5e-5a46-4efb-9d53-afc6ee0586cd"
  }
}

PATCH/account/v2/companies/{companyUuid}/memberships/{userUuid}

Enable or disable marketplace user's company membership.

This only changes the user company membership's enabled status; all other attributes are ignored.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER Allows access to read and write all marketplace data.
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request
*userUuid path string Unique identifier of user in the API request

Body Parameters

User company membership data

PatchUserCompanyMembershipAccountV2 object:

Property Type Description
enabled boolean

Indicates whether membership is enabled

Responses

Status Meaning Description Definition
200 OK Success UserCompanyMembershipAccountV2
401 Unauthorized Unauthorized
404 Not Found Company/User/Membership not found

Read assignable roles for company membership

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/assignableRoles \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/assignableRoles HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/assignableRoles',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/assignableRoles',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/assignableRoles', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/assignableRoles',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/assignableRoles");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "name": "USER"
  },
  {
    "name": "CHANNEL_PRODUCT_SUPPORT"
  },
  {
    "name": "SALES_SUPPORT"
  },
  {
    "name": "CHANNEL_SUPPORT"
  }
]

GET/account/v2/companies/{companyUuid}/memberships/{userUuid}/assignableRoles

Retrieve marketplace roles that can be assigned by this company membership.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER_READ Allows access to read all marketplace data.
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.
ROLE_USER Allows access as current user matches the user in path.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request
*userUuid path string Unique identifier of user in the API request

Responses

Status Meaning Description Definition
200 OK Success array of UserRoleAccountV2
401 Unauthorized Unauthorized
404 Not Found Company/User/Membership not found

Read company membership

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "company": {
    "customAttributes": [
      {
        "attributeType": "TEXT",
        "hint": "US West, US Central, or US East",
        "label": "Geographic Region",
        "name": "Geographic Region",
        "value": "US"
      },
      {
        "attributeType": "MULTISELECT",
        "hint": "",
        "label": "Label Names",
        "name": "Company Details",
        "valueKeys": [
          "great option"
        ]
      }
    ],
    "defaultRole": "DEVELOPER",
    "enabled": true,
    "links": [
      {
        "href": "http://appdirect/api/account/v2/companies/4be3ce24-a702-46b9-a789-f15ce822a9ef",
        "rel": "self"
      },
      {
        "href": "http://appdirect/api/account/v2/companies/4be3ce24-a702-46b9-a789-f15ce822a9ef/memberships",
        "rel": "memberships"
      }
    ],
    "name": "Company 5261852235",
    "phoneNumber": "9259221234",
    "picture": "http://localhost:8080/profilePics/http://cdn/company.png",
    "reseller": true,
    "uuid": "4be3ce24-a702-46b9-a789-f15ce822a9ef",
    "vendor": true
  },
  "enabled": true,
  "lastUsed": false,
  "links": [
    {
      "href": "http://appdirect/api/account/v2/companies/4be3ce24-a702-46b9-a789-f15ce822a9ef/memberships/6de203c1-a583-455a-ba95-3797edc262d0",
      "rel": "self"
    },
    {
      "href": "http://appdirect/api/account/v2/users/6de203c1-a583-455a-ba95-3797edc262d0",
      "rel": "user"
    },
    {
      "href": "http://appdirect/api/account/v2/companies/4be3ce24-a702-46b9-a789-f15ce822a9ef",
      "rel": "company"
    }
  ],
  "metadata": {
    "mosi_username": "adazuretest@sdasd21321.onmicrosoft.com"
  },
  "mosiUser": {
    "username": "adazuretest@sdasd21321.onmicrosoft.com"
  },
  "position": "Business Analyst",
  "roles": [
    "ROLE_BILLING_ADMIN",
    "ROLE_SYS_ADMIN"
  ],
  "user": {
    "activated": true,
    "allowLogin": true,
    "boostUser": {
      "apsUid": "murnu8w"
    },
    "currency": null,
    "customAttributes": [
      {
        "attributeType": "TEXT",
        "hint": "commission_hint",
        "label": "Commission_Payout_ID",
        "name": "C5125859",
        "value": "value"
      }
    ],
    "email": "jude.simpson@company5833088198.com",
    "firstName": "Jude",
    "lastName": "Simpson",
    "ldapId": "1",
    "links": [
      {
        "href": "http://appdirect/api/account/v2/users/6de203c1-a583-455a-ba95-3797edc262d0",
        "rel": "self"
      },
      {
        "href": "http://appdirect/api/account/v2/users/6de203c1-a583-455a-ba95-3797edc262d0/memberships",
        "rel": "memberships"
      }
    ],
    "metadata": {
      "apsUid": "murnu8w"
    },
    "picture": "http://appdirect/profilePics/img2147417701652580695.png?184b58e358f087154d94329f9000b28a",
    "roles": [
      "ROLE_USER"
    ],
    "userName": "jude.simpson",
    "uuid": "6de203c1-a583-455a-ba95-3797edc262d0"
  }
}

GET/account/v2/companies/{companyUuid}/memberships/{userUuid}

Retrieve a marketplace user's company membership information.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER_READ Allows access to read all marketplace data.
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager for the marketplace. Only memberships with the Reseller role or that are linked to Reseller companies can be retrieved.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_USER Allows access as an end user in the company

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request
includeCompanies query boolean Optional. Default is true. When set to true, companies will be included in the API response. When set to false, companies will not be included.
includeUserCustomAttributes query boolean Optional. Default is true. When set to true, user custom attributes will be included in the API response. When set to false, user custom attributes will not be included.
*userUuid path string Unique identifier of user in the API request

Responses

Status Meaning Description Definition
200 OK Success UserCompanyMembershipAccountV2
401 Unauthorized Unauthorized
404 Not Found Company/User/Membership not found

List company memberships

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "company": {
        "customAttributes": [
          {
            "attributeType": "TEXT",
            "hint": "US West, US Central, or US East",
            "label": "Geographic Region",
            "name": "Geographic Region",
            "value": "US"
          },
          {
            "attributeType": "MULTISELECT",
            "hint": "",
            "label": "Label Names",
            "name": "Company Details",
            "valueKeys": [
              "great option"
            ]
          }
        ],
        "defaultRole": "DEVELOPER",
        "enabled": true,
        "links": [
          {
            "href": "http://appdirect/api/account/v2/companies/4be3ce24-a702-46b9-a789-f15ce822a9ef",
            "rel": "self"
          },
          {
            "href": "http://appdirect/api/account/v2/companies/4be3ce24-a702-46b9-a789-f15ce822a9ef/memberships",
            "rel": "memberships"
          }
        ],
        "name": "Company 5261852235",
        "phoneNumber": "9259221234",
        "picture": "http://localhost:8080/profilePics/http://cdn/company.png",
        "reseller": true,
        "uuid": "4be3ce24-a702-46b9-a789-f15ce822a9ef",
        "vendor": true
      },
      "enabled": true,
      "lastUsed": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/4be3ce24-a702-46b9-a789-f15ce822a9ef/memberships/d6e7c0d2-e86a-4ea2-a6c9-c1bbeb2410f0",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/users/d6e7c0d2-e86a-4ea2-a6c9-c1bbeb2410f0",
          "rel": "user"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/4be3ce24-a702-46b9-a789-f15ce822a9ef",
          "rel": "company"
        }
      ],
      "metadata": {
        "mosi_username": "agcompanybill1@testl3816.onmicrosoft.com"
      },
      "mosiUser": {
        "username": "agcompanybill1@testl3816.onmicrosoft.com"
      },
      "position": "Project Team Lead",
      "roles": [
        "ROLE_BILLING_ADMIN",
        "ROLE_SYS_ADMIN"
      ],
      "user": {
        "activated": true,
        "allowLogin": true,
        "boostUser": {
          "apsUid": "murnu8w"
        },
        "currency": null,
        "customAttributes": [
          {
            "attributeType": "TEXT",
            "hint": "commission_hint",
            "label": "Commission_Payout_ID",
            "name": "C5125859",
            "value": "value"
          }
        ],
        "email": "john.simpson@company58330881982.com",
        "firstName": "John",
        "lastName": "Simpson",
        "ldapId": "1",
        "links": [
          {
            "href": "http://appdirect/api/account/v2/users/d6e7c0d2-e86a-4ea2-a6c9-c1bbeb2410f0",
            "rel": "self"
          },
          {
            "href": "http://appdirect/api/account/v2/users/d6e7c0d2-e86a-4ea2-a6c9-c1bbeb2410f0/memberships",
            "rel": "memberships"
          }
        ],
        "metadata": {
          "apsUid": "murnu8w"
        },
        "picture": "http://appdirect/profilePics/img2147417701652580695.png?184b58e358f087154d94329f9000b28a",
        "roles": [
          "ROLE_USER"
        ],
        "userName": "john.simpson",
        "uuid": "d6e7c0d2-e86a-4ea2-a6c9-c1bbeb2410f0"
      }
    },
    {
      "company": {
        "customAttributes": [
          {
            "attributeType": "TEXT",
            "hint": "US West, US Central, or US East",
            "label": "Geographic Region",
            "name": "Geographic Region",
            "value": "US"
          },
          {
            "attributeType": "MULTISELECT",
            "hint": "",
            "label": "Label Names",
            "name": "Company Details",
            "valueKeys": [
              "great option"
            ]
          }
        ],
        "defaultRole": "DEVELOPER",
        "enabled": true,
        "links": [
          {
            "href": "http://appdirect/api/account/v2/companies/4be3ce24-a702-46b9-a789-f15ce822a9ef",
            "rel": "self"
          },
          {
            "href": "http://appdirect/api/account/v2/companies/4be3ce24-a702-46b9-a789-f15ce822a9ef/memberships",
            "rel": "memberships"
          }
        ],
        "name": "Company 5261852235",
        "phoneNumber": "9259221234",
        "picture": "http://localhost:8080/profilePics/http://cdn/company.png",
        "reseller": true,
        "uuid": "4be3ce24-a702-46b9-a789-f15ce822a9ef",
        "vendor": true
      },
      "enabled": true,
      "lastUsed": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/4be3ce24-a702-46b9-a789-f15ce822a9ef/memberships/6de203c1-a583-455a-ba95-3797edc262d0",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/users/6de203c1-a583-455a-ba95-3797edc262d0",
          "rel": "user"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/4be3ce24-a702-46b9-a789-f15ce822a9ef",
          "rel": "company"
        }
      ],
      "metadata": {
        "mosi_username": "adazuretest@sdasd21321.onmicrosoft.com"
      },
      "mosiUser": {
        "username": "adazuretest@sdasd21321.onmicrosoft.com"
      },
      "position": "Business Analyst",
      "roles": [
        "ROLE_BILLING_ADMIN",
        "ROLE_SYS_ADMIN"
      ],
      "user": {
        "activated": true,
        "allowLogin": true,
        "boostUser": null,
        "currency": null,
        "customAttributes": [],
        "email": "jude.simpson@company5833088198.com",
        "firstName": "Jude",
        "lastName": "Simpson",
        "ldapId": null,
        "links": [
          {
            "href": "http://appdirect/api/account/v2/users/6de203c1-a583-455a-ba95-3797edc262d0",
            "rel": "self"
          },
          {
            "href": "http://appdirect/api/account/v2/users/6de203c1-a583-455a-ba95-3797edc262d0/memberships",
            "rel": "memberships"
          }
        ],
        "metadata": {
          "apsUid": null
        },
        "picture": null,
        "roles": [
          "ROLE_USER"
        ],
        "userName": "jude.simpson",
        "uuid": "6de203c1-a583-455a-ba95-3797edc262d0"
      }
    }
  ],
  "links": [],
  "page": {
    "number": 0,
    "size": 50,
    "totalElements": 2,
    "totalPages": 1
  }
}

GET/account/v2/companies/{companyUuid}/memberships

List a marketplace company's user memberships.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER_READ Allows access to read all marketplace data.
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_USER Allows access as an end user in the company.

Parameters

Parameter Type Data Type Default Description
active query boolean If specified, returns only memberships associated with users having the specified active status
*companyUuid path string Unique identifier of company in the API request
enabled query boolean If specified, returns only memberships with the specified enabled status
groupUuid query string If specified, returns only memberships that are a part of the specified group
includeCompanies query boolean Optional. Default is true. When set to true, companies will be included in the API response. When set to false, companies will not be included.
includeUserCustomAttributes query boolean Optional. Default is true. When set to true, user custom attributes will be included in the API response. When set to false, user custom attributes will not be included.
page query integer 0 Zero-based page index
roleName query string If specified, returns only memberships with the specified role enabled
searchText query string Search term used to search on different fields of a membership
size query integer 50 The size of the page to be returned
sortField query string of enum:
DATE
FIRST_NAME
LAST_NAME
DATE The property to sort by
sortOrder query string of enum:
ASC
DESC
ASC Ordering type

Responses

Status Meaning Description Definition
200 OK Success PagedUserCompanyMembershipAccountV2
401 Unauthorized Unauthorized
404 Not Found Company not found

List application assignments for company membership

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/assignments \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/assignments HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/assignments',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/assignments',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/assignments', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/assignments',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/assignments");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "assignmentCount": 1,
      "companyEntitlementId": 23,
      "companyEntitlementLabel": "Mock App",
      "companyEntitlementStatus": "ACTIVE",
      "createdOn": 1480699562586,
      "gridImageUrl": "http://appdirect/app_resources/9/myAppIcon/img1445094381431796823.png?466c707fefd0aba59d170d532e013f3d",
      "links": [
        {
          "href": "http://appdirect/api/marketplace/v1/products/47",
          "rel": "application"
        }
      ],
      "listImageUrl": "http://appdirect/app_resources/9/thumbs_64/img1445094381431796823.png?466c707fefd0aba59d170d532e013f3d",
      "ownerFirstName": "Susan",
      "ownerId": 40,
      "ownerLastName": "Simpson",
      "ownerUuid": "4aad1f87-a653-4031-9b64-de42c7c5fa3f",
      "productName": "MockApp208301774438095187",
      "status": "ACTIVE",
      "uuid": "4d8ab391-33b9-472f-abce-6a6bd5e4c39b"
    },
    {
      "assignmentCount": 2,
      "companyEntitlementId": 1323,
      "companyEntitlementLabel": "Sample App",
      "companyEntitlementStatus": "ACTIVE",
      "createdOn": 1481650330000,
      "gridImageUrl": "http://appdirect/app_resources/2723/myAppIcon/img4627488903781521711.png?0e3706dc6af5012131ca53ed107d0675",
      "links": [
        {
          "href": "http://appdirect/api/marketplace/v1/products/2723?country=&currency=",
          "rel": "application"
        }
      ],
      "listImageUrl": "http://appdirect/app_resources/2723/thumbs_64/img4627488903781521711.png?5eee537065a26ca7f488610144784c88\n",
      "ownerFirstName": "super",
      "ownerId": 1,
      "ownerLastName": "user",
      "ownerUuid": "2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1",
      "productName": "Sample Application2",
      "status": "ACTIVE",
      "uuid": "88ab5014-56fa-4e4e-9090-8ac6e4e2d189"
    }
  ],
  "links": []
}

GET/account/v2/companies/{companyUuid}/memberships/{userUuid}/assignments

Retrieve a marketplace user's application assignments.

Returns assignments that are not FAILED or CANCELLED.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER_READ Allows access to read all marketplace data.
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request
*userUuid path string Unique identifier of user in the API request

Responses

Status Meaning Description Definition
200 OK Success ResourcesUserAssignmentAccountV2
401 Unauthorized Unauthorized
404 Not Found Company/User not found

Read user checklist

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/checklist \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/checklist HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/checklist',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/checklist',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/checklist', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/checklist',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/checklist");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "haveAssignedUsers": false,
  "haveCompletedCompanyProfile": false,
  "haveCompletedProfile": false,
  "haveInvitedUsers": false,
  "havePurchasedProduct": false,
  "links": []
}

GET/account/v2/companies/{companyUuid}/memberships/{userUuid}/checklist

Retrieve a marketplace user's checklist.

Required Scope and Authorization Rules

Scope Rule
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 access to read all marketplace data.
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.
ROLE_USER Allows access as current user matches the user in path.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request
*userUuid path string Unique identifier of user in the API request

Responses

Status Meaning Description Definition
200 OK Success UserChecklistAccountV2
401 Unauthorized Unauthorized
404 Not Found Company/User not found

Request to purchase an application

Example request

curl -X POST https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/applications/{applicationId}/purchaseRequests \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/applications/{applicationId}/purchaseRequests HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/applications/{applicationId}/purchaseRequests',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/applications/{applicationId}/purchaseRequests',
{
  method: 'POST'

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/applications/{applicationId}/purchaseRequests', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/applications/{applicationId}/purchaseRequests',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/applications/{applicationId}/purchaseRequests");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST/account/v2/companies/{companyUuid}/memberships/{userUuid}/applications/{applicationId}/purchaseRequests

Request to purchase an application for the given marketplace company and user.

This causes an email notification to be sent to company administrators (system and billing admins).

Required Scope and Authorization Rules

Scope Rule
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 Allows access to read and write all marketplace data.
ROLE_USER Allows access as current user matches the user in path.

Parameters

Parameter Type Data Type Default Description
*applicationId path integer Unique identifier of application to purchase
*companyUuid path string Unique identifier of company in the API request
*userUuid path string User Unique identifier of user in the API request

Responses

Status Meaning Description Definition
204 No Content Success
401 Unauthorized Unauthorized
404 Not Found Company/User/Membership/Application not found
409 Conflict Application already purchased

Update company membership

Example request

curl -X PUT https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Represents updating a user membership to company",
      "type": "object",
      "title": "UpdateUserCompanyMembershipAccountV2",
      "properties": {
        "enabled": {
          "description": "Indicates whether the membership is enabled",
          "type": "boolean"
        },
        "roles": {
          "description": "Roles for this membership. One or more of the following: ROLE_CHANNEL_ADMIN (Marketplace Manager), ROLE_CHANNEL_PRODUCT_SUPPORT (Product Support), ROLE_SALES_SUPPORT (Sales Support), ROLE_RESELLER_MANAGER (Reseller Manager), ROLE_RESELLER (Reseller), ROLE_CHANNEL_SUPPORT (Customer Support), ROLE_SYS_ADMIN (Company Admin), ROLE_BILLING_ADMIN (Billing Admin), ROLE_DEVELOPER (Developer).",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "example": {
        "enabled": true,
        "roles": [
          "ROLE_BILLING_ADMIN",
          "ROLE_DEVELOPER",
          "ROLE_SYS_ADMIN"
        ]
      }
    },
    {
      "example": {
        "enabled": true,
        "roles": [
          "ROLE_BILLING_ADMIN",
          "ROLE_DEVELOPER",
          "ROLE_SYS_ADMIN"
        ]
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "enabled": true,
  "roles": [
    "ROLE_BILLING_ADMIN",
    "ROLE_DEVELOPER",
    "ROLE_SYS_ADMIN"
  ]
}

Example response

{
  "company": {
    "customAttributes": [
      {
        "attributeType": "TEXT",
        "hint": "US West, US Central, or US East",
        "label": "email",
        "name": "Geographic Region",
        "value": "US1"
      }
    ],
    "defaultRole": "DEVELOPER",
    "enabled": true,
    "links": [
      {
        "href": "http://localhost:8080/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
        "rel": "self"
      },
      {
        "href": "http://localhost:8080/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/memberships",
        "rel": "memberships"
      }
    ],
    "name": "Appdirect",
    "phoneNumber": "9259221234",
    "picture": null,
    "reseller": true,
    "uuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
    "vendor": true
  },
  "enabled": true,
  "lastUsed": false,
  "links": [
    {
      "href": "http://localhost:8080/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/memberships/a38ef2d2-cdad-483c-ba86-fa6186d12263",
      "rel": "self"
    },
    {
      "href": "http://localhost:8080/api/account/v2/users/a38ef2d2-cdad-483c-ba86-fa6186d12263",
      "rel": "user"
    },
    {
      "href": "http://localhost:8080/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
      "rel": "company"
    }
  ],
  "metadata": {
    "mosi_username": null
  },
  "mosiUser": null,
  "position": null,
  "roles": [
    "ROLE_BILLING_ADMIN",
    "ROLE_DEVELOPER",
    "ROLE_SYS_ADMIN",
    "ROLE_CHANNEL_ADMIN",
    "ROLE_CHANNEL_PRODUCT_SUPPORT",
    "ROLE_CHANNEL_SUPPORT",
    "ROLE_SALES_SUPPORT",
    "ROLE_RESELLER",
    "ROLE_RESELLER_MANAGER"
  ],
  "user": {
    "activated": true,
    "allowLogin": true,
    "boostUser": {
      "apsUid": "murnu8w"
    },
    "currency": null,
    "customAttributes": [],
    "email": "guy.smith24@yopmail.com",
    "firstName": "Guy",
    "lastName": "Smith",
    "ldapId": null,
    "links": [
      {
        "href": "http://localhost:8080/api/account/v2/users/a38ef2d2-cdad-483c-ba86-fa6186d12263",
        "rel": "self"
      },
      {
        "href": "http://localhost:8080/api/account/v2/users/a38ef2d2-cdad-483c-ba86-fa6186d12263/memberships",
        "rel": "memberships"
      }
    ],
    "metadata": {
      "apsUid": "murnu8w"
    },
    "picture": null,
    "roles": [
      "ROLE_USER"
    ],
    "userName": "guy.smith24@yopmail.com",
    "uuid": "a38ef2d2-cdad-483c-ba86-fa6186d12263"
  }
}

PUT/account/v2/companies/{companyUuid}/memberships/{userUuid}

Update a marketplace user's company membership.

Updates the following roles based on the provided user company membership data: Product Support, Sales Support, Reseller Manager, Customer Support, Reseller, Billing Admin, Company Admin, Developer. This also enables/disables the membership based on provided user company membership data.

Note: You cannot set the Marketplace Manager role through the API.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER Allows access to read and write all marketplace data.
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request
*userUuid path string Unique identifier of user in the API request

Body Parameters

Update User company membership data

UpdateUserCompanyMembershipAccountV2 object:

Property Type Description
enabled boolean

Indicates whether the membership is enabled

roles array of string

Roles for this membership. One or more of the following: ROLE_CHANNEL_ADMIN (Marketplace Manager), ROLE_CHANNEL_PRODUCT_SUPPORT (Product Support), ROLE_SALES_SUPPORT (Sales Support), ROLE_RESELLER_MANAGER (Reseller Manager), ROLE_RESELLER (Reseller), ROLE_CHANNEL_SUPPORT (Customer Support), ROLE_SYS_ADMIN (Company Admin), ROLE_BILLING_ADMIN (Billing Admin), ROLE_DEVELOPER (Developer).

Responses

Status Meaning Description Definition
200 OK Success UserCompanyMembershipAccountV2
401 Unauthorized Unauthorized
404 Not Found Company/User/Membership not found

List groups for company membership

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/groups \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/groups HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/groups',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/groups',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/groups', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/groups',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/groups");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "superuser group",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/56ac8abc-2b63-4b66-a648-dde419aa6c4a",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/56ac8abc-2b63-4b66-a648-dde419aa6c4a/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 2,
      "name": "superuser-group",
      "systemManaged": false,
      "uuid": "56ac8abc-2b63-4b66-a648-dde419aa6c4a"
    },
    {
      "companyDefault": true,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "All company users",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/5acdd82e-5cb7-4a23-b842-38d514aafcdf",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/5acdd82e-5cb7-4a23-b842-38d514aafcdf/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 88,
      "name": "Everyone",
      "systemManaged": true,
      "uuid": "5acdd82e-5cb7-4a23-b842-38d514aafcdf"
    },
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "All Company Admin users",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/74f7132f-8dd9-4b3a-8014-5aac81dc2c05",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/74f7132f-8dd9-4b3a-8014-5aac81dc2c05/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 14,
      "name": "Company Admins",
      "systemManaged": true,
      "uuid": "74f7132f-8dd9-4b3a-8014-5aac81dc2c05"
    },
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "All Marketplace Managers",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/9a79c98d-8e36-49ed-837c-cc9473dee851",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/9a79c98d-8e36-49ed-837c-cc9473dee851/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 9,
      "name": "Marketplace Managers",
      "systemManaged": true,
      "uuid": "9a79c98d-8e36-49ed-837c-cc9473dee851"
    },
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "All Reseller Manager users",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/6d970a9e-a702-406f-808b-9483163efdd1",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/6d970a9e-a702-406f-808b-9483163efdd1/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 2,
      "name": "Reseller Managers",
      "systemManaged": true,
      "uuid": "6d970a9e-a702-406f-808b-9483163efdd1"
    },
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "All Customer Support users",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/70c65cb0-cbe5-447c-bdce-1d00e4d08f84",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/70c65cb0-cbe5-447c-bdce-1d00e4d08f84/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 12,
      "name": "Customer Support",
      "systemManaged": true,
      "uuid": "70c65cb0-cbe5-447c-bdce-1d00e4d08f84"
    },
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "All Sales Support users",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/73f252d5-0dbe-4414-8384-edb7544b83b6",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/73f252d5-0dbe-4414-8384-edb7544b83b6/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 13,
      "name": "Sales Support",
      "systemManaged": true,
      "uuid": "73f252d5-0dbe-4414-8384-edb7544b83b6"
    },
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "All Product Support users",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/b0cf07b9-9953-406f-ba64-b4ca239f30bf",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/b0cf07b9-9953-406f-ba64-b4ca239f30bf/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 12,
      "name": "Product Support",
      "systemManaged": true,
      "uuid": "b0cf07b9-9953-406f-ba64-b4ca239f30bf"
    },
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "All Developer users",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/a7d34c49-a376-433b-af53-f51be1cf2038",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/a7d34c49-a376-433b-af53-f51be1cf2038/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 78,
      "name": "Developers",
      "systemManaged": true,
      "uuid": "a7d34c49-a376-433b-af53-f51be1cf2038"
    },
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "All Billing Admin users",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/84d6c781-9290-461c-a18f-010791cb87ca",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/84d6c781-9290-461c-a18f-010791cb87ca/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 20,
      "name": "Billing Admins",
      "systemManaged": true,
      "uuid": "84d6c781-9290-461c-a18f-010791cb87ca"
    }
  ],
  "links": [
    {
      "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/memberships/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1/groups?page=0&size=50&sortField=createdOn&sortOrder=DESC",
      "rel": "self"
    }
  ],
  "page": {
    "number": 0,
    "size": 50,
    "totalElements": 10,
    "totalPages": 1
  }
}

GET/account/v2/companies/{companyUuid}/memberships/{userUuid}/groups

Retrieve the list of groups the company membership is in.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER_READ Allows access to read all marketplace data.
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_USER Allows access as an end user in the company

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request
ldap query boolean Set to true when company is externally managed
page query integer 0 Zero-based page index
searchText query string Search term used to search on group name and description
size query integer 50 The size of the page to be returned
sortField query string createdOn
sortOrder query string of enum:
ASC
DESC
DESC
*userUuid path string Unique identifier of user in the API request

Responses

Status Meaning Description Definition
200 OK Success PagedCompanyGroupAccountV2
401 Unauthorized Unauthorized
404 Not Found Company/User not found

Read company assignable roles

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/assignableRoles \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/assignableRoles HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/assignableRoles',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/assignableRoles',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/assignableRoles', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/assignableRoles',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/assignableRoles");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "name": "ROLE_SYS_ADMIN"
  },
  {
    "name": "ROLE_RESELLER"
  },
  {
    "name": "ROLE_BILLING_ADMIN"
  },
  {
    "name": "ROLE_USER"
  }
]

GET/account/v2/companies/{companyUuid}/assignableRoles

Retrieves a list of marketplace roles that the current, logged-in user can assign to any user in any marketplace company.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of the company

Responses

Status Meaning Description Definition
200 OK Success array of UserAssignableRoleV2
401 Unauthorized Unauthorized
404 Not Found Company not found

Content Events

Publish content events

Example request

curl -X POST https://{marketplaceURL}/api/appwise/v2/data \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/appwise/v2/data HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appwise/v2/data',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Descriptions of content change events, and the associated content",
      "type": "object",
      "title": "ContentEvent",
      "required": [
        "key"
      ],
      "properties": {
        "action": {
          "allOf": [
            {
              "description": "An action statement that can be used to describe changes that appear in feeds. The statement is constructed of a verb suffixed by text. For example: Verb (assigned) + text (a task) = action description (assigned a task). If delete boolean is true, the resource is deleted from Customer Search.\n\nRequired parameters: Only Text and Verb are required in requests to create action statements. Only delete is required to delete a resource.",
              "type": "object",
              "title": "Action",
              "required": [
                "text",
                "verb"
              ],
              "properties": {
                "delete": {
                  "description": "If true, the resource is deleted from Search",
                  "type": "boolean"
                },
                "text": {
                  "description": "The text that appears after the verb in the (verb+text) action statement",
                  "type": "string"
                },
                "verb": {
                  "description": "The verb that appears in the (verb+text) action statement",
                  "type": "string"
                }
              },
              "example": {
                "text": "a task",
                "verb": "assigned"
              }
            },
            {
              "description": "Description of changes in the event"
            }
          ]
        },
        "actor": {
          "allOf": [
            {
              "description": "Identify the application user by identifier (accountName) and name.\n\nRequired parameters: Only identifier is required to identify a user.",
              "type": "object",
              "title": "ContentEventActor",
              "required": [
                "identifier"
              ],
              "properties": {
                "identifier": {
                  "description": "Identifier (accountName) for the application user. Format: {user_handle}@{user_uuid}@{company_uuid}. Required.",
                  "type": "string",
                  "example": "bob@a13a9998-e025-4751-8fee-72afdc0fe6d5@2cc88871-e942-4910-96e3-0521d7ae52f4"
                },
                "name": {
                  "description": "Full name of the user in the application",
                  "type": "string",
                  "example": "Bob Roberts"
                }
              },
              "example": {
                "identifier": "bob@a13a9998-e025-4751-8fee-72afdc0fe6d5@2cc88871-e942-4910-96e3-0521d7ae52f4",
                "name": "Bob Roberts"
              }
            },
            {
              "description": "The user (accountName) who made the change. There is no actor for system-generated changes."
            }
          ]
        },
        "changes": {
          "allOf": [
            {
              "description": "Changes to a resource connected to Search",
              "type": "object",
              "title": "Changes",
              "properties": {
                "fields": {
                  "description": "Field changes",
                  "type": "array",
                  "items": {
                    "description": "Defines a field, valid content, appearance, and behavior",
                    "type": "object",
                    "title": "ContentEventField",
                    "required": [],
                    "properties": {},
                    "example": {}
                  }
                },
                "groups": {
                  "description": "Group access changes",
                  "type": "array",
                  "items": {
                    "description": "UUID of a user group configured in the marketplace. Gives resource visibility to a group of users.",
                    "type": "object",
                    "title": "Group",
                    "required": [],
                    "properties": {},
                    "example": {}
                  }
                },
                "users": {
                  "description": "User access changes",
                  "type": "array",
                  "items": {
                    "description": "The application user by identifier (accountName) and name. If delete boolean is true, the user's application account (accountName) for the Search resource is deleted from the ContentEventUser users array.\n\nRequired parameters: Only identifier is required to identify a user. Identifier and delete are required for deletion.",
                    "type": "object",
                    "title": "ContentEventUser",
                    "required": [],
                    "properties": {},
                    "example": {}
                  }
                }
              },
              "example": {
                "fields": [
                  {
                    "display": "expanded",
                    "label": "Project Status",
                    "name": "projectStatus",
                    "op": "replace",
                    "value": "In progress"
                  }
                ],
                "groups": [
                  {
                    "identifier": "c390a4bf-4f54-418a-87ca-5970c332ba17"
                  }
                ],
                "users": [
                  {
                    "identifier": "bob@a13a9998-e025-4751-8fee-72afdc0fe6d5@2cc88871-e942-4910-96e3-0521d7ae52f4",
                    "name": "Bob Roberts"
                  }
                ]
              }
            },
            {
              "description": "List of field and user access changes to apply to the resource. This field must not be provided if the resource is being deleted (\"action.delete\": true)."
            }
          ]
        },
        "contents": {
          "description": "Content items associated with the resource",
          "type": "array",
          "items": {
            "description": "Structured Search content. When delete parameter is true, the content is removed from the resource.",
            "type": "object",
            "title": "Content",
            "required": [
              "url"
            ],
            "properties": {
              "delete": {
                "description": "If true, the content is removed from the resource",
                "type": "boolean"
              },
              "linkedToResource": {
                "description": "Manage duplicate search results for content associated with other resources. If true, link content to associated resources and return it as a single object. If false, content and associated resources are returned as separate objects. Example: Search terms appear in a spreadsheet that is attached to an email. If true, search returns the spreadsheet. If false, search returns the email and the spreadsheet.",
                "type": "boolean"
              },
              "mimeType": {
                "description": "MIME type of the content",
                "type": "string",
                "example": "application/pdf"
              },
              "previewUrl": {
                "description": "URL of the content preview",
                "type": "string",
                "example": "https://myapp.com/orders/1234?preview"
              },
              "searchText": {
                "description": "Full text of the content",
                "type": "string"
              },
              "title": {
                "description": "Title of the content",
                "type": "string",
                "example": "Order request"
              },
              "url": {
                "description": "URL of the content. Required.",
                "type": "string",
                "example": "https://myapp.com/orders/1234"
              }
            },
            "example": {
              "linkedToResource": true,
              "mimeType": "application/pdf",
              "previewUrl": "https://myapp.com/orders/1234?preview",
              "searchText": "string",
              "title": "Order request",
              "url": "https://myapp.com/orders/1234"
            }
          }
        },
        "eventMetadata": {
          "allOf": [
            {
              "description": "Metadata for Search content",
              "type": "object",
              "title": "EventMetadata",
              "required": [
                "id",
                "timestamp",
                "type"
              ],
              "properties": {
                "id": {
                  "description": "Event ID. Required.",
                  "type": "string"
                },
                "timestamp": {
                  "description": "Event timestamp. Required.",
                  "type": "string"
                },
                "type": {
                  "allOf": [
                    {},
                    {}
                  ]
                }
              },
              "example": {
                "id": "6ed0279c-35ed-4c7e-928e-25e46c080431",
                "timestamp": "2020-06-11T15:23:45Z",
                "type": "ResourceUpdated"
              }
            },
            {
              "description": "Metadata associated with the event"
            }
          ]
        },
        "key": {
          "allOf": [
            {
              "description": "Identify a resource",
              "type": "object",
              "title": "Key",
              "required": [
                "instance",
                "resourceId",
                "source"
              ],
              "properties": {
                "instance": {
                  "description": "Vendor account identifier within the application. Required.",
                  "type": "string"
                },
                "resourceId": {
                  "description": "Unique ID of the resource in the instance. Required.",
                  "type": "string"
                },
                "source": {
                  "description": "Application UUID. Note: Application UUID = Product UUID. Required.",
                  "type": "string"
                },
                "timestamp": {
                  "description": "UTC timestamp of when the event occurred in epoch format, with millisecond precision",
                  "type": "integer",
                  "format": "int64"
                }
              },
              "example": {
                "instance": "myclient.myapp.com",
                "resourceId": "order-12345",
                "source": "b2fc6737-3d3f-4da2-afda-f80f25b89af9",
                "timestamp": 1500558736123
              }
            },
            {
              "description": "Event key. Required."
            }
          ]
        }
      },
      "example": {
        "action": {
          "text": "a task",
          "verb": "assigned"
        },
        "actor": {
          "identifier": "bob@a13a9998-e025-4751-8fee-72afdc0fe6d5@2cc88871-e942-4910-96e3-0521d7ae52f4",
          "name": "Bob Roberts"
        },
        "changes": {
          "fields": [
            {
              "display": "expanded",
              "label": "Project Status",
              "name": "projectStatus",
              "op": "replace",
              "value": "In progress"
            }
          ],
          "groups": [
            {
              "identifier": "c390a4bf-4f54-418a-87ca-5970c332ba17"
            }
          ],
          "users": [
            {
              "identifier": "bob@a13a9998-e025-4751-8fee-72afdc0fe6d5@2cc88871-e942-4910-96e3-0521d7ae52f4",
              "name": "Bob Roberts"
            }
          ]
        },
        "contents": [
          {
            "linkedToResource": true,
            "mimeType": "application/pdf",
            "previewUrl": "https://myapp.com/orders/1234?preview",
            "searchText": "string",
            "title": "Order request",
            "url": "https://myapp.com/orders/1234"
          }
        ],
        "eventMetadata": {
          "id": "6ed0279c-35ed-4c7e-928e-25e46c080431",
          "timestamp": "2020-06-11T15:23:45Z",
          "type": "ResourceUpdated"
        },
        "key": {
          "instance": "myclient.myapp.com",
          "resourceId": "order-12345",
          "source": "b2fc6737-3d3f-4da2-afda-f80f25b89af9",
          "timestamp": 1500558736123
        }
      }
    },
    {
      "example": {
        "action": {
          "text": "a task",
          "verb": "assigned"
        },
        "actor": {
          "identifier": "bob@a13a9998-e025-4751-8fee-72afdc0fe6d5@2cc88871-e942-4910-96e3-0521d7ae52f4",
          "name": "Bob Roberts"
        },
        "changes": {
          "fields": [
            {
              "display": "expanded",
              "label": "Project Status",
              "name": "projectStatus",
              "op": "replace",
              "value": "In progress"
            }
          ],
          "groups": [
            {
              "identifier": "c390a4bf-4f54-418a-87ca-5970c332ba17"
            }
          ],
          "users": [
            {
              "identifier": "bob@a13a9998-e025-4751-8fee-72afdc0fe6d5@2cc88871-e942-4910-96e3-0521d7ae52f4",
              "name": "Bob Roberts"
            }
          ]
        },
        "contents": [
          {
            "linkedToResource": true,
            "mimeType": "application/pdf",
            "previewUrl": "https://myapp.com/orders/1234?preview",
            "searchText": "string",
            "title": "Order request",
            "url": "https://myapp.com/orders/1234"
          }
        ],
        "eventMetadata": {
          "id": "6ed0279c-35ed-4c7e-928e-25e46c080431",
          "timestamp": "2020-06-11T15:23:45Z",
          "type": "ResourceUpdated"
        },
        "key": {
          "instance": "myclient.myapp.com",
          "resourceId": "order-12345",
          "source": "b2fc6737-3d3f-4da2-afda-f80f25b89af9",
          "timestamp": 1500558736123
        }
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appwise/v2/data',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/appwise/v2/data', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/appwise/v2/data',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appwise/v2/data");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "action": {
    "text": "a task",
    "verb": "assigned"
  },
  "actor": {
    "identifier": "bob@a13a9998-e025-4751-8fee-72afdc0fe6d5@2cc88871-e942-4910-96e3-0521d7ae52f4",
    "name": "Bob Roberts"
  },
  "changes": {
    "fields": [
      {
        "display": "expanded",
        "label": "Project Status",
        "name": "projectStatus",
        "op": "replace",
        "value": "In progress"
      }
    ],
    "groups": [
      {
        "identifier": "c390a4bf-4f54-418a-87ca-5970c332ba17"
      }
    ],
    "users": [
      {
        "identifier": "bob@a13a9998-e025-4751-8fee-72afdc0fe6d5@2cc88871-e942-4910-96e3-0521d7ae52f4",
        "name": "Bob Roberts"
      }
    ]
  },
  "contents": [
    {
      "linkedToResource": true,
      "mimeType": "application/pdf",
      "previewUrl": "https://myapp.com/orders/1234?preview",
      "searchText": "string",
      "title": "Order request",
      "url": "https://myapp.com/orders/1234"
    }
  ],
  "eventMetadata": {
    "id": "6ed0279c-35ed-4c7e-928e-25e46c080431",
    "timestamp": "2020-06-11T15:23:45Z",
    "type": "ResourceUpdated"
  },
  "key": {
    "instance": "myclient.myapp.com",
    "resourceId": "order-12345",
    "source": "b2fc6737-3d3f-4da2-afda-f80f25b89af9",
    "timestamp": 1500558736123
  }
}

Example response

{}

POST/appwise/v2/data

Publishes content events that contain new or changed data in referenced resources. To access this API, you must configure product-scoped OAuth2 authentication for your application.

Required Scope and Authorization Rules

Scope Rule
ROLE_APPLICATION Allows access as the Developer that owns the Product.

Body Parameters

All information about a change to data in a referenced resource, including the resource key, change description, changes to fields, user access, and content.

ContentEvent object:

Property Type Description
action Action

Description of changes in the event

actor ContentEventActor

The user (accountName) who made the change. There is no actor for system-generated changes.

changes Changes

List of field and user access changes to apply to the resource. This field must not be provided if the resource is being deleted ("action.delete": true).

contents array of Content

Content items associated with the resource

eventMetadata EventMetadata

Metadata associated with the event

key Key

Event key. Required.

Responses

Status Meaning Description Definition
200 OK Success
400 Bad Request Input is invalid or malformed ContentEventError
401 Unauthorized Unauthorized to publish this event ContentEventError
500 Internal Server Error An internal error occurred during event processing ContentEventError

Currency Exchange Rate

Deactivate a Currency Exchange Rate

Example request

curl -X PATCH https://{marketplaceURL}/api/channel/v1/exchangeRates/{currencyExchangeRateUuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PATCH https://{marketplaceURL}/api/channel/v1/exchangeRates/{currencyExchangeRateUuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/exchangeRates/{currencyExchangeRateUuid}',
  method: 'patch',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "properties": {
        "active": {
          "description": "Currency Exchange Rates can be only deactivated. Allowed value: false.",
          "type": "boolean"
        }
      },
      "example": {
        "active": true
      }
    },
    {
      "description": "Currency Exchange Rate active object",
      "example": {
        "active": false
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/exchangeRates/{currencyExchangeRateUuid}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.patch('https://{marketplaceURL}/api/channel/v1/exchangeRates/{currencyExchangeRateUuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.patch 'https://{marketplaceURL}/api/channel/v1/exchangeRates/{currencyExchangeRateUuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/exchangeRates/{currencyExchangeRateUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "active": false
}

Example response

{
  "active": true,
  "authenticationType": "USER_LOGIN",
  "baseCurrency": "GTQ",
  "counterCurrency": "INR",
  "currencyExchangeRateUuid": "76b11329-e3a5-4944-93b0-0411c9f63369",
  "oauthKey": "",
  "rate": 0.3,
  "userId": 3434556,
  "validFrom": 1507077229000
}

PATCH/channel/v1/exchangeRates/{currencyExchangeRateUuid}

Deactivate a Currency Exchange Rate. To stop supporting currency exchange on your marketplace, deactivate a rate. This will prevent the exchange rate from being used to convert usage.

Parameters

Parameter Type Data Type Default Description
*currencyExchangeRateUuid path string The unique identifier of the currency exchange rate.

Body Parameters

Currency Exchange Rate active

Responses

Status Meaning Description Definition
200 OK OK CurrencyExchangeRate
404 Not Found Not Found

Read all Currency Exchange Rates

Example request

curl -X GET https://{marketplaceURL}/api/channel/v1/exchangeRates \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/channel/v1/exchangeRates HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/exchangeRates',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/exchangeRates',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/channel/v1/exchangeRates', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/channel/v1/exchangeRates',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/exchangeRates");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "active": true,
      "authenticationType": "CHANNEL_CONSUMER_LOGIN",
      "baseCurrency": "USD",
      "counterCurrency": "CAD",
      "currencyExchangeRateUuid": "9ec1a010-2814-42c9-a9e0-44ed1f5895f0",
      "oauthKey": "dNcCBthw82",
      "rate": 1.25,
      "userId": 1111,
      "validFrom": 1507077229000
    }
  ],
  "links": [
    {
      "href": "http://appdirect/api/channel/v1/exchangeRates?page=1",
      "rel": "next"
    }
  ],
  "page": {
    "number": 0,
    "size": 20,
    "totalElements": 50,
    "totalPages": 3
  }
}

GET/channel/v1/exchangeRates

Retrieve all of the current and historical exchange rates set on the marketplace.

Parameters

Parameter Type Data Type Default Description
baseCurrency query string of enum:
USD
CAD
EUR
JPY
GBP
KRW
CHF
SEK
SGD
MYR
AUD
MXN
INR
BRL
DKK
NZD
NOK
ZAR
PHP
CNY
SAR
GTQ
The base currency filter. Optional.
counterCurrency query string of enum:
USD
CAD
EUR
JPY
GBP
KRW
CHF
SEK
SGD
MYR
AUD
MXN
INR
BRL
DKK
NZD
NOK
ZAR
PHP
CNY
SAR
GTQ
The counter currency filter. Optional.
page query integer 0 The page number. Optional.
size query integer 20 The number of application returned by page. Optional.
sortField query string of enum:
BASE_CURRENCY
COUNTER_CURRENCY
VALID_FROM
VALID_FROM The order field. Optional.
sortOrder query string of enum:
ASC
DESC
DESC The sort direction. Optional.

Responses

Status Meaning Description Definition
200 OK OK CurrencyExchangeRateList
404 Not Found Not Found

Create new Currency Exchange Rate

Example request

curl -X POST https://{marketplaceURL}/api/channel/v1/exchangeRates \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/channel/v1/exchangeRates HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/exchangeRates',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "type": "object",
      "title": "CurrencyExchangeRateRequest",
      "required": [
        "baseCurrency",
        "counterCurrency",
        "rate"
      ],
      "properties": {
        "baseCurrency": {
          "allOf": [
            {
              "description": "Supported currencies for the system",
              "type": "string",
              "title": "Currency",
              "default": "USD",
              "enum": [
                "USD",
                "CAD",
                "EUR",
                "JPY",
                "GBP",
                "KRW",
                "CHF",
                "SEK",
                "SGD",
                "MYR",
                "AUD",
                "MXN",
                "INR",
                "BRL",
                "DKK",
                "NZD",
                "NOK",
                "ZAR",
                "PHP",
                "CNY",
                "SAR",
                "GTQ",
                "IDR",
                "ARS",
                "COP",
                "PEN"
              ]
            },
            {
              "description": "A supported External Currency"
            }
          ]
        },
        "counterCurrency": {
          "allOf": [
            {
              "description": "Supported currencies for the system",
              "type": "string",
              "title": "Currency",
              "default": "USD",
              "enum": [
                "USD",
                "CAD",
                "EUR",
                "JPY",
                "GBP",
                "KRW",
                "CHF",
                "SEK",
                "SGD",
                "MYR",
                "AUD",
                "MXN",
                "INR",
                "BRL",
                "DKK",
                "NZD",
                "NOK",
                "ZAR",
                "PHP",
                "CNY",
                "SAR",
                "GTQ",
                "IDR",
                "ARS",
                "COP",
                "PEN"
              ]
            },
            {
              "description": "A supported Marketplace Currency"
            }
          ]
        },
        "rate": {
          "description": "A currency pair is the quotation and pricing structure of the currencies traded in a forex market. A Currency Pair is represented as XXX/YYY where XXX is the Base currency and YYY is the Counter currency.\n\nIn AppDirect the Base currency is an external currency and the Counter currency is a supported currency in your marketplace.\n\nWhen an exchange rate is provided with a Currency Pair, it represents how much of the Counter currency is required to purchase 1 unit of the Base currency.\nEUR/USD=1.18; EUR is the Base currency and USD is the counter currency.\n1 EUR is equal to 1.18 USD.\nIn order to buy 1 EUR, the buyer must pay 1.18 USD.",
          "type": "number"
        }
      },
      "example": {
        "baseCurrency": "USD",
        "counterCurrency": "CAD",
        "rate": 0.5
      }
    },
    {
      "description": "Currency Exchange Rate object",
      "example": {
        "baseCurrency": "USD",
        "counterCurrency": "CAD",
        "rate": 0.2
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/exchangeRates',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/channel/v1/exchangeRates', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/channel/v1/exchangeRates',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/exchangeRates");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "baseCurrency": "USD",
  "counterCurrency": "CAD",
  "rate": 0.2
}

Example response

{
  "active": true,
  "authenticationType": "USER_LOGIN",
  "baseCurrency": "GTQ",
  "counterCurrency": "INR",
  "currencyExchangeRateUuid": "76b11329-e3a5-4944-93b0-0411c9f63369",
  "oauthKey": "",
  "rate": 0.3,
  "userId": 3434556,
  "validFrom": 1507077229000
}

POST/channel/v1/exchangeRates

Define a new exchange rate to be used when custom metered usage is reported to your marketplace by a Developer in a currency that isn't supported by your marketplace. This enables you to invoice your customers in your marketplace currency, even though a Developer's external price list for metered usage charges (like Amazon Web Services) might be in a different currency.

Body Parameters

The new Currency Exchange Rate

CurrencyExchangeRateRequest object:

Property Type Description
baseCurrency Currency

A supported External Currency

counterCurrency Currency

A supported Marketplace Currency

rate number

A currency pair is the quotation and pricing structure of the currencies traded in a forex market. A Currency Pair is represented as XXX/YYY where XXX is the Base currency and YYY is the Counter currency.

In AppDirect the Base currency is an external currency and the Counter currency is a supported currency in your marketplace.

When an exchange rate is provided with a Currency Pair, it represents how much of the Counter currency is required to purchase 1 unit of the Base currency.

EUR/USD=1.18; EUR is the Base currency and USD is the counter currency.

1 EUR is equal to 1.18 USD.

In order to buy 1 EUR, the buyer must pay 1.18 USD.

Responses

Status Meaning Description Definition
200 OK OK CurrencyExchangeRate
404 Not Found Not Found

Read a Currency Exchange Rate

Example request

curl -X GET https://{marketplaceURL}/api/channel/v1/exchangeRates/{currencyExchangeRateUuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/channel/v1/exchangeRates/{currencyExchangeRateUuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/exchangeRates/{currencyExchangeRateUuid}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/exchangeRates/{currencyExchangeRateUuid}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/channel/v1/exchangeRates/{currencyExchangeRateUuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/channel/v1/exchangeRates/{currencyExchangeRateUuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/exchangeRates/{currencyExchangeRateUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "active": true,
  "authenticationType": "USER_LOGIN",
  "baseCurrency": "GTQ",
  "counterCurrency": "INR",
  "currencyExchangeRateUuid": "76b11329-e3a5-4944-93b0-0411c9f63369",
  "oauthKey": "",
  "rate": 0.3,
  "userId": 3434556,
  "validFrom": 1507077229000
}

GET/channel/v1/exchangeRates/{currencyExchangeRateUuid}

Retrieve the details of a specific Currency Exchange Rate.

Parameters

Parameter Type Data Type Default Description
*currencyExchangeRateUuid path string The unique identifier of the currency exchange rate.

Responses

Status Meaning Description Definition
200 OK OK CurrencyExchangeRate
404 Not Found Not Found

Customer Notifications

Create or update a common email template element

This call allows you to create a new template element (for example, a variable) or update an existing one.

Example request

curl -X POST https://{marketplaceURL}/api/notification/v1/templates/common/email \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/notification/v1/templates/common/email HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/notification/v1/templates/common/email',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "type": "object",
      "title": "NotificationCommonEmailElementWS",
      "required": [
        "type",
        "content",
        "locale"
      ],
      "properties": {
        "content": {
          "description": "Email notification content",
          "type": "string"
        },
        "defaultCommonElement": {
          "description": "If the elements are default common elements",
          "type": "boolean"
        },
        "enabled": {
          "description": "If the email template is enabled",
          "type": "boolean"
        },
        "id": {
          "description": "Email notification template ID",
          "type": "number"
        },
        "locale": {
          "description": "Email notification locale to determine the language",
          "type": "string"
        },
        "partner": {
          "description": "Partner being used to render the email",
          "type": "string"
        },
        "type": {
          "allOf": [
            {
              "type": "string",
              "title": "NotificationCommonElementType",
              "enum": [
                "UNSUBSCRIBE"
              ]
            },
            {
              "description": "Email notification common element type"
            }
          ]
        }
      }
    },
    {
      "example": {
        "content": "This is a test.",
        "enabled": true,
        "locale": "en_US",
        "partner": "APPDIRECT",
        "type": "UNSUBSCRIBE"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/notification/v1/templates/common/email',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/notification/v1/templates/common/email', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/notification/v1/templates/common/email',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/notification/v1/templates/common/email");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "content": "This is a test.",
  "enabled": true,
  "locale": "en_US",
  "partner": "APPDIRECT",
  "type": "UNSUBSCRIBE"
}

Example response

{
  "content": "This is a test.",
  "defaultCommonElement": false,
  "enabled": true,
  "id": 3,
  "locale": "en_US",
  "partner": "APPDIRECT",
  "type": "UNSUBSCRIBE"
}

POST/notification/v1/templates/common/email

Create or update a common email template element This call allows you to create a new template element (for example, a variable) or update an existing one.

Body Parameters

Common element definition

NotificationCommonEmailElementWS object:

Property Type Description
content string

Email notification content

defaultCommonElement boolean

If the elements are default common elements

enabled boolean

If the email template is enabled

id number

Email notification template ID

locale string

Email notification locale to determine the language

partner string

Partner being used to render the email

type NotificationCommonElementType

Email notification common element type

Responses

Status Meaning Description Definition
200 OK Read notification common elements successfully.

Create or update an email template

This call creates a new email template or updates an existing template.

Example request

curl -X POST https://{marketplaceURL}/api/notification/v1/templates/email \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/notification/v1/templates/email HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/notification/v1/templates/email',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "type": "object",
      "title": "NotificationEmailTemplateWS",
      "required": [
        "type",
        "locale",
        "subject",
        "content"
      ],
      "properties": {
        "content": {
          "description": "Email notification content",
          "type": "string"
        },
        "defaultTemplate": {
          "description": "If the template is a default template of it's kind",
          "type": "boolean"
        },
        "directSales": {
          "description": "If the template is used for a direct sale product",
          "type": "boolean"
        },
        "enabled": {
          "description": "If the email template is enabled",
          "type": "boolean"
        },
        "fallbackEmailTemplateId": {
          "description": "The ID of the template to fallback to if current one is disabled or not existing",
          "type": "number"
        },
        "id": {
          "description": "Email notification template ID",
          "type": "number"
        },
        "locale": {
          "description": "Email notification locale to determine the language",
          "type": "string"
        },
        "partner": {
          "description": "Partner being used to render the email",
          "type": "string"
        },
        "reminderPattern": {
          "description": "Notification reminder pattern",
          "type": "string"
        },
        "subject": {
          "description": "Email notification subject",
          "type": "string"
        },
        "type": {
          "allOf": [
            {
              "type": "string",
              "title": "NotificationTemplateType",
              "enum": [
                "ACCOUNT_ACTIVATION",
                "ACCOUNT_ACTIVATION_AFTER_MIGRATION",
                "BRANDED_ACCOUNT_ACTIVATION",
                "ACCOUNT_ACTIVATION_CREATED_BY_ASSISTED_SALES",
                "ACTIVE_USER_TEMP_PASSWORD",
                "NEW_USER",
                "INVITE_USER",
                "BAAS_MARKETPLACE_SIGN_UP_REQUEST",
                "LISTING_MARKETPLACE_SIGN_UP_REQUEST",
                "STORE_MARKETPLACE_SIGN_UP_REQUEST",
                "LISTING_MARKETPLACE_SIGN_UP_REMINDER",
                "STORE_MARKETPLACE_SIGN_UP_REMINDER",
                "PASSWORD_RESET",
                "PASSWORD_CHANGED_NOTICE",
                "PRIMARY_EMAIL_CHANGED_NOTICE",
                "EMAIL_VERIFICATION",
                "IMPERSONATE_REQUEST",
                "PASSWORD_REMINDER",
                "REGISTRATION_REMINDER",
                "FIRST_TIME_LOGIN",
                "INACTIVE_USER_LOGIN_REMINDER",
                "INACTIVE_USER_PURCHASE_REMINDER",
                "ACCOUNT_ACTIVATION_FOR_EMAIL_CHANGE",
                "TWO_FACTOR_AUTHENTICATION_EMAIL",
                "ASSIGNMENT_NOTICE",
                "UNASSIGNMENT_NOTICE",
                "ASSIGNED_USERS_LIMIT",
                "ADOPTION_NOTICE",
                "SUBSCRIPTION_ADOPTION",
                "APPLICATION_ACCESS_REQUEST_NOTICE",
                "APPLICATION_PURCHASE_REQUEST_NOTICE",
                "EXPIRED_APPLICATION_REQUEST",
                "SUSPENDED_APPLICATION_REQUEST",
                "UPDATED_DOWNLOAD",
                "REVIEW_PURCHASE_REMINDER",
                "DENY_REVIEW",
                "DISCOUNT_DEACTIVATED",
                "CHANGE_OWNERSHIP",
                "REACTIVATE_DOMAIN",
                "SUBSCRIPTION_ORDER",
                "SUBSCRIPTION_ORDER_SINGLE_USER",
                "SUBSCRIPTION_ORDER_FREE_TRIAL",
                "PERSONAL_SUBSCRIPTION_NOTICE",
                "SUBSCRIPTION_ORDER_DOCUMENT",
                "SUBSCRIPTION_ORDER_MODULE",
                "FAILED_ORDER",
                "SUBSCRIPTION_UPGRADE",
                "FREE_TRIAL_OVER",
                "FREE_TRIAL_AUTO_UPGRADE_TO_PAID",
                "EXPIRED_TRIAL_UPGRADE_REMINDER",
                "INVOICE",
                "PAYMENT_SUCCESSFUL",
                "PAYMENT_FAILED",
                "REFUND",
                "EXPIRED_CREDIT_CARD",
                "SUBSCRIPTION_SUSPENDED_OVERDUE_INVOICE",
                "SUBSCRIPTION_SUSPENDED",
                "SUBSCRIPTION_CANCEL",
                "SUBSCRIPTION_CANCEL_SCHEDULED",
                "SCHEDULED_CANCELLATION_REMINDER",
                "TICKET_SUPPORT_SUBSCRIPTION_CANCEL",
                "FAILED_TO_REMOVE_USER",
                "FAILED_TO_REMOVE_USER_HAS_ACTIVE_OR_PENDING_APPS",
                "FAILED_TO_REMOVE_USER_OWNS_APPS",
                "FAILED_TO_REMOVE_USER_SOLE_SYSADMIN",
                "END_OF_CONTRACT",
                "OFF_PURCHASE_ORDER",
                "ORDER_APPROVAL_REQUEST",
                "SUBSCRIPTION_ORDER_RESELLER",
                "SUBSCRIPTION_CHANGE_RESELLER",
                "PUBLISH_REQUEST_PENDING_APPROVAL",
                "APPLICATION_PUBLISHED",
                "PUBLISH_DENIED",
                "VENDOR_NOTIFICATION",
                "VENDOR_REVIEW",
                "QUESTION_ASKED",
                "VENDOR_PUBLISH_REQUEST",
                "NETWORK_APPLICATION_REPUBLISHED",
                "MANUAL_EVENT_RESOLUTION",
                "NEW_REPORT_AVAILABLE",
                "REPORT_GENERATED",
                "REPORT_SUMMARY",
                "NEW_REPORT_SPECIFIC_NOTIFICATION",
                "OFFLINE_ORDER",
                "OFFLINE_ASSIGNMENT",
                "PRODUCT_CREDENTIALS",
                "MOSI_BOOST_FAILURE",
                "CREST_NEW_ADMIN",
                "MOSI_NEW_ADMIN",
                "MOSI_NEW_USER",
                "MOSI_UPDATE_USERNAME",
                "MOSI_ORDER_PLACED",
                "GOOGLE_NEW_ADMIN_USER",
                "GOOGLE_NEW_USER",
                "SENDGRID_PURCHASE",
                "MCAFEE_PURCHASE",
                "SCALEXTREME_ACCOUNT",
                "SYMANTEC_CLOUD_NEW_ACCOUNT",
                "SYMANTEC_CLOUD_OLD_ACCOUNT",
                "SYMANTEC_EV_CLOUD_NOTIFICATION",
                "MOZY_NEW_USER",
                "NORTON_NEW_USER_PC",
                "WEBEX_NEW_USER",
                "ASYNCHRONOUS_PRODUCT_PURCHASE_NOTIFICATION",
                "MARKETPLACE_REQUEST_TO_ADD_PRODUCT",
                "VENDOR_ADD_REQUEST",
                "PRODUCT_ADDED",
                "VENDOR_APPROVED",
                "AZURE_SYNC_INVITE_NEW_USER",
                "AZURE_SYNC_INVITE_USER",
                "DOCUSIGN_PURCHASE",
                "DOCUSIGN_ASSIGN",
                "RESELLER_LINKED",
                "RESELLER_UNLINKED",
                "RESELLER_SIGNUP_REQUESTED",
                "RESELLER_SIGNUP_APPROVED",
                "RESELLER_SIGNUP_DENIED",
                "TBILL_VALIDATION",
                "TBILL_APPROVED_USER_NOTIFICATION",
                "TBILL_REJECTED_USER_NOTIFICATION",
                "TBILL_APPROVED_CHANNEL_NOTIFICATION",
                "TBILL_REJECTED_CHANNEL_NOTIFICATION",
                "TBILL_INVALID_NOTIFICATION",
                "LEFTRONIC_ACCOUNT_ACTIVATION",
                "DOMAIN_REGISTRATION_DOMAIN_PURCHASED_NEW",
                "DOMAIN_REGISTRATION_DOMAIN_PURCHASED_TRANSFER",
                "DOMAIN_REGISTRATION_DOMAIN_TRANSFER_COMPLETE",
                "DOMAIN_REGISTRATION_END_OF_CONTRACT",
                "DOMAIN_REGISTRATION_END_OF_CONTRACT_MANUAL_RENEWAL",
                "DOMAIN_REGISTRATION_DOMAIN_SUSPENDED",
                "DOMAIN_REGISTRATION_DOMAIN_CANCELED",
                "O365_RESET_DOMAIN_USER_PASSWORDS",
                "SALES_LEAD_CREATED",
                "SALES_LEAD_ACCEPTED",
                "SALES_LEAD_DENIED",
                "SALES_LEAD_ASSIGNED",
                "SALES_LEAD_WON",
                "SALES_LEAD_LOST",
                "LEAD_PRODUCT_CREATED_ADMIN",
                "LEAD_MANUAL_CREATED_RESELLER",
                "LEAD_MANUAL_CREATED_DEVELOPER",
                "LEAD_PRODUCT_CREATED_SSR",
                "LEAD_REFERRED_COMPANY_SSR",
                "LEAD_REFERRED_COMPANY_RESELLER",
                "LEAD_CONVERTED_ADMIN",
                "LEAD_CONVERTED_SSR",
                "PRODUCT_PROFILE_LEAD_CREATED",
                "CUSTOM_AD_HOC",
                "SALES_OPPORTUNITY_CREATED",
                "SALES_OPPORTUNITY_APPROVED",
                "SALES_OPPORTUNITY_DENIED",
                "RESELLER_PROFILE_PUBLICATION_REQUESTED",
                "RESELLER_PROFILE_PUBLICATION_REQUEST_CANCELLED",
                "RESELLER_PROFILE_UNPUBLISHED",
                "RESELLER_PROFILE_PUBLICATION_APPROVED",
                "RESELLER_PROFILE_PUBLICATION_DENIED",
                "MICROSOFT_CREDENTIALS_SENT",
                "FAILED_CONTRACT",
                "WHOLESALES_PRICE_END_USER_ACTION_PENDING_PRICE_GRANTED",
                "WHOLESALE_PRICE_END_USER_ACTION_PENDING_PRICE_GRANTED_BY_SALES_SUPPORT",
                "WHOLESALE_PRICE_END_USER_ACTION_PENDING_REJECTED",
                "WHOLESALE_PRICE_END_USER_ACTION_PENDING_REJECTED_BY_CHANNEL",
                "WHOLESALES_PRICE_RESELLER_ACTION_PENDING_PRICE_REQUESTED",
                "WHOLESALE_PRICE_SALES_SUPPORT_ACTION_PENDING_PRICE_REQUESTED",
                "WHOLESALES_PRICE_RESELLER_ACTION_PENDING_PRICE_REQUESTED_FOR_COMPANY_ADMIN",
                "WHOLESALE_PRICE_RESELLER_ACTION_PENDING_REJECTED_BY_RESELLER_MANAGER",
                "WHOLESALE_PRICE_SALES_SUPPORT_ACTION_PENDING_REJECTED_BY_CHANNEL_ADMIN",
                "WHOLESALE_PRICE_RESELLER_ACTION_PENDING_REJECTED_BY_END_USER",
                "WHOLESALE_PRICE_SALES_SUPPORT_ACTION_PENDING_REJECTED_BY_END_USER",
                "WHOLESALES_PRICE_RESELLER_ACTION_PENDING_MANAGER_APPROVED",
                "WHOLESALES_PRICE_RESELLER_MANAGER_ACTION_PENDING_PRICE_REQUESTED",
                "WHOLESALES_PRICE_RESELLER_MANAGER_ACTION_PENDING_PRICE_REQUESTED_FOR_CHANNEL_ADMIN",
                "API_ALERT",
                "WELCOME_USER",
                "CREDIT_CARD_REQUIRED"
              ]
            },
            {
              "description": "Email notification template type"
            }
          ]
        }
      }
    },
    {
      "example": {
        "content": "This is a test.",
        "directSales": false,
        "enabled": true,
        "fallbackEmailTemplateId": 1,
        "locale": "en_US",
        "partner": "APPDIRECT",
        "subject": "Test email",
        "type": "ACCOUNT_ACTIVATION"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/notification/v1/templates/email',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/notification/v1/templates/email', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/notification/v1/templates/email',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/notification/v1/templates/email");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "content": "This is a test.",
  "directSales": false,
  "enabled": true,
  "fallbackEmailTemplateId": 1,
  "locale": "en_US",
  "partner": "APPDIRECT",
  "subject": "Test email",
  "type": "ACCOUNT_ACTIVATION"
}

Example response

{
  "content": "This is a test.",
  "defaultTemplate": false,
  "directSales": false,
  "enabled": true,
  "fallbackEmailTemplateId": 1,
  "id": 573,
  "locale": "en_US",
  "partner": "APPDIRECT",
  "reminderPattern": "pattern...",
  "subject": "Test email",
  "type": "ACCOUNT_ACTIVATION"
}

POST/notification/v1/templates/email

Create or update an email template This call creates a new email template or updates an existing template.

Body Parameters

Template definition

NotificationEmailTemplateWS object:

Property Type Description
content string

Email notification content

defaultTemplate boolean

If the template is a default template of it's kind

directSales boolean

If the template is used for a direct sale product

enabled boolean

If the email template is enabled

fallbackEmailTemplateId number

The ID of the template to fallback to if current one is disabled or not existing

id number

Email notification template ID

locale string

Email notification locale to determine the language

partner string

Partner being used to render the email

reminderPattern string

Notification reminder pattern

subject string

Email notification subject

type NotificationTemplateType

Email notification template type

Responses

Status Meaning Description Definition
200 OK Read notification common elements successfully.

Create or update an sms template

This call create a new element or updates an existing SMS template.

Example request

curl -X POST https://{marketplaceURL}/api/notification/v1/templates/sms \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/notification/v1/templates/sms HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/notification/v1/templates/sms',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "type": "object",
      "title": "NotificationSmsTemplateWS",
      "required": [
        "type",
        "locale",
        "content"
      ],
      "properties": {
        "content": {
          "description": "SMS notification content",
          "type": "string"
        },
        "directSales": {
          "description": "If the template is used for a direct sale product",
          "type": "boolean"
        },
        "enabled": {
          "description": "If the SMS template is enabled",
          "type": "boolean"
        },
        "id": {
          "description": "SMS notification template ID",
          "type": "number"
        },
        "locale": {
          "description": "SMS notification locale to determine the language",
          "type": "string"
        },
        "type": {
          "allOf": [
            {
              "type": "string",
              "title": "NotificationTemplateType",
              "enum": [
                "ACCOUNT_ACTIVATION",
                "ACCOUNT_ACTIVATION_AFTER_MIGRATION",
                "BRANDED_ACCOUNT_ACTIVATION",
                "ACCOUNT_ACTIVATION_CREATED_BY_ASSISTED_SALES",
                "ACTIVE_USER_TEMP_PASSWORD",
                "NEW_USER",
                "INVITE_USER",
                "BAAS_MARKETPLACE_SIGN_UP_REQUEST",
                "LISTING_MARKETPLACE_SIGN_UP_REQUEST",
                "STORE_MARKETPLACE_SIGN_UP_REQUEST",
                "LISTING_MARKETPLACE_SIGN_UP_REMINDER",
                "STORE_MARKETPLACE_SIGN_UP_REMINDER",
                "PASSWORD_RESET",
                "PASSWORD_CHANGED_NOTICE",
                "PRIMARY_EMAIL_CHANGED_NOTICE",
                "EMAIL_VERIFICATION",
                "IMPERSONATE_REQUEST",
                "PASSWORD_REMINDER",
                "REGISTRATION_REMINDER",
                "FIRST_TIME_LOGIN",
                "INACTIVE_USER_LOGIN_REMINDER",
                "INACTIVE_USER_PURCHASE_REMINDER",
                "ACCOUNT_ACTIVATION_FOR_EMAIL_CHANGE",
                "TWO_FACTOR_AUTHENTICATION_EMAIL",
                "ASSIGNMENT_NOTICE",
                "UNASSIGNMENT_NOTICE",
                "ASSIGNED_USERS_LIMIT",
                "ADOPTION_NOTICE",
                "SUBSCRIPTION_ADOPTION",
                "APPLICATION_ACCESS_REQUEST_NOTICE",
                "APPLICATION_PURCHASE_REQUEST_NOTICE",
                "EXPIRED_APPLICATION_REQUEST",
                "SUSPENDED_APPLICATION_REQUEST",
                "UPDATED_DOWNLOAD",
                "REVIEW_PURCHASE_REMINDER",
                "DENY_REVIEW",
                "DISCOUNT_DEACTIVATED",
                "CHANGE_OWNERSHIP",
                "REACTIVATE_DOMAIN",
                "SUBSCRIPTION_ORDER",
                "SUBSCRIPTION_ORDER_SINGLE_USER",
                "SUBSCRIPTION_ORDER_FREE_TRIAL",
                "PERSONAL_SUBSCRIPTION_NOTICE",
                "SUBSCRIPTION_ORDER_DOCUMENT",
                "SUBSCRIPTION_ORDER_MODULE",
                "FAILED_ORDER",
                "SUBSCRIPTION_UPGRADE",
                "FREE_TRIAL_OVER",
                "FREE_TRIAL_AUTO_UPGRADE_TO_PAID",
                "EXPIRED_TRIAL_UPGRADE_REMINDER",
                "INVOICE",
                "PAYMENT_SUCCESSFUL",
                "PAYMENT_FAILED",
                "REFUND",
                "EXPIRED_CREDIT_CARD",
                "SUBSCRIPTION_SUSPENDED_OVERDUE_INVOICE",
                "SUBSCRIPTION_SUSPENDED",
                "SUBSCRIPTION_CANCEL",
                "SUBSCRIPTION_CANCEL_SCHEDULED",
                "SCHEDULED_CANCELLATION_REMINDER",
                "TICKET_SUPPORT_SUBSCRIPTION_CANCEL",
                "FAILED_TO_REMOVE_USER",
                "FAILED_TO_REMOVE_USER_HAS_ACTIVE_OR_PENDING_APPS",
                "FAILED_TO_REMOVE_USER_OWNS_APPS",
                "FAILED_TO_REMOVE_USER_SOLE_SYSADMIN",
                "END_OF_CONTRACT",
                "OFF_PURCHASE_ORDER",
                "ORDER_APPROVAL_REQUEST",
                "SUBSCRIPTION_ORDER_RESELLER",
                "SUBSCRIPTION_CHANGE_RESELLER",
                "PUBLISH_REQUEST_PENDING_APPROVAL",
                "APPLICATION_PUBLISHED",
                "PUBLISH_DENIED",
                "VENDOR_NOTIFICATION",
                "VENDOR_REVIEW",
                "QUESTION_ASKED",
                "VENDOR_PUBLISH_REQUEST",
                "NETWORK_APPLICATION_REPUBLISHED",
                "MANUAL_EVENT_RESOLUTION",
                "NEW_REPORT_AVAILABLE",
                "REPORT_GENERATED",
                "REPORT_SUMMARY",
                "NEW_REPORT_SPECIFIC_NOTIFICATION",
                "OFFLINE_ORDER",
                "OFFLINE_ASSIGNMENT",
                "PRODUCT_CREDENTIALS",
                "MOSI_BOOST_FAILURE",
                "CREST_NEW_ADMIN",
                "MOSI_NEW_ADMIN",
                "MOSI_NEW_USER",
                "MOSI_UPDATE_USERNAME",
                "MOSI_ORDER_PLACED",
                "GOOGLE_NEW_ADMIN_USER",
                "GOOGLE_NEW_USER",
                "SENDGRID_PURCHASE",
                "MCAFEE_PURCHASE",
                "SCALEXTREME_ACCOUNT",
                "SYMANTEC_CLOUD_NEW_ACCOUNT",
                "SYMANTEC_CLOUD_OLD_ACCOUNT",
                "SYMANTEC_EV_CLOUD_NOTIFICATION",
                "MOZY_NEW_USER",
                "NORTON_NEW_USER_PC",
                "WEBEX_NEW_USER",
                "ASYNCHRONOUS_PRODUCT_PURCHASE_NOTIFICATION",
                "MARKETPLACE_REQUEST_TO_ADD_PRODUCT",
                "VENDOR_ADD_REQUEST",
                "PRODUCT_ADDED",
                "VENDOR_APPROVED",
                "AZURE_SYNC_INVITE_NEW_USER",
                "AZURE_SYNC_INVITE_USER",
                "DOCUSIGN_PURCHASE",
                "DOCUSIGN_ASSIGN",
                "RESELLER_LINKED",
                "RESELLER_UNLINKED",
                "RESELLER_SIGNUP_REQUESTED",
                "RESELLER_SIGNUP_APPROVED",
                "RESELLER_SIGNUP_DENIED",
                "TBILL_VALIDATION",
                "TBILL_APPROVED_USER_NOTIFICATION",
                "TBILL_REJECTED_USER_NOTIFICATION",
                "TBILL_APPROVED_CHANNEL_NOTIFICATION",
                "TBILL_REJECTED_CHANNEL_NOTIFICATION",
                "TBILL_INVALID_NOTIFICATION",
                "LEFTRONIC_ACCOUNT_ACTIVATION",
                "DOMAIN_REGISTRATION_DOMAIN_PURCHASED_NEW",
                "DOMAIN_REGISTRATION_DOMAIN_PURCHASED_TRANSFER",
                "DOMAIN_REGISTRATION_DOMAIN_TRANSFER_COMPLETE",
                "DOMAIN_REGISTRATION_END_OF_CONTRACT",
                "DOMAIN_REGISTRATION_END_OF_CONTRACT_MANUAL_RENEWAL",
                "DOMAIN_REGISTRATION_DOMAIN_SUSPENDED",
                "DOMAIN_REGISTRATION_DOMAIN_CANCELED",
                "O365_RESET_DOMAIN_USER_PASSWORDS",
                "SALES_LEAD_CREATED",
                "SALES_LEAD_ACCEPTED",
                "SALES_LEAD_DENIED",
                "SALES_LEAD_ASSIGNED",
                "SALES_LEAD_WON",
                "SALES_LEAD_LOST",
                "LEAD_PRODUCT_CREATED_ADMIN",
                "LEAD_MANUAL_CREATED_RESELLER",
                "LEAD_MANUAL_CREATED_DEVELOPER",
                "LEAD_PRODUCT_CREATED_SSR",
                "LEAD_REFERRED_COMPANY_SSR",
                "LEAD_REFERRED_COMPANY_RESELLER",
                "LEAD_CONVERTED_ADMIN",
                "LEAD_CONVERTED_SSR",
                "PRODUCT_PROFILE_LEAD_CREATED",
                "CUSTOM_AD_HOC",
                "SALES_OPPORTUNITY_CREATED",
                "SALES_OPPORTUNITY_APPROVED",
                "SALES_OPPORTUNITY_DENIED",
                "RESELLER_PROFILE_PUBLICATION_REQUESTED",
                "RESELLER_PROFILE_PUBLICATION_REQUEST_CANCELLED",
                "RESELLER_PROFILE_UNPUBLISHED",
                "RESELLER_PROFILE_PUBLICATION_APPROVED",
                "RESELLER_PROFILE_PUBLICATION_DENIED",
                "MICROSOFT_CREDENTIALS_SENT",
                "FAILED_CONTRACT",
                "WHOLESALES_PRICE_END_USER_ACTION_PENDING_PRICE_GRANTED",
                "WHOLESALE_PRICE_END_USER_ACTION_PENDING_PRICE_GRANTED_BY_SALES_SUPPORT",
                "WHOLESALE_PRICE_END_USER_ACTION_PENDING_REJECTED",
                "WHOLESALE_PRICE_END_USER_ACTION_PENDING_REJECTED_BY_CHANNEL",
                "WHOLESALES_PRICE_RESELLER_ACTION_PENDING_PRICE_REQUESTED",
                "WHOLESALE_PRICE_SALES_SUPPORT_ACTION_PENDING_PRICE_REQUESTED",
                "WHOLESALES_PRICE_RESELLER_ACTION_PENDING_PRICE_REQUESTED_FOR_COMPANY_ADMIN",
                "WHOLESALE_PRICE_RESELLER_ACTION_PENDING_REJECTED_BY_RESELLER_MANAGER",
                "WHOLESALE_PRICE_SALES_SUPPORT_ACTION_PENDING_REJECTED_BY_CHANNEL_ADMIN",
                "WHOLESALE_PRICE_RESELLER_ACTION_PENDING_REJECTED_BY_END_USER",
                "WHOLESALE_PRICE_SALES_SUPPORT_ACTION_PENDING_REJECTED_BY_END_USER",
                "WHOLESALES_PRICE_RESELLER_ACTION_PENDING_MANAGER_APPROVED",
                "WHOLESALES_PRICE_RESELLER_MANAGER_ACTION_PENDING_PRICE_REQUESTED",
                "WHOLESALES_PRICE_RESELLER_MANAGER_ACTION_PENDING_PRICE_REQUESTED_FOR_CHANNEL_ADMIN",
                "API_ALERT",
                "WELCOME_USER",
                "CREDIT_CARD_REQUIRED"
              ]
            },
            {
              "description": "SMS notification template type"
            }
          ]
        }
      }
    },
    {
      "example": {
        "content": "This is a test.",
        "directSales": false,
        "enabled": true,
        "locale": "en_US",
        "type": "ACCOUNT_ACTIVATION"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/notification/v1/templates/sms',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/notification/v1/templates/sms', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/notification/v1/templates/sms',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/notification/v1/templates/sms");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "content": "This is a test.",
  "directSales": false,
  "enabled": true,
  "locale": "en_US",
  "type": "ACCOUNT_ACTIVATION"
}

Example response

{
  "content": "This is a test.",
  "directSales": false,
  "enabled": true,
  "id": 1,
  "locale": "en_US",
  "type": "ACCOUNT_ACTIVATION"
}

POST/notification/v1/templates/sms

Create or update an sms template This call create a new element or updates an existing SMS template.

Body Parameters

Sms Template definition

NotificationSmsTemplateWS object:

Property Type Description
content string

SMS notification content

directSales boolean

If the template is used for a direct sale product

enabled boolean

If the SMS template is enabled

id number

SMS notification template ID

locale string

SMS notification locale to determine the language

type NotificationTemplateType

SMS notification template type

Responses

Status Meaning Description Definition
200 OK Read notification common elements successfully.

Retrieve common email element by type

Retrieve common email element by type for the current channel.

Example request

curl -X GET https://{marketplaceURL}/api/notification/v1/templates/common/email/{type} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/notification/v1/templates/common/email/{type} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/notification/v1/templates/common/email/{type}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/notification/v1/templates/common/email/{type}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/notification/v1/templates/common/email/{type}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/notification/v1/templates/common/email/{type}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/notification/v1/templates/common/email/{type}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": "This is a test.",
  "defaultCommonElement": false,
  "enabled": true,
  "id": 4,
  "locale": "en_US",
  "partner": "APPDIRECT",
  "type": "UNSUBSCRIBE"
}

GET/notification/v1/templates/common/email/{type}

Retrieve common email element by type Retrieve common email element by type for the current channel

Parameters

Parameter Type Data Type Default Description
*type path string Notification common element type

Responses

Status Meaning Description Definition
200 OK Read notification common elements successfully. NotificationCommonEmailElementWS

List notification common elements

List common element definitions that is present in each notification that is sent e.

Example request

curl -X GET https://{marketplaceURL}/api/notification/v1/templates/common \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/notification/v1/templates/common HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/notification/v1/templates/common',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/notification/v1/templates/common',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/notification/v1/templates/common', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/notification/v1/templates/common',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/notification/v1/templates/common");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "methods": [
      "EMAIL",
      "SMS"
    ],
    "position": "BOTTOM",
    "type": "UNSUBSCRIBE"
  }
]

GET/notification/v1/templates/common

List notification common elements List common element definitions that is present in each notification that is sent e.g. an unsubscribe message in an email footer.

Responses

Status Meaning Description Definition
200 OK Read notification common elements successfully. array of NotificationCommonElementDefinition

Retrieve an email template by type

This call returns all details from a specific email template type.

Example request

curl -X GET https://{marketplaceURL}/api/notification/v1/templates/email/{type} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/notification/v1/templates/email/{type} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/notification/v1/templates/email/{type}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/notification/v1/templates/email/{type}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/notification/v1/templates/email/{type}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/notification/v1/templates/email/{type}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/notification/v1/templates/email/{type}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": "Hello,<br/>Congratulations! You have a new {PARTNER_STORE_LABEL} account ready to be activated.<br/>Your account has been created with the username {USER_EMAIL}<br/>To activate your account please use the following link:<br/>{ACTIVATION_URL}<br/><br/>If you have any questions, our Support Team is standing by. You can<br/>email us at {SUPPORT_EMAIL}, call us at {SUPPORT_PHONE},<br/>or start a chat with us on the website at {SUPPORT_URL}.<br/>\n<br/>Thank you!<br/>Your friends at {PARTNER_LABEL}",
  "defaultTemplate": false,
  "directSales": false,
  "enabled": true,
  "fallbackEmailTemplateId": 10,
  "id": 2,
  "locale": "en_US",
  "partner": "APPDIRECT",
  "reminderPattern": "pattern...",
  "subject": "Please verify your email address for {PARTNER_LABEL}",
  "type": "ACCOUNT_ACTIVATION"
}

GET/notification/v1/templates/email/{type}

Retrieve an email template by type This call returns all details from a specific email template type.

Parameters

Parameter Type Data Type Default Description
directSales query boolean false Get the developer email template
*type path string Email template type

Responses

Status Meaning Description Definition
200 OK Email template read. NotificationEmailTemplateWS
404 Not Found Customized email template or default email template not found.

Retrieve an SMS template by type

This call returns all details for a specific sms template type.

Example request

curl -X GET https://{marketplaceURL}/api/notification/v1/templates/sms/{type} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/notification/v1/templates/sms/{type} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/notification/v1/templates/sms/{type}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/notification/v1/templates/sms/{type}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/notification/v1/templates/sms/{type}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/notification/v1/templates/sms/{type}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/notification/v1/templates/sms/{type}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "Subject": "subject...",
  "content": "activate that bad boy",
  "directSales": false,
  "enabled": true,
  "id": 269,
  "locale": "en_US",
  "type": "ACCOUNT_ACTIVATION"
}

GET/notification/v1/templates/sms/{type}

Retrieve an SMS template by type This call returns all details for a specific sms template type.

Parameters

Parameter Type Data Type Default Description
directSales query boolean false Get the developer sms tempalte
*type path string Sms template type

Responses

Status Meaning Description Definition
200 OK SMS template read. NotificationSmsTemplateWS
404 Not Found Customized SMS template or default SMS template not found.

List all notification parameters for a notification type

This call returns all parameter details from a notification template for a specified template type.

Example request

curl -X GET https://{marketplaceURL}/api/notification/v1/templates/parameters/{type} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/notification/v1/templates/parameters/{type} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/notification/v1/templates/parameters/{type}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/notification/v1/templates/parameters/{type}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/notification/v1/templates/parameters/{type}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/notification/v1/templates/parameters/{type}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/notification/v1/templates/parameters/{type}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "parameterName": "{SUPPORT_EMAIL}",
    "type": "SUPPORT_EMAIL",
    "valueType": "SINGLE"
  },
  {
    "parameterName": "{BASE_URL}",
    "type": "BASE_URL",
    "valueType": "SINGLE"
  },
  {
    "parameterName": "{SUPPORT_PHONE}",
    "type": "SUPPORT_PHONE",
    "valueType": "SINGLE"
  },
  {
    "parameterName": "{ACTIVATION_URL}",
    "type": "ACTIVATION_URL",
    "valueType": "SINGLE"
  },
  {
    "parameterName": "{COMPANY_NAME}",
    "type": "COMPANY_NAME",
    "valueType": "SINGLE"
  },
  {
    "parameterName": "{PARTNER_LABEL}",
    "type": "PARTNER_LABEL",
    "valueType": "SINGLE"
  },
  {
    "parameterName": "{PARTNER_STORE_LABEL}",
    "type": "PARTNER_STORE_LABEL",
    "valueType": "SINGLE"
  },
  {
    "parameterName": "{USER_EMAIL}",
    "type": "USER_EMAIL",
    "valueType": "SINGLE"
  },
  {
    "parameterName": "{ACTIVATION_TOKEN}",
    "type": "ACTIVATION_TOKEN",
    "valueType": "SINGLE"
  },
  {
    "parameterName": "{SUPPORT_URL}",
    "type": "SUPPORT_URL",
    "valueType": "SINGLE"
  },
  {
    "parameterName": "{MARKETPLACE_LOGO_URL}",
    "type": "MARKETPLACE_LOGO_URL",
    "valueType": "SINGLE"
  }
]

GET/notification/v1/templates/parameters/{type}

List all notification parameters for a notification type This call returns all parameter details from a notification template for a specified template type.

Parameters

Parameter Type Data Type Default Description
*type path string Notification type

Responses

Status Meaning Description Definition
200 OK Success array of NotificationTemplateParameter

List notification templates

List notification templates for the current channel.

Example request

curl -X GET https://{marketplaceURL}/api/notification/v1/templates \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/notification/v1/templates HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/notification/v1/templates',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/notification/v1/templates',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/notification/v1/templates', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/notification/v1/templates',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/notification/v1/templates");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "audience": "NEW_USER",
    "category": "ACCOUNTS",
    "generated": false,
    "methods": [
      {
        "enabled": true,
        "method": "EMAIL"
      },
      {
        "enabled": true,
        "method": "SMS"
      }
    ],
    "reminder": "NONE",
    "required": true,
    "type": "ACCOUNT_ACTIVATION"
  },
  {
    "audience": "NEW_USER",
    "category": "ACCOUNTS",
    "generated": false,
    "methods": [
      {
        "enabled": true,
        "method": "EMAIL"
      }
    ],
    "reminder": "NONE",
    "required": false,
    "type": "ACCOUNT_ACTIVATION_AFTER_MIGRATION"
  },
  {
    "audience": "NEW_USER",
    "category": "ACCOUNTS",
    "generated": false,
    "methods": [
      {
        "enabled": true,
        "method": "EMAIL"
      }
    ],
    "reminder": "NONE",
    "required": true,
    "type": "BRANDED_ACCOUNT_ACTIVATION"
  },
  {
    "audience": "NEW_USER",
    "category": "ACCOUNTS",
    "generated": false,
    "methods": [
      {
        "enabled": true,
        "method": "EMAIL"
      }
    ],
    "reminder": "NONE",
    "required": false,
    "type": "ACCOUNT_ACTIVATION_CREATED_BY_ASSISTED_SALES"
  },
  {
    "audience": "NEW_USER",
    "category": "ACCOUNTS",
    "generated": false,
    "methods": [
      {
        "enabled": true,
        "method": "EMAIL"
      }
    ],
    "reminder": "NONE",
    "required": false,
    "type": "ACTIVE_USER_TEMP_PASSWORD"
  },
  {
    "audience": "NEW_USER",
    "category": "ACCOUNTS",
    "generated": false,
    "methods": [
      {
        "enabled": true,
        "method": "EMAIL"
      },
      {
        "enabled": true,
        "method": "SMS"
      }
    ],
    "reminder": "NONE",
    "required": true,
    "type": "NEW_USER"
  }
]

GET/notification/v1/templates

List notification templates List notification templates for the current channel

Parameters

Parameter Type Data Type Default Description
directSales query boolean false List only the developers notification templates

Responses

Status Meaning Description Definition
200 OK Read notification templates successfully. array of NotificationTemplateDefinition

Discounts

Create discounts

Example request

curl -X POST https://{marketplaceURL}/api/channel/v1/discounts \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/channel/v1/discounts HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/discounts',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Discount details",
      "type": "object",
      "title": "Discount",
      "required": [
        "type",
        "description"
      ],
      "properties": {
        "applicationId": {
          "description": "Application ID.",
          "type": "number",
          "nullable": true
        },
        "applicationName": {
          "description": "Name of the application to which the discount applies.",
          "type": "string",
          "nullable": true
        },
        "applicationUuid": {
          "description": "Application UUID.",
          "type": "string",
          "nullable": true
        },
        "autoApply": {
          "description": "True if the discount is automatically applied. Default value is true.",
          "type": "boolean"
        },
        "basePartnerSharePercentage": {
          "description": "Base partner's percentage share of the discount.",
          "type": "number",
          "nullable": true
        },
        "billingCycles": {
          "description": "Number of billing cycles for which the discount should be applied.",
          "type": "number",
          "nullable": true
        },
        "code": {
          "description": "Discount code. Must be at least 4 characters, but no longer than 103 characters.",
          "type": "string",
          "nullable": true
        },
        "createdOn": {
          "description": "Creation date of the discount.",
          "type": "number",
          "nullable": true
        },
        "description": {
          "description": "Description of discount. Required field. Must be at least 4 characters, but no longer than 255 characters.",
          "type": "string"
        },
        "editionId": {
          "description": "Edition ID.",
          "type": "number",
          "nullable": true
        },
        "editionUuid": {
          "description": "Edition UUID.",
          "type": "string",
          "nullable": true
        },
        "expirationDate": {
          "description": "Expiration date for the discount. This date must be in the future.",
          "type": "number",
          "nullable": true
        },
        "id": {
          "description": "Discount ID.",
          "type": "number",
          "nullable": true
        },
        "industryId": {
          "description": "Industry ID.",
          "type": "number",
          "nullable": true
        },
        "maxRedemptions": {
          "description": "Maximum number of redemptions available.",
          "type": "number",
          "nullable": true
        },
        "maxUnits": {
          "description": "Maximum number of units for which to apply the discount.",
          "type": "number"
        },
        "minUnits": {
          "description": "Minimum number of units for which to apply the discount.",
          "type": "number"
        },
        "partnerSharePercentage": {
          "description": "Partner's percentage share of the discount.",
          "type": "number",
          "nullable": true
        },
        "paymentPlanId": {
          "description": "Payment plan ID.",
          "type": "number",
          "nullable": true
        },
        "paymentPlanUuid": {
          "description": "Payment plan UUID.",
          "type": "string",
          "nullable": true
        },
        "percentage": {
          "description": "Percentage discount if discount is of PERCENTAGE type. The percentage value cannot exceed two decimal places (for example, 10.15).",
          "type": "number"
        },
        "price": {
          "description": "Amount to discount if discount is of FIXED_PRICE type.",
          "type": "number",
          "nullable": true
        },
        "redemptionRestriction": {
          "allOf": [
            {
              "type": "string",
              "title": "RedemptionRestriction",
              "properties": {
                "RedemptionRestriction": {
                  "type": "string",
                  "enum": [
                    "NONE",
                    "ONCE_PER_USER",
                    "ONCE_PER_COMPANY"
                  ]
                }
              }
            },
            {
              "description": "Redemption restriction. May be NONE, ONCE_PER_USER, or ONCE_PER_COMPANY. Default value is NONE."
            }
          ]
        },
        "redemptions": {
          "description": "Number of times the discount has been redeemed.",
          "type": "number"
        },
        "retainable": {
          "description": "True if the discount is retainable. Retainable discounts can be redeemed on orders that are updated after the discount expires. For example, if an order includes a discount that expires on 01 January 2019, and the order is then updated on 02 January 2019, the discount would still be redeemable. The default value is false (discounts are not retained).",
          "type": "boolean"
        },
        "startDate": {
          "description": "Start date for the discount.",
          "type": "number",
          "nullable": true
        },
        "type": {
          "allOf": [
            {
              "type": "string",
              "title": "DiscountType",
              "properties": {
                "DiscountType": {
                  "type": "string",
                  "enum": [
                    "PERCENTAGE",
                    "FIXED_PRICE"
                  ]
                }
              }
            },
            {
              "description": "Discount type. Required field. May be PERCENTAGE or FIXED_PRICE."
            }
          ]
        },
        "unit": {
          "allOf": [
            {
              "type": "string",
              "title": "PricingUnit",
              "enum": [
                "USER",
                "GIGABYTE",
                "MEGABYTE",
                "HOUR",
                "MINUTE",
                "INVOICE",
                "UNIT",
                "PROJECT",
                "PROPERTY",
                "ITEM",
                "WORD",
                "EMAIL",
                "CONTACT",
                "CALL",
                "CREDIT",
                "ROOM",
                "HOST",
                "AGENT",
                "OPERATOR",
                "PROVIDER",
                "MANAGER",
                "TESTER",
                "JVM",
                "SERVER",
                "WEB_USE_MINUTE",
                "AUDIO_USE_MINUTE",
                "PIECE",
                "EMPLOYEE_PAY_PERIOD",
                "EMPLOYEE_PER_PAY_PERIOD",
                "COMPUTER",
                "NOT_APPLICABLE",
                "ONE_TIME_SETUP",
                "DATA_POINTS",
                "TIER1_API_CALLS",
                "TIER2_API_CALLS",
                "ADVISORY_HOURS",
                "OVERAGE_AUDIO_MINUTE",
                "EMPLOYEE",
                "CONNECTION",
                "PUSH_USER",
                "THOUSAND_EMAILS_PER_DAY",
                "PUSH_NOTIFICATION_DEVICES",
                "API_CALLS",
                "SMS_TEXT_MESSAGE",
                "CONTACTS_1000",
                "CONTRACT_FEE",
                "TRANSFER_FEE",
                "REACTIVATION_FEE",
                "RECIPIENT",
                "ADDITIONAL_1000_CONTACTS_BLOCK",
                "SCHEDULE_PLAN",
                "EMAILS_1000",
                "EMAILS_2500",
                "MOBILE_DEVICE",
                "PAYSLIP",
                "PAYSLIP_CORRECTION",
                "STORE",
                "WEBSITE",
                "EPAPER",
                "PAGE",
                "POSTAGE_AND_PRINT",
                "INTERNATIONAL_POSTAGE_AND_PRINT",
                "TIER1_TOP_LEVEL_DOMAIN",
                "TIER2_TOP_LEVEL_DOMAIN",
                "DEDICATED_IP",
                "ENABLELCM",
                "MAXCOMPONENTS",
                "DATA_MANAGEMENT_USER",
                "SPECIALIST_USER",
                "PROFESSIONAL_USER",
                "MATERIALITY_MATRIX",
                "STAKEHOLDER_MANAGEMENT",
                "SCORECARD",
                "STANDARD_MAPPING",
                "DONATION_MANAGEMENT",
                "DOCUMENT",
                "PACKAGE_SMALL",
                "PACKAGE_LARGE",
                "MEMBER",
                "ATTENDEE",
                "MAILING",
                "RESPONSE",
                "EXTERNAL_INVOICE_FEE",
                "CLIENT_TEST",
                "IMAGE_TRANSFORMATION",
                "TOTAL_IMAGE",
                "LICENSE",
                "MAILBOX",
                "FREE_40_INCH_HDTV_PC",
                "FREE_46_INCH_HDTV_PC",
                "FREE_46_INCH_HDTV_PC_MOUNTING",
                "EMPLOYEE_PER_WEEK",
                "REGISTER",
                "END_USER",
                "CORE",
                "DEVICE",
                "PORT",
                "MEASURER",
                "PUBLISHED_MEASUREMENT",
                "NODE",
                "SERVER_RULE",
                "VPN_LP",
                "PROXY_LP",
                "DESKTOP_CONNECT_LP",
                "CAMERA",
                "MAIN_SOUND_ZONE",
                "SUB_SOUND_ZONE",
                "POST",
                "REPORT",
                "BOX",
                "SESSION",
                "DISPLAY",
                "TRUCKROLL",
                "TRANSACTION_FEE",
                "SENDING_API_CALL",
                "LOOKUP_API_CALL",
                "ANALYTICS_API_CALL",
                "MIGRATION_INSTANCE",
                "NFON_SETUP_PER_PHONE_EXTENSION",
                "NFON_SETUP_PER_PHONE_EXTENSION_PLUS",
                "NFON_SETUP_PER_EFAX_EXTENSION",
                "NFON_PHONE_EXTENSION",
                "NFON_PHONE_EXTENSION_PLUS",
                "NFON_EFAX_EXTENSION",
                "NFON_CALL_CENTER_MONITORING",
                "NFON_NMEETING",
                "NFON_MOBILE_NFON_DEVICE",
                "NFON_ISOFTPHONE_MAC",
                "NFON_NSOFTPHONE_STANDARD_WINDOWS",
                "NFON_NSOFTPHONE_PREMIUM_WINDOWS",
                "NFON_NCTI_STANDARD_WINDOWS",
                "NFON_NCTI_STANDARD_CRM_WINDOWS",
                "NFON_NCTI_STANDARD_MAC",
                "NFON_NSOFTPHONE_STANDARD_WINDOWS_OR_MOBILE",
                "WESUSTAIN_PERFORMANCE",
                "WESUSTAIN_STAKEHOLDER_REPUTATION",
                "WESUSTAIN_WEAPP",
                "FAX",
                "FAX_LINE",
                "ROOM_LINE",
                "DEPARTMENT_LINE",
                "INTERNATIONAL_LICENSE",
                "INTERNATIONAL_DEPARTMENT_LINE",
                "INTERNATIONAL_ROOM_LINE",
                "INTERNATIONAL_LINE",
                "CALLING_CREDIT",
                "LINE",
                "TOLLFREE_ROOM_LINE",
                "TOLLFREE_DEPARTMENT_LINE",
                "TAXES_AND_FEES",
                "LEAD",
                "OPPORTUNITY",
                "CAMPAIGN",
                "CASE",
                "CUSTOMER",
                "TIER1_STANDARD_LINE",
                "TIER1_ROOM_LINE",
                "TIER1_TOLLFREE_ROOM_LINE",
                "TIER1_TOLLFREE_DEPARTMENT_LINE",
                "TIER1_FAX_LINE",
                "TIER1_DEPARTMENT_LINE",
                "TIER2_STANDARD_LINE",
                "TIER2_ROOM_LINE",
                "TIER2_DEPARTMENT_LINE",
                "TIER3_STANDARD_LINE",
                "TIER3_ROOM_LINE",
                "TIER3_DEPARTMENT_LINE",
                "TIER4_STANDARD_LINE",
                "TIER4_ROOM_LINE",
                "TIER4_DEPARTMENT_LINE",
                "CLUSTER",
                "NODE_4VCPU",
                "FIVE_HUNDRED_GB_SSD",
                "TWELVE_TB_NETWORK_IO",
                "JBOSS_EAP",
                "JBOSS_FUSE",
                "JBOSS_A_MQ",
                "JBOSS_BRMS",
                "JBOSS_BPM_SUITE",
                "JBOSS_DATA_GRID",
                "JBOSS_DATA_VIRT",
                "USER_LICENSE",
                "ADDITIONAL_NUMBER_LICENSE",
                "ROOM_PHONE_LICENSE",
                "UBERCONFERENCE_PRO_LICENSE",
                "UBERCONFERENCE_PRO_LICENSE_UNBUNDLED",
                "INSTANCE",
                "INDOOR_CAMERA",
                "OUTDOOR_CAMERA",
                "VINGATE_LP_LICENCE",
                "ADMINISTRATOR",
                "MOBILE_USER",
                "G_SUITE",
                "T1",
                "PHONE",
                "AUTO_ATTENDANT",
                "HUNT_GROUP",
                "VOICEMAIL_BOX",
                "TOLL_FREE_NUMBER",
                "INBOUND_LONG_DISTANCE_MINUTE",
                "OUTBOUND_LONG_DISTANCE_MINUTE",
                "INBOUND_OUTBOUND_LONG_DISTANCE_MINUTE",
                "SET_TOP_BOX",
                "MODEM",
                "ACCESS_POINT",
                "CALLING_FEATURE",
                "IAD_DEVICE",
                "ANALOG_LINE",
                "PRI",
                "SBC_DEVICE",
                "ROUTER",
                "INTERNATIONAL_MINUTE",
                "PHONE_LINE",
                "DYNAMIC_IP_ADDRESS",
                "STATIC_IP_ADDRESS",
                "GATEWAY",
                "REMOTE_CONTROL",
                "TIER1_STANDARD_SEAT",
                "TIER2_STANDARD_SEAT",
                "TIER3_STANDARD_SEAT",
                "TIER4_STANDARD_SEAT",
                "TIER1_TOLL_FREE_SEAT",
                "MILLION_MESSAGES",
                "MESSAGE",
                "WEEKLY",
                "PHONE_NUMBER",
                "GUEST",
                "REVISION_SAFE_DATAROOM",
                "GROUP_SESSION",
                "MAILBOX_AD_SYNC",
                "PHONE_SUPPORT",
                "EXTRA_10TB",
                "EXTRA_50TB",
                "EXTRA_200TB",
                "MAP_VIEW",
                "SVM",
                "CHANNEL",
                "NUMBER_PRINTER_TABLET",
                "NUMBER_ONSITE_SERVER",
                "NUMBER_VISITS",
                "ONSITE_TECHNICIAN_PC",
                "ONSITE_TECHNICIAN_SERVER",
                "SHORTER_REACTION_TIMES",
                "E_COMMERCE_INTEGRATION",
                "LOCATION",
                "TRAINING_SESSION",
                "GIGABYTES_PER_HOUR",
                "FINANCIAL_PLANNING",
                "ONSITE_WORKPLACE",
                "INTERNAL_TOOLS_ACCESS",
                "DUTY_SERVICE",
                "TERABYTE",
                "HOST_UNIT_HOURS",
                "WEB_CHECKS",
                "ACTIVE_USERS",
                "ACTIVE_EMPLOYEE",
                "PC_OF_NET_RECURRING_FEE",
                "ACTIVE_VENDOR",
                "ADVERTISEMENT",
                "ADVERTISER_SPENDS",
                "ANNUAL_FUNDRAISING_INCOME",
                "ANNUAL_SUBSCRIPTION",
                "APPLIANCE",
                "ASSET",
                "ASSETS_UNDER_MANAGEMENT",
                "BUSINESS_PARTNERS",
                "CASH_FLOWS",
                "COMPONENT",
                "CONNECTED_SYSTEMS",
                "CONTRACTS",
                "COSTS",
                "DATA_STREAMS",
                "DATABASE_SIZE",
                "EXTERNAL_SERVICE_CALLS",
                "FILE",
                "FIXED",
                "FLAT",
                "FLAT_FEE_BASED_ON_ASSETS",
                "FLEET_PLANNING_ORDERS",
                "FORMS",
                "GIGABYTE_DATABASE_SIZES",
                "INSTALLATION",
                "INSTALLED_CAPACITY",
                "JOB_POSTING",
                "LEARNER",
                "LOGON",
                "MANAGED_SYSTEM",
                "MASTER_DATA_OBJECT",
                "MASTER_RECORDS",
                "MBPS",
                "MONITORED_USER",
                "MPLS",
                "ORDER",
                "OUTPATIENT_DAYS",
                "PAGE_VIEW",
                "PATIENT_CARE_DAY",
                "PATIENT_TREATED",
                "PLANT",
                "POINTS_OF_DELIVERY",
                "PREMIUM",
                "PROCESS",
                "PRODUCTS",
                "RECORDS",
                "RENTAL_UNIT",
                "RESOURCES",
                "REVENUE",
                "SALES_ORDER",
                "SALES_PORTFOLIOS",
                "SERVICE_ORDERS",
                "SITE_VISITS",
                "SPENDS",
                "SPEND_VOLUMES",
                "STREAM",
                "STUDENT",
                "SUBSCRIBER",
                "SUPPLIERS",
                "TICKETS",
                "TOTAL_ANNUAL_BUDGET",
                "TUNNEL",
                "VIRTUAL_USERS",
                "SAP_SYSTEM",
                "POSITION_TYPES",
                "OVERAGE_FEES",
                "OVERAGE_FEE_TRANSACTION",
                "OVERAGE_FEES_DOCUMENT",
                "OVERAGE_FEES_ITEM",
                "EVENT",
                "BUSINESS_EVENT",
                "LEGAL_TENDER",
                "ANNUAL_REVENUE",
                "AD_SYNC",
                "FULL_DATA_RESTORE",
                "USED_STORAGE_100GB",
                "COMPANY",
                "ADDITIONAL_USER",
                "VISIT",
                "VIDEO",
                "ELECTRONIC_PAYMENT",
                "CHECK_PAYMENT",
                "EXPRESS_PAY_ELECTRONIC_PAYMENT",
                "EXPRESS_PAY_CHECK_PAYMENT",
                "DATA_ENTRY_SERVICE",
                "MONTHLY_VISIT",
                "SCRUB_TRANSACTION",
                "DEVICE_LICENSE",
                "SERVER_LICENSE",
                "BASE_LICENSE",
                "SERVICE_CALL",
                "SUPPORT_INCIDENT_TICKET",
                "CUSTOM_REPORT_BUILDING_TRAINING",
                "QUOTA",
                "DOMESTIC_TRANSACTION",
                "BEE",
                "BEE_FLEET",
                "BEE_BEACON_AMBIENT_LIGHT",
                "BEE_BEACON_TEMPERATURE_HUMIDITY",
                "CONTACTS_100",
                "TEMPLATE",
                "TEMPLATE_PACKS_10",
                "PACK",
                "SMS_TEXT_MESSAGE_10",
                "VIRTUAL_SERVER",
                "PHYSICAL_SERVER",
                "WORKSTATION",
                "CHATS",
                "MATCH_LIST",
                "CERTIFICATE_12_MONTHS",
                "CERTIFICATE_24_MONTHS",
                "PRIVACY",
                "PAGE_VIEWS_100000",
                "VOICE_OUT",
                "EXAM",
                "PARTICIPANT",
                "ENCRYPTION_ADDON",
                "ESS",
                "ETI",
                "ATP_ADDON",
                "PBE_ADDO",
                "NETI_ADDON",
                "HUNDRED_SMS_REMINDER",
                "CALENDAR_SYNC",
                "PAYMENT_INTERFACE",
                "MULTILINGUAL_ONLINE_EVENT_BOOKING",
                "SOCKET",
                "OFFER",
                "FREELANCER",
                "SOAP",
                "DATEV_LEXWARE_INTERFACE",
                "TOKEN",
                "SERVICE_MONTH",
                "VIDEO_PACKAGE_50_HOURS",
                "INTERFACE",
                "TEST_CASE",
                "MINUTES_15",
                "MINUTES_30",
                "CONNECTED_ACCESS_POINT",
                "DAY",
                "SATURDAY_SURCHARGE",
                "NIGHT_SURCHARGE",
                "SUNDAY_SURCHARGE",
                "PUBLIC_HOLIDAY_SURCHARGE",
                "BASIC_PACKAGE",
                "STANDARD_PACKAGE",
                "PREMIUM_PACKAGE",
                "REPORTS_MODULE",
                "WORKFLOW_MODULE",
                "NBV_250K",
                "NBV",
                "INVENTORY",
                "ADDITIONAL_COMPANY",
                "TRANSACTION",
                "PREMIUM_CREDIT_REPORTS",
                "ADDITIONAL_CONNECTION",
                "STOCK_UNIT",
                "MONTHLY_USAGE_FEE",
                "USAGE_FEE",
                "MONTHLY_CHARGES",
                "STANDARD_USER",
                "ADDITIONAL_UNIT",
                "COMMISSION",
                "KITTING",
                "WOP",
                "SFDC",
                "NAMED_USER_LICENSE",
                "BARCODING_AND_WAREHOUSING",
                "MODULE",
                "MANUFACTURING_MODULE",
                "MRP",
                "CONSOLE_MODULE",
                "CONSOLIDATIONS",
                "MULTI_CURRENCY",
                "ADDON_LICENSE",
                "INBOUND_PAGE",
                "OUTBOUND_PAGE",
                "OPPORTUNITY_RETENTION",
                "SOCIAL_SENTIMENT",
                "DEMAND_PRICE",
                "SETUP_FEE",
                "SHAREPOINT",
                "INTEGRATION_MAINTENANCE",
                "VIEWER",
                "MANAGEMENT_USER",
                "SQ_FT",
                "LOCATION_UPTO_10_EMPLOYEES",
                "LOCATION_UPTO_20_EMPLOYEES",
                "LOCATION_UPTO_30_EMPLOYEES",
                "LOCATION_UPTO_60_EMPLOYEES",
                "LOCATION_UPTO_99_EMPLOYEES",
                "M365_ONLINE",
                "WEB_HOSTING_SERVER",
                "STANDARD_EDITION_GIGABYTE",
                "STORAGE_GIGABYTE",
                "EGRESS_GIGABYTE",
                "FEE_HW_DEFECT_NO_WARRANTY_CASE",
                "SIM_CARD",
                "SIM_CARDS_10",
                "APPLICATION_CONNECTOR",
                "ADDITIONAL_API_CALLS",
                "USED_STORAGE_PER_GB",
                "CERTIFICATION",
                "MACHINE",
                "CALCULATION_USER",
                "MAILBOX_S",
                "MAILBOX_M",
                "MAILBOX_L",
                "STORAGE",
                "GROUP",
                "VEHICLE",
                "ENDPOINT",
                "MANAGED_SERVICE",
                "SOC",
                "ONLINE_PLAN",
                "ENTERPRISE_PLAN",
                "FLOATING_LICENSE",
                "USER_PER_LICENSE",
                "CONCURRENT_USER_PER_LICENSE",
                "DASHBOARD",
                "IT_INTERFACE",
                "CONNECTABLE_IOT_DEVICE_VIA_USB",
                "CONNECTABLE_IOT_DEVICE_VIA_TULIP_GATEWAY",
                "CONNECTABLE_MACHINE_PER_LICENSE",
                "OBJECT_TO_BE_CHECKED",
                "MACHINE_WITH_BI_SUPPORT",
                "CONNECTED_DEVICE",
                "LISTING",
                "TLS_ENCRYPTION",
                "DOMAIN_LEVEL_SEND",
                "EFAX_ROUTER",
                "PRORATED_CREDIT",
                "NEW_HIRE",
                "NAS",
                "SALESFORCE_USER",
                "INTERVIEW",
                "ASSESSMENT",
                "NU_WEBEX_CALLING_ENHANCED",
                "NU_WEBEX_CALLING_PROFESSIONAL",
                "WEBEX_ASSISTANT_FOR_WEBEX_MEETINGS_NU",
                "NU_MEETINGS_BRIDGE_COUNTRY_CALL_BACK_AUDIO",
                "FLEX_TEAMS_MESSAGING",
                "ADDON_ANALYSES",
                "ADDITIONAL_LISTING",
                "MIGRATION_TENANT",
                "MIGRATION_GROUP",
                "MIGRATION_DOCUMENT",
                "MIGRATION_GSUITE",
                "MIGRATION_FOLDER",
                "ENHANCED_USER",
                "SINGLE_NAME_CERTIFICATE",
                "SETUP",
                "WILDCARD_CERTIFICATE",
                "SECURITY_PACKAGE",
                "ADDITIONAL_LANGUAGE",
                "VANITY_URL",
                "BRANDING",
                "DATA_SOURCE",
                "CREATOR_USER",
                "ESIGN_USER",
                "READ_ONLY_USER",
                "MEASURING_POINT",
                "ANDON_TV",
                "TABLET",
                "USER_10000",
                "USER_100",
                "PUBLIC_IP",
                "WORKLOAD",
                "PUBLIC_IP_ADDRESS",
                "COMPUTE_POINT",
                "RESOURCE_UNIT",
                "VALUE_POINT",
                "ACCOUNT",
                "REQUEST",
                "TRANSCRIPT",
                "NOTIFICATION",
                "CLAIM",
                "MID",
                "ENGAGEMENT",
                "TEAM_LICENSE_DIGITAL_TEAMBOARD",
                "TEAM_LICENSE_MODULE_CONNECTIVITY",
                "TEAM_LICENSE_MODULE_PROBLEM_SOLUTION",
                "TEAM_LICENSE_MODULE_AUDITS",
                "TEAM_LICENSE_MODULE_PROCESS_CONFIRMATION",
                "TEAM_LICENSE_MODULE_QUALIFICATION_MATRIX",
                "TEAM_LICENSE_MODULE_STANDARD_WORK_INSTRUCTION",
                "TEAM_LICENSE_MODULE_PARETO_ANALYSIS",
                "KPI",
                "YEAR_KPI_ARCHIVAL",
                "CORPORATE_CLOUD_HOSTING",
                "ON_PREMISES_HOSTING",
                "SUPPORT_SERVICE_HOUR",
                "CLASS",
                "EXPERT",
                "SPINDLE_HOUR",
                "ADDON_ADMINISTRATION",
                "ADDON_CONFIGURATION",
                "ADDON_PLANNING",
                "ADDON_PLANNING_OBJECTS",
                "ADDON_MASTER_DATA",
                "ADDON_CAPACITY_PLANS_CALENDAR",
                "ADDON_CONFLICT_RADAR",
                "ADDON_GAP_LIST",
                "ADDON_DASHBOARD",
                "ADDON_PLANNING_READ_ONLY",
                "ADDON_UTILIZATION_POOLS",
                "ADDON_FIXED_SCHEDULES",
                "ADDON_ASSEMBLY_GROUPS",
                "ADDON_ORDER_ON_HOLD",
                "ADDON_PARALLEL_RESSOURCES",
                "ADDON_MULTI_FUNCTIONAL_RESSOURCES",
                "ADDON_PLANEUS_TV_PER_TERMINAL",
                "ADDON_MASTER_DATA_WORK_PROCEDURES",
                "ADDON_MANUAL_IMPORT",
                "ADDON_AUTOMATIC_IMPORT",
                "ADDON_REPORTING_BASIC",
                "ADDON_REPORTING_ADVANCED",
                "ADDON_REPORT_RESOURCES_AVAILABILITY_PER_DAY",
                "ADDON_REPORT_OEE",
                "ADDON_REPORT_ON_TIME_DELIVERY_HISTORY",
                "ADDON_REPORT_PROCESS_PERFORMANCE_HISTORY",
                "ADDON_REPORT_UTILIZATION_PER_RESOURCE",
                "ADDON_REPORT_REPORTING_PLUG_IN",
                "ADDON_EXTERNAL_PARTNERS_BASIC_LICENSE",
                "ADDON_WORKBENCH_PACK_OF_5",
                "ADDON_WORKBENCH_PACK_OF_10",
                "ADDON_WORKBENCH_PACK_OF_15",
                "CLIENT",
                "VIRTUAL_MACHINE",
                "MODEL_TRANSFORMATION",
                "CASE_REFRESH",
                "CASE_VIEW",
                "CASE_DOCUMENT_DOWNLOAD",
                "VERIFICATION",
                "ADDON_CORPORATE_BRANDING",
                "CLIENT_TAX_FILINGS",
                "CLIENT_COMPLIANCE_SERVICES",
                "PROPOSAL",
                "UK_ID_CHECK",
                "INTERNATIONAL_ID_CHECK",
                "CREDIT_SCREEN",
                "UK_COMPANY_REPORT",
                "NON_UK_COMPANY_REPORT",
                "HR_SCREEN",
                "COMPANY_FORMATION",
                "CLIENT_ACCOUNTS",
                "SMARTKIT",
                "WORKFLOW",
                "EDITOR",
                "WORKER",
                "ADDON_POTENTIAL_ANALYSIS",
                "TRAINING_PACKAGE_SMALL",
                "TRAINING_PACKAGE_LARGE",
                "TOOL_PATH_OPTIMIZATION",
                "CLIENT_VAT_FILINGS",
                "BUNDLE",
                "PACKAGE",
                "VM",
                "INCIDENT",
                "SEND",
                "INTEGRATION",
                "BILLABLE_HOUR",
                "TB",
                "SOURCE",
                "TRAINING",
                "SITE",
                "CONSULTING_UNIT",
                "CAPACITY",
                "MIGRATION",
                "WORKSHOP",
                "ONBOARDING",
                "BENEFIT_ELIGIBLE_EMPLOYEE",
                "SEAT",
                "MS365_SEAT",
                "MS_EXCHANGE_MAILBOX",
                "GWORKSPACE_SEAT",
                "INTERNET_LINE",
                "BACKUP_LINE",
                "USER_PACK_50",
                "USER_PACK_100",
                "CIRCUIT",
                "NAC"
              ]
            },
            {
              "description": "Pricing unit. May be USER, GIGABYTE, MEGABYTE, HOUR, MINUTE, INVOICE, UNIT, PROJECT, PROPERTY, ITEM, WORD,\nEMAIL, CONTACT, CALL, CREDIT, ROOM, HOST, AGENT, OPERATOR, PROVIDER, MANAGER, TESTER, JVM, SERVER, WEB_USE_MINUTE,\nAUDIO_USE_MINUTE, PIECE, EMPLOYEE_PAY_PERIOD, EMPLOYEE_PER_PAY_PERIOD, COMPUTER, NOT_APPLICABLE, ONE_TIME_SETUP,\nDATA_POINTS, TIER1_API_CALLS, TIER2_API_CALLS, ADVISORY_HOURS, OVERAGE_AUDIO_MINUTE, EMPLOYEE, CONNECTION,\nPUSH_USER, THOUSAND_EMAILS_PER_DAY, PUSH_NOTIFICATION_DEVICES, API_CALLS, SMS_TEXT_MESSAGE, CONTACTS_1000, CONTRACT_FEE,\nTRANSFER_FEE, REACTIVATION_FEE, RECIPIENT, ADDITIONAL_1000_CONTACTS_BLOCK, SCHEDULE_PLAN, EMAILS_1000, EMAILS_2500,\nMOBILE_DEVICE, PAYSLIP, PAYSLIP_CORRECTION, STORE, WEBSITE, EPAPER, PAGE, POSTAGE_AND_PRINT, INTERNATIONAL_POSTAGE_AND_PRINT,\nTIER1_TOP_LEVEL_DOMAIN, TIER2_TOP_LEVEL_DOMAIN, DEDICATED_IP, ENABLELCM, MAXCOMPONENTS, DATA_MANAGEMENT_USER, SPECIALIST_USER,\nPROFESSIONAL_USER, MATERIALITY_MATRIX, STAKEHOLDER_MANAGEMENT, SCORECARD, STANDARD_MAPPING, DONATION_MANAGEMENT, DOCUMENT,\nPACKAGE_SMALL, PACKAGE_LARGE, MEMBER, ATTENDEE, MAILING, RESPONSE, EXTERNAL_INVOICE_FEE, CLIENT_TEST, IMAGE_TRANSFORMATION,\nTOTAL_IMAGE, LICENSE, MAILBOX, FREE_40_INCH_HDTV_PC, FREE_46_INCH_HDTV_PC, FREE_46_INCH_HDTV_PC_MOUNTING, EMPLOYEE_PER_WEEK,\nREGISTER, END_USER, CORE, DEVICE, PORT, MEASURER, PUBLISHED_MEASUREMENT, NODE, SERVER_RULE, VPN_LP, PROXY_LP,\nDESKTOP_CONNECT_LP, CAMERA, MAIN_SOUND_ZONE, SUB_SOUND_ZONE, POST, REPORT, BOX, SESSION, DISPLAY, TRUCKROLL, TRANSACTION_FEE,\nSENDING_API_CALL, LOOKUP_API_CALL, ANALYTICS_API_CALL, MIGRATION_INSTANCE, NFON_SETUP_PER_PHONE_EXTENSION,\nNFON_SETUP_PER_PHONE_EXTENSION_PLUS, NFON_SETUP_PER_EFAX_EXTENSION, NFON_PHONE_EXTENSION, NFON_PHONE_EXTENSION_PLUS,\nNFON_EFAX_EXTENSION, NFON_CALL_CENTER_MONITORING, NFON_NMEETING, NFON_MOBILE_NFON_DEVICE, NFON_ISOFTPHONE_MAC,\nNFON_NSOFTPHONE_STANDARD_WINDOWS, NFON_NSOFTPHONE_PREMIUM_WINDOWS, NFON_NCTI_STANDARD_WINDOWS, NFON_NCTI_STANDARD_CRM_WINDOWS,\nNFON_NCTI_STANDARD_MAC, NFON_NSOFTPHONE_STANDARD_WINDOWS_OR_MOBILE, WESUSTAIN_PERFORMANCE, WESUSTAIN_STAKEHOLDER_REPUTATION,\nWESUSTAIN_WEAPP, FAX, FAX_LINE, ROOM_LINE, DEPARTMENT_LINE, INTERNATIONAL_LICENSE, INTERNATIONAL_DEPARTMENT_LINE,\nINTERNATIONAL_ROOM_LINE, INTERNATIONAL_LINE, CALLING_CREDIT, LINE, TOLLFREE_ROOM_LINE, TOLLFREE_DEPARTMENT_LINE,\nTAXES_AND_FEES, LEAD, OPPORTUNITY, CAMPAIGN, CASE, CUSTOMER, TIER1_STANDARD_LINE, TIER1_ROOM_LINE, TIER1_TOLLFREE_ROOM_LINE,\nTIER1_TOLLFREE_DEPARTMENT_LINE, TIER1_FAX_LINE, TIER1_DEPARTMENT_LINE, TIER2_STANDARD_LINE, TIER2_ROOM_LINE,\nTIER2_DEPARTMENT_LINE, TIER3_STANDARD_LINE, TIER3_ROOM_LINE, TIER3_DEPARTMENT_LINE, TIER4_STANDARD_LINE, TIER4_ROOM_LINE,\nTIER4_DEPARTMENT_LINE, CLUSTER, NODE_4VCPU, FIVE_HUNDRED_GB_SSD, TWELVE_TB_NETWORK_IO, JBOSS_EAP, JBOSS_FUSE, JBOSS_A_MQ,\nJBOSS_BRMS, JBOSS_BPM_SUITE, JBOSS_DATA_GRID, JBOSS_DATA_VIRT, USER_LICENSE, ADDITIONAL_NUMBER_LICENSE, ROOM_PHONE_LICENSE,\nUBERCONFERENCE_PRO_LICENSE, UBERCONFERENCE_PRO_LICENSE_UNBUNDLED, INSTANCE, INDOOR_CAMERA, OUTDOOR_CAMERA, VINGATE_LP_LICENCE,\nADMINISTRATOR, MOBILE_USER, T1, PHONE, AUTO_ATTENDANT, HUNT_GROUP, VOICEMAIL_BOX, TOLL_FREE_NUMBER,\nINBOUND_LONG_DISTANCE_MINUTE, OUTBOUND_LONG_DISTANCE_MINUTE, INBOUND_OUTBOUND_LONG_DISTANCE_MINUTE, SET_TOP_BOX, MODEM,\nACCESS_POINT, CALLING_FEATURE, IAD_DEVICE, ANALOG_LINE, PRI, SBC_DEVICE, ROUTER, INTERNATIONAL_MINUTE, PHONE_LINE,\nDYNAMIC_IP_ADDRESS, STATIC_IP_ADDRESS, GATEWAY, REMOTE_CONTROL, TIER1_STANDARD_SEAT, TIER2_STANDARD_SEAT, TIER3_STANDARD_SEAT,\nTIER4_STANDARD_SEAT, TIER1_TOLL_FREE_SEAT, MILLION_MESSAGES, MESSAGE, WEEKLY, or PHONE_NUMBER."
            }
          ]
        },
        "uuid": {
          "description": "Discount UUID.",
          "type": "string",
          "nullable": true
        },
        "vendorSharePercentage": {
          "description": "Vendor's percentage share of the discount.",
          "type": "number",
          "nullable": true
        }
      }
    },
    {
      "example": {
        "applicationId": null,
        "applicationName": null,
        "applicationUuid": null,
        "autoApply": true,
        "basePartnerSharePercentage": 25,
        "billingCycles": null,
        "code": null,
        "createdOn": null,
        "description": "SOMEDESCRIPTION",
        "editionId": null,
        "editionUuid": null,
        "expirationDate": null,
        "id": null,
        "industryId": null,
        "maxRedemptions": null,
        "maxUnits": 0,
        "minUnits": 0,
        "partnerSharePercentage": 25,
        "paymentPlanId": null,
        "paymentPlanUuid": null,
        "percentage": 70,
        "price": null,
        "redemptionRestriction": "NONE",
        "redemptions": 0,
        "retainable": false,
        "startDate": null,
        "type": "PERCENTAGE",
        "unit": "USER",
        "uuid": null,
        "vendorSharePercentage": 50
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/discounts',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/channel/v1/discounts', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/channel/v1/discounts',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/discounts");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "applicationId": null,
  "applicationName": null,
  "applicationUuid": null,
  "autoApply": true,
  "basePartnerSharePercentage": 25,
  "billingCycles": null,
  "code": null,
  "createdOn": null,
  "description": "SOMEDESCRIPTION",
  "editionId": null,
  "editionUuid": null,
  "expirationDate": null,
  "id": null,
  "industryId": null,
  "maxRedemptions": null,
  "maxUnits": 0,
  "minUnits": 0,
  "partnerSharePercentage": 25,
  "paymentPlanId": null,
  "paymentPlanUuid": null,
  "percentage": 70,
  "price": null,
  "redemptionRestriction": "NONE",
  "redemptions": 0,
  "retainable": false,
  "startDate": null,
  "type": "PERCENTAGE",
  "unit": "USER",
  "uuid": null,
  "vendorSharePercentage": 50
}

Example response

{
  "applicationId": null,
  "applicationName": null,
  "applicationUuid": null,
  "autoApply": true,
  "basePartnerSharePercentage": 25,
  "billingCycles": null,
  "code": null,
  "createdOn": 1480969136160,
  "description": "SOMEDESCRIPTION",
  "editionId": null,
  "editionUuid": null,
  "expirationDate": null,
  "id": 1,
  "industryId": null,
  "maxRedemptions": null,
  "maxUnits": 0,
  "minUnits": 0,
  "partnerSharePercentage": 25,
  "paymentPlanId": null,
  "paymentPlanUuid": null,
  "percentage": 70,
  "price": null,
  "redemptionRestriction": "NONE",
  "redemptions": 0,
  "retainable": false,
  "startDate": null,
  "type": "PERCENTAGE",
  "unit": "USER",
  "uuid": "17055f26-ace6-4abe-87a6-ab64f4de80ce",
  "vendorSharePercentage": 50
}

POST/channel/v1/discounts

Creates a discount with the provided data. Note that percentage discounts cannot exceed two decimal places (for example, 10.15).

Body Parameters

Discount data object

Discount object:

Property Type Description
applicationId number

Application ID.

applicationName string

Name of the application to which the discount applies.

applicationUuid string

Application UUID.

autoApply boolean

True if the discount is automatically applied. Default value is true.

basePartnerSharePercentage number

Base partner's percentage share of the discount.

billingCycles number

Number of billing cycles for which the discount should be applied.

code string

Discount code. Must be at least 4 characters, but no longer than 103 characters.

createdOn number

Creation date of the discount.

description string

Description of discount. Required field. Must be at least 4 characters, but no longer than 255 characters.

editionId number

Edition ID.

editionUuid string

Edition UUID.

expirationDate number

Expiration date for the discount. This date must be in the future.

id number

Discount ID.

industryId number

Industry ID.

maxRedemptions number

Maximum number of redemptions available.

maxUnits number

Maximum number of units for which to apply the discount.

minUnits number

Minimum number of units for which to apply the discount.

partnerSharePercentage number

Partner's percentage share of the discount.

paymentPlanId number

Payment plan ID.

paymentPlanUuid string

Payment plan UUID.

percentage number

Percentage discount if discount is of PERCENTAGE type. The percentage value cannot exceed two decimal places (for example, 10.15).

price number

Amount to discount if discount is of FIXED_PRICE type.

redemptionRestriction RedemptionRestriction

Redemption restriction. May be NONE, ONCE_PER_USER, or ONCE_PER_COMPANY. Default value is NONE.

redemptions number

Number of times the discount has been redeemed.

retainable boolean

True if the discount is retainable. Retainable discounts can be redeemed on orders that are updated after the discount expires. For example, if an order includes a discount that expires on 01 January 2019, and the order is then updated on 02 January 2019, the discount would still be redeemable. The default value is false (discounts are not retained).

startDate number

Start date for the discount.

type DiscountType

Discount type. Required field. May be PERCENTAGE or FIXED_PRICE.

unit PricingUnit

Pricing unit. May be USER, GIGABYTE, MEGABYTE, HOUR, MINUTE, INVOICE, UNIT, PROJECT, PROPERTY, ITEM, WORD,

EMAIL, CONTACT, CALL, CREDIT, ROOM, HOST, AGENT, OPERATOR, PROVIDER, MANAGER, TESTER, JVM, SERVER, WEB_USE_MINUTE,

AUDIO_USE_MINUTE, PIECE, EMPLOYEE_PAY_PERIOD, EMPLOYEE_PER_PAY_PERIOD, COMPUTER, NOT_APPLICABLE, ONE_TIME_SETUP,

DATA_POINTS, TIER1_API_CALLS, TIER2_API_CALLS, ADVISORY_HOURS, OVERAGE_AUDIO_MINUTE, EMPLOYEE, CONNECTION,

PUSH_USER, THOUSAND_EMAILS_PER_DAY, PUSH_NOTIFICATION_DEVICES, API_CALLS, SMS_TEXT_MESSAGE, CONTACTS_1000, CONTRACT_FEE,

TRANSFER_FEE, REACTIVATION_FEE, RECIPIENT, ADDITIONAL_1000_CONTACTS_BLOCK, SCHEDULE_PLAN, EMAILS_1000, EMAILS_2500,

MOBILE_DEVICE, PAYSLIP, PAYSLIP_CORRECTION, STORE, WEBSITE, EPAPER, PAGE, POSTAGE_AND_PRINT, INTERNATIONAL_POSTAGE_AND_PRINT,

TIER1_TOP_LEVEL_DOMAIN, TIER2_TOP_LEVEL_DOMAIN, DEDICATED_IP, ENABLELCM, MAXCOMPONENTS, DATA_MANAGEMENT_USER, SPECIALIST_USER,

PROFESSIONAL_USER, MATERIALITY_MATRIX, STAKEHOLDER_MANAGEMENT, SCORECARD, STANDARD_MAPPING, DONATION_MANAGEMENT, DOCUMENT,

PACKAGE_SMALL, PACKAGE_LARGE, MEMBER, ATTENDEE, MAILING, RESPONSE, EXTERNAL_INVOICE_FEE, CLIENT_TEST, IMAGE_TRANSFORMATION,

TOTAL_IMAGE, LICENSE, MAILBOX, FREE_40_INCH_HDTV_PC, FREE_46_INCH_HDTV_PC, FREE_46_INCH_HDTV_PC_MOUNTING, EMPLOYEE_PER_WEEK,

REGISTER, END_USER, CORE, DEVICE, PORT, MEASURER, PUBLISHED_MEASUREMENT, NODE, SERVER_RULE, VPN_LP, PROXY_LP,

DESKTOP_CONNECT_LP, CAMERA, MAIN_SOUND_ZONE, SUB_SOUND_ZONE, POST, REPORT, BOX, SESSION, DISPLAY, TRUCKROLL, TRANSACTION_FEE,

SENDING_API_CALL, LOOKUP_API_CALL, ANALYTICS_API_CALL, MIGRATION_INSTANCE, NFON_SETUP_PER_PHONE_EXTENSION,

NFON_SETUP_PER_PHONE_EXTENSION_PLUS, NFON_SETUP_PER_EFAX_EXTENSION, NFON_PHONE_EXTENSION, NFON_PHONE_EXTENSION_PLUS,

NFON_EFAX_EXTENSION, NFON_CALL_CENTER_MONITORING, NFON_NMEETING, NFON_MOBILE_NFON_DEVICE, NFON_ISOFTPHONE_MAC,

NFON_NSOFTPHONE_STANDARD_WINDOWS, NFON_NSOFTPHONE_PREMIUM_WINDOWS, NFON_NCTI_STANDARD_WINDOWS, NFON_NCTI_STANDARD_CRM_WINDOWS,

NFON_NCTI_STANDARD_MAC, NFON_NSOFTPHONE_STANDARD_WINDOWS_OR_MOBILE, WESUSTAIN_PERFORMANCE, WESUSTAIN_STAKEHOLDER_REPUTATION,

WESUSTAIN_WEAPP, FAX, FAX_LINE, ROOM_LINE, DEPARTMENT_LINE, INTERNATIONAL_LICENSE, INTERNATIONAL_DEPARTMENT_LINE,

INTERNATIONAL_ROOM_LINE, INTERNATIONAL_LINE, CALLING_CREDIT, LINE, TOLLFREE_ROOM_LINE, TOLLFREE_DEPARTMENT_LINE,

TAXES_AND_FEES, LEAD, OPPORTUNITY, CAMPAIGN, CASE, CUSTOMER, TIER1_STANDARD_LINE, TIER1_ROOM_LINE, TIER1_TOLLFREE_ROOM_LINE,

TIER1_TOLLFREE_DEPARTMENT_LINE, TIER1_FAX_LINE, TIER1_DEPARTMENT_LINE, TIER2_STANDARD_LINE, TIER2_ROOM_LINE,

TIER2_DEPARTMENT_LINE, TIER3_STANDARD_LINE, TIER3_ROOM_LINE, TIER3_DEPARTMENT_LINE, TIER4_STANDARD_LINE, TIER4_ROOM_LINE,

TIER4_DEPARTMENT_LINE, CLUSTER, NODE_4VCPU, FIVE_HUNDRED_GB_SSD, TWELVE_TB_NETWORK_IO, JBOSS_EAP, JBOSS_FUSE, JBOSS_A_MQ,

JBOSS_BRMS, JBOSS_BPM_SUITE, JBOSS_DATA_GRID, JBOSS_DATA_VIRT, USER_LICENSE, ADDITIONAL_NUMBER_LICENSE, ROOM_PHONE_LICENSE,

UBERCONFERENCE_PRO_LICENSE, UBERCONFERENCE_PRO_LICENSE_UNBUNDLED, INSTANCE, INDOOR_CAMERA, OUTDOOR_CAMERA, VINGATE_LP_LICENCE,

ADMINISTRATOR, MOBILE_USER, T1, PHONE, AUTO_ATTENDANT, HUNT_GROUP, VOICEMAIL_BOX, TOLL_FREE_NUMBER,

INBOUND_LONG_DISTANCE_MINUTE, OUTBOUND_LONG_DISTANCE_MINUTE, INBOUND_OUTBOUND_LONG_DISTANCE_MINUTE, SET_TOP_BOX, MODEM,

ACCESS_POINT, CALLING_FEATURE, IAD_DEVICE, ANALOG_LINE, PRI, SBC_DEVICE, ROUTER, INTERNATIONAL_MINUTE, PHONE_LINE,

DYNAMIC_IP_ADDRESS, STATIC_IP_ADDRESS, GATEWAY, REMOTE_CONTROL, TIER1_STANDARD_SEAT, TIER2_STANDARD_SEAT, TIER3_STANDARD_SEAT,

TIER4_STANDARD_SEAT, TIER1_TOLL_FREE_SEAT, MILLION_MESSAGES, MESSAGE, WEEKLY, or PHONE_NUMBER.

uuid string

Discount UUID.

vendorSharePercentage number

Vendor's percentage share of the discount.

Responses

Status Meaning Description Definition
201 Created Created Discount
400 Bad Request Bad Request
404 Not Found Not Found
409 Conflict Conflict

Delete discounts

Example request

curl -X DELETE https://{marketplaceURL}/api/channel/v1/discounts/{discountId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/channel/v1/discounts/{discountId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/discounts/{discountId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/discounts/{discountId}',
{
  method: 'DELETE'

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/channel/v1/discounts/{discountId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/channel/v1/discounts/{discountId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/discounts/{discountId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE/channel/v1/discounts/{discountId}

Deletes the discount with the specified discount ID or UUID.

Parameters

Parameter Type Data Type Default Description
*discountId path string Discount ID or Discount UUID

Responses

Status Meaning Description Definition
204 No Content No Content
404 Not Found Not Found

Retrieve discounts

Example request

curl -X GET https://{marketplaceURL}/api/channel/v1/discounts/{discountId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/channel/v1/discounts/{discountId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/discounts/{discountId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/discounts/{discountId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/channel/v1/discounts/{discountId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/channel/v1/discounts/{discountId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/discounts/{discountId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "applicationId": null,
  "applicationName": null,
  "applicationUuid": null,
  "autoApply": true,
  "basePartnerSharePercentage": null,
  "billingCycles": null,
  "code": null,
  "createdOn": 1480969138028,
  "description": "SOMEDESCRIPTION",
  "editionId": null,
  "editionUuid": null,
  "expirationDate": null,
  "id": 4,
  "industryId": null,
  "maxRedemptions": null,
  "maxUnits": 0,
  "minUnits": 0,
  "partnerSharePercentage": null,
  "paymentPlanId": null,
  "paymentPlanUuid": null,
  "percentage": 70,
  "price": null,
  "redemptionRestriction": "NONE",
  "redemptions": 0,
  "retainable": false,
  "startDate": null,
  "type": "PERCENTAGE",
  "unit": "USER",
  "uuid": "47055f26-ace6-4abe-87a6-ab64f4de80ce",
  "vendorSharePercentage": null
}

GET/channel/v1/discounts/{discountId}

Retrieves the discount for the given discount ID or UUID.

Parameters

Parameter Type Data Type Default Description
*discountId path string Discount ID or Discount UUID

Responses

Status Meaning Description Definition
200 OK OK Discount
404 Not Found Not Found

List all discounts

Example request

curl -X GET https://{marketplaceURL}/api/channel/v1/discounts \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/channel/v1/discounts HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/discounts',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/discounts',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/channel/v1/discounts', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/channel/v1/discounts',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/discounts");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "applicationId": null,
    "applicationName": null,
    "applicationUuid": null,
    "autoApply": true,
    "basePartnerSharePercentage": null,
    "billingCycles": null,
    "code": null,
    "createdOn": 1480969138028,
    "description": "SOMEDESCRIPTION",
    "editionId": null,
    "editionUuid": null,
    "expirationDate": null,
    "id": 4,
    "industryId": null,
    "maxRedemptions": null,
    "maxUnits": 0,
    "minUnits": 0,
    "partnerSharePercentage": null,
    "paymentPlanId": null,
    "paymentPlanUuid": null,
    "percentage": 70,
    "price": null,
    "redemptionRestriction": "NONE",
    "redemptions": 0,
    "retainable": false,
    "startDate": null,
    "type": "PERCENTAGE",
    "unit": "USER",
    "uuid": "47055f26-ace6-4abe-87a6-ab64f4de80ce",
    "vendorSharePercentage": null
  }
]

GET/channel/v1/discounts

Lists all available discounts. The parameters can be used to filter the results.

Parameters

Parameter Type Data Type Default Description
code query string Discount code
count query integer 250 Number of results to fetch. Used for paging.
sortField query string of enum:
APPLICATION
CHANNEL
CODE
CREATED_ON
END_DATE
REDEMPTIONS
START_DATE
CREATED_ON Sort field. Default value is creation date.
sortOrder query string of enum:
ASC
DESC
ASC Sort order. Default value is ascending.
start query integer First result index. Used for paging.

Responses

Status Meaning Description Definition
200 OK OK array of Discount
404 Not Found Not Found

Update discounts

Example request

curl -X PUT https://{marketplaceURL}/api/channel/v1/discounts/{discountId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/channel/v1/discounts/{discountId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/discounts/{discountId}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Discount details",
      "type": "object",
      "title": "Discount",
      "required": [
        "type",
        "description"
      ],
      "properties": {
        "applicationId": {
          "description": "Application ID.",
          "type": "number",
          "nullable": true
        },
        "applicationName": {
          "description": "Name of the application to which the discount applies.",
          "type": "string",
          "nullable": true
        },
        "applicationUuid": {
          "description": "Application UUID.",
          "type": "string",
          "nullable": true
        },
        "autoApply": {
          "description": "True if the discount is automatically applied. Default value is true.",
          "type": "boolean"
        },
        "basePartnerSharePercentage": {
          "description": "Base partner's percentage share of the discount.",
          "type": "number",
          "nullable": true
        },
        "billingCycles": {
          "description": "Number of billing cycles for which the discount should be applied.",
          "type": "number",
          "nullable": true
        },
        "code": {
          "description": "Discount code. Must be at least 4 characters, but no longer than 103 characters.",
          "type": "string",
          "nullable": true
        },
        "createdOn": {
          "description": "Creation date of the discount.",
          "type": "number",
          "nullable": true
        },
        "description": {
          "description": "Description of discount. Required field. Must be at least 4 characters, but no longer than 255 characters.",
          "type": "string"
        },
        "editionId": {
          "description": "Edition ID.",
          "type": "number",
          "nullable": true
        },
        "editionUuid": {
          "description": "Edition UUID.",
          "type": "string",
          "nullable": true
        },
        "expirationDate": {
          "description": "Expiration date for the discount. This date must be in the future.",
          "type": "number",
          "nullable": true
        },
        "id": {
          "description": "Discount ID.",
          "type": "number",
          "nullable": true
        },
        "industryId": {
          "description": "Industry ID.",
          "type": "number",
          "nullable": true
        },
        "maxRedemptions": {
          "description": "Maximum number of redemptions available.",
          "type": "number",
          "nullable": true
        },
        "maxUnits": {
          "description": "Maximum number of units for which to apply the discount.",
          "type": "number"
        },
        "minUnits": {
          "description": "Minimum number of units for which to apply the discount.",
          "type": "number"
        },
        "partnerSharePercentage": {
          "description": "Partner's percentage share of the discount.",
          "type": "number",
          "nullable": true
        },
        "paymentPlanId": {
          "description": "Payment plan ID.",
          "type": "number",
          "nullable": true
        },
        "paymentPlanUuid": {
          "description": "Payment plan UUID.",
          "type": "string",
          "nullable": true
        },
        "percentage": {
          "description": "Percentage discount if discount is of PERCENTAGE type. The percentage value cannot exceed two decimal places (for example, 10.15).",
          "type": "number"
        },
        "price": {
          "description": "Amount to discount if discount is of FIXED_PRICE type.",
          "type": "number",
          "nullable": true
        },
        "redemptionRestriction": {
          "allOf": [
            {
              "type": "string",
              "title": "RedemptionRestriction",
              "properties": {
                "RedemptionRestriction": {
                  "type": "string",
                  "enum": [
                    "NONE",
                    "ONCE_PER_USER",
                    "ONCE_PER_COMPANY"
                  ]
                }
              }
            },
            {
              "description": "Redemption restriction. May be NONE, ONCE_PER_USER, or ONCE_PER_COMPANY. Default value is NONE."
            }
          ]
        },
        "redemptions": {
          "description": "Number of times the discount has been redeemed.",
          "type": "number"
        },
        "retainable": {
          "description": "True if the discount is retainable. Retainable discounts can be redeemed on orders that are updated after the discount expires. For example, if an order includes a discount that expires on 01 January 2019, and the order is then updated on 02 January 2019, the discount would still be redeemable. The default value is false (discounts are not retained).",
          "type": "boolean"
        },
        "startDate": {
          "description": "Start date for the discount.",
          "type": "number",
          "nullable": true
        },
        "type": {
          "allOf": [
            {
              "type": "string",
              "title": "DiscountType",
              "properties": {
                "DiscountType": {
                  "type": "string",
                  "enum": [
                    "PERCENTAGE",
                    "FIXED_PRICE"
                  ]
                }
              }
            },
            {
              "description": "Discount type. Required field. May be PERCENTAGE or FIXED_PRICE."
            }
          ]
        },
        "unit": {
          "allOf": [
            {
              "type": "string",
              "title": "PricingUnit",
              "enum": [
                "USER",
                "GIGABYTE",
                "MEGABYTE",
                "HOUR",
                "MINUTE",
                "INVOICE",
                "UNIT",
                "PROJECT",
                "PROPERTY",
                "ITEM",
                "WORD",
                "EMAIL",
                "CONTACT",
                "CALL",
                "CREDIT",
                "ROOM",
                "HOST",
                "AGENT",
                "OPERATOR",
                "PROVIDER",
                "MANAGER",
                "TESTER",
                "JVM",
                "SERVER",
                "WEB_USE_MINUTE",
                "AUDIO_USE_MINUTE",
                "PIECE",
                "EMPLOYEE_PAY_PERIOD",
                "EMPLOYEE_PER_PAY_PERIOD",
                "COMPUTER",
                "NOT_APPLICABLE",
                "ONE_TIME_SETUP",
                "DATA_POINTS",
                "TIER1_API_CALLS",
                "TIER2_API_CALLS",
                "ADVISORY_HOURS",
                "OVERAGE_AUDIO_MINUTE",
                "EMPLOYEE",
                "CONNECTION",
                "PUSH_USER",
                "THOUSAND_EMAILS_PER_DAY",
                "PUSH_NOTIFICATION_DEVICES",
                "API_CALLS",
                "SMS_TEXT_MESSAGE",
                "CONTACTS_1000",
                "CONTRACT_FEE",
                "TRANSFER_FEE",
                "REACTIVATION_FEE",
                "RECIPIENT",
                "ADDITIONAL_1000_CONTACTS_BLOCK",
                "SCHEDULE_PLAN",
                "EMAILS_1000",
                "EMAILS_2500",
                "MOBILE_DEVICE",
                "PAYSLIP",
                "PAYSLIP_CORRECTION",
                "STORE",
                "WEBSITE",
                "EPAPER",
                "PAGE",
                "POSTAGE_AND_PRINT",
                "INTERNATIONAL_POSTAGE_AND_PRINT",
                "TIER1_TOP_LEVEL_DOMAIN",
                "TIER2_TOP_LEVEL_DOMAIN",
                "DEDICATED_IP",
                "ENABLELCM",
                "MAXCOMPONENTS",
                "DATA_MANAGEMENT_USER",
                "SPECIALIST_USER",
                "PROFESSIONAL_USER",
                "MATERIALITY_MATRIX",
                "STAKEHOLDER_MANAGEMENT",
                "SCORECARD",
                "STANDARD_MAPPING",
                "DONATION_MANAGEMENT",
                "DOCUMENT",
                "PACKAGE_SMALL",
                "PACKAGE_LARGE",
                "MEMBER",
                "ATTENDEE",
                "MAILING",
                "RESPONSE",
                "EXTERNAL_INVOICE_FEE",
                "CLIENT_TEST",
                "IMAGE_TRANSFORMATION",
                "TOTAL_IMAGE",
                "LICENSE",
                "MAILBOX",
                "FREE_40_INCH_HDTV_PC",
                "FREE_46_INCH_HDTV_PC",
                "FREE_46_INCH_HDTV_PC_MOUNTING",
                "EMPLOYEE_PER_WEEK",
                "REGISTER",
                "END_USER",
                "CORE",
                "DEVICE",
                "PORT",
                "MEASURER",
                "PUBLISHED_MEASUREMENT",
                "NODE",
                "SERVER_RULE",
                "VPN_LP",
                "PROXY_LP",
                "DESKTOP_CONNECT_LP",
                "CAMERA",
                "MAIN_SOUND_ZONE",
                "SUB_SOUND_ZONE",
                "POST",
                "REPORT",
                "BOX",
                "SESSION",
                "DISPLAY",
                "TRUCKROLL",
                "TRANSACTION_FEE",
                "SENDING_API_CALL",
                "LOOKUP_API_CALL",
                "ANALYTICS_API_CALL",
                "MIGRATION_INSTANCE",
                "NFON_SETUP_PER_PHONE_EXTENSION",
                "NFON_SETUP_PER_PHONE_EXTENSION_PLUS",
                "NFON_SETUP_PER_EFAX_EXTENSION",
                "NFON_PHONE_EXTENSION",
                "NFON_PHONE_EXTENSION_PLUS",
                "NFON_EFAX_EXTENSION",
                "NFON_CALL_CENTER_MONITORING",
                "NFON_NMEETING",
                "NFON_MOBILE_NFON_DEVICE",
                "NFON_ISOFTPHONE_MAC",
                "NFON_NSOFTPHONE_STANDARD_WINDOWS",
                "NFON_NSOFTPHONE_PREMIUM_WINDOWS",
                "NFON_NCTI_STANDARD_WINDOWS",
                "NFON_NCTI_STANDARD_CRM_WINDOWS",
                "NFON_NCTI_STANDARD_MAC",
                "NFON_NSOFTPHONE_STANDARD_WINDOWS_OR_MOBILE",
                "WESUSTAIN_PERFORMANCE",
                "WESUSTAIN_STAKEHOLDER_REPUTATION",
                "WESUSTAIN_WEAPP",
                "FAX",
                "FAX_LINE",
                "ROOM_LINE",
                "DEPARTMENT_LINE",
                "INTERNATIONAL_LICENSE",
                "INTERNATIONAL_DEPARTMENT_LINE",
                "INTERNATIONAL_ROOM_LINE",
                "INTERNATIONAL_LINE",
                "CALLING_CREDIT",
                "LINE",
                "TOLLFREE_ROOM_LINE",
                "TOLLFREE_DEPARTMENT_LINE",
                "TAXES_AND_FEES",
                "LEAD",
                "OPPORTUNITY",
                "CAMPAIGN",
                "CASE",
                "CUSTOMER",
                "TIER1_STANDARD_LINE",
                "TIER1_ROOM_LINE",
                "TIER1_TOLLFREE_ROOM_LINE",
                "TIER1_TOLLFREE_DEPARTMENT_LINE",
                "TIER1_FAX_LINE",
                "TIER1_DEPARTMENT_LINE",
                "TIER2_STANDARD_LINE",
                "TIER2_ROOM_LINE",
                "TIER2_DEPARTMENT_LINE",
                "TIER3_STANDARD_LINE",
                "TIER3_ROOM_LINE",
                "TIER3_DEPARTMENT_LINE",
                "TIER4_STANDARD_LINE",
                "TIER4_ROOM_LINE",
                "TIER4_DEPARTMENT_LINE",
                "CLUSTER",
                "NODE_4VCPU",
                "FIVE_HUNDRED_GB_SSD",
                "TWELVE_TB_NETWORK_IO",
                "JBOSS_EAP",
                "JBOSS_FUSE",
                "JBOSS_A_MQ",
                "JBOSS_BRMS",
                "JBOSS_BPM_SUITE",
                "JBOSS_DATA_GRID",
                "JBOSS_DATA_VIRT",
                "USER_LICENSE",
                "ADDITIONAL_NUMBER_LICENSE",
                "ROOM_PHONE_LICENSE",
                "UBERCONFERENCE_PRO_LICENSE",
                "UBERCONFERENCE_PRO_LICENSE_UNBUNDLED",
                "INSTANCE",
                "INDOOR_CAMERA",
                "OUTDOOR_CAMERA",
                "VINGATE_LP_LICENCE",
                "ADMINISTRATOR",
                "MOBILE_USER",
                "G_SUITE",
                "T1",
                "PHONE",
                "AUTO_ATTENDANT",
                "HUNT_GROUP",
                "VOICEMAIL_BOX",
                "TOLL_FREE_NUMBER",
                "INBOUND_LONG_DISTANCE_MINUTE",
                "OUTBOUND_LONG_DISTANCE_MINUTE",
                "INBOUND_OUTBOUND_LONG_DISTANCE_MINUTE",
                "SET_TOP_BOX",
                "MODEM",
                "ACCESS_POINT",
                "CALLING_FEATURE",
                "IAD_DEVICE",
                "ANALOG_LINE",
                "PRI",
                "SBC_DEVICE",
                "ROUTER",
                "INTERNATIONAL_MINUTE",
                "PHONE_LINE",
                "DYNAMIC_IP_ADDRESS",
                "STATIC_IP_ADDRESS",
                "GATEWAY",
                "REMOTE_CONTROL",
                "TIER1_STANDARD_SEAT",
                "TIER2_STANDARD_SEAT",
                "TIER3_STANDARD_SEAT",
                "TIER4_STANDARD_SEAT",
                "TIER1_TOLL_FREE_SEAT",
                "MILLION_MESSAGES",
                "MESSAGE",
                "WEEKLY",
                "PHONE_NUMBER",
                "GUEST",
                "REVISION_SAFE_DATAROOM",
                "GROUP_SESSION",
                "MAILBOX_AD_SYNC",
                "PHONE_SUPPORT",
                "EXTRA_10TB",
                "EXTRA_50TB",
                "EXTRA_200TB",
                "MAP_VIEW",
                "SVM",
                "CHANNEL",
                "NUMBER_PRINTER_TABLET",
                "NUMBER_ONSITE_SERVER",
                "NUMBER_VISITS",
                "ONSITE_TECHNICIAN_PC",
                "ONSITE_TECHNICIAN_SERVER",
                "SHORTER_REACTION_TIMES",
                "E_COMMERCE_INTEGRATION",
                "LOCATION",
                "TRAINING_SESSION",
                "GIGABYTES_PER_HOUR",
                "FINANCIAL_PLANNING",
                "ONSITE_WORKPLACE",
                "INTERNAL_TOOLS_ACCESS",
                "DUTY_SERVICE",
                "TERABYTE",
                "HOST_UNIT_HOURS",
                "WEB_CHECKS",
                "ACTIVE_USERS",
                "ACTIVE_EMPLOYEE",
                "PC_OF_NET_RECURRING_FEE",
                "ACTIVE_VENDOR",
                "ADVERTISEMENT",
                "ADVERTISER_SPENDS",
                "ANNUAL_FUNDRAISING_INCOME",
                "ANNUAL_SUBSCRIPTION",
                "APPLIANCE",
                "ASSET",
                "ASSETS_UNDER_MANAGEMENT",
                "BUSINESS_PARTNERS",
                "CASH_FLOWS",
                "COMPONENT",
                "CONNECTED_SYSTEMS",
                "CONTRACTS",
                "COSTS",
                "DATA_STREAMS",
                "DATABASE_SIZE",
                "EXTERNAL_SERVICE_CALLS",
                "FILE",
                "FIXED",
                "FLAT",
                "FLAT_FEE_BASED_ON_ASSETS",
                "FLEET_PLANNING_ORDERS",
                "FORMS",
                "GIGABYTE_DATABASE_SIZES",
                "INSTALLATION",
                "INSTALLED_CAPACITY",
                "JOB_POSTING",
                "LEARNER",
                "LOGON",
                "MANAGED_SYSTEM",
                "MASTER_DATA_OBJECT",
                "MASTER_RECORDS",
                "MBPS",
                "MONITORED_USER",
                "MPLS",
                "ORDER",
                "OUTPATIENT_DAYS",
                "PAGE_VIEW",
                "PATIENT_CARE_DAY",
                "PATIENT_TREATED",
                "PLANT",
                "POINTS_OF_DELIVERY",
                "PREMIUM",
                "PROCESS",
                "PRODUCTS",
                "RECORDS",
                "RENTAL_UNIT",
                "RESOURCES",
                "REVENUE",
                "SALES_ORDER",
                "SALES_PORTFOLIOS",
                "SERVICE_ORDERS",
                "SITE_VISITS",
                "SPENDS",
                "SPEND_VOLUMES",
                "STREAM",
                "STUDENT",
                "SUBSCRIBER",
                "SUPPLIERS",
                "TICKETS",
                "TOTAL_ANNUAL_BUDGET",
                "TUNNEL",
                "VIRTUAL_USERS",
                "SAP_SYSTEM",
                "POSITION_TYPES",
                "OVERAGE_FEES",
                "OVERAGE_FEE_TRANSACTION",
                "OVERAGE_FEES_DOCUMENT",
                "OVERAGE_FEES_ITEM",
                "EVENT",
                "BUSINESS_EVENT",
                "LEGAL_TENDER",
                "ANNUAL_REVENUE",
                "AD_SYNC",
                "FULL_DATA_RESTORE",
                "USED_STORAGE_100GB",
                "COMPANY",
                "ADDITIONAL_USER",
                "VISIT",
                "VIDEO",
                "ELECTRONIC_PAYMENT",
                "CHECK_PAYMENT",
                "EXPRESS_PAY_ELECTRONIC_PAYMENT",
                "EXPRESS_PAY_CHECK_PAYMENT",
                "DATA_ENTRY_SERVICE",
                "MONTHLY_VISIT",
                "SCRUB_TRANSACTION",
                "DEVICE_LICENSE",
                "SERVER_LICENSE",
                "BASE_LICENSE",
                "SERVICE_CALL",
                "SUPPORT_INCIDENT_TICKET",
                "CUSTOM_REPORT_BUILDING_TRAINING",
                "QUOTA",
                "DOMESTIC_TRANSACTION",
                "BEE",
                "BEE_FLEET",
                "BEE_BEACON_AMBIENT_LIGHT",
                "BEE_BEACON_TEMPERATURE_HUMIDITY",
                "CONTACTS_100",
                "TEMPLATE",
                "TEMPLATE_PACKS_10",
                "PACK",
                "SMS_TEXT_MESSAGE_10",
                "VIRTUAL_SERVER",
                "PHYSICAL_SERVER",
                "WORKSTATION",
                "CHATS",
                "MATCH_LIST",
                "CERTIFICATE_12_MONTHS",
                "CERTIFICATE_24_MONTHS",
                "PRIVACY",
                "PAGE_VIEWS_100000",
                "VOICE_OUT",
                "EXAM",
                "PARTICIPANT",
                "ENCRYPTION_ADDON",
                "ESS",
                "ETI",
                "ATP_ADDON",
                "PBE_ADDO",
                "NETI_ADDON",
                "HUNDRED_SMS_REMINDER",
                "CALENDAR_SYNC",
                "PAYMENT_INTERFACE",
                "MULTILINGUAL_ONLINE_EVENT_BOOKING",
                "SOCKET",
                "OFFER",
                "FREELANCER",
                "SOAP",
                "DATEV_LEXWARE_INTERFACE",
                "TOKEN",
                "SERVICE_MONTH",
                "VIDEO_PACKAGE_50_HOURS",
                "INTERFACE",
                "TEST_CASE",
                "MINUTES_15",
                "MINUTES_30",
                "CONNECTED_ACCESS_POINT",
                "DAY",
                "SATURDAY_SURCHARGE",
                "NIGHT_SURCHARGE",
                "SUNDAY_SURCHARGE",
                "PUBLIC_HOLIDAY_SURCHARGE",
                "BASIC_PACKAGE",
                "STANDARD_PACKAGE",
                "PREMIUM_PACKAGE",
                "REPORTS_MODULE",
                "WORKFLOW_MODULE",
                "NBV_250K",
                "NBV",
                "INVENTORY",
                "ADDITIONAL_COMPANY",
                "TRANSACTION",
                "PREMIUM_CREDIT_REPORTS",
                "ADDITIONAL_CONNECTION",
                "STOCK_UNIT",
                "MONTHLY_USAGE_FEE",
                "USAGE_FEE",
                "MONTHLY_CHARGES",
                "STANDARD_USER",
                "ADDITIONAL_UNIT",
                "COMMISSION",
                "KITTING",
                "WOP",
                "SFDC",
                "NAMED_USER_LICENSE",
                "BARCODING_AND_WAREHOUSING",
                "MODULE",
                "MANUFACTURING_MODULE",
                "MRP",
                "CONSOLE_MODULE",
                "CONSOLIDATIONS",
                "MULTI_CURRENCY",
                "ADDON_LICENSE",
                "INBOUND_PAGE",
                "OUTBOUND_PAGE",
                "OPPORTUNITY_RETENTION",
                "SOCIAL_SENTIMENT",
                "DEMAND_PRICE",
                "SETUP_FEE",
                "SHAREPOINT",
                "INTEGRATION_MAINTENANCE",
                "VIEWER",
                "MANAGEMENT_USER",
                "SQ_FT",
                "LOCATION_UPTO_10_EMPLOYEES",
                "LOCATION_UPTO_20_EMPLOYEES",
                "LOCATION_UPTO_30_EMPLOYEES",
                "LOCATION_UPTO_60_EMPLOYEES",
                "LOCATION_UPTO_99_EMPLOYEES",
                "M365_ONLINE",
                "WEB_HOSTING_SERVER",
                "STANDARD_EDITION_GIGABYTE",
                "STORAGE_GIGABYTE",
                "EGRESS_GIGABYTE",
                "FEE_HW_DEFECT_NO_WARRANTY_CASE",
                "SIM_CARD",
                "SIM_CARDS_10",
                "APPLICATION_CONNECTOR",
                "ADDITIONAL_API_CALLS",
                "USED_STORAGE_PER_GB",
                "CERTIFICATION",
                "MACHINE",
                "CALCULATION_USER",
                "MAILBOX_S",
                "MAILBOX_M",
                "MAILBOX_L",
                "STORAGE",
                "GROUP",
                "VEHICLE",
                "ENDPOINT",
                "MANAGED_SERVICE",
                "SOC",
                "ONLINE_PLAN",
                "ENTERPRISE_PLAN",
                "FLOATING_LICENSE",
                "USER_PER_LICENSE",
                "CONCURRENT_USER_PER_LICENSE",
                "DASHBOARD",
                "IT_INTERFACE",
                "CONNECTABLE_IOT_DEVICE_VIA_USB",
                "CONNECTABLE_IOT_DEVICE_VIA_TULIP_GATEWAY",
                "CONNECTABLE_MACHINE_PER_LICENSE",
                "OBJECT_TO_BE_CHECKED",
                "MACHINE_WITH_BI_SUPPORT",
                "CONNECTED_DEVICE",
                "LISTING",
                "TLS_ENCRYPTION",
                "DOMAIN_LEVEL_SEND",
                "EFAX_ROUTER",
                "PRORATED_CREDIT",
                "NEW_HIRE",
                "NAS",
                "SALESFORCE_USER",
                "INTERVIEW",
                "ASSESSMENT",
                "NU_WEBEX_CALLING_ENHANCED",
                "NU_WEBEX_CALLING_PROFESSIONAL",
                "WEBEX_ASSISTANT_FOR_WEBEX_MEETINGS_NU",
                "NU_MEETINGS_BRIDGE_COUNTRY_CALL_BACK_AUDIO",
                "FLEX_TEAMS_MESSAGING",
                "ADDON_ANALYSES",
                "ADDITIONAL_LISTING",
                "MIGRATION_TENANT",
                "MIGRATION_GROUP",
                "MIGRATION_DOCUMENT",
                "MIGRATION_GSUITE",
                "MIGRATION_FOLDER",
                "ENHANCED_USER",
                "SINGLE_NAME_CERTIFICATE",
                "SETUP",
                "WILDCARD_CERTIFICATE",
                "SECURITY_PACKAGE",
                "ADDITIONAL_LANGUAGE",
                "VANITY_URL",
                "BRANDING",
                "DATA_SOURCE",
                "CREATOR_USER",
                "ESIGN_USER",
                "READ_ONLY_USER",
                "MEASURING_POINT",
                "ANDON_TV",
                "TABLET",
                "USER_10000",
                "USER_100",
                "PUBLIC_IP",
                "WORKLOAD",
                "PUBLIC_IP_ADDRESS",
                "COMPUTE_POINT",
                "RESOURCE_UNIT",
                "VALUE_POINT",
                "ACCOUNT",
                "REQUEST",
                "TRANSCRIPT",
                "NOTIFICATION",
                "CLAIM",
                "MID",
                "ENGAGEMENT",
                "TEAM_LICENSE_DIGITAL_TEAMBOARD",
                "TEAM_LICENSE_MODULE_CONNECTIVITY",
                "TEAM_LICENSE_MODULE_PROBLEM_SOLUTION",
                "TEAM_LICENSE_MODULE_AUDITS",
                "TEAM_LICENSE_MODULE_PROCESS_CONFIRMATION",
                "TEAM_LICENSE_MODULE_QUALIFICATION_MATRIX",
                "TEAM_LICENSE_MODULE_STANDARD_WORK_INSTRUCTION",
                "TEAM_LICENSE_MODULE_PARETO_ANALYSIS",
                "KPI",
                "YEAR_KPI_ARCHIVAL",
                "CORPORATE_CLOUD_HOSTING",
                "ON_PREMISES_HOSTING",
                "SUPPORT_SERVICE_HOUR",
                "CLASS",
                "EXPERT",
                "SPINDLE_HOUR",
                "ADDON_ADMINISTRATION",
                "ADDON_CONFIGURATION",
                "ADDON_PLANNING",
                "ADDON_PLANNING_OBJECTS",
                "ADDON_MASTER_DATA",
                "ADDON_CAPACITY_PLANS_CALENDAR",
                "ADDON_CONFLICT_RADAR",
                "ADDON_GAP_LIST",
                "ADDON_DASHBOARD",
                "ADDON_PLANNING_READ_ONLY",
                "ADDON_UTILIZATION_POOLS",
                "ADDON_FIXED_SCHEDULES",
                "ADDON_ASSEMBLY_GROUPS",
                "ADDON_ORDER_ON_HOLD",
                "ADDON_PARALLEL_RESSOURCES",
                "ADDON_MULTI_FUNCTIONAL_RESSOURCES",
                "ADDON_PLANEUS_TV_PER_TERMINAL",
                "ADDON_MASTER_DATA_WORK_PROCEDURES",
                "ADDON_MANUAL_IMPORT",
                "ADDON_AUTOMATIC_IMPORT",
                "ADDON_REPORTING_BASIC",
                "ADDON_REPORTING_ADVANCED",
                "ADDON_REPORT_RESOURCES_AVAILABILITY_PER_DAY",
                "ADDON_REPORT_OEE",
                "ADDON_REPORT_ON_TIME_DELIVERY_HISTORY",
                "ADDON_REPORT_PROCESS_PERFORMANCE_HISTORY",
                "ADDON_REPORT_UTILIZATION_PER_RESOURCE",
                "ADDON_REPORT_REPORTING_PLUG_IN",
                "ADDON_EXTERNAL_PARTNERS_BASIC_LICENSE",
                "ADDON_WORKBENCH_PACK_OF_5",
                "ADDON_WORKBENCH_PACK_OF_10",
                "ADDON_WORKBENCH_PACK_OF_15",
                "CLIENT",
                "VIRTUAL_MACHINE",
                "MODEL_TRANSFORMATION",
                "CASE_REFRESH",
                "CASE_VIEW",
                "CASE_DOCUMENT_DOWNLOAD",
                "VERIFICATION",
                "ADDON_CORPORATE_BRANDING",
                "CLIENT_TAX_FILINGS",
                "CLIENT_COMPLIANCE_SERVICES",
                "PROPOSAL",
                "UK_ID_CHECK",
                "INTERNATIONAL_ID_CHECK",
                "CREDIT_SCREEN",
                "UK_COMPANY_REPORT",
                "NON_UK_COMPANY_REPORT",
                "HR_SCREEN",
                "COMPANY_FORMATION",
                "CLIENT_ACCOUNTS",
                "SMARTKIT",
                "WORKFLOW",
                "EDITOR",
                "WORKER",
                "ADDON_POTENTIAL_ANALYSIS",
                "TRAINING_PACKAGE_SMALL",
                "TRAINING_PACKAGE_LARGE",
                "TOOL_PATH_OPTIMIZATION",
                "CLIENT_VAT_FILINGS",
                "BUNDLE",
                "PACKAGE",
                "VM",
                "INCIDENT",
                "SEND",
                "INTEGRATION",
                "BILLABLE_HOUR",
                "TB",
                "SOURCE",
                "TRAINING",
                "SITE",
                "CONSULTING_UNIT",
                "CAPACITY",
                "MIGRATION",
                "WORKSHOP",
                "ONBOARDING",
                "BENEFIT_ELIGIBLE_EMPLOYEE",
                "SEAT",
                "MS365_SEAT",
                "MS_EXCHANGE_MAILBOX",
                "GWORKSPACE_SEAT",
                "INTERNET_LINE",
                "BACKUP_LINE",
                "USER_PACK_50",
                "USER_PACK_100",
                "CIRCUIT",
                "NAC"
              ]
            },
            {
              "description": "Pricing unit. May be USER, GIGABYTE, MEGABYTE, HOUR, MINUTE, INVOICE, UNIT, PROJECT, PROPERTY, ITEM, WORD,\nEMAIL, CONTACT, CALL, CREDIT, ROOM, HOST, AGENT, OPERATOR, PROVIDER, MANAGER, TESTER, JVM, SERVER, WEB_USE_MINUTE,\nAUDIO_USE_MINUTE, PIECE, EMPLOYEE_PAY_PERIOD, EMPLOYEE_PER_PAY_PERIOD, COMPUTER, NOT_APPLICABLE, ONE_TIME_SETUP,\nDATA_POINTS, TIER1_API_CALLS, TIER2_API_CALLS, ADVISORY_HOURS, OVERAGE_AUDIO_MINUTE, EMPLOYEE, CONNECTION,\nPUSH_USER, THOUSAND_EMAILS_PER_DAY, PUSH_NOTIFICATION_DEVICES, API_CALLS, SMS_TEXT_MESSAGE, CONTACTS_1000, CONTRACT_FEE,\nTRANSFER_FEE, REACTIVATION_FEE, RECIPIENT, ADDITIONAL_1000_CONTACTS_BLOCK, SCHEDULE_PLAN, EMAILS_1000, EMAILS_2500,\nMOBILE_DEVICE, PAYSLIP, PAYSLIP_CORRECTION, STORE, WEBSITE, EPAPER, PAGE, POSTAGE_AND_PRINT, INTERNATIONAL_POSTAGE_AND_PRINT,\nTIER1_TOP_LEVEL_DOMAIN, TIER2_TOP_LEVEL_DOMAIN, DEDICATED_IP, ENABLELCM, MAXCOMPONENTS, DATA_MANAGEMENT_USER, SPECIALIST_USER,\nPROFESSIONAL_USER, MATERIALITY_MATRIX, STAKEHOLDER_MANAGEMENT, SCORECARD, STANDARD_MAPPING, DONATION_MANAGEMENT, DOCUMENT,\nPACKAGE_SMALL, PACKAGE_LARGE, MEMBER, ATTENDEE, MAILING, RESPONSE, EXTERNAL_INVOICE_FEE, CLIENT_TEST, IMAGE_TRANSFORMATION,\nTOTAL_IMAGE, LICENSE, MAILBOX, FREE_40_INCH_HDTV_PC, FREE_46_INCH_HDTV_PC, FREE_46_INCH_HDTV_PC_MOUNTING, EMPLOYEE_PER_WEEK,\nREGISTER, END_USER, CORE, DEVICE, PORT, MEASURER, PUBLISHED_MEASUREMENT, NODE, SERVER_RULE, VPN_LP, PROXY_LP,\nDESKTOP_CONNECT_LP, CAMERA, MAIN_SOUND_ZONE, SUB_SOUND_ZONE, POST, REPORT, BOX, SESSION, DISPLAY, TRUCKROLL, TRANSACTION_FEE,\nSENDING_API_CALL, LOOKUP_API_CALL, ANALYTICS_API_CALL, MIGRATION_INSTANCE, NFON_SETUP_PER_PHONE_EXTENSION,\nNFON_SETUP_PER_PHONE_EXTENSION_PLUS, NFON_SETUP_PER_EFAX_EXTENSION, NFON_PHONE_EXTENSION, NFON_PHONE_EXTENSION_PLUS,\nNFON_EFAX_EXTENSION, NFON_CALL_CENTER_MONITORING, NFON_NMEETING, NFON_MOBILE_NFON_DEVICE, NFON_ISOFTPHONE_MAC,\nNFON_NSOFTPHONE_STANDARD_WINDOWS, NFON_NSOFTPHONE_PREMIUM_WINDOWS, NFON_NCTI_STANDARD_WINDOWS, NFON_NCTI_STANDARD_CRM_WINDOWS,\nNFON_NCTI_STANDARD_MAC, NFON_NSOFTPHONE_STANDARD_WINDOWS_OR_MOBILE, WESUSTAIN_PERFORMANCE, WESUSTAIN_STAKEHOLDER_REPUTATION,\nWESUSTAIN_WEAPP, FAX, FAX_LINE, ROOM_LINE, DEPARTMENT_LINE, INTERNATIONAL_LICENSE, INTERNATIONAL_DEPARTMENT_LINE,\nINTERNATIONAL_ROOM_LINE, INTERNATIONAL_LINE, CALLING_CREDIT, LINE, TOLLFREE_ROOM_LINE, TOLLFREE_DEPARTMENT_LINE,\nTAXES_AND_FEES, LEAD, OPPORTUNITY, CAMPAIGN, CASE, CUSTOMER, TIER1_STANDARD_LINE, TIER1_ROOM_LINE, TIER1_TOLLFREE_ROOM_LINE,\nTIER1_TOLLFREE_DEPARTMENT_LINE, TIER1_FAX_LINE, TIER1_DEPARTMENT_LINE, TIER2_STANDARD_LINE, TIER2_ROOM_LINE,\nTIER2_DEPARTMENT_LINE, TIER3_STANDARD_LINE, TIER3_ROOM_LINE, TIER3_DEPARTMENT_LINE, TIER4_STANDARD_LINE, TIER4_ROOM_LINE,\nTIER4_DEPARTMENT_LINE, CLUSTER, NODE_4VCPU, FIVE_HUNDRED_GB_SSD, TWELVE_TB_NETWORK_IO, JBOSS_EAP, JBOSS_FUSE, JBOSS_A_MQ,\nJBOSS_BRMS, JBOSS_BPM_SUITE, JBOSS_DATA_GRID, JBOSS_DATA_VIRT, USER_LICENSE, ADDITIONAL_NUMBER_LICENSE, ROOM_PHONE_LICENSE,\nUBERCONFERENCE_PRO_LICENSE, UBERCONFERENCE_PRO_LICENSE_UNBUNDLED, INSTANCE, INDOOR_CAMERA, OUTDOOR_CAMERA, VINGATE_LP_LICENCE,\nADMINISTRATOR, MOBILE_USER, T1, PHONE, AUTO_ATTENDANT, HUNT_GROUP, VOICEMAIL_BOX, TOLL_FREE_NUMBER,\nINBOUND_LONG_DISTANCE_MINUTE, OUTBOUND_LONG_DISTANCE_MINUTE, INBOUND_OUTBOUND_LONG_DISTANCE_MINUTE, SET_TOP_BOX, MODEM,\nACCESS_POINT, CALLING_FEATURE, IAD_DEVICE, ANALOG_LINE, PRI, SBC_DEVICE, ROUTER, INTERNATIONAL_MINUTE, PHONE_LINE,\nDYNAMIC_IP_ADDRESS, STATIC_IP_ADDRESS, GATEWAY, REMOTE_CONTROL, TIER1_STANDARD_SEAT, TIER2_STANDARD_SEAT, TIER3_STANDARD_SEAT,\nTIER4_STANDARD_SEAT, TIER1_TOLL_FREE_SEAT, MILLION_MESSAGES, MESSAGE, WEEKLY, or PHONE_NUMBER."
            }
          ]
        },
        "uuid": {
          "description": "Discount UUID.",
          "type": "string",
          "nullable": true
        },
        "vendorSharePercentage": {
          "description": "Vendor's percentage share of the discount.",
          "type": "number",
          "nullable": true
        }
      }
    },
    {
      "example": {
        "applicationId": null,
        "applicationName": null,
        "applicationUuid": null,
        "autoApply": true,
        "basePartnerSharePercentage": 25,
        "billingCycles": null,
        "code": null,
        "createdOn": null,
        "description": "SOMEDESCRIPTION",
        "editionId": null,
        "editionUuid": null,
        "expirationDate": null,
        "id": null,
        "industryId": null,
        "maxRedemptions": null,
        "maxUnits": 0,
        "minUnits": 0,
        "partnerSharePercentage": 25,
        "paymentPlanId": null,
        "paymentPlanUuid": null,
        "percentage": 50,
        "price": null,
        "redemptionRestriction": "NONE",
        "redemptions": 0,
        "retainable": false,
        "startDate": null,
        "type": "PERCENTAGE",
        "unit": "USER",
        "uuid": null,
        "vendorSharePercentage": 50
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/discounts/{discountId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/channel/v1/discounts/{discountId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/channel/v1/discounts/{discountId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/discounts/{discountId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "applicationId": null,
  "applicationName": null,
  "applicationUuid": null,
  "autoApply": true,
  "basePartnerSharePercentage": 25,
  "billingCycles": null,
  "code": null,
  "createdOn": null,
  "description": "SOMEDESCRIPTION",
  "editionId": null,
  "editionUuid": null,
  "expirationDate": null,
  "id": null,
  "industryId": null,
  "maxRedemptions": null,
  "maxUnits": 0,
  "minUnits": 0,
  "partnerSharePercentage": 25,
  "paymentPlanId": null,
  "paymentPlanUuid": null,
  "percentage": 50,
  "price": null,
  "redemptionRestriction": "NONE",
  "redemptions": 0,
  "retainable": false,
  "startDate": null,
  "type": "PERCENTAGE",
  "unit": "USER",
  "uuid": null,
  "vendorSharePercentage": 50
}

Example response

{
  "applicationId": null,
  "applicationName": null,
  "applicationUuid": null,
  "autoApply": true,
  "basePartnerSharePercentage": 25,
  "billingCycles": null,
  "code": null,
  "createdOn": null,
  "description": "SOMEDESCRIPTION",
  "editionId": null,
  "editionUuid": null,
  "expirationDate": null,
  "id": 5,
  "industryId": null,
  "maxRedemptions": null,
  "maxUnits": 0,
  "minUnits": 0,
  "partnerSharePercentage": 25,
  "paymentPlanId": null,
  "paymentPlanUuid": null,
  "percentage": 50,
  "price": null,
  "redemptionRestriction": "NONE",
  "redemptions": 0,
  "retainable": false,
  "startDate": null,
  "type": "PERCENTAGE",
  "unit": "USER",
  "uuid": "57055f26-ace6-4abe-87a6-ab64f4de80ce",
  "vendorSharePercentage": 50
}

PUT/channel/v1/discounts/{discountId}

Updates the specified discount with the provided data. Note that percentage discounts cannot exceed two decimal places (for example, 10.15).

Parameters

Parameter Type Data Type Default Description
*discountId path string Discount ID or Discount UUID

Body Parameters

Discount data object

Discount object:

Property Type Description
applicationId number

Application ID.

applicationName string

Name of the application to which the discount applies.

applicationUuid string

Application UUID.

autoApply boolean

True if the discount is automatically applied. Default value is true.

basePartnerSharePercentage number

Base partner's percentage share of the discount.

billingCycles number

Number of billing cycles for which the discount should be applied.

code string

Discount code. Must be at least 4 characters, but no longer than 103 characters.

createdOn number

Creation date of the discount.

description string

Description of discount. Required field. Must be at least 4 characters, but no longer than 255 characters.

editionId number

Edition ID.

editionUuid string

Edition UUID.

expirationDate number

Expiration date for the discount. This date must be in the future.

id number

Discount ID.

industryId number

Industry ID.

maxRedemptions number

Maximum number of redemptions available.

maxUnits number

Maximum number of units for which to apply the discount.

minUnits number

Minimum number of units for which to apply the discount.

partnerSharePercentage number

Partner's percentage share of the discount.

paymentPlanId number

Payment plan ID.

paymentPlanUuid string

Payment plan UUID.

percentage number

Percentage discount if discount is of PERCENTAGE type. The percentage value cannot exceed two decimal places (for example, 10.15).

price number

Amount to discount if discount is of FIXED_PRICE type.

redemptionRestriction RedemptionRestriction

Redemption restriction. May be NONE, ONCE_PER_USER, or ONCE_PER_COMPANY. Default value is NONE.

redemptions number

Number of times the discount has been redeemed.

retainable boolean

True if the discount is retainable. Retainable discounts can be redeemed on orders that are updated after the discount expires. For example, if an order includes a discount that expires on 01 January 2019, and the order is then updated on 02 January 2019, the discount would still be redeemable. The default value is false (discounts are not retained).

startDate number

Start date for the discount.

type DiscountType

Discount type. Required field. May be PERCENTAGE or FIXED_PRICE.

unit PricingUnit

Pricing unit. May be USER, GIGABYTE, MEGABYTE, HOUR, MINUTE, INVOICE, UNIT, PROJECT, PROPERTY, ITEM, WORD,

EMAIL, CONTACT, CALL, CREDIT, ROOM, HOST, AGENT, OPERATOR, PROVIDER, MANAGER, TESTER, JVM, SERVER, WEB_USE_MINUTE,

AUDIO_USE_MINUTE, PIECE, EMPLOYEE_PAY_PERIOD, EMPLOYEE_PER_PAY_PERIOD, COMPUTER, NOT_APPLICABLE, ONE_TIME_SETUP,

DATA_POINTS, TIER1_API_CALLS, TIER2_API_CALLS, ADVISORY_HOURS, OVERAGE_AUDIO_MINUTE, EMPLOYEE, CONNECTION,

PUSH_USER, THOUSAND_EMAILS_PER_DAY, PUSH_NOTIFICATION_DEVICES, API_CALLS, SMS_TEXT_MESSAGE, CONTACTS_1000, CONTRACT_FEE,

TRANSFER_FEE, REACTIVATION_FEE, RECIPIENT, ADDITIONAL_1000_CONTACTS_BLOCK, SCHEDULE_PLAN, EMAILS_1000, EMAILS_2500,

MOBILE_DEVICE, PAYSLIP, PAYSLIP_CORRECTION, STORE, WEBSITE, EPAPER, PAGE, POSTAGE_AND_PRINT, INTERNATIONAL_POSTAGE_AND_PRINT,

TIER1_TOP_LEVEL_DOMAIN, TIER2_TOP_LEVEL_DOMAIN, DEDICATED_IP, ENABLELCM, MAXCOMPONENTS, DATA_MANAGEMENT_USER, SPECIALIST_USER,

PROFESSIONAL_USER, MATERIALITY_MATRIX, STAKEHOLDER_MANAGEMENT, SCORECARD, STANDARD_MAPPING, DONATION_MANAGEMENT, DOCUMENT,

PACKAGE_SMALL, PACKAGE_LARGE, MEMBER, ATTENDEE, MAILING, RESPONSE, EXTERNAL_INVOICE_FEE, CLIENT_TEST, IMAGE_TRANSFORMATION,

TOTAL_IMAGE, LICENSE, MAILBOX, FREE_40_INCH_HDTV_PC, FREE_46_INCH_HDTV_PC, FREE_46_INCH_HDTV_PC_MOUNTING, EMPLOYEE_PER_WEEK,

REGISTER, END_USER, CORE, DEVICE, PORT, MEASURER, PUBLISHED_MEASUREMENT, NODE, SERVER_RULE, VPN_LP, PROXY_LP,

DESKTOP_CONNECT_LP, CAMERA, MAIN_SOUND_ZONE, SUB_SOUND_ZONE, POST, REPORT, BOX, SESSION, DISPLAY, TRUCKROLL, TRANSACTION_FEE,

SENDING_API_CALL, LOOKUP_API_CALL, ANALYTICS_API_CALL, MIGRATION_INSTANCE, NFON_SETUP_PER_PHONE_EXTENSION,

NFON_SETUP_PER_PHONE_EXTENSION_PLUS, NFON_SETUP_PER_EFAX_EXTENSION, NFON_PHONE_EXTENSION, NFON_PHONE_EXTENSION_PLUS,

NFON_EFAX_EXTENSION, NFON_CALL_CENTER_MONITORING, NFON_NMEETING, NFON_MOBILE_NFON_DEVICE, NFON_ISOFTPHONE_MAC,

NFON_NSOFTPHONE_STANDARD_WINDOWS, NFON_NSOFTPHONE_PREMIUM_WINDOWS, NFON_NCTI_STANDARD_WINDOWS, NFON_NCTI_STANDARD_CRM_WINDOWS,

NFON_NCTI_STANDARD_MAC, NFON_NSOFTPHONE_STANDARD_WINDOWS_OR_MOBILE, WESUSTAIN_PERFORMANCE, WESUSTAIN_STAKEHOLDER_REPUTATION,

WESUSTAIN_WEAPP, FAX, FAX_LINE, ROOM_LINE, DEPARTMENT_LINE, INTERNATIONAL_LICENSE, INTERNATIONAL_DEPARTMENT_LINE,

INTERNATIONAL_ROOM_LINE, INTERNATIONAL_LINE, CALLING_CREDIT, LINE, TOLLFREE_ROOM_LINE, TOLLFREE_DEPARTMENT_LINE,

TAXES_AND_FEES, LEAD, OPPORTUNITY, CAMPAIGN, CASE, CUSTOMER, TIER1_STANDARD_LINE, TIER1_ROOM_LINE, TIER1_TOLLFREE_ROOM_LINE,

TIER1_TOLLFREE_DEPARTMENT_LINE, TIER1_FAX_LINE, TIER1_DEPARTMENT_LINE, TIER2_STANDARD_LINE, TIER2_ROOM_LINE,

TIER2_DEPARTMENT_LINE, TIER3_STANDARD_LINE, TIER3_ROOM_LINE, TIER3_DEPARTMENT_LINE, TIER4_STANDARD_LINE, TIER4_ROOM_LINE,

TIER4_DEPARTMENT_LINE, CLUSTER, NODE_4VCPU, FIVE_HUNDRED_GB_SSD, TWELVE_TB_NETWORK_IO, JBOSS_EAP, JBOSS_FUSE, JBOSS_A_MQ,

JBOSS_BRMS, JBOSS_BPM_SUITE, JBOSS_DATA_GRID, JBOSS_DATA_VIRT, USER_LICENSE, ADDITIONAL_NUMBER_LICENSE, ROOM_PHONE_LICENSE,

UBERCONFERENCE_PRO_LICENSE, UBERCONFERENCE_PRO_LICENSE_UNBUNDLED, INSTANCE, INDOOR_CAMERA, OUTDOOR_CAMERA, VINGATE_LP_LICENCE,

ADMINISTRATOR, MOBILE_USER, T1, PHONE, AUTO_ATTENDANT, HUNT_GROUP, VOICEMAIL_BOX, TOLL_FREE_NUMBER,

INBOUND_LONG_DISTANCE_MINUTE, OUTBOUND_LONG_DISTANCE_MINUTE, INBOUND_OUTBOUND_LONG_DISTANCE_MINUTE, SET_TOP_BOX, MODEM,

ACCESS_POINT, CALLING_FEATURE, IAD_DEVICE, ANALOG_LINE, PRI, SBC_DEVICE, ROUTER, INTERNATIONAL_MINUTE, PHONE_LINE,

DYNAMIC_IP_ADDRESS, STATIC_IP_ADDRESS, GATEWAY, REMOTE_CONTROL, TIER1_STANDARD_SEAT, TIER2_STANDARD_SEAT, TIER3_STANDARD_SEAT,

TIER4_STANDARD_SEAT, TIER1_TOLL_FREE_SEAT, MILLION_MESSAGES, MESSAGE, WEEKLY, or PHONE_NUMBER.

uuid string

Discount UUID.

vendorSharePercentage number

Vendor's percentage share of the discount.

Responses

Status Meaning Description Definition
200 OK OK Discount
400 Bad Request Bad Request
404 Not Found Not Found
409 Conflict Conflict

Domains

List verified company domains

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/verifiedDomains \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/verifiedDomains HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/verifiedDomains',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/verifiedDomains',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/verifiedDomains', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/verifiedDomains',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/verifiedDomains");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "content": "mydomain1.com",
      "links": []
    },
    {
      "content": "mydomain2.com",
      "links": []
    }
  ],
  "links": []
}

GET/account/v2/companies/{companyUuid}/verifiedDomains

Retrieve a marketplace company's verified domains.

Required Scope and Authorization Rules

Scope Rule
ROLE_BILLING_ADMIN Allows access as a Billing Admin for the company.
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 access to read all marketplace data.
ROLE_RESELLER Allows access as a Reseller for the company.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request

Responses

Status Meaning Description Definition
200 OK Success VerifiedCompanyDomainAccountV2
401 Unauthorized Unauthorized
404 Not Found Company not found

Read company domain

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/domains/{domainName} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/domains/{domainName} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/domains/{domainName}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/domains/{domainName}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/domains/{domainName}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/domains/{domainName}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/domains/{domainName}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "company": {
    "customAttributes": [],
    "defaultRole": "USER",
    "enabled": true,
    "links": [],
    "name": "Appdirect",
    "phoneNumber": "4155555555",
    "picture": null,
    "reseller": false,
    "uuid": "da7c47c0-c1c7-43f4-bf45-f60d6cc5dd6e",
    "vendor": false
  },
  "companyEntitlementStatus": "ACTIVE",
  "currency": "USD",
  "domainAssociatedApplications": [],
  "domainEntitlementId": 1426,
  "domainProvider": {
    "id": 2506,
    "imageLogoLarge": "app_resources/529/thumbs_64/img1764112210464997003.png",
    "name": "AUTO_DOMAIN_PROIVDER_APP",
    "providerCompany": "Appdirect",
    "uuid": "576e870a-8742-4fb4-ada7-af87c82861d7"
  },
  "endOfContractDate": 1517288400000,
  "launchUrl": "http://localhost:8080/sso/domain/idp/init/1426",
  "links": [],
  "name": "demoempires.com",
  "owner": {
    "activated": true,
    "allowLogin": true,
    "boostUser": null,
    "currency": "USD",
    "customAttributes": [],
    "email": "c4736378@appdirect.com",
    "firstName": "Auto",
    "lastName": "Tester",
    "ldapId": null,
    "links": [],
    "metadata": {},
    "picture": null,
    "roles": [],
    "userId": 4338,
    "userName": null,
    "uuid": "52f71266-ca3e-4f52-a506-83e70407edc2"
  },
  "price": 10.63,
  "renews": true,
  "source": "PURCHASED",
  "status": "ACTIVE",
  "subscriptionId": "b3f9761d-21df-4240-9006-2dbb4b19eec0",
  "uuid": "2efe36aa-ec95-4505-9544-4a995c51135e"
}

GET/account/v2/companies/{companyUuid}/domains/{domainName}

Get a specific company domain

Required Scope and Authorization Rules

Scope Rule
ROLE_BILLING_ADMIN Allows access as a Billing Admin for the company.
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 access to read all marketplace data.
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_USER Allows access as owner of the company domain.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request
*domainName path string Company domain name

Responses

Status Meaning Description Definition
200 OK Success CompanyDomainAccountV2
401 Unauthorized Unauthorized
404 Not Found Company/Domain name not found

List company domains

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/domains \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/domains HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/domains',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/domains',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/domains', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/domains',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/domains");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "company": {
        "customAttributes": [
          {
            "attributeType": "TEXT",
            "hint": "US West, US Central, or US East",
            "label": "Geographic Region",
            "name": "Geographic Region",
            "value": "US"
          },
          {
            "attributeType": "MULTISELECT",
            "hint": "",
            "label": "Label Names",
            "name": "Company Details",
            "valueKeys": [
              "great option"
            ]
          }
        ],
        "defaultRole": "USER",
        "enabled": true,
        "links": [],
        "name": "Company 6702951797",
        "phoneNumber": "+1 123 123 1234",
        "picture": "http://appdirect/profilePics/http://cdn/company.png",
        "reseller": false,
        "uuid": "0fc286dc-40ae-4cd0-9f04-59687fdf39bf",
        "vendor": false
      },
      "companyEntitlementStatus": "ACTIVE",
      "currency": "USD",
      "domainAssociatedApplications": [],
      "domainEntitlementId": 51,
      "domainProvider": {
        "id": 131,
        "imageLogoLarge": "app_resources/2506/thumbs_64/img4627488903781521711.png",
        "name": "MockApp6544683144966352395",
        "providerCompany": "Appdirect",
        "uuid": "fc876968-396a-40bc-824f-01b588d22ad2"
      },
      "endOfContractDate": 1480699590955,
      "launchUrl": "http://appdirect/saml/domain/idp/init/51",
      "links": [],
      "name": "mydomain1.com",
      "owner": {
        "activated": true,
        "allowLogin": true,
        "boostUser": {
          "apsUid": "murnu8w"
        },
        "email": "lisa.lopez@company8722006945.com",
        "firstName": "Lisa",
        "lastName": "Lopez",
        "ldapId": "1",
        "links": [],
        "metadata": {
          "apsUid": "murnu8w"
        },
        "picture": "http://appdirect/profilePics/img2147417701652580695.png?184b58e358f087154d94329f9000b28a",
        "roles": [],
        "userId": 109,
        "userName": "lisa.lopez@company8722006945.com",
        "uuid": "3308489f-3448-45c4-bab1-5dd4461ccadd"
      },
      "price": 10.63,
      "renews": true,
      "source": "PURCHASED",
      "status": "ACTIVE",
      "subscriptionId": "b3f9761d-21df-4240-9006-2dbb4b19eec0",
      "uuid": "ec4783be-0325-49c7-b53d-8e4d9631104a"
    },
    {
      "company": {
        "customAttributes": [
          {
            "attributeType": "TEXT",
            "hint": "US West, US Central, or US East",
            "label": "Geographic Region",
            "name": "Geographic Region",
            "value": "US"
          },
          {
            "attributeType": "MULTISELECT",
            "hint": "",
            "label": "Label Names",
            "name": "Company Details",
            "valueKeys": [
              "great option"
            ]
          }
        ],
        "defaultRole": "USER",
        "enabled": true,
        "links": [],
        "name": "Company 6702951797",
        "phoneNumber": "+1 123 123 1234",
        "picture": "http://appdirect/profilePics/http://cdn/company.png",
        "reseller": false,
        "uuid": "0fc286dc-40ae-4cd0-9f04-59687fdf39bf",
        "vendor": false
      },
      "companyEntitlementStatus": "ACTIVE",
      "currency": "USD",
      "domainAssociatedApplications": [],
      "domainEntitlementId": 51,
      "domainProvider": {
        "id": 131,
        "imageLogoLarge": "app_resources/2506/thumbs_64/img4627488903781521711.png",
        "name": "MockApp6544683144966352395",
        "providerCompany": "Appdirect",
        "uuid": "fc876968-396a-40bc-824f-01b588d22ad2"
      },
      "endOfContractDate": 1480699590955,
      "launchUrl": "http://appdirect/saml/domain/idp/init/51",
      "links": [],
      "name": "mydomain2.com",
      "owner": {
        "activated": true,
        "allowLogin": true,
        "boostUser": null,
        "email": "lisa.lopez@company8722006945.com",
        "firstName": "Lisa",
        "lastName": "Lopez",
        "ldapId": null,
        "links": [],
        "metadata": {},
        "picture": null,
        "roles": [],
        "userId": 109,
        "userName": "lisa.lopez@company8722006945.com",
        "uuid": "3308489f-3448-45c4-bab1-5dd4461ccadd"
      },
      "price": 10.63,
      "renews": true,
      "source": "PURCHASED",
      "status": "ACTIVE",
      "subscriptionId": "4b19761c-a7a2-4d95-b3bf-66e1c66b0a1a",
      "uuid": "9e986b20-0c6f-4a65-9321-d31956aa3f40"
    }
  ],
  "links": []
}

GET/account/v2/companies/{companyUuid}/domains

Retrieve a marketplace company's domains.

Required Scope and Authorization Rules

Scope Rule
ROLE_BILLING_ADMIN Allows access as a Billing Admin for the company.
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 access to read all marketplace data.
ROLE_RESELLER Allows access as a Reseller for the company.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request
searchText query string Search term used to search domain names

Responses

Status Meaning Description Definition
200 OK Success PagedCompanyDomainAccountV2
401 Unauthorized Unauthorized
404 Not Found Company not found

Editions

Retrieve an edition

Example request

curl -X GET https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/editions/{editionId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/editions/{editionId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/editions/{editionId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/editions/{editionId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/editions/{editionId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/editions/{editionId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/editions/{editionId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "bullets": [],
  "bundleOnly": false,
  "code": "WfvHz",
  "customerContractRestricted": false,
  "customizations": [],
  "defaultFreeTrial": false,
  "expiredTrialGracePeriod": null,
  "freeTrialDuration": 1,
  "freeTrialType": "MONTH",
  "id": 316,
  "invisible": false,
  "items": [],
  "lastModified": 1461792763091,
  "leadGen": false,
  "name": "XLt6HgwZBq",
  "plans": [
    {
      "allowCustomUsage": false,
      "contract": {
        "autoExtensionPricingId": 624,
        "blockContractDowngrades": false,
        "blockContractUpgrades": false,
        "blockSwitchToShorterContract": false,
        "cancellationPeriodLimit": null,
        "endOfContractGracePeriod": null,
        "gracePeriod": null,
        "minimumServiceLength": 3,
        "terminationFee": null
      },
      "costs": [
        {
          "amount": {
            "USD": 10
          },
          "blockContractDecrease": false,
          "blockContractIncrease": false,
          "blockOriginalContractDecrease": false,
          "increment": 1,
          "maxUnits": null,
          "meteredUsage": false,
          "minUnits": 0,
          "pricePerIncrement": false,
          "unit": "USER",
          "unitDependency": null
        }
      ],
      "discount": null,
      "frequency": "MONTHLY",
      "href": "http://localhost/api/marketplace/v1/products/316/editions/316/paymentPlans/624",
      "id": 624,
      "isPrimaryPrice": false,
      "keepBillDateOnUsageChange": false,
      "primaryPrice": false,
      "separatePrepaid": false,
      "uuid": "9d813cc8-4aa8-4b22-b6ff-bfb4d8a72426"
    },
    {
      "allowCustomUsage": false,
      "contract": {
        "autoExtensionPricingId": 625,
        "blockContractDowngrades": false,
        "blockContractUpgrades": false,
        "blockSwitchToShorterContract": false,
        "cancellationPeriodLimit": null,
        "endOfContractGracePeriod": null,
        "gracePeriod": null,
        "minimumServiceLength": 6,
        "terminationFee": null
      },
      "costs": [
        {
          "amount": {
            "USD": 10
          },
          "blockContractDecrease": false,
          "blockContractIncrease": false,
          "blockOriginalContractDecrease": false,
          "increment": 1,
          "maxUnits": null,
          "meteredUsage": false,
          "minUnits": 0,
          "pricePerIncrement": false,
          "unit": "USER",
          "unitDependency": null
        }
      ],
      "discount": null,
      "frequency": "MONTHLY",
      "href": "http://localhost/api/marketplace/v1/products/316/editions/316/paymentPlans/625",
      "id": 625,
      "isPrimaryPrice": false,
      "keepBillDateOnUsageChange": false,
      "primaryPrice": false,
      "separatePrepaid": false,
      "uuid": "f55ad8a6-11d4-4bab-ac7f-d1bf887e685d"
    }
  ],
  "primary": false,
  "rank": 1,
  "restricted": false,
  "revenueType": "RECURRING",
  "targetAudience": null,
  "trial": {
    "length": 1,
    "unit": "MONTH"
  },
  "uuid": "77395548-5c87-45d0-9c87-4fc51ea8aa97"
}

GET/marketplace/v1/products/{applicationId}/editions/{editionId}

This call returns all details related to a specific product edition

Parameters

Parameter Type Data Type Default Description
*applicationId path number product id
*editionId path number Edition id

Responses

Status Meaning Description Definition
200 OK Edition information returned. Edition
404 Not Found Application or edition not found.

Events

Retrieve an event

This call returns all details for a specific event.

Example request

curl -X GET https://{marketplaceURL}/api/channel/v1/events/{eventId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/channel/v1/events/{eventId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/events/{eventId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/events/{eventId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/channel/v1/events/{eventId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/channel/v1/events/{eventId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/events/{eventId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "asynchronous": true,
  "company": {
    "companyId": "acecc1af-174c-467c-9ac6-a1469ff9ef1a",
    "links": [
      {
        "href": "http://appdirect/api/account/v1/companies/acecc1af-174c-467c-9ac6-a1469ff9ef1a",
        "rel": "self"
      }
    ],
    "name": "companyName"
  },
  "consumed": false,
  "creationDate": 1480310699136,
  "error": {
    "code": null,
    "message": null
  },
  "links": [
    {
      "href": "http://appdirect/api/channel/v1/events/EventID",
      "rel": "self"
    }
  ],
  "manuallyResolved": false,
  "orderId": 356,
  "product": {
    "links": [
      {
        "href": "http://appdirect/api/marketplace/v1/products/1335",
        "rel": "self"
      }
    ],
    "name": "rWA4Y3hiV6yU9OHm",
    "productId": 1335
  },
  "subscriptionId": 354,
  "successful": true,
  "type": "SUBSCRIPTION_ORDER",
  "uuid": "EventID"
}

GET/channel/v1/events/{eventId}

Retrieve an event This call returns all details for a specific event.

Parameters

Parameter Type Data Type Default Description
*eventId path string Only return event with this event id.

Responses

Status Meaning Description Definition
200 OK Event read. Event
404 Not Found Event not found.

List all events

This call lists all events on your marketplace.

Example request

curl -X GET https://{marketplaceURL}/api/channel/v1/events \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/channel/v1/events HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/events',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/events',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/channel/v1/events', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/channel/v1/events',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/events");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "asynchronous": true,
      "company": {
        "companyId": null,
        "links": [
          {
            "href": "http://appdirect/api/account/v1/companies/null",
            "rel": "self"
          }
        ],
        "name": "companyName"
      },
      "consumed": false,
      "creationDate": 1480310700384,
      "error": {
        "code": null,
        "message": null
      },
      "manuallyResolved": false,
      "orderId": 362,
      "product": {
        "links": [
          {
            "href": "http://appdirect/api/marketplace/v1/products/1341",
            "rel": "self"
          }
        ],
        "name": "wvrZh7o1WOrZxmt3",
        "productId": 1341
      },
      "subscriptionId": null,
      "successful": true,
      "type": "SUBSCRIPTION_ORDER",
      "uuid": "EventID"
    }
  ],
  "links": [],
  "page": {
    "number": 0,
    "size": 1,
    "totalElements": 1,
    "totalPages": 1
  }
}

GET/channel/v1/events

List all events This call lists all events on your marketplace.

Parameters

Parameter Type Data Type Default Description
fromDate query number Search events from this date in milliseconds.
orderId query number Only return events for these purchase order.
page query string 0 The desired page. Defaults to "0".
searchText query string Search term used to search on different fields of an application.
size query string 50 The number of events per page. Defaults to "250".
sortOrder query string of enum:
ASC
DESC
ASC Ordering type. Default is "ASC".
toDate query number Search events to this date in milliseconds.
type query string Only return events for these event type.

Responses

Status Meaning Description Definition
200 OK paged events. PagedResourcesOfEventWS

Groups

Create user group

Example request

curl -X POST https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "type": "object",
      "title": "CreateCompanyGroupAccountV2",
      "properties": {
        "description": {
          "description": "Company group description.",
          "type": "string"
        },
        "name": {
          "description": "Company group name.",
          "type": "string"
        }
      },
      "example": {
        "description": "Human Resources",
        "name": "HR"
      }
    },
    {
      "example": {
        "description": "create-test-desc",
        "name": "create-test-name"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "description": "create-test-desc",
  "name": "create-test-name"
}

Example response

{
  "companyDefault": false,
  "companyUuid": "028818f1-deb1-43b7-94fe-1f8c874fb9ee",
  "description": "create-test-desc",
  "externallyManaged": false,
  "links": [
    {
      "href": "http://appdirect/api/account/v2/companies/028818f1-deb1-43b7-94fe-1f8c874fb9ee/groups/7f097767-b808-4a6c-8837-3dc57f57103d",
      "rel": "self"
    },
    {
      "href": "http://appdirect/api/account/v2/companies/028818f1-deb1-43b7-94fe-1f8c874fb9ee",
      "rel": "company"
    },
    {
      "href": "http://appdirect/api/account/v2/companies/028818f1-deb1-43b7-94fe-1f8c874fb9ee/groups/7f097767-b808-4a6c-8837-3dc57f57103d/memberships?member=true&page=0&size=50",
      "rel": "memberships"
    }
  ],
  "memberCount": 0,
  "name": "create-test-name",
  "uuid": "7f097767-b808-4a6c-8837-3dc57f57103d"
}

POST/account/v2/companies/{companyUuid}/groups

Create a user group for a marketplace company.

Required Scope and Authorization Rules

Scope Rule
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 Allows access to read and write all marketplace data.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request

Body Parameters

Group creation data

CreateCompanyGroupAccountV2 object:

Property Type Description
description string

Company group description.

name string

Company group name.

Responses

Status Meaning Description Definition
201 Created Created CompanyGroupAccountV2
401 Unauthorized Unauthorized
404 Not Found Company not found. array of Error

Delete user from group

Example request

curl -X DELETE https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships/{userUuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships/{userUuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships/{userUuid}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships/{userUuid}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships/{userUuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships/{userUuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships/{userUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "code": "Not Found",
    "message": "User not found for Company."
  }
]

DELETE/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships/{userUuid}

Delete a user from a marketplace company's user group.

Required Scope and Authorization Rules

Scope Rule
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_SYS_ADMIN Allows access as a Company Admin for the company.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request
*groupUuid path string Unique identifier of group in the API request
*userUuid path string Unique identifier of user in the API request

Responses

Status Meaning Description Definition
204 No Content No Content
401 Unauthorized Unauthorized
404 Not Found User is not a member of the company or group is not found for company array of Error

Delete user group

Example request

curl -X DELETE https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "code": "Not Found",
    "message": "Group with companyUuid=6b4bd452-895d-4098-aa56-e6046b238e0f, groupUuid=c7d2ad85-4a79-49c3-836e-881230347d5b not found."
  }
]

DELETE/account/v2/companies/{companyUuid}/groups/{groupUuid}

Delete a user group for the requested marketplace company.

Required Scope and Authorization Rules

Scope Rule
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 Allows access to read and write all marketplace data.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request
*groupUuid path string Unique identifier of group in the API request

Responses

Status Meaning Description Definition
204 No Content Success
401 Unauthorized Unauthorized
404 Not Found Group is not found for company array of Error

List user groups

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "new-group-1-desc",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/feff91cf-e5b3-4833-9ad2-47a8c3d4deeb",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/feff91cf-e5b3-4833-9ad2-47a8c3d4deeb/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 0,
      "name": "new-group-1",
      "systemManaged": false,
      "uuid": "feff91cf-e5b3-4833-9ad2-47a8c3d4deeb"
    },
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "All Billing Admin users",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/84d6c781-9290-461c-a18f-010791cb87ca",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/84d6c781-9290-461c-a18f-010791cb87ca/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 20,
      "name": "Billing Admins",
      "systemManaged": true,
      "uuid": "84d6c781-9290-461c-a18f-010791cb87ca"
    },
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "All Reseller users",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/b7c9099c-aff1-42a9-824c-7f8a7ee1ab93",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/b7c9099c-aff1-42a9-824c-7f8a7ee1ab93/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 1,
      "name": "Resellers",
      "systemManaged": true,
      "uuid": "b7c9099c-aff1-42a9-824c-7f8a7ee1ab93"
    },
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "All Developer users",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/a7d34c49-a376-433b-af53-f51be1cf2038",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/a7d34c49-a376-433b-af53-f51be1cf2038/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 78,
      "name": "Developers",
      "systemManaged": true,
      "uuid": "a7d34c49-a376-433b-af53-f51be1cf2038"
    },
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "All Sales Support users",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/73f252d5-0dbe-4414-8384-edb7544b83b6",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/73f252d5-0dbe-4414-8384-edb7544b83b6/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 13,
      "name": "Sales Support",
      "systemManaged": true,
      "uuid": "73f252d5-0dbe-4414-8384-edb7544b83b6"
    },
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "All Product Support users",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/b0cf07b9-9953-406f-ba64-b4ca239f30bf",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/b0cf07b9-9953-406f-ba64-b4ca239f30bf/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 12,
      "name": "Product Support",
      "systemManaged": true,
      "uuid": "b0cf07b9-9953-406f-ba64-b4ca239f30bf"
    },
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "All Reseller Manager users",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/6d970a9e-a702-406f-808b-9483163efdd1",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/6d970a9e-a702-406f-808b-9483163efdd1/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 2,
      "name": "Reseller Managers",
      "systemManaged": true,
      "uuid": "6d970a9e-a702-406f-808b-9483163efdd1"
    },
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "All Customer Support users",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/70c65cb0-cbe5-447c-bdce-1d00e4d08f84",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/70c65cb0-cbe5-447c-bdce-1d00e4d08f84/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 12,
      "name": "Customer Support",
      "systemManaged": true,
      "uuid": "70c65cb0-cbe5-447c-bdce-1d00e4d08f84"
    },
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "All Marketplace Managers",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/9a79c98d-8e36-49ed-837c-cc9473dee851",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/9a79c98d-8e36-49ed-837c-cc9473dee851/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 9,
      "name": "Marketplace Managers",
      "systemManaged": true,
      "uuid": "9a79c98d-8e36-49ed-837c-cc9473dee851"
    },
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "All Company Admin users",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/74f7132f-8dd9-4b3a-8014-5aac81dc2c05",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/74f7132f-8dd9-4b3a-8014-5aac81dc2c05/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 14,
      "name": "Company Admins",
      "systemManaged": true,
      "uuid": "74f7132f-8dd9-4b3a-8014-5aac81dc2c05"
    },
    {
      "companyDefault": true,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "All company users",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/5acdd82e-5cb7-4a23-b842-38d514aafcdf",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/5acdd82e-5cb7-4a23-b842-38d514aafcdf/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 88,
      "name": "Everyone",
      "systemManaged": true,
      "uuid": "5acdd82e-5cb7-4a23-b842-38d514aafcdf"
    },
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "superuser group",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/56ac8abc-2b63-4b66-a648-dde419aa6c4a",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/56ac8abc-2b63-4b66-a648-dde419aa6c4a/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 2,
      "name": "superuser-group",
      "systemManaged": false,
      "uuid": "56ac8abc-2b63-4b66-a648-dde419aa6c4a"
    }
  ],
  "links": [
    {
      "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups?page=0&size=50&sortField=createdOn&sortOrder=DESC",
      "rel": "self"
    }
  ],
  "page": {
    "number": 0,
    "size": 50,
    "totalElements": 12,
    "totalPages": 1
  }
}

GET/account/v2/companies/{companyUuid}/groups

Retrieve a marketplace company's user groups.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER_READ Allows access to read all marketplace data.
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request
page query integer 0 Zero-based page index
searchText query string Search term used to search groups names
size query integer 50 The size of the page to be returned
sortField query string createdOn The property to sort by. Supported values are createdOn, name.
sortOrder query string of enum:
ASC
DESC
DESC Ordering type

Responses

Status Meaning Description Definition
200 OK Success PagedCompanyGroupAccountV2
401 Unauthorized Unauthorized
404 Not Found Company not found. array of Error

Read user from group

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships/{userUuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships/{userUuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships/{userUuid}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships/{userUuid}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships/{userUuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships/{userUuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships/{userUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "company": {
    "defaultRole": "USER",
    "enabled": true,
    "links": [
      {
        "href": "http://appdirect/api/account/v2/companies/c2e3ad7c-0549-4638-9a23-9e19c046c3d7",
        "rel": "self"
      },
      {
        "href": "http://appdirect/api/account/v2/companies/c2e3ad7c-0549-4638-9a23-9e19c046c3d7/memberships",
        "rel": "memberships"
      }
    ],
    "name": "Appdirect",
    "phoneNumber": "9259221234",
    "picture": null,
    "reseller": true,
    "uuid": "c2e3ad7c-0549-4638-9a23-9e19c046c3d7",
    "vendor": false
  },
  "enabled": true,
  "lastUsed": false,
  "links": [
    {
      "href": "http://appdirect/api/account/v2/companies/c2e3ad7c-0549-4638-9a23-9e19c046c3d7/groups/d6c89ee4-c5ee-4996-9103-08d6766ced02/memberships/671660e1-1ac8-4e0d-b7c4-7fe844193d82",
      "rel": "self"
    },
    {
      "href": "http://appdirect/api/account/v2/companies/c2e3ad7c-0549-4638-9a23-9e19c046c3d7",
      "rel": "company"
    },
    {
      "href": "http://appdirect/api/account/v2/companies/c2e3ad7c-0549-4638-9a23-9e19c046c3d7/groups/d6c89ee4-c5ee-4996-9103-08d6766ced02",
      "rel": "group"
    }
  ],
  "metadata": {
    "mosi_username": "adazuretest@sdasd21321.onmicrosoft.com"
  },
  "mosiUser": {
    "username": "adazuretest@sdasd21321.onmicrosoft.com"
  },
  "position": "Business Analyst",
  "roles": [
    "ROLE_SYS_ADMIN",
    "ROLE_BILLING_ADMIN",
    "ROLE_USER"
  ],
  "user": {
    "activated": true,
    "allowLogin": true,
    "boostUser": {
      "apsUid": "murnu8w"
    },
    "currency": "USD",
    "customAttributes": [
      {
        "attributeType": "TEXT",
        "hint": "commission_hint",
        "label": "Commission_Payout_ID",
        "name": "C5125859",
        "value": "t1"
      },
      {
        "attributeType": "MULTISELECT",
        "hint": "Allows credit card payments and enables credit card fields",
        "label": "Allow Credit Card",
        "name": "allow_credit_card",
        "valueKeys": []
      },
      {
        "attributeType": "TEXT",
        "hint": "",
        "label": "C5457097",
        "name": "C5457097",
        "value": "abcd"
      }
    ],
    "email": "user.test-6465249637976946765@appdirect.com",
    "firstName": "user.test",
    "lastName": "Lee",
    "ldapId": "1",
    "links": [
      {
        "href": "http://appdirect/api/account/v2/users/671660e1-1ac8-4e0d-b7c4-7fe844193d82",
        "rel": "self"
      },
      {
        "href": "http://appdirect/api/account/v2/users/671660e1-1ac8-4e0d-b7c4-7fe844193d82/memberships",
        "rel": "memberships"
      }
    ],
    "metadata": {
      "apsUid": null
    },
    "picture": "http://localhost:8080/profilePics/img6839249962619189663.png?32339267f9f00643fd18373adf580743",
    "roles": [
      "ROLE_USER"
    ],
    "userName": "user.test-6465249637976946765@appdirect.com",
    "uuid": "671660e1-1ac8-4e0d-b7c4-7fe844193d82"
  }
}

GET/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships/{userUuid}

Retrieve a user/company membership resource.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER_READ Allows access to read all marketplace data.
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request
*groupUuid path string Unique identifier of group in the API request
*userUuid path string Unique identifier of user in the API request

Responses

Status Meaning Description Definition
200 OK Success UserCompanyMembershipAccountV2
401 Unauthorized Unauthorized
404 Not Found User is not a member of the company or group is not found for company array of Error

List user group members

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "company": {
        "defaultRole": "USER",
        "enabled": true,
        "links": [
          {
            "href": "http://appdirect/api/account/v2/companies/c2e3ad7c-0549-4638-9a23-9e19c046c3d7",
            "rel": "self"
          },
          {
            "href": "http://appdirect/api/account/v2/companies/c2e3ad7c-0549-4638-9a23-9e19c046c3d7/memberships",
            "rel": "memberships"
          }
        ],
        "name": "Appdirect",
        "phoneNumber": "9259221234",
        "picture": null,
        "reseller": true,
        "uuid": "c2e3ad7c-0549-4638-9a23-9e19c046c3d7",
        "vendor": false
      },
      "enabled": true,
      "lastUsed": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/c2e3ad7c-0549-4638-9a23-9e19c046c3d7/groups/d6c89ee4-c5ee-4996-9103-08d6766ced02/memberships/671660e1-1ac8-4e0d-b7c4-7fe844193d82",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/c2e3ad7c-0549-4638-9a23-9e19c046c3d7",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/c2e3ad7c-0549-4638-9a23-9e19c046c3d7/groups/d6c89ee4-c5ee-4996-9103-08d6766ced02",
          "rel": "group"
        }
      ],
      "metadata": {
        "mosi_username": "adazuretest@sdasd21321.onmicrosoft.com"
      },
      "mosiUser": {
        "username": "adazuretest@sdasd21321.onmicrosoft.com"
      },
      "position": "Business Analyst",
      "roles": [
        "ROLE_SYS_ADMIN",
        "ROLE_BILLING_ADMIN",
        "ROLE_USER"
      ],
      "user": {
        "activated": true,
        "allowLogin": true,
        "boostUser": {
          "apsUid": "murnu8w"
        },
        "currency": "USD",
        "customAttributes": [
          {
            "attributeType": "TEXT",
            "hint": "commission_hint",
            "label": "Commission_Payout_ID",
            "name": "C5125859",
            "value": "t1"
          },
          {
            "attributeType": "MULTISELECT",
            "hint": "Allows credit card payments and enables credit card fields",
            "label": "Allow Credit Card",
            "name": "allow_credit_card",
            "valueKeys": []
          },
          {
            "attributeType": "TEXT",
            "hint": "",
            "label": "C5457097",
            "name": "C5457097",
            "value": "abcd"
          }
        ],
        "email": "user.test-6465249637976946765@appdirect.com",
        "firstName": "user.test",
        "lastName": "Lee",
        "ldapId": "1",
        "links": [
          {
            "href": "http://appdirect/api/account/v2/users/671660e1-1ac8-4e0d-b7c4-7fe844193d82",
            "rel": "self"
          },
          {
            "href": "http://appdirect/api/account/v2/users/671660e1-1ac8-4e0d-b7c4-7fe844193d82/memberships",
            "rel": "memberships"
          }
        ],
        "metadata": {
          "apsUid": null
        },
        "picture": "http://localhost:8080/profilePics/img6839249962619189663.png?32339267f9f00643fd18373adf580743",
        "roles": [
          "ROLE_USER"
        ],
        "userName": "user.test-6465249637976946765@appdirect.com",
        "uuid": "671660e1-1ac8-4e0d-b7c4-7fe844193d82"
      }
    }
  ],
  "links": [],
  "page": {
    "number": 0,
    "size": 50,
    "totalElements": 1,
    "totalPages": 0
  }
}

GET/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships

List members of a user group for the requested marketplace company.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER_READ Allows access to read all marketplace data.
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request
*groupUuid path string Unique identifier of group in the API request
member query boolean true When true, only group members are return. When false, non-members of the group are returned.
page query integer 0 Zero-based page index
searchText query string Optional parameter object containing:
searchText - Search term used to search on different fields of a user
role - If specified, only users with the specified marketplace role are returned
status - If specified, only users with the specified status are returned
size query integer 50 The size of the page to be returned @return List of user/company membership resources

Responses

Status Meaning Description Definition
200 OK Success PagedUserCompanyMembershipAccountV2
401 Unauthorized Unauthorized
404 Not Found Company or company group not found array of Error

Read user group

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "companyDefault": false,
  "companyUuid": "999d6565-9694-457c-8941-fadeb36166e5",
  "description": "read-test-desc",
  "externallyManaged": false,
  "links": [
    {
      "href": "http://appdirect/api/account/v2/companies/999d6565-9694-457c-8941-fadeb36166e5/groups/74a8e9c1-0e64-4009-b529-671ae9188e70",
      "rel": "self"
    },
    {
      "href": "http://appdirect/api/account/v2/companies/999d6565-9694-457c-8941-fadeb36166e5",
      "rel": "company"
    },
    {
      "href": "http://appdirect/api/account/v2/companies/999d6565-9694-457c-8941-fadeb36166e5/groups/74a8e9c1-0e64-4009-b529-671ae9188e70/memberships?member=true&page=0&size=50",
      "rel": "memberships"
    }
  ],
  "memberCount": 1,
  "name": "read-test-name",
  "systemManged": false,
  "uuid": "74a8e9c1-0e64-4009-b529-671ae9188e70"
}

GET/account/v2/companies/{companyUuid}/groups/{groupUuid}

Retrieve a marketplace company's user group.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER_READ Allows access to read all marketplace data.
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request
*groupUuid path string Unique identifier of group in the API request

Responses

Status Meaning Description Definition
200 OK Success CompanyGroupAccountV2
401 Unauthorized Unauthorized
404 Not Found Group is not found for company array of Error

Add user to group

Example request

curl -X PUT https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships/{userUuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships/{userUuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships/{userUuid}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships/{userUuid}',
{
  method: 'PUT',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships/{userUuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships/{userUuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships/{userUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "company": {
    "customAttributes": [
      {
        "attributeType": "TEXT",
        "hint": "US West, US Central, or US East",
        "label": "email",
        "name": "Geographic Region",
        "value": "US1"
      }
    ],
    "defaultRole": "USER",
    "enabled": true,
    "links": [
      {
        "href": "http://appdirect/api/account/v2/companies/b3b61301-9117-4d69-b4c2-006f15865d99",
        "rel": "self"
      },
      {
        "href": "http://appdirect/api/account/v2/companies/b3b61301-9117-4d69-b4c2-006f15865d99/memberships",
        "rel": "memberships"
      }
    ],
    "name": "Appdirect",
    "phoneNumber": "9259221234",
    "picture": "http://localhost:8080/profilePics/img8682785678220952561.png?2bf10bf40154c8e7642aea942fe1ff8d",
    "reseller": true,
    "uuid": "b3b61301-9117-4d69-b4c2-006f15865d99",
    "vendor": false
  },
  "enabled": true,
  "lastUsed": false,
  "links": [
    {
      "href": "http://appdirect/api/account/v2/companies/b3b61301-9117-4d69-b4c2-006f15865d99/groups/6febc9da-15ff-4404-a61a-0988bed2797d/memberships/98050d65-fb1c-484b-a696-feb2345b952c",
      "rel": "self"
    },
    {
      "href": "http://appdirect/api/account/v2/companies/b3b61301-9117-4d69-b4c2-006f15865d99",
      "rel": "company"
    },
    {
      "href": "http://appdirect/api/account/v2/companies/b3b61301-9117-4d69-b4c2-006f15865d99/groups/6febc9da-15ff-4404-a61a-0988bed2797d",
      "rel": "group"
    }
  ],
  "metadata": {
    "mosi_username": "adazuretest@sdasd21321.onmicrosoft.com"
  },
  "mosiUser": {
    "username": "adazuretest@sdasd21321.onmicrosoft.com"
  },
  "position": "Business Analyst",
  "roles": [
    "ROLE_SYS_ADMIN",
    "ROLE_BILLING_ADMIN",
    "ROLE_USER"
  ],
  "user": {
    "activated": true,
    "allowLogin": true,
    "boostUser": null,
    "currency": "USD",
    "customAttributes": [
      {
        "attributeType": "TEXT",
        "hint": "commission_hint",
        "label": "Commission_Payout_ID",
        "name": "C5125859",
        "value": "t1"
      }
    ],
    "email": "user.test-6176537145049527751@appdirect.com",
    "firstName": "user.test",
    "lastName": "Lee",
    "ldapId": "1",
    "links": [
      {
        "href": "http://appdirect/api/account/v2/users/98050d65-fb1c-484b-a696-feb2345b952c",
        "rel": "self"
      },
      {
        "href": "http://appdirect/api/account/v2/users/98050d65-fb1c-484b-a696-feb2345b952c/memberships",
        "rel": "memberships"
      }
    ],
    "metadata": {
      "apsUid": null
    },
    "picture": "http://localhost:8080/profilePics/img6839249962619189663.png?32339267f9f00643fd18373adf580743",
    "roles": [
      "ROLE_USER"
    ],
    "userName": "user.test-6176537145049527751@appdirect.com",
    "uuid": "98050d65-fb1c-484b-a696-feb2345b952c"
  }
}

PUT/account/v2/companies/{companyUuid}/groups/{groupUuid}/memberships/{userUuid}

Add a user to marketplace company's user group.

Required Scope and Authorization Rules

Scope Rule
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_SYS_ADMIN Allows access as a Company Admin for the company.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request
*groupUuid path string Unique identifier of group in the API request
*userUuid path string Unique identifier of user (part of company) in the API request

Responses

Status Meaning Description Definition
204 No Content Success UserCompanyMembershipAccountV2
401 Unauthorized Unauthorized
404 Not Found User is not a member of the company or group is not found for company array of Error
500 Internal Server Error Could not manually assign/unassign a member to/from a system managed group

Update user group

Example request

curl -X PUT https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "type": "object",
      "title": "UpdateCompanyGroupAccountV2",
      "properties": {
        "description": {
          "description": "Company group description.",
          "type": "string"
        },
        "name": {
          "description": "Company group name.",
          "type": "string"
        }
      },
      "example": {
        "description": "Engineering",
        "name": "Engineer"
      }
    },
    {
      "example": {
        "description": "update-test-desc-new",
        "name": "update-test-name-new"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/groups/{groupUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "description": "update-test-desc-new",
  "name": "update-test-name-new"
}

Example response

{
  "companyDefault": false,
  "companyUuid": "7cd7e316-7ccd-41b3-9e46-a9bc58197adf",
  "description": "update-test-desc-new",
  "externallyManaged": false,
  "links": [
    {
      "href": "http://appdirect/api/account/v2/companies/7cd7e316-7ccd-41b3-9e46-a9bc58197adf/groups/263b8d39-9cfe-49b0-94ee-779f3c98e76b",
      "rel": "self"
    },
    {
      "href": "http://appdirect/api/account/v2/companies/7cd7e316-7ccd-41b3-9e46-a9bc58197adf",
      "rel": "company"
    },
    {
      "href": "http://appdirect/api/account/v2/companies/7cd7e316-7ccd-41b3-9e46-a9bc58197adf/groups/263b8d39-9cfe-49b0-94ee-779f3c98e76b/memberships?member=true&page=0&size=50",
      "rel": "memberships"
    }
  ],
  "memberCount": 0,
  "name": "update-test-name-new",
  "uuid": "263b8d39-9cfe-49b0-94ee-779f3c98e76b"
}

PUT/account/v2/companies/{companyUuid}/groups/{groupUuid}

Update user group for the requested marketplace company.

Required Scope and Authorization Rules

Scope Rule
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 Allows access to read and write all marketplace data.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request
*groupUuid path string Unique identifier of group in the API request

Body Parameters

Updated user grouop data

UpdateCompanyGroupAccountV2 object:

Property Type Description
description string

Company group description.

name string

Company group name.

Responses

Status Meaning Description Definition
200 OK Success CompanyGroupAccountV2
401 Unauthorized Unauthorized
404 Not Found Company or company group not found array of Error

Invitations

List company invitations

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "accepted": false,
      "company": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "createdOn": 1517942905000,
      "email": "mary.gonsalez3@yopmail.com",
      "externalIdentifier": "mary.gonsalez3@yopmail.com",
      "inviter": "user@appdirect.com",
      "lastModified": 1517942905000,
      "role": "DEVELOPER"
    },
    {
      "accepted": false,
      "company": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "createdOn": 1473362089000,
      "email": "C14209781@appdirect.com",
      "externalIdentifier": "C14209781@appdirect.com",
      "inviter": "superuser+1@appdirect.com",
      "lastModified": 1473362089000,
      "role": "USER"
    }
  ],
  "links": [],
  "page": {
    "number": 0,
    "size": 10,
    "totalElements": 2,
    "totalPages": 1
  }
}

GET/account/v2/companies/{companyUuid}/invitations

Retrieve a marketplace company's user invitations.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER_READ Allows access to read all marketplace data.
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request
filter query string Filter query used to reduce the returned result set
inviterUuid query string Unique identifier of marketplace user who sent invitation

Responses

Status Meaning Description Definition
200 OK Success PagedInvitationAccountV2
401 Unauthorized Unauthorized
404 Not Found Company, inviter or invitation not found

Invite users to company (CSV)

Example request

curl -X POST https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations/csv \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations/csv HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations/csv',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "type": "object",
  "properties": {
    "invitations": {
      "description": "CSV file to uploaded.",
      "type": "string",
      "format": "binary"
    }
  }
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations/csv',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations/csv', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations/csv',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations/csv");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "errors": [
    {
      "email": "test1@email",
      "externalIdentifier": "",
      "index": 2,
      "role": "DEVELOPER",
      "type": "PARSE_ERROR"
    }
  ],
  "invitationsSent": 2
}

POST/account/v2/companies/{companyUuid}/invitations/csv

Invite multiple users to a marketplace company using a CSV file. This method expects a Content-Type request header with a value of “multipart/form-data”, “text/plain” or “text/csv”.

Note: You cannot set the Marketplace Manager role through the API.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER Allows access to read and write all marketplace data.
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request
inviterUuid query string Unique identifier of inviter (marketplace user) in the API request

Responses

Status Meaning Description Definition
200 OK Success BulkInviteResponse
401 Unauthorized Unauthorized
404 Not Found Company or inviter not found

Invite users to company

Example request

curl -X POST https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '[
  {
    "email": "test1@email.com",
    "role": "DEVELOPER"
  },
  {
    "email": "test2@email.com",
    "role": "ROLE_USER"
  },
  {
    "email": "test3@email.com",
    "role": "ROLE_SYS_ADMIN"
  }
]';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

[
  {
    "email": "test1@email.com",
    "role": "DEVELOPER"
  },
  {
    "email": "test2@email.com",
    "role": "ROLE_USER"
  },
  {
    "email": "test3@email.com",
    "role": "ROLE_SYS_ADMIN"
  }
]

Example response

{
  "errors": [
    {
      "email": "test1@email",
      "externalIdentifier": "",
      "index": 2,
      "role": "DEVELOPER",
      "type": "PARSE_ERROR"
    }
  ],
  "invitationsSent": 2
}

POST/account/v2/companies/{companyUuid}/invitations

Invite multiple users to a marketplace company using list of Invitation resources.

Note: You cannot set the Marketplace Manager role through the API.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER Allows access to read and write all marketplace data.
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.

Parameters

Parameter Type Data Type Default Description
api.usesExternalIds query boolean false If "true", specified companyUuid is used as company external Id.
*companyUuid path string Unique identifier of company in the API request
inviterUuid query string Unique identifier of inviter (marketplace user) in the API request

Body Parameters

List of invitation resources.

Array of InvitationRequestAccountV2

Property Type Description
email string

Email the invitation was sent to.

role Role

Associated role. Accepts role names with or without a 'ROLE_' prefix, for example 'ROLE_USER' or 'USER'.

Responses

Status Meaning Description Definition
200 OK Success BulkInviteResponse
401 Unauthorized Unauthorized
404 Not Found Company or inviter not found

Revoke user invitation

Example request

curl -X DELETE https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations/{email} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations/{email} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations/{email}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations/{email}',
{
  method: 'DELETE'

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations/{email}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations/{email}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations/{email}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE/account/v2/companies/{companyUuid}/invitations/{email}

Revoke a user's invitiation to a marketplace company.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER Allows access to read and write all marketplace data.
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request
*email path string Email address of invitee in the API request
inviterUuid query string Unique identifier of marketplace user who sent invitation

Responses

Status Meaning Description Definition
200 OK Success
400 Bad Request Bad Request
401 Unauthorized Unauthorized
403 Forbidden Forbidden to delete invitation of an active user
404 Not Found Company, inviter or invitation not found

Accept user invitation

Example request

curl -X POST https://{marketplaceURL}/api/account/v2/invitations/{invitationToken}/registration \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/account/v2/invitations/{invitationToken}/registration HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/invitations/{invitationToken}/registration',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "allOf": [
        {
          "description": "Resource links",
          "type": "object",
          "title": "ResourceSupport",
          "properties": {
            "links": {
              "description": "Resource links",
              "type": "array",
              "items": {
                "type": "object",
                "title": "Link",
                "properties": {
                  "href": {
                    "type": "string"
                  },
                  "rel": {
                    "type": "string"
                  }
                },
                "example": {
                  "href": "...",
                  "rel": "..."
                },
                "nullable": true
              }
            }
          },
          "example": {
            "links": [
              {
                "href": "...",
                "rel": "..."
              },
              {
                "href": "...",
                "rel": "..."
              }
            ]
          },
          "nullable": true
        },
        {
          "type": "object",
          "title": "UserRegistration",
          "properties": {
            "externalIdentifier": {
              "description": "External identifier of user",
              "type": "string"
            },
            "firstName": {
              "description": "First name of user",
              "type": "string"
            },
            "lastName": {
              "description": "Last name of user",
              "type": "string",
              "nullable": true
            },
            "locale": {
              "description": "Locale of user in the standard ISO 639-1 language code + ISO 3166-1 country code format. For example: 'en_US', 'fr_CA' etc",
              "type": "string"
            },
            "password": {
              "description": "Password",
              "type": "string"
            },
            "title": {
              "description": "Title of user",
              "type": "string"
            }
          },
          "example": {
            "externalIdentifier": "123456456",
            "firstName": "John",
            "lastName": "Doe",
            "links": [],
            "locale": "en_US",
            "password": "Admin123",
            "title": "MS"
          }
        }
      ]
    },
    {
      "example": {
        "externalIdentifier": "123",
        "firstName": "John",
        "lastName": "Doe",
        "links": [],
        "locale": "en_US",
        "password": "Admin123",
        "title": "MS"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/invitations/{invitationToken}/registration',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/account/v2/invitations/{invitationToken}/registration', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/account/v2/invitations/{invitationToken}/registration',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/invitations/{invitationToken}/registration");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "externalIdentifier": "123",
  "firstName": "John",
  "lastName": "Doe",
  "links": [],
  "locale": "en_US",
  "password": "Admin123",
  "title": "MS"
}

Example response

{
  "accepted": true,
  "company": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "createdOn": 1480699597762,
  "email": "newbie@email.com",
  "inviter": "aec08af5-154f-4929-bcf2-afe2e805d6fd",
  "lastModified": 1480699597764,
  "role": "USER"
}

POST/account/v2/invitations/{invitationToken}/registration

Accept a user's invitation to a marketplace company

Required Scope and Authorization Rules

Scope Rule
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 Allows access to read and write all marketplace data.

Parameters

Parameter Type Data Type Default Description
api.usesExternalIds query boolean false When "true", inviter external Id will be used instead of UUID
*invitationToken path string Unique invitation token in the API request

Body Parameters

User registration resource

UserRegistration object:

Property Type Description
externalIdentifier string

External identifier of user

firstName string

First name of user

lastName string

Last name of user

links array of Link

Resource links

locale string

Locale of user in the standard ISO 639-1 language code + ISO 3166-1 country code format. For example: 'en_US', 'fr_CA' etc

password string

Password

title string

Title of user

Responses

Status Meaning Description Definition
200 OK Success InvitationAccountV2
400 Bad Request Invitee is already an active user, first/last names are missing or a user already exists with the same external id
401 Unauthorized Unauthorized
403 Forbidden Role hierarchy violation. The user making the request cannot change the password of a user with a higher role than their own.
404 Not Found Invitation not found

Invoices

Pay an Invoice

Example request

curl -X POST https://{marketplaceURL}/api/billing/v1/invoices/{invoiceNumber}/payments \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/billing/v1/invoices/{invoiceNumber}/payments HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/invoices/{invoiceNumber}/payments',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "allOf": [
        {
          "description": "Resource links",
          "type": "object",
          "title": "ResourceSupport",
          "properties": {
            "links": {
              "description": "Resource links",
              "type": "array",
              "items": {
                "type": "object",
                "title": "Link",
                "properties": {
                  "href": {
                    "type": "string"
                  },
                  "rel": {
                    "type": "string"
                  }
                },
                "example": {
                  "href": "...",
                  "rel": "..."
                },
                "nullable": true
              }
            }
          },
          "example": {
            "links": [
              {
                "href": "...",
                "rel": "..."
              },
              {
                "href": "...",
                "rel": "..."
              }
            ]
          },
          "nullable": true
        },
        {
          "type": "object",
          "title": "Payment",
          "properties": {
            "amount": {
              "description": "Payment amount.",
              "type": "number",
              "nullable": true
            },
            "company": {
              "allOf": [
                {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {},
                    "id": {}
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true
                },
                {
                  "description": "Link to company information."
                }
              ]
            },
            "currency": {
              "allOf": [
                {
                  "description": "Supported currencies for the system",
                  "type": "string",
                  "title": "Currency",
                  "default": "USD",
                  "enum": [
                    "USD",
                    "CAD",
                    "EUR",
                    "JPY",
                    "GBP",
                    "KRW",
                    "CHF",
                    "SEK",
                    "SGD",
                    "MYR",
                    "AUD",
                    "MXN",
                    "INR",
                    "BRL",
                    "DKK",
                    "NZD",
                    "NOK",
                    "ZAR",
                    "PHP",
                    "CNY",
                    "SAR",
                    "GTQ",
                    "IDR",
                    "ARS",
                    "COP",
                    "PEN"
                  ]
                },
                {
                  "description": "Payment currency."
                }
              ]
            },
            "date": {
              "description": "Payment date.",
              "type": "number",
              "nullable": true
            },
            "gatewayResponse": {
              "allOf": [
                {
                  "type": "object",
                  "title": "GatewayResponse",
                  "properties": {
                    "avs": {},
                    "code": {},
                    "cvv": {},
                    "message": {}
                  },
                  "example": {
                    "avs": true,
                    "code": "...",
                    "cvv": true,
                    "message": "..."
                  }
                },
                {
                  "description": "Gateway response"
                }
              ]
            },
            "id": {
              "description": "Payment number.",
              "type": "number",
              "nullable": true
            },
            "method": {
              "allOf": [
                {
                  "description": "The supported payment methods",
                  "type": "string",
                  "title": "PaymentMethod",
                  "enum": [
                    "CREDIT_CARD",
                    "PAYPAL",
                    "MANUAL",
                    "EXTERNAL_INVOICE",
                    "MARKETPLACE_CREDITS"
                  ]
                },
                {
                  "description": "Payment method. Includes CREDIT_CARD, PAYPAL, and MANUAL."
                }
              ]
            },
            "result": {
              "allOf": [
                {
                  "type": "string",
                  "title": "PaymentResult",
                  "enum": [
                    "SUCCESSFUL",
                    "FAILED",
                    "GATEWAY_NOT_AVAILABLE",
                    "MANUAL"
                  ]
                },
                {
                  "description": "Payment result. May be SUCCESSFUL, FAILED , GATEWAY_NOT_AVAILABLE, or MANUAL."
                }
              ]
            },
            "transactionId": {
              "description": "Transaction ID.",
              "type": "string",
              "nullable": true
            },
            "user": {
              "allOf": [
                {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {},
                    "id": {}
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true
                },
                {
                  "description": "Link to user information."
                }
              ]
            }
          },
          "example": {
            "amount": 12345,
            "company": {
              "href": "...",
              "id": "..."
            },
            "currency": "INR",
            "date": 12345,
            "gatewayResponse": {
              "avs": true,
              "code": "...",
              "cvv": true,
              "message": "..."
            },
            "id": 12345,
            "links": [
              {
                "href": "...",
                "rel": "..."
              },
              {
                "href": "...",
                "rel": "..."
              }
            ],
            "method": "PAYPAL",
            "result": "GATEWAY_NOT_AVAILABLE",
            "transactionId": "...",
            "user": {
              "href": "...",
              "id": "..."
            }
          }
        }
      ]
    },
    {
      "description": "Payment data object."
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/invoices/{invoiceNumber}/payments',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/billing/v1/invoices/{invoiceNumber}/payments', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/billing/v1/invoices/{invoiceNumber}/payments',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/invoices/{invoiceNumber}/payments");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "amount": 12345,
  "company": {
    "href": "...",
    "id": "..."
  },
  "currency": "INR",
  "date": 12345,
  "gatewayResponse": {
    "avs": true,
    "code": "...",
    "cvv": true,
    "message": "..."
  },
  "id": 12345,
  "links": [
    {
      "href": "...",
      "rel": "..."
    },
    {
      "href": "...",
      "rel": "..."
    }
  ],
  "method": "PAYPAL",
  "result": "GATEWAY_NOT_AVAILABLE",
  "transactionId": "...",
  "user": {
    "href": "...",
    "id": "..."
  }
}

POST/billing/v1/invoices/{invoiceNumber}/payments

If the invoice is unpaid, will process the payment and return the result. Will return an exception otherwise

Parameters

Parameter Type Data Type Default Description
*invoiceNumber path integer The unique identifier for the invoice provided by the channel.

Body Parameters

Payment data object.

Payment object:

Property Type Description
amount number

Payment amount.

company LinkWS

Link to company information.

currency Currency

Payment currency.

date number

Payment date.

gatewayResponse GatewayResponse

Gateway response

id number

Payment number.

links array of Link

Resource links

method PaymentMethod

Payment method. Includes CREDIT_CARD, PAYPAL, and MANUAL.

result PaymentResult

Payment result. May be SUCCESSFUL, FAILED , GATEWAY_NOT_AVAILABLE, or MANUAL.

transactionId string

Transaction ID.

user LinkWS

Link to user information.

Responses

Status Meaning Description Definition
200 OK OK Payment
400 Bad Request Bad Request
401 Unauthorized Unauthorized
404 Not Found Not Found
409 Conflict Conflict

List all invoices for a company

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/companies/{companyId}/invoices \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/companies/{companyId}/invoices HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/invoices',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/invoices',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/invoices', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/invoices',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/companies/{companyId}/invoices");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "company": {
      "href": "http://appdirect/api/account/v1/companies/644eb32e-4afa-4699-9dae-5d3394320968",
      "id": "644eb32e-4afa-4699-9dae-5d3394320968"
    },
    "creationDate": 1481002410613,
    "currency": "USD",
    "dueDate": 1481353200000,
    "invoiceId": 20,
    "links": [
      {
        "href": "http://appdirect/api/account/v2/users/a18c91e8-d5d5-4fb8-915c-726535a0bc8a",
        "rel": "user"
      },
      {
        "href": "http://appdirect/api/account/v2/companies/644eb32e-4afa-4699-9dae-5d3394320968",
        "rel": "company"
      },
      {
        "href": "http://appdirect/api/billing/v1/invoices/20",
        "rel": "self"
      }
    ],
    "orderIds": [
      "2030"
    ],
    "referenceNumber": null,
    "status": "PAID",
    "total": 10,
    "user": {
      "href": "http://appdirect/api/account/v1/users/a18c91e8-d5d5-4fb8-915c-726535a0bc8a",
      "id": "a18c91e8-d5d5-4fb8-915c-726535a0bc8a"
    }
  }
]

GET/billing/v1/companies/{companyId}/invoices

List all of the invoices for the given company

Parameters

Parameter Type Data Type Default Description
*companyId path string Company UUID
count query integer 250 Number of results to fetch. Used for paging.
excludeFree query boolean Exclude invoices with no charges (free)
fromDate query number From date
sortField query string of enum:
DATE
INVOICE_ID
TOTAL
INVOICE_ID Sort field
sortOrder query string of enum:
ASC
DESC
DESC Sort order
start query integer 0 First result index. Used for paging.
status query string of enum:
CARRIED
PAID
UNPAID
VOIDED
Invoice status
toDate query number To date

Responses

Status Meaning Description Definition
200 OK OK array of InvoiceListing
404 Not Found Not Found

List All Invoice Payments

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/invoices/{invoiceNumber}/payments \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/invoices/{invoiceNumber}/payments HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/invoices/{invoiceNumber}/payments',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/invoices/{invoiceNumber}/payments',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/invoices/{invoiceNumber}/payments', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/invoices/{invoiceNumber}/payments',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/invoices/{invoiceNumber}/payments");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "amount": 10,
    "company": {
      "href": "http://appdirect/api/account/v1/companies/5aae5a52-cec3-4cb2-87b4-6352624d2a31",
      "id": "5aae5a52-cec3-4cb2-87b4-6352624d2a31"
    },
    "currency": "USD",
    "date": 1481003382652,
    "gatewayResponse": {
      "avs": true,
      "code": null,
      "cvv": true,
      "message": null
    },
    "links": [
      {
        "href": "http://appdirect/api/billing/v1/payments/2",
        "rel": "self"
      }
    ],
    "method": "CREDIT_CARD",
    "paymentNumber": 2,
    "result": "SUCCESSFUL",
    "transactionId": "123456abcdef",
    "user": {
      "href": "http://appdirect/api/account/v1/users/72ae0d01-8036-4203-95c0-4c2fb424ff6d",
      "id": "72ae0d01-8036-4203-95c0-4c2fb424ff6d"
    }
  }
]

GET/billing/v1/invoices/{invoiceNumber}/payments

List all payment data for an invoice

Parameters

Parameter Type Data Type Default Description
count query string 250 Number of results to fetch. Used for paging.
fromDate query number From date.
*invoiceNumber path integer Invoice number.
method query string of enum:
ADP_INVOICE
ARIBAPAY
BT_BILL
CLICKANDBUY
CLOUDFOUNDRY
CREDIT_CARD
CUMULA_BILL
DTAG
EXTERNAL_INVOICE
KREDITKARTE
LASTSCHRIFT_MRNEXNET
MANO_TEO_BILL
MANUAL
MARKETPLACE_CREDITS
NETS_ARVATO_INVOICE
NEXTEL
PAYPAL
ROGERS_CC_DTMF
ROGERS_CC_POS
SNAP
TBILL
THISTLE
TOICLEARING
Payment method.
result query string of enum:
FAILED
GATEWAY_NOT_AVAILABLE
MANUAL
SUCCESSFUL
Payment result.
sortField query string of enum:
AMOUNT
DATE
PAYMENT_ID
PAYMENT_ID Sort field.
sortOrder query string of enum:
ASC
DESC
ASC Sort order.
start query string 0 First result index. Used for paging.
toDate query number To date.

Responses

Status Meaning Description Definition
200 OK OK array of Payment
204 No Content No Content array of Payment
401 Unauthorized Unauthorized
404 Not Found Not Found

Retrieve an Invoice

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/invoices/{invoiceNumber} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/invoices/{invoiceNumber} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/invoices/{invoiceNumber}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/invoices/{invoiceNumber}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/invoices/{invoiceNumber}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/invoices/{invoiceNumber}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/invoices/{invoiceNumber}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "company": {
    "href": "http://appdirect/api/account/v1/companies/ba550905-e0ea-48f2-a04f-0763e999d89c",
    "id": "ba550905-e0ea-48f2-a04f-0763e999d89c"
  },
  "creationDate": 1481003386696,
  "currency": "USD",
  "delegatedToInvoice": null,
  "dueDate": 1481353200000,
  "includedInvoices": null,
  "invoiceId": 1,
  "invoiceLines": [
    {
      "description": "Invoice Line description",
      "editionId": 1210,
      "id": 23,
      "itemId": null,
      "paymentPlanId": 1367,
      "percentage": null,
      "periodEnd": null,
      "periodStart": null,
      "price": null,
      "pricingUnit": "USER",
      "productId": 788,
      "quantity": 1,
      "total": null,
      "type": "ITEM"
    }
  ],
  "links": [
    {
      "href": "http://appdirect/api/account/v2/users/f090d591-8909-43ed-883d-71fb09ef3941",
      "rel": "user"
    },
    {
      "href": "http://appdirect/api/account/v2/companies/ba550905-e0ea-48f2-a04f-0763e999d89c",
      "rel": "company"
    },
    {
      "href": "http://appdirect/api/billing/v1/invoices/1",
      "rel": "self"
    }
  ],
  "orderIds": [
    "2030"
  ],
  "referenceNumber": null,
  "status": "PAID",
  "total": 10,
  "user": {
    "href": "http://appdirect/api/account/v1/users/f090d591-8909-43ed-883d-71fb09ef3941",
    "id": "f090d591-8909-43ed-883d-71fb09ef3941"
  }
}

GET/billing/v1/invoices/{invoiceNumber}

Read an invoice

Parameters

Parameter Type Data Type Default Description
*invoiceNumber path integer The unique identifier for the invoice provided by the channel.

Responses

Status Meaning Description Definition
200 OK OK Invoice
401 Unauthorized Unauthorized
404 Not Found Not Found

List All Invoices

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/invoices \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/invoices HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/invoices',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/invoices',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/invoices', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/invoices',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/invoices");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "company": {
      "href": "http://appdirect/api/account/v1/companies/5a95127f-4b06-459c-bdb1-da80568de2fd",
      "id": "5a95127f-4b06-459c-bdb1-da80568de2fd"
    },
    "creationDate": 1481003387753,
    "currency": "USD",
    "dueDate": 1481353200000,
    "invoiceId": 1,
    "links": [
      {
        "href": "http://appdirect/api/account/v2/users/eefdf767-9197-4402-ba0d-614cfec17ee1",
        "rel": "user"
      },
      {
        "href": "http://appdirect/api/account/v2/companies/5a95127f-4b06-459c-bdb1-da80568de2fd",
        "rel": "company"
      },
      {
        "href": "http://appdirect/api/billing/v1/invoices/1",
        "rel": "self"
      }
    ],
    "orderIds": [
      "2030"
    ],
    "referenceNumber": null,
    "status": "PAID",
    "total": 10,
    "user": {
      "href": "http://appdirect/api/account/v1/users/eefdf767-9197-4402-ba0d-614cfec17ee1",
      "id": "eefdf767-9197-4402-ba0d-614cfec17ee1"
    }
  }
]

GET/billing/v1/invoices

List all invoice data

Parameters

Parameter Type Data Type Default Description
buyerRole query string of enum:
ALL
CUSTOMER
RESELLER
SALES_SUPPORT
Filter invoices with purchases made by user with this role.
count query string 250 Number of results to fetch. Used for paging.
excludeFree query boolean Exclude invoices with no charges.
fromDate query number From date.
sortField query string of enum:
DATE
INVOICE_ID
TOTAL
INVOICE_ID Sort field.
sortOrder query string of enum:
ASC
DESC
ASC Sort order.
start query string 0 First result index. Used for paging.
status query string of enum:
CARRIED
PAID
UNPAID
VOIDED
Invoice status.
toDate query number To date.

Responses

Status Meaning Description Definition
200 OK OK array of InvoiceListing
204 No Content No Content array of InvoiceListing
401 Unauthorized Unauthorized
404 Not Found Not Found

List all invoices for a user

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/invoices \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/invoices HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/invoices',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/invoices',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/invoices', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/invoices',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/invoices");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "company": {
      "href": "http://appdirect/api/account/v1/companies/644eb32e-4afa-4699-9dae-5d3394320968",
      "id": "644eb32e-4afa-4699-9dae-5d3394320968"
    },
    "creationDate": 1481002410613,
    "currency": "USD",
    "dueDate": 1481353200000,
    "invoiceId": 20,
    "links": [
      {
        "href": "http://appdirect/api/account/v2/users/a18c91e8-d5d5-4fb8-915c-726535a0bc8a",
        "rel": "user"
      },
      {
        "href": "http://appdirect/api/account/v2/companies/644eb32e-4afa-4699-9dae-5d3394320968",
        "rel": "company"
      },
      {
        "href": "http://appdirect/api/billing/v1/invoices/20",
        "rel": "self"
      }
    ],
    "orderIds": [
      "2030"
    ],
    "referenceNumber": null,
    "status": "PAID",
    "total": 10,
    "user": {
      "href": "http://appdirect/api/account/v1/users/a18c91e8-d5d5-4fb8-915c-726535a0bc8a",
      "id": "a18c91e8-d5d5-4fb8-915c-726535a0bc8a"
    }
  }
]

GET/billing/v1/companies/{companyId}/users/{userId}/invoices

List all of the invoices for the given user

Parameters

Parameter Type Data Type Default Description
*companyId path string User's company UUID
count query integer 250 Number of results to fetch. Used for paging.
excludeFree query boolean Exclude invoices with no charges (free)
fromDate query number From date
sortField query string of enum:
DATE
INVOICE_ID
TOTAL
INVOICE_ID Sort field
sortOrder query string of enum:
ASC
DESC
ASC Sort order
start query integer 0 First result index. Used for paging.
status query string of enum:
CARRIED
PAID
UNPAID
VOIDED
Invoice status
toDate query number To date
*userId path string User UUID

Responses

Status Meaning Description Definition
200 OK OK array of InvoiceListing
404 Not Found Not Found

Leads v1

Resellers, Referral Users, Developers, and Reseller Managers can use the Leads API to create, read, and update leads.

Create a lead

Example request

curl -X POST https://{marketplaceURL}/api/prm/v1/leads \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/prm/v1/leads HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/prm/v1/leads',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "allOf": [
        {
          "description": "Parameters for this object are also contained in the [SalesLead](#saleslead) object. These parameters are shared by sales leads and sales opportunities. The parameters refer to either the lead or the opportunity. For example, within the lead, the UUID is the unique identifier of the lead, and within the opportunity, the UUID is the unique identifier of the opportunity.",
          "type": "object",
          "title": "AbstractLead",
          "properties": {
            "additionalComment": {
              "description": "Any note that you want to add about the lead",
              "type": "string",
              "nullable": true
            },
            "anticipatedCloseDate": {
              "description": "The anticipated date that the lead will be closed in UNIX Epoch milliseconds",
              "type": "number",
              "nullable": true
            },
            "anticipatedNumberOfSeats": {
              "description": "The number of licenses required for the subcription",
              "type": "number",
              "nullable": true
            },
            "attributes": {
              "description": "Custom attributes for the lead",
              "type": "object"
            },
            "comment": {
              "description": "Any note that you want to add about the lead",
              "type": "string",
              "nullable": true
            },
            "creationDate": {
              "description": "The date the lead was created in UNIX Epoch milliseconds",
              "type": "number",
              "nullable": true
            },
            "customer": {
              "allOf": [
                {
                  "type": "object",
                  "title": "CompanyContact",
                  "properties": {
                    "company": {},
                    "contact": {}
                  },
                  "example": {
                    "company": "...",
                    "contact": "..."
                  }
                },
                {
                  "description": "Customer contact information",
                  "type": "object",
                  "x-nullable": true
                }
              ]
            },
            "externalIdentifier": {
              "description": "An optional identifier provided by the markeplace owner",
              "type": "string",
              "nullable": true
            },
            "lastModificationDate": {
              "description": "The date that the lead was last modified in UNIX Epoch milliseconds",
              "type": "number",
              "nullable": true
            },
            "reseller": {
              "allOf": [
                {
                  "type": "object",
                  "title": "CompanyContact",
                  "properties": {
                    "company": {},
                    "contact": {}
                  },
                  "example": {
                    "company": "...",
                    "contact": "..."
                  }
                },
                {
                  "description": "Reseller contact information",
                  "type": "object",
                  "x-nullable": true
                }
              ]
            },
            "useCaseDescription": {
              "description": "Description of what the lead customer needs",
              "type": "string",
              "nullable": true
            },
            "uuid": {
              "description": "The unique identifier of either the lead or the opportunity",
              "type": "string",
              "nullable": true
            }
          },
          "example": {
            "additionalComment": "...",
            "anticipatedCloseDate": "...",
            "anticipatedNumberOfSeats": "...",
            "attrbutes": "...",
            "comment": "...",
            "creationDate": "...",
            "customer": "...",
            "externalIdentifier": "...",
            "lastModificationDate": "...",
            "reseller": "...",
            "useCaseDescription": "...",
            "uuid": "..."
          }
        },
        {
          "description": "The parameters for [AbstractLead](#abstractlead) are contained in this object",
          "type": "object",
          "title": "SalesLead",
          "properties": {
            "application": {
              "allOf": [
                {
                  "type": "object",
                  "title": "ApplicationReseller",
                  "properties": {
                    "id": {},
                    "name": {},
                    "vendor": {}
                  },
                  "example": {
                    "id": "...",
                    "name": "...",
                    "vendor": "..."
                  },
                  "nullable": true
                },
                {
                  "description": "Information about the product associated with the lead",
                  "type": "object",
                  "x-nullable": true
                }
              ]
            },
            "customerLeadForProvider": {
              "description": "Indicates whether a lead is for a marketplace owner (true) or not (false)",
              "type": "boolean"
            },
            "customerLeadForReseller": {
              "description": "Indicates whether a lead is for a Reseller (true) or not (false)",
              "type": "boolean"
            },
            "customerLeadForVendor": {
              "description": "Indicates whether a lead is for a vendor (true) or not (false)",
              "type": "boolean"
            },
            "edition": {
              "allOf": [
                {
                  "type": "object",
                  "title": "LeadEdition",
                  "properties": {
                    "name": {},
                    "uuid": {}
                  },
                  "example": {
                    "name": "...",
                    "uuid": "..."
                  },
                  "nullable": true
                },
                {
                  "description": "The information about the specific edition of the lead",
                  "type": "object",
                  "x-nullable": true
                }
              ]
            },
            "referralLead": {
              "description": "Indicates whether the lead was created by a Reseller (true) or not (false)",
              "type": "boolean"
            },
            "source": {
              "allOf": [
                {
                  "type": "string",
                  "title": "SalesLeadSource",
                  "enum": [
                    "RESELLER",
                    "CUSTOMER"
                  ]
                },
                {
                  "description": "Information about the source of the lead, such as RESELLER or CUSTOMER"
                }
              ]
            },
            "status": {
              "allOf": [
                {
                  "type": "string",
                  "title": "SalesLeadStatus",
                  "enum": [
                    "PENDING",
                    "DENIED",
                    "ACCEPTED",
                    "ASSIGNED",
                    "LOST",
                    "WON"
                  ],
                  "nullable": true
                },
                {
                  "description": "Information about the status of the lead, such as, PENDING, DENIED, ACCEPTED, ASSIGNED, LOST, WON",
                  "type": "object",
                  "x-nullable": true
                }
              ]
            },
            "target": {
              "allOf": [
                {
                  "type": "string",
                  "title": "SalesLeadTarget",
                  "enum": [
                    "PROVIDER",
                    "RESELLER",
                    "VENDOR"
                  ],
                  "nullable": true
                },
                {
                  "description": "Information about the sales lead target, such as, RESELLER, PROVIDER, VENDOR",
                  "type": "object",
                  "x-nullable": true
                }
              ]
            }
          },
          "example": {
            "additionalComment": "...",
            "anticipatedCloseDate": "...",
            "application": "...",
            "attributes": "...",
            "comment": "...",
            "creationDate": "...",
            "customer": "...",
            "customerLeadForProvider": "...",
            "customerLeadForReseller": "...",
            "customerLeadForVendor": "...",
            "edition": "...",
            "externalIdentifier": "...",
            "lastModificationDate": "...",
            "referalLead": "...",
            "reseller": "...",
            "source": "...",
            "status": "...",
            "target": "...",
            "useCaseDescription": "...",
            "uuid": "..."
          }
        }
      ]
    },
    {
      "example": {
        "additionalComment": null,
        "anticipatedCloseDate": null,
        "anticipatedNumberOfSeats": null,
        "application": null,
        "attributes": {},
        "comment": null,
        "creationDate": null,
        "customer": {
          "company": {
            "country": "US",
            "name": "New Company",
            "size": "RANGE_10_24",
            "state": "CA"
          },
          "contact": {
            "email": "alice@company.com",
            "firstName": "Alice",
            "lastName": "Smith",
            "phone": "415-555-1212"
          }
        },
        "customerLeadForProvider": false,
        "customerLeadForReseller": true,
        "customerLeadForVendor": false,
        "edition": null,
        "externalIdentifier": null,
        "lastModificationDate": null,
        "referralLead": false,
        "reseller": {
          "company": {
            "uuid": "ba4a43af-f12e-4908-af0d-fb53a5b43f0f"
          }
        },
        "source": "CUSTOMER",
        "status": null,
        "target": "RESELLER",
        "useCaseDescription": null,
        "uuid": null
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/prm/v1/leads',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/prm/v1/leads', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/prm/v1/leads',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/prm/v1/leads");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "additionalComment": null,
  "anticipatedCloseDate": null,
  "anticipatedNumberOfSeats": null,
  "application": null,
  "attributes": {},
  "comment": null,
  "creationDate": null,
  "customer": {
    "company": {
      "country": "US",
      "name": "New Company",
      "size": "RANGE_10_24",
      "state": "CA"
    },
    "contact": {
      "email": "alice@company.com",
      "firstName": "Alice",
      "lastName": "Smith",
      "phone": "415-555-1212"
    }
  },
  "customerLeadForProvider": false,
  "customerLeadForReseller": true,
  "customerLeadForVendor": false,
  "edition": null,
  "externalIdentifier": null,
  "lastModificationDate": null,
  "referralLead": false,
  "reseller": {
    "company": {
      "uuid": "ba4a43af-f12e-4908-af0d-fb53a5b43f0f"
    }
  },
  "source": "CUSTOMER",
  "status": null,
  "target": "RESELLER",
  "useCaseDescription": null,
  "uuid": null
}

Example response

{
  "additionalComment": null,
  "anticipatedCloseDate": null,
  "anticipatedNumberOfSeats": null,
  "application": null,
  "attributes": {},
  "comment": null,
  "creationDate": 1480310516373,
  "customer": {
    "company": {
      "country": "US",
      "name": "New Company",
      "size": "RANGE_10_24",
      "state": "CA"
    },
    "contact": {
      "email": "alice@company.com",
      "firstName": "Alice",
      "lastName": "Smith",
      "phone": "+1 415-555-1212"
    }
  },
  "customerLeadForProvider": false,
  "customerLeadForReseller": true,
  "customerLeadForVendor": false,
  "edition": null,
  "externalIdentifier": null,
  "lastModificationDate": 1480310516373,
  "links": [
    {
      "href": "http://appdirect/api/account/v2/companies/ba4a43af-f12e-4908-af0d-fb53a5b43f0f",
      "rel": "resellerCompany"
    },
    {
      "href": "http://appdirect/api/prm/v1/leads/4222bf0e-1f25-4690-8e8d-30edade574be",
      "rel": "self"
    }
  ],
  "referralLead": false,
  "reseller": {
    "company": {
      "country": "US",
      "customAttributes": {},
      "name": "Company-6",
      "uuid": "ba4a43af-f12e-4908-af0d-fb53a5b43f0f"
    },
    "contact": {}
  },
  "source": "CUSTOMER",
  "status": "ASSIGNED",
  "target": "RESELLER",
  "useCaseDescription": null,
  "uuid": "4222bf0e-1f25-4690-8e8d-30edade574be"
}

POST/prm/v1/leads

Create a lead.

Parameters

Parameter Type Data Type Default Description
ignoreDuplicateEmail query boolean false when true, duplicate emails are accepted. Applies only to reseller referral leads.

Body Parameters

Lead data

SalesLead object:

Property Type Description
additionalComment string

Any note that you want to add about the lead

anticipatedCloseDate number

The anticipated date that the lead will be closed in UNIX Epoch milliseconds

anticipatedNumberOfSeats number

The number of licenses required for the subcription

application ApplicationReseller

Information about the product associated with the lead

attributes object

Custom attributes for the lead

comment string

Any note that you want to add about the lead

creationDate number

The date the lead was created in UNIX Epoch milliseconds

customer CompanyContact

Customer contact information

customerLeadForProvider boolean

Indicates whether a lead is for a marketplace owner (true) or not (false)

customerLeadForReseller boolean

Indicates whether a lead is for a Reseller (true) or not (false)

customerLeadForVendor boolean

Indicates whether a lead is for a vendor (true) or not (false)

edition LeadEdition

The information about the specific edition of the lead

externalIdentifier string

An optional identifier provided by the markeplace owner

lastModificationDate number

The date that the lead was last modified in UNIX Epoch milliseconds

referralLead boolean

Indicates whether the lead was created by a Reseller (true) or not (false)

reseller CompanyContact

Reseller contact information

source SalesLeadSource

Information about the source of the lead, such as RESELLER or CUSTOMER

status SalesLeadStatus

Information about the status of the lead, such as, PENDING, DENIED, ACCEPTED, ASSIGNED, LOST, WON

target SalesLeadTarget

Information about the sales lead target, such as, RESELLER, PROVIDER, VENDOR

useCaseDescription string

Description of what the lead customer needs

uuid string

The unique identifier of either the lead or the opportunity

Responses

Status Meaning Description Definition
204 No Content Lead created SalesLeadResource
409 Conflict Duplicate email address

Read a lead

Example request

curl -X GET https://{marketplaceURL}/api/prm/v1/leads/{uuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/prm/v1/leads/{uuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/prm/v1/leads/{uuid}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/prm/v1/leads/{uuid}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/prm/v1/leads/{uuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/prm/v1/leads/{uuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/prm/v1/leads/{uuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "additionalComment": null,
  "anticipatedCloseDate": null,
  "anticipatedNumberOfSeats": null,
  "application": null,
  "attributes": {},
  "comment": null,
  "creationDate": 1480310518795,
  "customer": {
    "company": {
      "country": "US",
      "name": "New Company",
      "size": "RANGE_10_24",
      "state": "CA"
    },
    "contact": {
      "email": "alice@company.com",
      "firstName": "Alice",
      "lastName": "Smith",
      "phone": "+1 415-555-1212"
    }
  },
  "customerLeadForProvider": false,
  "customerLeadForReseller": true,
  "customerLeadForVendor": false,
  "edition": null,
  "externalIdentifier": null,
  "lastModificationDate": 1480310518795,
  "links": [
    {
      "href": "http://appdirect/api/prm/v1/leads/7333e699-1fe0-4d72-bd75-49d5043c5fe8",
      "rel": "self"
    },
    {
      "href": "http://appdirect/api/account/v2/companies/ae72fcef-e4e9-42c3-9086-3bbdffc78205",
      "rel": "resellerCompany"
    }
  ],
  "referralLead": false,
  "reseller": {
    "company": {
      "country": "US",
      "customAttributes": {},
      "name": "Company-46",
      "uuid": "ae72fcef-e4e9-42c3-9086-3bbdffc78205"
    },
    "contact": {}
  },
  "source": "CUSTOMER",
  "status": "ASSIGNED",
  "target": "RESELLER",
  "useCaseDescription": null,
  "uuid": "7333e699-1fe0-4d72-bd75-49d5043c5fe8"
}

GET/prm/v1/leads/{uuid}

Read a lead

Parameters

Parameter Type Data Type Default Description
*uuid path string Lead UUID

Responses

Status Meaning Description Definition
200 OK Success SalesLeadResource

List leads

Example request

curl -X GET https://{marketplaceURL}/api/prm/v1/leads \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/prm/v1/leads HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/prm/v1/leads',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/prm/v1/leads',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/prm/v1/leads', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/prm/v1/leads',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/prm/v1/leads");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "additionalComment": null,
      "anticipatedCloseDate": null,
      "anticipatedNumberOfSeats": null,
      "application": null,
      "attributes": {},
      "comment": null,
      "creationDate": 1480310526411,
      "customer": {
        "company": {
          "country": "US",
          "name": "New Company",
          "size": "RANGE_10_24",
          "state": "CA"
        },
        "contact": {
          "email": "alice@company.com",
          "firstName": "Alice",
          "lastName": "Smith",
          "phone": "+1 415-555-1212"
        }
      },
      "customerLeadForProvider": false,
      "customerLeadForReseller": false,
      "customerLeadForVendor": false,
      "edition": null,
      "externalIdentifier": null,
      "lastModificationDate": 1480310526411,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/users/6280ef28-3db2-4f6a-8248-e0e311d7f513",
          "rel": "resellerContact"
        },
        {
          "href": "http://appdirect/api/prm/v1/leads/cf96360d-255f-46e5-961a-396b17bd4b6b",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/f43958d7-c4b6-429d-9663-9f72244d58b1",
          "rel": "resellerCompany"
        }
      ],
      "referralLead": true,
      "reseller": {
        "company": {
          "country": "US",
          "customAttributes": {},
          "name": "Company-156",
          "uuid": "f43958d7-c4b6-429d-9663-9f72244d58b1"
        },
        "contact": {
          "email": "company-156-admin@company-156.com",
          "uuid": "6280ef28-3db2-4f6a-8248-e0e311d7f513"
        }
      },
      "source": "RESELLER",
      "status": "PENDING",
      "target": "PROVIDER",
      "useCaseDescription": null,
      "uuid": "cf96360d-255f-46e5-961a-396b17bd4b6b"
    }
  ],
  "links": [],
  "page": {
    "number": 0,
    "size": 50,
    "totalElements": 1,
    "totalPages": 1
  }
}

GET/prm/v1/leads

List leads

Parameters

Parameter Type Data Type Default Description
fromDate query integer Search for leads created on of after this date, in milliseconds since epoch
page query integer 0 Zero-based page index
searchText query string Search term used to search on different fields of a lead
size query integer 50 The size of the page to be returned
sortField query string of enum:
COMPANY_NAME
DATE
RESELLER_LAST_NAME
USER_FULL_NAME
USER_LAST_NAME
DATE The property to sort by
sortOrder query string of enum:
ASC
DESC
DESC Ordering type
source query array of string If specified, only return leads with matching source(s)
status query array of string If specified, only return leads with matching status(es)
target query array of string If specified, only return leads with matching target(s)
toDate query integer Search for leads created on of before this date, in milliseconds since epoch

Responses

Status Meaning Description Definition
200 OK Success PagedSalesLead

Update a lead

Example request

curl -X PATCH https://{marketplaceURL}/api/prm/v1/leads/{uuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PATCH https://{marketplaceURL}/api/prm/v1/leads/{uuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/prm/v1/leads/{uuid}',
  method: 'patch',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "allOf": [
        {
          "description": "Parameters for this object are also contained in the [SalesLead](#saleslead) object. These parameters are shared by sales leads and sales opportunities. The parameters refer to either the lead or the opportunity. For example, within the lead, the UUID is the unique identifier of the lead, and within the opportunity, the UUID is the unique identifier of the opportunity.",
          "type": "object",
          "title": "AbstractLead",
          "properties": {
            "additionalComment": {
              "description": "Any note that you want to add about the lead",
              "type": "string",
              "nullable": true
            },
            "anticipatedCloseDate": {
              "description": "The anticipated date that the lead will be closed in UNIX Epoch milliseconds",
              "type": "number",
              "nullable": true
            },
            "anticipatedNumberOfSeats": {
              "description": "The number of licenses required for the subcription",
              "type": "number",
              "nullable": true
            },
            "attributes": {
              "description": "Custom attributes for the lead",
              "type": "object"
            },
            "comment": {
              "description": "Any note that you want to add about the lead",
              "type": "string",
              "nullable": true
            },
            "creationDate": {
              "description": "The date the lead was created in UNIX Epoch milliseconds",
              "type": "number",
              "nullable": true
            },
            "customer": {
              "allOf": [
                {
                  "type": "object",
                  "title": "CompanyContact",
                  "properties": {
                    "company": {},
                    "contact": {}
                  },
                  "example": {
                    "company": "...",
                    "contact": "..."
                  }
                },
                {
                  "description": "Customer contact information",
                  "type": "object",
                  "x-nullable": true
                }
              ]
            },
            "externalIdentifier": {
              "description": "An optional identifier provided by the markeplace owner",
              "type": "string",
              "nullable": true
            },
            "lastModificationDate": {
              "description": "The date that the lead was last modified in UNIX Epoch milliseconds",
              "type": "number",
              "nullable": true
            },
            "reseller": {
              "allOf": [
                {
                  "type": "object",
                  "title": "CompanyContact",
                  "properties": {
                    "company": {},
                    "contact": {}
                  },
                  "example": {
                    "company": "...",
                    "contact": "..."
                  }
                },
                {
                  "description": "Reseller contact information",
                  "type": "object",
                  "x-nullable": true
                }
              ]
            },
            "useCaseDescription": {
              "description": "Description of what the lead customer needs",
              "type": "string",
              "nullable": true
            },
            "uuid": {
              "description": "The unique identifier of either the lead or the opportunity",
              "type": "string",
              "nullable": true
            }
          },
          "example": {
            "additionalComment": "...",
            "anticipatedCloseDate": "...",
            "anticipatedNumberOfSeats": "...",
            "attrbutes": "...",
            "comment": "...",
            "creationDate": "...",
            "customer": "...",
            "externalIdentifier": "...",
            "lastModificationDate": "...",
            "reseller": "...",
            "useCaseDescription": "...",
            "uuid": "..."
          }
        },
        {
          "description": "The parameters for [AbstractLead](#abstractlead) are contained in this object",
          "type": "object",
          "title": "SalesLead",
          "properties": {
            "application": {
              "allOf": [
                {
                  "type": "object",
                  "title": "ApplicationReseller",
                  "properties": {
                    "id": {},
                    "name": {},
                    "vendor": {}
                  },
                  "example": {
                    "id": "...",
                    "name": "...",
                    "vendor": "..."
                  },
                  "nullable": true
                },
                {
                  "description": "Information about the product associated with the lead",
                  "type": "object",
                  "x-nullable": true
                }
              ]
            },
            "customerLeadForProvider": {
              "description": "Indicates whether a lead is for a marketplace owner (true) or not (false)",
              "type": "boolean"
            },
            "customerLeadForReseller": {
              "description": "Indicates whether a lead is for a Reseller (true) or not (false)",
              "type": "boolean"
            },
            "customerLeadForVendor": {
              "description": "Indicates whether a lead is for a vendor (true) or not (false)",
              "type": "boolean"
            },
            "edition": {
              "allOf": [
                {
                  "type": "object",
                  "title": "LeadEdition",
                  "properties": {
                    "name": {},
                    "uuid": {}
                  },
                  "example": {
                    "name": "...",
                    "uuid": "..."
                  },
                  "nullable": true
                },
                {
                  "description": "The information about the specific edition of the lead",
                  "type": "object",
                  "x-nullable": true
                }
              ]
            },
            "referralLead": {
              "description": "Indicates whether the lead was created by a Reseller (true) or not (false)",
              "type": "boolean"
            },
            "source": {
              "allOf": [
                {
                  "type": "string",
                  "title": "SalesLeadSource",
                  "enum": [
                    "RESELLER",
                    "CUSTOMER"
                  ]
                },
                {
                  "description": "Information about the source of the lead, such as RESELLER or CUSTOMER"
                }
              ]
            },
            "status": {
              "allOf": [
                {
                  "type": "string",
                  "title": "SalesLeadStatus",
                  "enum": [
                    "PENDING",
                    "DENIED",
                    "ACCEPTED",
                    "ASSIGNED",
                    "LOST",
                    "WON"
                  ],
                  "nullable": true
                },
                {
                  "description": "Information about the status of the lead, such as, PENDING, DENIED, ACCEPTED, ASSIGNED, LOST, WON",
                  "type": "object",
                  "x-nullable": true
                }
              ]
            },
            "target": {
              "allOf": [
                {
                  "type": "string",
                  "title": "SalesLeadTarget",
                  "enum": [
                    "PROVIDER",
                    "RESELLER",
                    "VENDOR"
                  ],
                  "nullable": true
                },
                {
                  "description": "Information about the sales lead target, such as, RESELLER, PROVIDER, VENDOR",
                  "type": "object",
                  "x-nullable": true
                }
              ]
            }
          },
          "example": {
            "additionalComment": "...",
            "anticipatedCloseDate": "...",
            "application": "...",
            "attributes": "...",
            "comment": "...",
            "creationDate": "...",
            "customer": "...",
            "customerLeadForProvider": "...",
            "customerLeadForReseller": "...",
            "customerLeadForVendor": "...",
            "edition": "...",
            "externalIdentifier": "...",
            "lastModificationDate": "...",
            "referalLead": "...",
            "reseller": "...",
            "source": "...",
            "status": "...",
            "target": "...",
            "useCaseDescription": "...",
            "uuid": "..."
          }
        }
      ]
    },
    {
      "example": {
        "additionalComment": null,
        "anticipatedCloseDate": null,
        "anticipatedNumberOfSeats": null,
        "application": null,
        "attributes": {},
        "comment": "Some comment",
        "creationDate": null,
        "customer": null,
        "customerLeadForProvider": false,
        "customerLeadForReseller": false,
        "customerLeadForVendor": false,
        "edition": null,
        "externalIdentifier": null,
        "lastModificationDate": null,
        "referralLead": false,
        "reseller": null,
        "source": "RESELLER",
        "status": "WON",
        "target": null,
        "useCaseDescription": null,
        "uuid": null
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/prm/v1/leads/{uuid}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.patch('https://{marketplaceURL}/api/prm/v1/leads/{uuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.patch 'https://{marketplaceURL}/api/prm/v1/leads/{uuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/prm/v1/leads/{uuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "additionalComment": null,
  "anticipatedCloseDate": null,
  "anticipatedNumberOfSeats": null,
  "application": null,
  "attributes": {},
  "comment": "Some comment",
  "creationDate": null,
  "customer": null,
  "customerLeadForProvider": false,
  "customerLeadForReseller": false,
  "customerLeadForVendor": false,
  "edition": null,
  "externalIdentifier": null,
  "lastModificationDate": null,
  "referralLead": false,
  "reseller": null,
  "source": "RESELLER",
  "status": "WON",
  "target": null,
  "useCaseDescription": null,
  "uuid": null
}

Example response

{
  "additionalComment": null,
  "anticipatedCloseDate": null,
  "anticipatedNumberOfSeats": null,
  "application": null,
  "attributes": {},
  "comment": "Some comment",
  "creationDate": 1480310525294,
  "customer": {
    "company": {
      "country": "US",
      "name": "New Company",
      "size": "RANGE_10_24",
      "state": "CA"
    },
    "contact": {
      "email": "alice@company.com",
      "firstName": "Alice",
      "lastName": "Smith",
      "phone": "+1 415-555-1212"
    }
  },
  "customerLeadForProvider": false,
  "customerLeadForReseller": false,
  "customerLeadForVendor": false,
  "edition": null,
  "externalIdentifier": null,
  "lastModificationDate": 1480310525388,
  "links": [
    {
      "href": "http://appdirect/api/prm/v1/leads/0b2c740c-9b2f-45f9-b850-d630c3d9014b",
      "rel": "self"
    },
    {
      "href": "http://appdirect/api/account/v2/companies/6f474777-66a8-4ea3-906b-ed9d9d54bcfb",
      "rel": "resellerCompany"
    },
    {
      "href": "http://appdirect/api/account/v2/users/09053531-fc27-458c-ba7f-801a0f5398b2",
      "rel": "resellerContact"
    }
  ],
  "referralLead": true,
  "reseller": {
    "company": {
      "country": "US",
      "customAttributes": {},
      "name": "Company-141",
      "uuid": "6f474777-66a8-4ea3-906b-ed9d9d54bcfb"
    },
    "contact": {
      "email": "company-141-admin@company-141.com",
      "uuid": "09053531-fc27-458c-ba7f-801a0f5398b2"
    }
  },
  "source": "RESELLER",
  "status": "WON",
  "target": "PROVIDER",
  "useCaseDescription": null,
  "uuid": "0b2c740c-9b2f-45f9-b850-d630c3d9014b"
}

PATCH/prm/v1/leads/{uuid}

Update a lead

Parameters

Parameter Type Data Type Default Description
*uuid path string Lead UUID

Body Parameters

(Partial) Lead data. Only specified fields will override current lead fields. Unknown fields, or fields that can't be updated are ignored.

SalesLead object:

Property Type Description
additionalComment string

Any note that you want to add about the lead

anticipatedCloseDate number

The anticipated date that the lead will be closed in UNIX Epoch milliseconds

anticipatedNumberOfSeats number

The number of licenses required for the subcription

application ApplicationReseller

Information about the product associated with the lead

attributes object

Custom attributes for the lead

comment string

Any note that you want to add about the lead

creationDate number

The date the lead was created in UNIX Epoch milliseconds

customer CompanyContact

Customer contact information

customerLeadForProvider boolean

Indicates whether a lead is for a marketplace owner (true) or not (false)

customerLeadForReseller boolean

Indicates whether a lead is for a Reseller (true) or not (false)

customerLeadForVendor boolean

Indicates whether a lead is for a vendor (true) or not (false)

edition LeadEdition

The information about the specific edition of the lead

externalIdentifier string

An optional identifier provided by the markeplace owner

lastModificationDate number

The date that the lead was last modified in UNIX Epoch milliseconds

referralLead boolean

Indicates whether the lead was created by a Reseller (true) or not (false)

reseller CompanyContact

Reseller contact information

source SalesLeadSource

Information about the source of the lead, such as RESELLER or CUSTOMER

status SalesLeadStatus

Information about the status of the lead, such as, PENDING, DENIED, ACCEPTED, ASSIGNED, LOST, WON

target SalesLeadTarget

Information about the sales lead target, such as, RESELLER, PROVIDER, VENDOR

useCaseDescription string

Description of what the lead customer needs

uuid string

The unique identifier of either the lead or the opportunity

Responses

Status Meaning Description Definition
200 OK Success SalesLeadResource

Leads v2

Resellers, Referral Users, Developers, and Reseller Managers can use the Leads API to create, read, and update leads, disqualify and delete leads, assign leads, associate companies with leads, and read lead-related activities.
Manual leads (leads that Resellers, Referral Users, Developers, and Reseller Managers create) can be viewed by only their creators.
Only profile owners and Reseller Managers can view company profile leads (leads that anonymous users create when they click Contact Us on a reseller company profile page).
Reseller Managers can view product profile leads (leads that anonymous users create when they click Contact Us on a product profile page). Marketplace Managers can configure product profile leads so that the Developers who own the product profile can also view the leads.

List activities

Example request

curl -X GET https://{marketplaceURL}/api/lead/v2/leads/{leadId}/activities?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/lead/v2/leads/{leadId}/activities?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/lead/v2/leads/{leadId}/activities',
  method: 'get',
  data: '?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/lead/v2/leads/{leadId}/activities?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/lead/v2/leads/{leadId}/activities', params={
  'context': {
  "type": "string",
  "enum": [
    "RESELLER",
    "REFERRAL",
    "DEVELOPER",
    "RESELLER_MANAGER",
    "PARTNER",
    "ANONYMOUS"
  ]
},  'companyId': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/lead/v2/leads/{leadId}/activities',
  params: {
  'context' => 'string',
'companyId' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/lead/v2/leads/{leadId}/activities?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "actorCompany": {
        "id": "386626c0-53e2-4515-8450-4a720bb5d029",
        "name": "Reseller Company"
      },
      "allowedResourcesAccess": [
        "ACTOR_COMPANY"
      ],
      "createdOn": 1528922810000,
      "id": "9d0957c8-d78d-44ac-9789-4b60a5859a3a",
      "partner": "APPDIRECT",
      "verb": "LEAD_CONVERSION_REQUESTED",
      "verbContext": "COMPANY"
    },
    {
      "actorCompany": {
        "id": "386626c0-1234-4515-8450-4a720bb5d029",
        "name": "Reseller Company"
      },
      "allowedResourcesAccess": [
        "ACTOR_COMPANY"
      ],
      "createdOn": 1528922659000,
      "id": "259558f5-da66-4ce9-aede-0f15f68478f5",
      "partner": "APPDIRECT",
      "verb": "LEAD_CREATED",
      "verbContext": "COMPANY"
    },
    {
      "actorCompany": {
        "id": "6b4bd452-895d-4098-aaaa-e6046b238e0f",
        "name": "Appdirect"
      },
      "allowedResourcesAccess": [
        "ACTOR_COMPANY"
      ],
      "createdOn": 1528922904000,
      "id": "c6350331-caa9-4942-b53c-611df7d7c1d7",
      "partner": "APPDIRECT",
      "verb": "LEAD_CONVERSION_APPROVED",
      "verbContext": "MARKETPLACE"
    },
    {
      "actorCompany": {
        "id": "386626c0-1234-4515-8450-4a720bb5d029",
        "name": "Reseller Company"
      },
      "allowedResourcesAccess": [
        "ACTOR_COMPANY"
      ],
      "createdOn": 1528922952000,
      "id": "49479105-36a9-4740-b9a3-b768c6755378",
      "partner": "APPDIRECT",
      "verb": "LEAD_CONVERTED",
      "verbContext": "COMPANY"
    },
    {
      "actorCompany": {
        "id": "386626c0-1234-4515-8450-4a720bb5d029",
        "name": "Reseller Company"
      },
      "allowedResourcesAccess": [
        "ACTOR_COMPANY"
      ],
      "contextQuote": {
        "applicationName": "AUTO_WEBAPP_NEW",
        "friendlyId": "I4HNJM",
        "id": "5f7a98c8-deac-40b2-8cef-cd41af042233"
      },
      "createdOn": 1528923325000,
      "id": "45e3a909-e3ec-46fc-8b08-bcc264fdc2f7",
      "partner": "APPDIRECT",
      "verb": "LEAD_QUOTE_LINKED",
      "verbContext": "COMPANY"
    }
  ],
  "page": {
    "number": 0,
    "size": 5,
    "totalElements": 17,
    "totalPages": 4
  }
}

GET/lead/v2/leads/{leadId}/activities

Retrieves a list of all lead activities visible for a given context. You can filter the list using optional query parameters.

Required Scope and Authorization Rules

Scope Rule
ROLE_DEVELOPER Allows access as a Developer for the company
ROLE_REFERRAL Allows access as a Referral for the company
ROLE_RESELLER Allows access as a Reseller for the company
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager for the marketplace

Parameters

Parameter Type Data Type Default Description
*companyId query string Company ID of the user who is retrieving the list
*context query string of enum:
RESELLER
REFERRAL
DEVELOPER
RESELLER_MANAGER
PARTNER
ANONYMOUS
Supported contexts
creationDateOrder query string of enum:
ASC
DESC
DESC Type of ordering used (ascending or descending) for the creation date
fromDate query number Date on which the lead activity was created (lower bound) in Unix timestamp format
*leadId path string Lead ID
page query integer 0 Page number
size query integer 50 Number of results per page
toDate query number Date on which the lead activity was created (upper bound) in Unix timestamp format

Responses

Status Meaning Description Definition
200 OK Success LeadActivityPagedReadResponse
401 Unauthorized Unauthorized
404 Not Found Not Found

Assign lead

Example request

curl -X POST https://{marketplaceURL}/api/lead/v2/assignment?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/lead/v2/assignment?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/lead/v2/assignment',
  method: 'post',
  data: '?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "leadId": "29a1dc26-8088-475c-ba75-7b73915a0fab",
  "recipient": {
    "companyId": "386626c0-1234-4515-8450-4a720bb5d029",
    "participantType": "COMPANY"
  }
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/lead/v2/assignment?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/lead/v2/assignment', params={
  'context': {
  "type": "string",
  "enum": [
    "RESELLER",
    "REFERRAL",
    "DEVELOPER",
    "RESELLER_MANAGER",
    "PARTNER",
    "ANONYMOUS"
  ]
},  'companyId': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/lead/v2/assignment',
  params: {
  'context' => 'string',
'companyId' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/lead/v2/assignment?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "leadId": "29a1dc26-8088-475c-ba75-7b73915a0fab",
  "recipient": {
    "companyId": "386626c0-1234-4515-8450-4a720bb5d029",
    "participantType": "COMPANY"
  }
}

Example response

{
  "lead": {
    "createdOn": 1534465177000,
    "creator": {
      "companyId": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "companyName": "Appdirect",
      "id": "833d4c99-1939-4366-a5ae-6fb7ae3ec1be",
      "role": "RESELLER_MANAGER"
    },
    "customAttributes": {},
    "customer": {
      "company": {
        "city": "Beverly Hills",
        "country": "US",
        "name": "Acme",
        "state": "CA",
        "street1": "1234 Main St",
        "street2": "1st floor",
        "zip": "90210"
      },
      "contact": {
        "email": "john.doe@acme.com",
        "firstName": "John",
        "lastName": "Doe",
        "phone": "+14455555555"
      }
    },
    "id": "29a1dc26-8088-475c-ba75-7b73915a0fab",
    "lastModified": 1534857159000,
    "leadType": "MANUAL",
    "notes": "Some notes",
    "partner": "APPDIRECT",
    "recipient": {
      "companyId": "386626c0-53e2-4515-8450-4a720bb5d029",
      "companyName": "Reseller Company",
      "participantType": "COMPANY"
    },
    "referrer": {
      "participantType": "CHANNEL",
      "partner": "APPDIRECT"
    },
    "status": "ASSIGNED"
  }
}

POST/lead/v2/assignment

Assigns a lead to a Reseller company. The assignee will be able to see that lead as long as is not assigned to another company. The owner of the lead retains visibility even if it is assigned to another company.

Required Scope and Authorization Rules

Scope Rule
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager for the marketplace

Parameters

Parameter Type Data Type Default Description
*companyId query string Company ID of the user who is assigning the lead
*context query string of enum:
RESELLER
REFERRAL
DEVELOPER
RESELLER_MANAGER
PARTNER
ANONYMOUS
Supported contexts

Body Parameters

Information about the person to whom the lead is being assigned

LeadAssignmentRequest object:

Property Type Description
leadId string

Lead ID

recipient LeadParticipant

The participant to whom the lead is being assigned

Responses

Status Meaning Description Definition
201 Created Lead assigned LeadAssignmentResponse
400 Bad Request Error attempting to assign the lead (missing required data, for example)
401 Unauthorized Unauthorized
404 Not Found Not Found

Associate lead

Example request

curl -X POST https://{marketplaceURL}/api/lead/v2/companyAssociation?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/lead/v2/companyAssociation?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/lead/v2/companyAssociation',
  method: 'post',
  data: '?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "leadId": "ce9d1713-7a48-43e4-bb43-b6880a19df24",
  "user": {
    "companyId": "62377315-61ba-4b50-9891-02799bef4257",
    "id": "1661c8d8-357b-4e8d-a0b9-a571ff00924b"
  }
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/lead/v2/companyAssociation?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/lead/v2/companyAssociation', params={
  'context': {
  "type": "string",
  "enum": [
    "RESELLER",
    "REFERRAL",
    "DEVELOPER",
    "RESELLER_MANAGER",
    "PARTNER",
    "ANONYMOUS"
  ]
},  'companyId': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/lead/v2/companyAssociation',
  params: {
  'context' => 'string',
'companyId' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/lead/v2/companyAssociation?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "leadId": "ce9d1713-7a48-43e4-bb43-b6880a19df24",
  "user": {
    "companyId": "62377315-61ba-4b50-9891-02799bef4257",
    "id": "1661c8d8-357b-4e8d-a0b9-a571ff00924b"
  }
}

Example response

{
  "convertedCompany": {
    "id": "62377315-61ba-4b50-9891-02799bef4257",
    "name": "Acme"
  },
  "convertedUser": {
    "companyId": "62377315-61ba-4b50-9891-02799bef4257",
    "id": "1661c8d8-357b-4e8d-a0b9-a571ff00924b"
  },
  "createdOn": 1534845351000,
  "creator": {
    "companyId": "6b4bd452-895d-4098-aa56-e6046b238e0f",
    "companyName": "Appdirect",
    "id": "833d4c99-1939-4366-a5ae-6fb7ae3ec1be",
    "role": "CHANNEL_ADMIN"
  },
  "customAttributes": {},
  "customer": {
    "company": {
      "city": "Beverly Hills",
      "companyExists": true,
      "country": "US",
      "linked": false,
      "name": "Globex",
      "state": "CA",
      "street1": "1234 Main St",
      "zip": "90210"
    },
    "contact": {
      "email": "jane.doe@company.com",
      "firstName": "Jane",
      "lastName": "Doe"
    }
  },
  "id": "ce9d1713-7a48-43e4-bb43-b6880a19df24",
  "lastModified": 1534845352000,
  "leadType": "MANUAL",
  "partner": "APPDIRECT",
  "recipient": {
    "participantType": "CHANNEL",
    "partner": "APPDIRECT"
  },
  "referrer": {
    "participantType": "CHANNEL",
    "partner": "APPDIRECT"
  },
  "status": "SUBMITTED"
}

POST/lead/v2/companyAssociation

Associates a lead with an existing marketplace user and company

Required Scope and Authorization Rules

Scope Rule
ROLE_RESELLER Allows access as a Reseller for the company
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager for the marketplace

Parameters

Parameter Type Data Type Default Description
*companyId query string Company ID of the user who is updating the lead
*context query string of enum:
RESELLER
REFERRAL
DEVELOPER
RESELLER_MANAGER
PARTNER
ANONYMOUS
Supported contexts

Body Parameters

Information about the user/company that the lead is being associated with

LeadCompanyAssociationRequest object:

Property Type Description
leadId string

Lead ID

user LeadUser

The user and company who are being associated with the lead

Responses

Status Meaning Description Definition
200 OK Lead associated LeadResponse
400 Bad Request Error attempting to associate the lead (missing required data, for example)
401 Unauthorized Unauthorized
404 Not Found Not Found

Convert lead

Example request

curl -X POST https://{marketplaceURL}/api/lead/v2/conversion?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string&leadId=type,string \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/lead/v2/conversion?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string&leadId=type,string HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/lead/v2/conversion',
  method: 'post',
  data: '?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string&leadId=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/lead/v2/conversion?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string&leadId=type,string',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/lead/v2/conversion', params={
  'context': {
  "type": "string",
  "enum": [
    "RESELLER",
    "REFERRAL",
    "DEVELOPER",
    "RESELLER_MANAGER",
    "PARTNER",
    "ANONYMOUS"
  ]
},  'companyId': {
  "type": "string"
},  'leadId': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/lead/v2/conversion',
  params: {
  'context' => 'string',
'companyId' => 'string',
'leadId' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/lead/v2/conversion?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string&leadId=type,string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "lead": {
    "convertedCompany": {
      "id": "b3577d6f-8f29-454e-9d9d-da99e1e9618f",
      "name": "Acme"
    },
    "convertedUser": {
      "companyId": "b3577d6f-8f29-454e-9d9d-da99e1e9618f",
      "id": "6f3b8110-4e66-49bd-aec9-2e2fbe8c54ea"
    },
    "createdOn": 1534846329000,
    "customer": {
      "company": {
        "companyExists": true,
        "linked": true,
        "name": "Acme"
      },
      "contact": {
        "email": "john.doe@acme.com",
        "firstName": "John",
        "lastName": "Doe"
      }
    },
    "id": "94890613-265d-4635-93d1-9fdddf70cf73",
    "lastModified": 1534985564812,
    "leadType": "COMPANY",
    "partner": "APPDIRECT",
    "profileCompany": {
      "id": "386626c0-53e2-4515-8450-4a720bb5d029",
      "name": "Reseller Company"
    },
    "recipient": {
      "companyId": "386626c0-53e2-4515-8450-4a720bb5d029",
      "companyName": "Reseller Company",
      "participantType": "COMPANY"
    },
    "referrer": {
      "participantType": "CHANNEL",
      "partner": "APPDIRECT"
    },
    "reseller": {
      "companyId": "386626c0-1234-4515-8450-4a720bb5d029",
      "id": "01d75b7c-ea78-4dc2-9e58-6ad217bddcbd"
    },
    "status": "CONVERTED"
  }
}

POST/lead/v2/conversion

Converts the lead to a marketplace company

Required Scope and Authorization Rules

Scope Rule
ROLE_RESELLER Allows access as a Reseller for the company

Parameters

Parameter Type Data Type Default Description
*companyId query string Company ID of the user who is converting the lead
*context query string of enum:
RESELLER
REFERRAL
DEVELOPER
RESELLER_MANAGER
PARTNER
ANONYMOUS
Supported contexts
*leadId query string Lead ID

Responses

Status Meaning Description Definition
200 OK Success LeadConversionResponse
400 Bad Request Error attempting to convert the lead (for example, it is not possible to convert the lead)
401 Unauthorized Unauthorized
404 Not Found Not Found
409 Conflict Conflict

Approve conversion request

Example request

curl -X POST https://{marketplaceURL}/api/lead/v2/conversionApproval?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&leadId=type,string \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/lead/v2/conversionApproval?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&leadId=type,string HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/lead/v2/conversionApproval',
  method: 'post',
  data: '?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&leadId=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/lead/v2/conversionApproval?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&leadId=type,string',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/lead/v2/conversionApproval', params={
  'context': {
  "type": "string",
  "enum": [
    "RESELLER",
    "REFERRAL",
    "DEVELOPER",
    "RESELLER_MANAGER",
    "PARTNER",
    "ANONYMOUS"
  ]
},  'leadId': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/lead/v2/conversionApproval',
  params: {
  'context' => 'string',
'leadId' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/lead/v2/conversionApproval?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&leadId=type,string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "lead": {
    "createdOn": 1534846329000,
    "customAttributes": {},
    "customer": {
      "company": {
        "name": "Acme"
      },
      "contact": {
        "email": "john.doe@acme.com",
        "firstName": "John",
        "lastName": "Doe"
      }
    },
    "id": "94890613-265d-4635-93d1-9fdddf70cf73",
    "lastModified": 1534984995000,
    "leadType": "COMPANY",
    "partner": "APPDIRECT",
    "profileCompany": {
      "id": "386626c0-1234-4515-8450-4a720bb5d029",
      "name": "Reseller Company"
    },
    "recipient": {
      "companyId": "386626c0-1234-4515-8450-4a720bb5d029",
      "companyName": "Reseller Company",
      "participantType": "COMPANY"
    },
    "referrer": {
      "participantType": "CHANNEL",
      "partner": "APPDIRECT"
    },
    "status": "CONVERSION_APPROVED"
  }
}

POST/lead/v2/conversionApproval

Approves the conversion request made by a Reseller company

Required Scope and Authorization Rules

Scope Rule
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager for the marketplace

Parameters

Parameter Type Data Type Default Description
*context query string of enum:
RESELLER
REFERRAL
DEVELOPER
RESELLER_MANAGER
PARTNER
ANONYMOUS
Supported contexts
*leadId query string Lead ID

Responses

Status Meaning Description Definition
200 OK Lead conversion approval successful LeadConversionResponse
400 Bad Request Error attempting to approve the request (for example, conversion is already approved)
401 Unauthorized Unauthorized
404 Not Found Not Found

Request conversion approval

Example request

curl -X POST https://{marketplaceURL}/api/lead/v2/conversionRequest?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string&leadId=type,string \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/lead/v2/conversionRequest?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string&leadId=type,string HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/lead/v2/conversionRequest',
  method: 'post',
  data: '?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string&leadId=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/lead/v2/conversionRequest?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string&leadId=type,string',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/lead/v2/conversionRequest', params={
  'context': {
  "type": "string",
  "enum": [
    "RESELLER",
    "REFERRAL",
    "DEVELOPER",
    "RESELLER_MANAGER",
    "PARTNER",
    "ANONYMOUS"
  ]
},  'companyId': {
  "type": "string"
},  'leadId': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/lead/v2/conversionRequest',
  params: {
  'context' => 'string',
'companyId' => 'string',
'leadId' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/lead/v2/conversionRequest?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string&leadId=type,string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "lead": {
    "createdOn": 1534846329000,
    "customAttributes": {},
    "customer": {
      "company": {
        "name": "Acme"
      },
      "contact": {
        "email": "john.doe@acme.com",
        "firstName": "John",
        "lastName": "Doe"
      }
    },
    "id": "94890613-265d-4635-93d1-9fdddf70cf73",
    "lastModified": 1534846331000,
    "leadType": "COMPANY",
    "partner": "APPDIRECT",
    "profileCompany": {
      "id": "386626c0-1234-4515-8450-4a720bb5d029",
      "name": "Reseller Company"
    },
    "recipient": {
      "participantType": "CHANNEL",
      "partner": "APPDIRECT"
    },
    "referrer": {
      "companyId": "386626c0-1234-4515-8450-4a720bb5d029",
      "companyName": "Reseller Company",
      "participantType": "COMPANY"
    },
    "status": "PENDING_CONVERSION_APPROVAL"
  }
}

POST/lead/v2/conversionRequest

Request permission to convert the lead to a marketplace company

Required Scope and Authorization Rules

Scope Rule
ROLE_RESELLER Allows access as a Reseller for the company

Parameters

Parameter Type Data Type Default Description
*companyId query string Company ID of the user who is requesting the lead conversion
*context query string of enum:
RESELLER
REFERRAL
DEVELOPER
RESELLER_MANAGER
PARTNER
ANONYMOUS
Supported contexts
*leadId query string Lead ID

Responses

Status Meaning Description Definition
200 OK Lead conversion request successful LeadConversionResponse
400 Bad Request Error attempting to request approval (for example, approval has already been requested)
401 Unauthorized Unauthorized
404 Not Found Not Found

Create lead

Example request

curl -X POST https://{marketplaceURL}/api/lead/v2/leads?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string&userId=type,string \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/lead/v2/leads?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string&userId=type,string HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/lead/v2/leads',
  method: 'post',
  data: '?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string&userId=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "customer": {
    "company": {
      "city": "Miami",
      "country": "US",
      "name": "Acme",
      "state": "FL",
      "street1": "1234 Main St",
      "street2": "30th Floor, Apt B",
      "zip": "33033"
    },
    "contact": {
      "email": "john.doe@acme.com",
      "firstName": "John",
      "lastName": "Doe",
      "phone": "+13055555555"
    }
  },
  "leadType": "MANUAL",
  "partner": "APPDIRECT"
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/lead/v2/leads?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string&userId=type,string',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/lead/v2/leads', params={
  'context': {
  "type": "string",
  "enum": [
    "RESELLER",
    "REFERRAL",
    "DEVELOPER",
    "RESELLER_MANAGER",
    "PARTNER",
    "ANONYMOUS"
  ]
},  'companyId': {
  "type": "string"
},  'userId': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/lead/v2/leads',
  params: {
  'context' => 'string',
'companyId' => 'string',
'userId' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/lead/v2/leads?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string&userId=type,string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "customer": {
    "company": {
      "city": "Miami",
      "country": "US",
      "name": "Acme",
      "state": "FL",
      "street1": "1234 Main St",
      "street2": "30th Floor, Apt B",
      "zip": "33033"
    },
    "contact": {
      "email": "john.doe@acme.com",
      "firstName": "John",
      "lastName": "Doe",
      "phone": "+13055555555"
    }
  },
  "leadType": "MANUAL",
  "partner": "APPDIRECT"
}

Example response

{
  "createdOn": 1534875428054,
  "creator": {
    "companyId": "fb2ea14d-2be2-4572-b607-2d70500c14f3",
    "companyName": "Referral Company",
    "id": "e0f7521e-a297-4d02-942e-a8ee3216d5e5",
    "role": "REFERRAL"
  },
  "customer": {
    "company": {
      "city": "Miami",
      "country": "US",
      "name": "Acme",
      "state": "FL",
      "street1": "1234 Main St",
      "street2": "30th Floor, Apt B",
      "zip": "33033"
    },
    "contact": {
      "email": "john.doe@companysrl.com",
      "firstName": "John",
      "lastName": "Doe",
      "phone": "+13055555555"
    }
  },
  "id": "cc146924-afe3-4f6f-b368-2279e1e2039e",
  "lastModified": 1534875428054,
  "leadType": "MANUAL",
  "partner": "APPDIRECT",
  "recipient": {
    "companyId": "fb2ea14d-2be2-4572-b607-2d70500c14f3",
    "companyName": "Referral Company",
    "participantType": "COMPANY"
  },
  "referrer": {
    "companyId": "fb2ea14d-2be2-4572-b607-2d70500c14f3",
    "companyName": "Referral Company",
    "participantType": "COMPANY"
  },
  "status": "ASSIGNED"
}

POST/lead/v2/leads

Creates a manual, company profile or product profile lead. Manual leads are visible to only those who created them. Company profile leads are visible to the Reseller that created the profile page as well as the Reseller Managers and Marketplace Managers. Product profile leads are visible to Marketplace Managers and Reseller Managers and can be configured so that the Developers who own the product profile can also see them.
Required parameters:
Company name
Contact email
Lead type
Partner
If the lead type is PRODUCT, the product ID
If the lead type is COMPANY, the reseller company ID
The required parameter correspond to the request payload in LeadCreationRequest

Required Scope and Authorization Rules

Scope Rule
ROLE_DEVELOPER Allows access as a Developer for the company
ROLE_PARTNER Allows access to read and write all Marketplace data. Non-interactive OAuth 1.0 credentials with read and write access are required to use this scope. The companyId, userId, and context parameters are also required.
ROLE_REFERRAL Allows access as a Referral for the company
ROLE_RESELLER Allows access as a Reseller for the company
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager for the marketplace

Parameters

Parameter Type Data Type Default Description
*companyId query string Company ID of the user who is creating the lead. Only required when creating a lead of type MANUAL.
*context query string of enum:
RESELLER
REFERRAL
DEVELOPER
RESELLER_MANAGER
PARTNER
ANONYMOUS
The supported lead's API contexts. ANONYMOUS context can be used to create a PRODUCT or COMPANY lead without authentication.
*userId query string User ID of the user who is creating the lead. Only required when using OAuth credentials with role PARTNER to create a lead of type MANUAL. In this case, the user ID must correspond to a marketplace user who has the Marketplace Manager role. The user must be a member of a company that has marketplace access.

Body Parameters

Information about the lead to create

LeadCreationRequest object:

Property Type Description
creator LeadUser

Information about the marketplace user who created the lead (required if the lead type is MANUAL)

customAttributes object

Custom attributes associated with the lead. This is a key-value object where the values are a set of strings associated with a given key, which is also a String.

customer LeadCustomer

Information about the customer and the customer's company

leadType LeadType

Lead type

notes string

Notes attached to the lead

partner string

Marketplace partner code

profileCompany LeadCompany

Information about the company profile from which the lead originated (required if the lead type is COMPANY)

profileProduct LeadProduct

Information about the product profile from which the lead originated (required if the lead type is PRODUCT)

profileProductEdition LeadProductEdition

Information about the edition from the product profile from which the lead originated (required if the lead type is PRODUCT). This object also requires profileProduct.

reseller LeadUser

Information about the reseller associated with the lead (required if the lead was created manually by a reseller)

Responses

Status Meaning Description Definition
201 Created Lead created LeadResponse
400 Bad Request Error attempting to create the lead (missing required data, for example)
401 Unauthorized Unauthorized
404 Not Found Not Found

Discard lead

Example request

curl -X DELETE https://{marketplaceURL}/api/lead/v2/leads/{leadId}?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/lead/v2/leads/{leadId}?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/lead/v2/leads/{leadId}',
  method: 'delete',
  data: '?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/lead/v2/leads/{leadId}?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string',
{
  method: 'DELETE'

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/lead/v2/leads/{leadId}', params={
  'context': {
  "type": "string",
  "enum": [
    "RESELLER",
    "REFERRAL",
    "DEVELOPER",
    "RESELLER_MANAGER",
    "PARTNER",
    "ANONYMOUS"
  ]
},  'companyId': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/lead/v2/leads/{leadId}',
  params: {
  'context' => 'string',
'companyId' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/lead/v2/leads/{leadId}?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE/lead/v2/leads/{leadId}

Deletes or disqualifies a lead (depending on type and assignment)

Required Scope and Authorization Rules

Scope Rule
ROLE_DEVELOPER Allows access as a Developer for the company
ROLE_REFERRAL Allows access as a Referral for the company
ROLE_RESELLER Allows access as a Reseller for the company
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager for the marketplace

Parameters

Parameter Type Data Type Default Description
*companyId query string Company ID of the user who is discarding the lead
*context query string of enum:
RESELLER
REFERRAL
DEVELOPER
RESELLER_MANAGER
PARTNER
ANONYMOUS
Supported contexts
*leadId path string Lead ID

Responses

Status Meaning Description Definition
204 No Content Lead deleted or disqualified
400 Bad Request Error attempting to discard a lead that cannot be deleted or disqualified
401 Unauthorized Unauthorized
404 Not Found Not Found

List leads

Example request

curl -X GET https://{marketplaceURL}/api/lead/v2/leads?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/lead/v2/leads?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/lead/v2/leads',
  method: 'get',
  data: '?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/lead/v2/leads?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/lead/v2/leads', params={
  'context': {
  "type": "string",
  "enum": [
    "RESELLER",
    "REFERRAL",
    "DEVELOPER",
    "RESELLER_MANAGER",
    "PARTNER",
    "ANONYMOUS"
  ]
},  'companyId': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/lead/v2/leads',
  params: {
  'context' => 'string',
'companyId' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/lead/v2/leads?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "createdOn": 1534531428,
      "creator": {
        "companyId": "6b4bd452-895d-4098-aa56-e6046b238e0f",
        "companyName": "AppDirect",
        "id": "833d4c99-1939-4366-a5ae-6fb7ae3ec1be",
        "role": "CHANNEL_ADMIN"
      },
      "customAttributes": {},
      "customer": {
        "company": {
          "city": "Beverly Hills",
          "country": "US",
          "name": "Acme",
          "state": "CA",
          "street1": "1234 Main St",
          "zip": "90210"
        },
        "contact": {
          "email": "john.doe@acme.com",
          "firstName": "John",
          "lastName": "Doe",
          "phone": "+14455555555"
        }
      },
      "id": "29a1dc26-8088-475c-ba75-7b73915a0fab",
      "lastModified": 1534531428,
      "leadType": "MANUAL",
      "partner": "APPDIRECT",
      "recipient": {
        "participantType": "CHANNEL",
        "partner": "APPDIRECT"
      },
      "referrer": {
        "participantType": "CHANNEL",
        "partner": "APPDIRECT"
      },
      "status": "SUBMITTED"
    },
    {
      "convertedCompany": {
        "id": "dba89c75-f10c-4314-8a98-0692d04594d3",
        "name": "Acme"
      },
      "convertedUser": {
        "companyId": "dba89c75-f10c-4314-8a98-0692d04594d3",
        "id": "ad38f05b-7508-4c70-8ef8-c7929f35e414"
      },
      "createdOn": 1534531428,
      "creator": {
        "companyId": "386626c0-53e2-4515-8450-4a720bb5d029",
        "companyName": "Reseller Company",
        "id": "01d75b7c-ea78-4dc2-9e58-6ad217bddcbd",
        "role": "RESELLER"
      },
      "customAttributes": {},
      "customer": {
        "company": {
          "city": "Beverly Hills",
          "companyExists": true,
          "country": "US",
          "name": "Globex",
          "state": "CA",
          "street1": "5678 Main Av",
          "zip": "90210"
        },
        "contact": {
          "email": "jane.doe@globex.com",
          "firstName": "Jane",
          "lastName": "Doe",
          "phone": "+18008888080"
        }
      },
      "id": "acfce97c-5428-4310-b841-3bf7cca4e047",
      "lastModified": 1534531428,
      "leadType": "MANUAL",
      "partner": "APPDIRECT",
      "recipient": {
        "companyId": "386626c0-53e2-4515-8450-4a720bb5d029",
        "companyName": "Reseller Company",
        "participantType": "COMPANY"
      },
      "referrer": {
        "participantType": "CHANNEL",
        "partner": "APPDIRECT"
      },
      "reseller": {
        "companyId": "386626c0-53e2-4515-8450-4a720bb5d029",
        "id": "01d75b7c-ea78-4dc2-9e58-6ad217bddcbd"
      },
      "result": "WON",
      "status": "CONVERTED"
    }
  ],
  "page": {
    "number": 0,
    "size": 10,
    "totalElements": 2,
    "totalPages": 1
  }
}

GET/lead/v2/leads

Retrieves a list of all leads visible for a given context. You can filter the list using optional query parameters. Manual leads are visible to only those who created them. Company profile leads are visible to the Reseller that created the profile page as well as the Reseller Managers and Marketplace Managers. Product profile leads are visible to Marketplace Managers and Reseller Managers and can be configured so that the Developers who own the product profile can also see them.

Required Scope and Authorization Rules

Scope Rule
ROLE_DEVELOPER Allows access as a Developer for the company
ROLE_REFERRAL Allows access as a Referral for the company
ROLE_RESELLER Allows access as a Reseller for the company
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager for the marketplace

Parameters

Parameter Type Data Type Default Description
*companyId query string Company ID of the user who retrieved the list
*context query string of enum:
RESELLER
REFERRAL
DEVELOPER
RESELLER_MANAGER
PARTNER
ANONYMOUS
Supported contexts
fromDate query number Date on which the lead was created (lower bound) in Unix timestamp format
page query integer 0 Page number
searchText query string Search text, which filters the list of leads
size query integer 50 Number of results per page
sortField query string of enum:
DATE
COMPANY_NAME
DATE The field by which to order the results
sortOrder query string of enum:
ASC
DESC
DESC Type of ordering used (ascending or descending)
status query string of enum:
CONVERTED
DISQUALIFIED
DELETED
PENDING_CONVERSION_APPROVAL
CONVERSION_APPROVED
PENDING_SUBMISSION
SUBMITTED
ASSIGNED
LEGACY
PENDING_FOR_MANAGERS
ACCEPTED_FOR_MANAGERS
Lead status
toDate query number Date on which the lead was created (upper bound) in Unix timestamp format

Responses

Status Meaning Description Definition
200 OK Success LeadPagedReadResponse
401 Unauthorized Unauthorized
404 Not Found Not Found

Get lead details

Example request

curl -X GET https://{marketplaceURL}/api/lead/v2/leads/{leadId}?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/lead/v2/leads/{leadId}?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/lead/v2/leads/{leadId}',
  method: 'get',
  data: '?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/lead/v2/leads/{leadId}?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/lead/v2/leads/{leadId}', params={
  'context': {
  "type": "string",
  "enum": [
    "RESELLER",
    "REFERRAL",
    "DEVELOPER",
    "RESELLER_MANAGER",
    "PARTNER",
    "ANONYMOUS"
  ]
},  'companyId': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/lead/v2/leads/{leadId}',
  params: {
  'context' => 'string',
'companyId' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/lead/v2/leads/{leadId}?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "createdOn": 1534465177000,
  "creator": {
    "companyId": "6b4bd452-895d-4098-aa56-e6046b238e0f",
    "companyName": "AppDirect",
    "id": "833d4c99-1939-4366-a5ae-6fb7ae3ec1be",
    "role": "CHANNEL_ADMIN"
  },
  "customAttributes": {},
  "customer": {
    "company": {
      "city": "Beverly Hills",
      "country": "US",
      "name": "Acme",
      "state": "CA",
      "street1": "1234 Main St",
      "zip": "90210"
    },
    "contact": {
      "email": "john.doe@acme.com",
      "firstName": "John",
      "lastName": "Doe",
      "phone": "+14455555555"
    }
  },
  "id": "29a1dc26-8088-475c-ba75-7b73915a0fab",
  "lastModified": 1534465179000,
  "leadType": "MANUAL",
  "partner": "APPDIRECT",
  "recipient": {
    "participantType": "CHANNEL",
    "partner": "APPDIRECT"
  },
  "referrer": {
    "participantType": "CHANNEL",
    "partner": "APPDIRECT"
  },
  "status": "SUBMITTED"
}

GET/lead/v2/leads/{leadId}

Retrieves a single lead and its details

Required Scope and Authorization Rules

Scope Rule
ROLE_DEVELOPER Allows access as a Developer for the company
ROLE_REFERRAL Allows access as a Referral for the company
ROLE_RESELLER Allows access as a Reseller for the company
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager for the marketplace

Parameters

Parameter Type Data Type Default Description
*companyId query string Company ID of the user who is retrieving the lead
*context query string of enum:
RESELLER
REFERRAL
DEVELOPER
RESELLER_MANAGER
PARTNER
ANONYMOUS
Supported contexts
*leadId path string Lead ID

Responses

Status Meaning Description Definition
200 OK Success LeadResponse
401 Unauthorized Unauthorized
404 Not Found Not Found

Update lead

Example request

curl -X PATCH https://{marketplaceURL}/api/lead/v2/leads/{leadId}?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PATCH https://{marketplaceURL}/api/lead/v2/leads/{leadId}?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/lead/v2/leads/{leadId}',
  method: 'patch',
  data: '?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "customer": {
    "company": {
      "name": "Globex",
      "street2": "5th floor"
    },
    "contact": {
      "email": "jane.doe@globex.com",
      "firstName": "Jane",
      "lastName": "Doe"
    }
  },
  "notes": "Updated company name, added floor and changed person to be contacted"
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/lead/v2/leads/{leadId}?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.patch('https://{marketplaceURL}/api/lead/v2/leads/{leadId}', params={
  'context': {
  "type": "string",
  "enum": [
    "RESELLER",
    "REFERRAL",
    "DEVELOPER",
    "RESELLER_MANAGER",
    "PARTNER",
    "ANONYMOUS"
  ]
},  'companyId': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.patch 'https://{marketplaceURL}/api/lead/v2/leads/{leadId}',
  params: {
  'context' => 'string',
'companyId' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/lead/v2/leads/{leadId}?context=type,string,enum,RESELLER%2CREFERRAL%2CDEVELOPER%2CRESELLER_MANAGER%2CPARTNER%2CANONYMOUS&companyId=type,string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "customer": {
    "company": {
      "name": "Globex",
      "street2": "5th floor"
    },
    "contact": {
      "email": "jane.doe@globex.com",
      "firstName": "Jane",
      "lastName": "Doe"
    }
  },
  "notes": "Updated company name, added floor and changed person to be contacted"
}

Example response

{
  "createdOn": 1534465177000,
  "creator": {
    "companyId": "6b4bd452-895d-4098-aa56-e6046b238e0f",
    "companyName": "Appdirect",
    "id": "833d4c99-1939-4366-a5ae-6fb7ae3ec1be",
    "role": "CHANNEL_ADMIN"
  },
  "customAttributes": {},
  "customer": {
    "company": {
      "city": "Beverly Hills",
      "country": "US",
      "name": "Globex",
      "state": "CA",
      "street1": "1234 Main St",
      "street2": "5th floor",
      "zip": "90210"
    },
    "contact": {
      "email": "jane.doe@globex.com",
      "firstName": "Jane",
      "lastName": "Jane",
      "phone": "+14455555555"
    }
  },
  "id": "29a1dc26-8088-475c-ba75-7b73915a0fab",
  "lastModified": 1534857159000,
  "leadType": "MANUAL",
  "notes": "Updated company name, added floor and changed person to be contacted",
  "partner": "APPDIRECT",
  "recipient": {
    "participantType": "CHANNEL",
    "partner": "APPDIRECT"
  },
  "referrer": {
    "participantType": "CHANNEL",
    "partner": "APPDIRECT"
  },
  "status": "SUBMITTED"
}

PATCH/lead/v2/leads/{leadId}

Updates the contact information or notes from a lead

Required Scope and Authorization Rules

Scope Rule
ROLE_DEVELOPER Allows access as a Developer for the company
ROLE_REFERRAL Allows access as a Referral for the company
ROLE_RESELLER Allows access as a Reseller for the company
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager for the marketplace

Parameters

Parameter Type Data Type Default Description
*companyId query string Company ID of the user who is updating the lead
*context query string of enum:
RESELLER
REFERRAL
DEVELOPER
RESELLER_MANAGER
PARTNER
ANONYMOUS
Supported contexts
*leadId path string Lead ID

Body Parameters

Information about the lead to update

LeadUpdateRequest object:

Property Type Description
customer LeadCustomer

Information about the customer and the customer's company

notes string

Notes attached to the lead

Responses

Status Meaning Description Definition
200 OK Success LeadResponse
400 Bad Request Error attempting to update a lead (for example, it is not possible to modify the lead)
401 Unauthorized Unauthorized
404 Not Found Not Found

Marketplace Product Settings

Retrieve active settings for a given marketplace

Example request

curl -X GET https://{marketplaceURL}/api/v3/marketplaceProduct/activeSettings/{productId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/v3/marketplaceProduct/activeSettings/{productId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/v3/marketplaceProduct/activeSettings/{productId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/v3/marketplaceProduct/activeSettings/{productId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/v3/marketplaceProduct/activeSettings/{productId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/v3/marketplaceProduct/activeSettings/{productId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/v3/marketplaceProduct/activeSettings/{productId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "productInformation": {
    "appFromNetwork": false,
    "productName": "AUTO_WEBAPP_NEW"
  },
  "showAPIHealthMaintenanceContainer": true,
  "showAdditionalSettingsContainer": false,
  "showAsComingSoon": true,
  "showAttributesContainer": true,
  "showBillingCycleStartDay": false,
  "showBillingPatternsContainer": false,
  "showBillingSettingsContainer": true,
  "showBillingTab": true,
  "showCategoriesContainer": true,
  "showCollectLeads": true,
  "showCompanyGroupSegmentsContainer": true,
  "showCustomerGroupsContainer": true,
  "showDisableSelfService": false,
  "showFID1Number": false,
  "showFreeTrialBillingOptionsContainer": true,
  "showHideAllPricing": true,
  "showMerchandisingOptionsContainer": true,
  "showProductLinesContainer": true,
  "showProductTab": true,
  "showSKUsContainer": false,
  "showSellDomainAsStandalone": false,
  "showSettingsContainer": true,
  "showSetupFeeTaxCode": false,
  "showSkipFirstPayment": false,
  "showSortingRank": true,
  "showTaxCode": true,
  "showTermsOfServiceURL": false,
  "showVisibleOnMarketplace": true,
  "showVisibleOnNetwork": true
}

GET/v3/marketplaceProduct/activeSettings/{productId}

Retrieve the settings, sections, tabs that should be visible to end user on the marketplace product settings UI for a given marketplace.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_PRODUCT_SUPPORT Allows access as a Product Support agent for the marketplace.

Parameters

Parameter Type Data Type Default Description
*productId path integer The product identifier

Responses

Status Meaning Description Definition
200 OK Success MarketplaceProductSettingActiveComponentsWS
401 Unauthorized Unauthorized
404 Not Found Product not found
500 Internal Server Error Internal server error

Retrieve product settings on a given marketplace

Example request

curl -X GET https://{marketplaceURL}/api/v3/marketplaceProduct/productSettings/{productId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/v3/marketplaceProduct/productSettings/{productId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/v3/marketplaceProduct/productSettings/{productId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/v3/marketplaceProduct/productSettings/{productId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/v3/marketplaceProduct/productSettings/{productId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/v3/marketplaceProduct/productSettings/{productId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/v3/marketplaceProduct/productSettings/{productId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "billing": {
    "billingSettings": {
      "billingCycle": {
        "options": [
          "MP_DEFAULT_CYCLE",
          "FIRST_DAY_OF_THE_MONTH",
          "LAST_DAY_OF_THE_MONTH",
          "PURCHASE_DAY",
          "CUSTOM_DAY_OF_THE_MONTH"
        ],
        "selectedOption": "FIRST_DAY_OF_THE_MONTH",
        "startDay": 1
      },
      "setupFeeTaxCode": "DEF456",
      "skipFirstPayment": true,
      "taxCode": "ABC123",
      "validations": [
        {
          "field": "startDay",
          "maxValue": 31,
          "minValue": 1,
          "numeric": true
        },
        {
          "field": "taxCode",
          "maxLength": 255
        },
        {
          "field": "setupFeeTaxCode",
          "maxLength": 25
        }
      ]
    },
    "freeTrialBillingOptions": [
      {
        "automaticUpgradeToPaidEnabled": true,
        "editionId": 9890,
        "editionName": "Free Trial",
        "requireBillingInfo": true
      }
    ],
    "skuSettings": {
      "editionPricingItems": [
        {
          "editionName": "Free Trial Edition",
          "paymentPlanId": 123,
          "skus": [
            {
              "fid1": "yyyy-yyyyyy-yyyy",
              "price": "$0.03",
              "pricingItemId": 20423,
              "sku": "A1B2C3"
            },
            {
              "fid1": "yyyy-yyyyyy-yyyy",
              "price": "$0.17",
              "pricingItemId": 20424,
              "sku": "321CBA"
            }
          ]
        }
      ],
      "validations": [
        {
          "alphanumeric": true,
          "field": "sku",
          "maxLength": 6,
          "minLength": 6,
          "required": true
        },
        {
          "field": "fid1",
          "maxLength": 25,
          "minLength": 2,
          "required": false
        }
      ]
    }
  },
  "general": {
    "additionalSettings": {
      "validations": [
        {
          "field": "externalIdentifier",
          "maxLength": 36
        },
        {
          "field": "productStockNumber",
          "maxLength": 36
        }
      ]
    },
    "apiHealthMaintenance": {
      "assignAndUnassign": {
        "disabled": true,
        "tooltip": "This endpoint has been disabled by the developer.",
        "value": false
      },
      "purchase": {
        "disabled": false,
        "value": true
      },
      "singleSignOn": {
        "disabled": false,
        "value": false
      },
      "updateSubscription": {
        "disabled": true,
        "tooltip": "The product is part of a bundle.",
        "value": true
      }
    },
    "settings": {
      "collectLeads": {
        "assignLeadsToDevelopers": false,
        "editionLeadGenEnabled": false,
        "enabled": true,
        "options": [
          "inAdditionToPurchase",
          "insteadOfPurchase"
        ],
        "selectedOption": "inAdditionToPurchase"
      },
      "disableSelfServe": true,
      "hideAllPricing": true,
      "sellDomainAsStandalone": true,
      "showAsComingSoon": true,
      "sortingRank": {
        "options": [
          "Very High",
          "High",
          "Medium",
          "Low",
          "Very Low"
        ],
        "selectedOption": "Very Low"
      },
      "termsOfServiceURL": "http://www.google.com",
      "validations": [
        {
          "field": "termsOfServiceURL",
          "maxLength": 1024
        }
      ],
      "visibleOnMarketplace": true,
      "visibleOnNetwork": true
    }
  },
  "productGroups": {
    "attributes": [
      {
        "attributeId": 56,
        "name": "English",
        "options": [
          {
            "attributeOptionId": 128,
            "name": "EngOpt1",
            "selected": true
          },
          {
            "attributeOptionId": 129,
            "name": "EngOpt2",
            "selected": false
          },
          {
            "attributeOptionId": 130,
            "name": "EngOpt3",
            "selected": false
          },
          {
            "attributeOptionId": 131,
            "name": "EngOpt4",
            "selected": false
          },
          {
            "attributeOptionId": 132,
            "name": "EngOpt5",
            "selected": false
          },
          {
            "attributeOptionId": 133,
            "name": "EngOpt6",
            "selected": false
          },
          {
            "attributeOptionId": 134,
            "name": "EngOpt7",
            "selected": false
          }
        ],
        "required": false
      }
    ],
    "categories": {
      "options": [
        {
          "categoryId": 0,
          "name": "Select a Category",
          "subCategories": [
            {
              "name": "Select a Sub Category",
              "subCategoryId": 0
            }
          ]
        },
        {
          "categoryId": 186,
          "name": "Numbers",
          "subCategories": [
            {
              "name": "Select a Sub Category",
              "subCategoryId": 0
            },
            {
              "name": "One",
              "subCategoryId": 113
            },
            {
              "name": "Two",
              "subCategoryId": 114
            }
          ]
        }
      ],
      "required": false,
      "selectedOptions": [
        {
          "categoryId": 0,
          "subCategoryId": 0
        },
        {
          "categoryId": 186,
          "subCategoryId": 0
        },
        {
          "categoryId": 186,
          "subCategoryId": 115
        }
      ],
      "tooltip": "Add categories to your application"
    },
    "customerGroups": [
      {
        "name": "New Customer Group",
        "options": [
          {
            "industryId": 55,
            "name": "Industry1",
            "selected": true
          },
          {
            "industryId": 56,
            "name": "Industry2",
            "selected": false
          }
        ],
        "required": true,
        "userAttributeId": 31
      }
    ],
    "merchandisingOptions": {
      "badges": {
        "options": [
          {
            "badgeId": 7,
            "imageUrl": "common_resources/attributeOptions/128/badge.png?e5dc31b07b947203ce979bd55032f960",
            "name": "EngOpt1",
            "position": 1
          },
          {
            "badgeId": 8,
            "imageUrl": "common_resources/attributeOptions/129/badge.png?e5dc31b07b947203ce979bd55032f960",
            "name": "EngOpt2",
            "position": 2
          },
          {
            "badgeId": 9,
            "imageUrl": "common_resources/attributeOptions/130/badge.png?fd55e224f0cc01dd33f6ae864002e880",
            "name": "EngOpt3"
          },
          {
            "badgeId": 10,
            "imageUrl": "common_resources/attributeOptions/null/badge.png?e5dc31b07b947203ce979bd55032f960",
            "name": "EngOpt4"
          }
        ],
        "selectedOptions": [
          7,
          8
        ]
      },
      "ribbons": {
        "options": [
          {
            "ribbonId": 0,
            "text": "Choose One"
          },
          {
            "color": "#0004FF",
            "ribbonId": 8,
            "text": "Discount",
            "textColor": "#FFFFF"
          },
          {
            "color": "#0004FF",
            "ribbonId": 7,
            "text": "Free",
            "textColor": "#FFFFF"
          },
          {
            "color": "#0004FF",
            "ribbonId": 9,
            "text": "Special",
            "textColor": "#FFFFF"
          }
        ],
        "selectedOption": 7
      }
    },
    "productLines": [
      {
        "name": "MSFT",
        "productLineId": 1,
        "selected": false
      }
    ],
    "segmentSelections": {
      "availableCompanyGroups": [
        {
          "id": "1b0cc1f0-4945-4c6a-989c-d5f350a1b9d1",
          "name": "cda",
          "segments": [
            {
              "id": "e96f1bd2-c6c7-4546-ad9c-518f5ff650a9",
              "name": "fd"
            }
          ]
        }
      ],
      "selectedSegments": [
        "e96f1bd2-c6c7-4546-ad9c-518f5ff650a9"
      ]
    }
  },
  "productInformation": {
    "appFromNetwork": false,
    "iconUrl": "https://ad-dev-dump1.s3.amazonaws.com/app_resources/157/thumbs_64/img7932941780668708927.png",
    "productName": "AUTO_WEBAPP_NEW"
  }
}

GET/v3/marketplaceProduct/productSettings/{productId}

Retrieve product settings, including product information, general settings, product group, and billing settings for a product on a given marketplace.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_PRODUCT_SUPPORT Allows access as a Product Support agent for the marketplace.

Parameters

Parameter Type Data Type Default Description
*productId path integer The product identifier

Responses

Status Meaning Description Definition
200 OK Success MarketplaceProductSettingsWS
401 Unauthorized Unauthorized
404 Not Found Product not found
500 Internal Server Error Internal server error

Update product settings on a given marketplace

Example request

curl -X PUT https://{marketplaceURL}/api/v3/marketplaceProduct/productSettings/{productId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/v3/marketplaceProduct/productSettings/{productId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/v3/marketplaceProduct/productSettings/{productId}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "billing": {
    "billingSettings": {
      "billingCycle": {
        "options": [
          "MP_DEFAULT_CYCLE",
          "FIRST_DAY_OF_THE_MONTH",
          "LAST_DAY_OF_THE_MONTH",
          "PURCHASE_DAY",
          "CUSTOM_DAY_OF_THE_MONTH"
        ],
        "selectedOption": "FIRST_DAY_OF_THE_MONTH",
        "startDay": 1
      },
      "setupFeeTaxCode": "DEF456",
      "skipFirstPayment": true,
      "taxCode": "ABC123",
      "validations": [
        {
          "field": "startDay",
          "maxValue": 31,
          "minValue": 1,
          "numeric": true
        },
        {
          "field": "taxCode",
          "maxLength": 255
        },
        {
          "field": "setupFeeTaxCode",
          "maxLength": 25
        }
      ]
    },
    "freeTrialBillingOptions": [
      {
        "automaticUpgradeToPaidEnabled": true,
        "editionId": 9890,
        "editionName": "Free Trial",
        "requireBillingInfo": true
      }
    ],
    "skuSettings": {
      "editionPricingItems": [
        {
          "editionName": "Free Trial Edition",
          "paymentPlanId": 123,
          "skus": [
            {
              "fid1": "yyyy-yyyyyy-yyyy",
              "price": "$0.03",
              "pricingItemId": 20423,
              "sku": "A1B2C3"
            },
            {
              "fid1": "yyyy-yyyyyy-yyyy",
              "price": "$0.17",
              "pricingItemId": 20424,
              "sku": "321CBA"
            }
          ]
        }
      ],
      "validations": [
        {
          "alphanumeric": true,
          "field": "sku",
          "maxLength": 6,
          "minLength": 6,
          "required": true
        },
        {
          "field": "fid1",
          "maxLength": 25,
          "minLength": 2,
          "required": false
        }
      ]
    }
  },
  "general": {
    "additionalSettings": {
      "validations": [
        {
          "field": "externalIdentifier",
          "maxLength": 36
        },
        {
          "field": "productStockNumber",
          "maxLength": 36
        }
      ]
    },
    "apiHealthMaintenance": {
      "assignAndUnassign": {
        "disabled": true,
        "tooltip": "This endpoint has been disabled by the developer.",
        "value": false
      },
      "purchase": {
        "disabled": false,
        "value": true
      },
      "singleSignOn": {
        "disabled": false,
        "value": false
      },
      "updateSubscription": {
        "disabled": true,
        "tooltip": "The product is part of a bundle.",
        "value": true
      }
    },
    "settings": {
      "collectLeads": {
        "assignLeadsToDevelopers": false,
        "editionLeadGenEnabled": false,
        "enabled": true,
        "options": [
          "inAdditionToPurchase",
          "insteadOfPurchase"
        ],
        "selectedOption": "inAdditionToPurchase"
      },
      "disableSelfServe": true,
      "hideAllPricing": true,
      "sellDomainAsStandalone": true,
      "showAsComingSoon": true,
      "sortingRank": {
        "options": [
          "Very High",
          "High",
          "Medium",
          "Low",
          "Very Low"
        ],
        "selectedOption": "Very Low"
      },
      "termsOfServiceURL": "http://www.google.com",
      "validations": [
        {
          "field": "termsOfServiceURL",
          "maxLength": 1024
        }
      ],
      "visibleOnMarketplace": true,
      "visibleOnNetwork": true
    }
  },
  "productGroups": {
    "attributes": [
      {
        "attributeId": 56,
        "name": "English",
        "options": [
          {
            "attributeOptionId": 128,
            "name": "EngOpt1",
            "selected": true
          },
          {
            "attributeOptionId": 129,
            "name": "EngOpt2",
            "selected": false
          },
          {
            "attributeOptionId": 130,
            "name": "EngOpt3",
            "selected": false
          },
          {
            "attributeOptionId": 131,
            "name": "EngOpt4",
            "selected": false
          },
          {
            "attributeOptionId": 132,
            "name": "EngOpt5",
            "selected": false
          },
          {
            "attributeOptionId": 133,
            "name": "EngOpt6",
            "selected": false
          },
          {
            "attributeOptionId": 134,
            "name": "EngOpt7",
            "selected": false
          }
        ],
        "required": false
      }
    ],
    "categories": {
      "options": [
        {
          "categoryId": 0,
          "name": "Select a Category",
          "subCategories": [
            {
              "name": "Select a Sub Category",
              "subCategoryId": 0
            }
          ]
        },
        {
          "categoryId": 186,
          "name": "Numbers",
          "subCategories": [
            {
              "name": "Select a Sub Category",
              "subCategoryId": 0
            },
            {
              "name": "One",
              "subCategoryId": 113
            },
            {
              "name": "Two",
              "subCategoryId": 114
            }
          ]
        }
      ],
      "required": false,
      "selectedOptions": [
        {
          "categoryId": 0,
          "subCategoryId": 0
        },
        {
          "categoryId": 186,
          "subCategoryId": 0
        },
        {
          "categoryId": 186,
          "subCategoryId": 115
        }
      ],
      "tooltip": "Add categories to your application"
    },
    "customerGroups": [
      {
        "name": "New Customer Group",
        "options": [
          {
            "industryId": 55,
            "name": "Industry1",
            "selected": true
          },
          {
            "industryId": 56,
            "name": "Industry2",
            "selected": false
          }
        ],
        "required": true,
        "userAttributeId": 31
      }
    ],
    "merchandisingOptions": {
      "badges": {
        "options": [
          {
            "badgeId": 7,
            "imageUrl": "common_resources/attributeOptions/128/badge.png?e5dc31b07b947203ce979bd55032f960",
            "name": "EngOpt1",
            "position": 1
          },
          {
            "badgeId": 8,
            "imageUrl": "common_resources/attributeOptions/129/badge.png?e5dc31b07b947203ce979bd55032f960",
            "name": "EngOpt2",
            "position": 2
          },
          {
            "badgeId": 9,
            "imageUrl": "common_resources/attributeOptions/130/badge.png?fd55e224f0cc01dd33f6ae864002e880",
            "name": "EngOpt3"
          },
          {
            "badgeId": 10,
            "imageUrl": "common_resources/attributeOptions/null/badge.png?e5dc31b07b947203ce979bd55032f960",
            "name": "EngOpt4"
          }
        ],
        "selectedOptions": [
          7,
          8
        ]
      },
      "ribbons": {
        "options": [
          {
            "ribbonId": 0,
            "text": "Choose One"
          },
          {
            "color": "#0004FF",
            "ribbonId": 8,
            "text": "Discount",
            "textColor": "#FFFFF"
          },
          {
            "color": "#0004FF",
            "ribbonId": 7,
            "text": "Free",
            "textColor": "#FFFFF"
          },
          {
            "color": "#0004FF",
            "ribbonId": 9,
            "text": "Special",
            "textColor": "#FFFFF"
          }
        ],
        "selectedOption": 7
      }
    },
    "productLines": [
      {
        "name": "MSFT",
        "productLineId": 1,
        "selected": false
      }
    ]
  },
  "productInformation": {
    "appFromNetwork": false,
    "iconUrl": "https://ad-dev-dump1.s3.amazonaws.com/app_resources/157/thumbs_64/img7932941780668708927.png",
    "productName": "AUTO_WEBAPP_NEW"
  }
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/v3/marketplaceProduct/productSettings/{productId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/v3/marketplaceProduct/productSettings/{productId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/v3/marketplaceProduct/productSettings/{productId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/v3/marketplaceProduct/productSettings/{productId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "billing": {
    "billingSettings": {
      "billingCycle": {
        "options": [
          "MP_DEFAULT_CYCLE",
          "FIRST_DAY_OF_THE_MONTH",
          "LAST_DAY_OF_THE_MONTH",
          "PURCHASE_DAY",
          "CUSTOM_DAY_OF_THE_MONTH"
        ],
        "selectedOption": "FIRST_DAY_OF_THE_MONTH",
        "startDay": 1
      },
      "setupFeeTaxCode": "DEF456",
      "skipFirstPayment": true,
      "taxCode": "ABC123",
      "validations": [
        {
          "field": "startDay",
          "maxValue": 31,
          "minValue": 1,
          "numeric": true
        },
        {
          "field": "taxCode",
          "maxLength": 255
        },
        {
          "field": "setupFeeTaxCode",
          "maxLength": 25
        }
      ]
    },
    "freeTrialBillingOptions": [
      {
        "automaticUpgradeToPaidEnabled": true,
        "editionId": 9890,
        "editionName": "Free Trial",
        "requireBillingInfo": true
      }
    ],
    "skuSettings": {
      "editionPricingItems": [
        {
          "editionName": "Free Trial Edition",
          "paymentPlanId": 123,
          "skus": [
            {
              "fid1": "yyyy-yyyyyy-yyyy",
              "price": "$0.03",
              "pricingItemId": 20423,
              "sku": "A1B2C3"
            },
            {
              "fid1": "yyyy-yyyyyy-yyyy",
              "price": "$0.17",
              "pricingItemId": 20424,
              "sku": "321CBA"
            }
          ]
        }
      ],
      "validations": [
        {
          "alphanumeric": true,
          "field": "sku",
          "maxLength": 6,
          "minLength": 6,
          "required": true
        },
        {
          "field": "fid1",
          "maxLength": 25,
          "minLength": 2,
          "required": false
        }
      ]
    }
  },
  "general": {
    "additionalSettings": {
      "validations": [
        {
          "field": "externalIdentifier",
          "maxLength": 36
        },
        {
          "field": "productStockNumber",
          "maxLength": 36
        }
      ]
    },
    "apiHealthMaintenance": {
      "assignAndUnassign": {
        "disabled": true,
        "tooltip": "This endpoint has been disabled by the developer.",
        "value": false
      },
      "purchase": {
        "disabled": false,
        "value": true
      },
      "singleSignOn": {
        "disabled": false,
        "value": false
      },
      "updateSubscription": {
        "disabled": true,
        "tooltip": "The product is part of a bundle.",
        "value": true
      }
    },
    "settings": {
      "collectLeads": {
        "assignLeadsToDevelopers": false,
        "editionLeadGenEnabled": false,
        "enabled": true,
        "options": [
          "inAdditionToPurchase",
          "insteadOfPurchase"
        ],
        "selectedOption": "inAdditionToPurchase"
      },
      "disableSelfServe": true,
      "hideAllPricing": true,
      "sellDomainAsStandalone": true,
      "showAsComingSoon": true,
      "sortingRank": {
        "options": [
          "Very High",
          "High",
          "Medium",
          "Low",
          "Very Low"
        ],
        "selectedOption": "Very Low"
      },
      "termsOfServiceURL": "http://www.google.com",
      "validations": [
        {
          "field": "termsOfServiceURL",
          "maxLength": 1024
        }
      ],
      "visibleOnMarketplace": true,
      "visibleOnNetwork": true
    }
  },
  "productGroups": {
    "attributes": [
      {
        "attributeId": 56,
        "name": "English",
        "options": [
          {
            "attributeOptionId": 128,
            "name": "EngOpt1",
            "selected": true
          },
          {
            "attributeOptionId": 129,
            "name": "EngOpt2",
            "selected": false
          },
          {
            "attributeOptionId": 130,
            "name": "EngOpt3",
            "selected": false
          },
          {
            "attributeOptionId": 131,
            "name": "EngOpt4",
            "selected": false
          },
          {
            "attributeOptionId": 132,
            "name": "EngOpt5",
            "selected": false
          },
          {
            "attributeOptionId": 133,
            "name": "EngOpt6",
            "selected": false
          },
          {
            "attributeOptionId": 134,
            "name": "EngOpt7",
            "selected": false
          }
        ],
        "required": false
      }
    ],
    "categories": {
      "options": [
        {
          "categoryId": 0,
          "name": "Select a Category",
          "subCategories": [
            {
              "name": "Select a Sub Category",
              "subCategoryId": 0
            }
          ]
        },
        {
          "categoryId": 186,
          "name": "Numbers",
          "subCategories": [
            {
              "name": "Select a Sub Category",
              "subCategoryId": 0
            },
            {
              "name": "One",
              "subCategoryId": 113
            },
            {
              "name": "Two",
              "subCategoryId": 114
            }
          ]
        }
      ],
      "required": false,
      "selectedOptions": [
        {
          "categoryId": 0,
          "subCategoryId": 0
        },
        {
          "categoryId": 186,
          "subCategoryId": 0
        },
        {
          "categoryId": 186,
          "subCategoryId": 115
        }
      ],
      "tooltip": "Add categories to your application"
    },
    "customerGroups": [
      {
        "name": "New Customer Group",
        "options": [
          {
            "industryId": 55,
            "name": "Industry1",
            "selected": true
          },
          {
            "industryId": 56,
            "name": "Industry2",
            "selected": false
          }
        ],
        "required": true,
        "userAttributeId": 31
      }
    ],
    "merchandisingOptions": {
      "badges": {
        "options": [
          {
            "badgeId": 7,
            "imageUrl": "common_resources/attributeOptions/128/badge.png?e5dc31b07b947203ce979bd55032f960",
            "name": "EngOpt1",
            "position": 1
          },
          {
            "badgeId": 8,
            "imageUrl": "common_resources/attributeOptions/129/badge.png?e5dc31b07b947203ce979bd55032f960",
            "name": "EngOpt2",
            "position": 2
          },
          {
            "badgeId": 9,
            "imageUrl": "common_resources/attributeOptions/130/badge.png?fd55e224f0cc01dd33f6ae864002e880",
            "name": "EngOpt3"
          },
          {
            "badgeId": 10,
            "imageUrl": "common_resources/attributeOptions/null/badge.png?e5dc31b07b947203ce979bd55032f960",
            "name": "EngOpt4"
          }
        ],
        "selectedOptions": [
          7,
          8
        ]
      },
      "ribbons": {
        "options": [
          {
            "ribbonId": 0,
            "text": "Choose One"
          },
          {
            "color": "#0004FF",
            "ribbonId": 8,
            "text": "Discount",
            "textColor": "#FFFFF"
          },
          {
            "color": "#0004FF",
            "ribbonId": 7,
            "text": "Free",
            "textColor": "#FFFFF"
          },
          {
            "color": "#0004FF",
            "ribbonId": 9,
            "text": "Special",
            "textColor": "#FFFFF"
          }
        ],
        "selectedOption": 7
      }
    },
    "productLines": [
      {
        "name": "MSFT",
        "productLineId": 1,
        "selected": false
      }
    ]
  },
  "productInformation": {
    "appFromNetwork": false,
    "iconUrl": "https://ad-dev-dump1.s3.amazonaws.com/app_resources/157/thumbs_64/img7932941780668708927.png",
    "productName": "AUTO_WEBAPP_NEW"
  }
}

Example response

[
  {
    "code": "Not Found",
    "message": "Product with id 10 not found."
  }
]

PUT/v3/marketplaceProduct/productSettings/{productId}

Update product settings for a product on a given marketplace.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_PRODUCT_SUPPORT Allows access as a Product Support agent for the marketplace.

Parameters

Parameter Type Data Type Default Description
*productId path integer The product identifier

Body Parameters

Information about the product settings that will be updated.

MarketplaceProductSettings object:

Property Type Description
billing Billing

Information about the billing settings, free trials, billing patterns, or SKU settings of the product.

general GeneralSettings

Information about the availability of the product, API health maintenance, and additional settings.

productGroups ProductGroups

Information about the categories, attributes, product lines, customer groups, and merchandising options of the product.

productInformation ProductInformation

Information about the product, such as the name, icon URL, and whether it is a network product.

Responses

Status Meaning Description Definition
200 OK Success
401 Unauthorized Unauthorized
404 Not Found Product not found
500 Internal Server Error Internal server error

Metered Usage

Fetch usage processing status

Example request

curl -X GET https://{marketplaceURL}/api/integration/v2/billing/usage/requests/{requestId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/integration/v2/billing/usage/requests/{requestId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v2/billing/usage/requests/{requestId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v2/billing/usage/requests/{requestId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/integration/v2/billing/usage/requests/{requestId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/integration/v2/billing/usage/requests/{requestId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v2/billing/usage/requests/{requestId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "failedUsages": [
    {
      "errorCode": "BAD_DATA",
      "errorDescription": "Usage submitted after deadline (6 PM UTC on last day of billing period)"
    }
  ],
  "failedUsagesCount": 1,
  "idempotencyKey": "20210429-b436h7j2",
  "processedUsagesCount": 10,
  "requestId": "067464f3-be67-4dd3-b1a3-b2ac75180222",
  "status": "FAILED",
  "totalUsagesCount": 11
}

GET/integration/v2/billing/usage/requests/{requestId}

Retrieve whether the metered usage events submitted with a Billing Usage V2 request were successfully processed. In the Billing Usage V2 response, locate the path that is unique to the request (queryUsageStatus). Use it to retrieve the processing status for the submitted usage events, and error details if applicable.

Parameters

Parameter Type Data Type Default Description
*requestId path string Unique system-assigned identifier for the API request used to submit the metered usage; returned with the Billing Usage V2 submission response.

Responses

Status Meaning Description Definition
200 OK Successfully returned usage event processing status UsageRequestInfo
403 Forbidden Access Denied Error
404 Not Found Not Found Error
500 Internal Server Error Internal Server Error Error

Billing Usage V2

Example request

curl -X POST https://{marketplaceURL}/api/integration/v2/billing/usage \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/integration/v2/billing/usage HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v2/billing/usage',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Metered usage event submission",
      "type": "object",
      "title": "MeteredUsageRequest",
      "properties": {
        "billable": {
          "description": "Indicates usage is billable (true) or estimated (false). Required.",
          "type": "boolean"
        },
        "idempotencyKey": {
          "description": "Unique caller-generated identifier for the metered usage that is sent. Ensures duplicate submissions can be identified and an error returned. Required.",
          "type": "string"
        },
        "requestGroupId": {
          "description": "A caller-generated identifier to group related metered usage requests. For example, 'January 2022' to group all requests that include January billing period events.",
          "type": "string",
          "nullable": true
        },
        "usages": {
          "description": "List of metered usage events.",
          "type": "array",
          "items": {
            "description": "List of metered usage events associated with a customer's subscription.",
            "type": "object",
            "title": "MeteredUsageItem",
            "properties": {
              "accountId": {
                "description": "Unique identifier that associates a vendor (ISV), customer company, and subscription. Represents company entitlement. Provided by vendor (ISV) when subscription purchased. Marketplace Managers can locate it in the user interface Integration Event event logs.",
                "type": "string"
              },
              "usageList": {
                "description": "List of metered usage event details.",
                "type": "array",
                "items": {
                  "description": "Details for a preconfigured or custom metered usage event.",
                  "type": "object",
                  "title": "UsageItem",
                  "properties": {
                    "attributes": {},
                    "currency": {},
                    "customUnit": {},
                    "description": {},
                    "eventDate": {},
                    "eventId": {},
                    "pricingUnit": {},
                    "quantity": {},
                    "unitPrice": {}
                  }
                }
              }
            }
          }
        }
      }
    },
    {
      "description": "Metered usage request body.",
      "example": {
        "billable": true,
        "idempotencyKey": "Caller-generated identifier",
        "requestGroupId": "January 2022 billing period",
        "usages": [
          {
            "accountId": "58e8092c-f83c-44d7-bd9a-f7a20adaec63",
            "usageList": [
              {
                "attributes": null,
                "currency": null,
                "customUnit": null,
                "description": "GIGABYTE usage on cloud",
                "eventDate": "2021-06-29T06:42:56Z",
                "eventId": null,
                "pricingUnit": "GIGABYTE",
                "quantity": 75,
                "unitPrice": null
              }
            ]
          },
          {
            "accountId": "ea3aa441-f650-4fd2-8f9f-bc61f69a6cf8",
            "usageList": [
              {
                "attributes": null,
                "currency": "EUR",
                "customUnit": "STORAGE",
                "description": "Storage - usage on cloud",
                "eventDate": "2019-07-22T08:37:12.569Z",
                "eventId": null,
                "pricingUnit": null,
                "quantity": 5,
                "unitPrice": 8
              }
            ]
          }
        ]
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v2/billing/usage',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/integration/v2/billing/usage', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/integration/v2/billing/usage',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v2/billing/usage");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "billable": true,
  "idempotencyKey": "Caller-generated identifier",
  "requestGroupId": "January 2022 billing period",
  "usages": [
    {
      "accountId": "58e8092c-f83c-44d7-bd9a-f7a20adaec63",
      "usageList": [
        {
          "attributes": null,
          "currency": null,
          "customUnit": null,
          "description": "GIGABYTE usage on cloud",
          "eventDate": "2021-06-29T06:42:56Z",
          "eventId": null,
          "pricingUnit": "GIGABYTE",
          "quantity": 75,
          "unitPrice": null
        }
      ]
    },
    {
      "accountId": "ea3aa441-f650-4fd2-8f9f-bc61f69a6cf8",
      "usageList": [
        {
          "attributes": null,
          "currency": "EUR",
          "customUnit": "STORAGE",
          "description": "Storage - usage on cloud",
          "eventDate": "2019-07-22T08:37:12.569Z",
          "eventId": null,
          "pricingUnit": null,
          "quantity": 5,
          "unitPrice": 8
        }
      ]
    }
  ]
}

Example response

{
  "idempotencyKey": "20210429-b436h7j2",
  "queryUsageStatus": "/api/integration/v2/billing/usage/requests/fade1f71-3f40-4f4e-81c1-e835cb459c30",
  "requestId": "067464f3-be67-4dd3-b1a3-b2ac75180222"
}

POST/integration/v2/billing/usage

Submit preconfigured, custom, or volume-priced metered usage data to be billed for a customer account.

Volume pricing usage is always preconfigured, not custom. It is processed at 6:00 PM UTC, either on the last day of the billing period or, if delayed billing is configured (always recommended for volume pricing), on the last day of a defined number of days after the billing period ends. It must be submitted in requests that do not include other pricing models.

Body Parameters

Metered usage request body. The request body example includes a preconfigured metered usage item followed by a custom metered usage item. For volume price usage, the request is the same.

MeteredUsageRequest object:

Property Type Description
billable boolean

Indicates usage is billable (true) or estimated (false). Required.

idempotencyKey string

Unique caller-generated identifier for the metered usage that is sent. Ensures duplicate submissions can be identified and an error returned. Required.

requestGroupId string

A caller-generated identifier to group related metered usage requests. For example, 'January 2022' to group all requests that include January billing period events.

usages array of MeteredUsageItem

List of metered usage events.

Responses

Status Meaning Description Definition
202 Accepted Metered usage report successfully received MeteredUsageRequestAccepted
400 Bad Request Bad Request Error
404 Not Found Not Found Error
500 Internal Server Error Internal Server Error Error

Billing Usage V1

Example request

curl -X POST https://{marketplaceURL}/api/integration/v1/billing/usage \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/integration/v1/billing/usage HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v1/billing/usage',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "type": "object",
      "title": "UsageBean",
      "properties": {
        "account": {
          "allOf": [
            {
              "type": "object",
              "title": "AccountInfo",
              "properties": {
                "accountIdentifier": {
                  "description": "Account identifier",
                  "type": "string",
                  "nullable": true
                },
                "parentAccountIdentifier": {
                  "description": "Parent account identifier. Applies to add-on products.",
                  "type": "string",
                  "nullable": true
                },
                "status": {
                  "allOf": [
                    {},
                    {}
                  ]
                }
              },
              "example": {
                "accountIdentifier": "...",
                "parentAccountIdentifier": "...",
                "status": "INITIALIZED"
              },
              "nullable": true
            },
            {
              "description": "Account information"
            }
          ]
        },
        "addonInstance": {
          "allOf": [
            {
              "type": "object",
              "title": "AddonInstanceInfo",
              "properties": {
                "id": {
                  "description": "ID",
                  "type": "string",
                  "nullable": true
                }
              },
              "example": {
                "id": "..."
              }
            },
            {
              "description": "Add-on instance information"
            }
          ]
        },
        "item": {
          "type": "array",
          "items": {
            "type": "object",
            "title": "UsageItemBean",
            "properties": {
              "customUnit": {
                "type": "string",
                "nullable": true
              },
              "description": {
                "type": "string",
                "nullable": true
              },
              "price": {
                "type": "number",
                "nullable": true
              },
              "quantity": {
                "type": "number",
                "nullable": true
              },
              "unit": {
                "type": "string",
                "title": "PricingUnit",
                "enum": [
                  "USER",
                  "GIGABYTE",
                  "MEGABYTE",
                  "HOUR",
                  "MINUTE",
                  "INVOICE",
                  "UNIT",
                  "PROJECT",
                  "PROPERTY",
                  "ITEM",
                  "WORD",
                  "EMAIL",
                  "CONTACT",
                  "CALL",
                  "CREDIT",
                  "ROOM",
                  "HOST",
                  "AGENT",
                  "OPERATOR",
                  "PROVIDER",
                  "MANAGER",
                  "TESTER",
                  "JVM",
                  "SERVER",
                  "WEB_USE_MINUTE",
                  "AUDIO_USE_MINUTE",
                  "PIECE",
                  "EMPLOYEE_PAY_PERIOD",
                  "EMPLOYEE_PER_PAY_PERIOD",
                  "COMPUTER",
                  "NOT_APPLICABLE",
                  "ONE_TIME_SETUP",
                  "DATA_POINTS",
                  "TIER1_API_CALLS",
                  "TIER2_API_CALLS",
                  "ADVISORY_HOURS",
                  "OVERAGE_AUDIO_MINUTE",
                  "EMPLOYEE",
                  "CONNECTION",
                  "PUSH_USER",
                  "THOUSAND_EMAILS_PER_DAY",
                  "PUSH_NOTIFICATION_DEVICES",
                  "API_CALLS",
                  "SMS_TEXT_MESSAGE",
                  "CONTACTS_1000",
                  "CONTRACT_FEE",
                  "TRANSFER_FEE",
                  "REACTIVATION_FEE",
                  "RECIPIENT",
                  "ADDITIONAL_1000_CONTACTS_BLOCK",
                  "SCHEDULE_PLAN",
                  "EMAILS_1000",
                  "EMAILS_2500",
                  "MOBILE_DEVICE",
                  "PAYSLIP",
                  "PAYSLIP_CORRECTION",
                  "STORE",
                  "WEBSITE",
                  "EPAPER",
                  "PAGE",
                  "POSTAGE_AND_PRINT",
                  "INTERNATIONAL_POSTAGE_AND_PRINT",
                  "TIER1_TOP_LEVEL_DOMAIN",
                  "TIER2_TOP_LEVEL_DOMAIN",
                  "DEDICATED_IP",
                  "ENABLELCM",
                  "MAXCOMPONENTS",
                  "DATA_MANAGEMENT_USER",
                  "SPECIALIST_USER",
                  "PROFESSIONAL_USER",
                  "MATERIALITY_MATRIX",
                  "STAKEHOLDER_MANAGEMENT",
                  "SCORECARD",
                  "STANDARD_MAPPING",
                  "DONATION_MANAGEMENT",
                  "DOCUMENT",
                  "PACKAGE_SMALL",
                  "PACKAGE_LARGE",
                  "MEMBER",
                  "ATTENDEE",
                  "MAILING",
                  "RESPONSE",
                  "EXTERNAL_INVOICE_FEE",
                  "CLIENT_TEST",
                  "IMAGE_TRANSFORMATION",
                  "TOTAL_IMAGE",
                  "LICENSE",
                  "MAILBOX",
                  "FREE_40_INCH_HDTV_PC",
                  "FREE_46_INCH_HDTV_PC",
                  "FREE_46_INCH_HDTV_PC_MOUNTING",
                  "EMPLOYEE_PER_WEEK",
                  "REGISTER",
                  "END_USER",
                  "CORE",
                  "DEVICE",
                  "PORT",
                  "MEASURER",
                  "PUBLISHED_MEASUREMENT",
                  "NODE",
                  "SERVER_RULE",
                  "VPN_LP",
                  "PROXY_LP",
                  "DESKTOP_CONNECT_LP",
                  "CAMERA",
                  "MAIN_SOUND_ZONE",
                  "SUB_SOUND_ZONE",
                  "POST",
                  "REPORT",
                  "BOX",
                  "SESSION",
                  "DISPLAY",
                  "TRUCKROLL",
                  "TRANSACTION_FEE",
                  "SENDING_API_CALL",
                  "LOOKUP_API_CALL",
                  "ANALYTICS_API_CALL",
                  "MIGRATION_INSTANCE",
                  "NFON_SETUP_PER_PHONE_EXTENSION",
                  "NFON_SETUP_PER_PHONE_EXTENSION_PLUS",
                  "NFON_SETUP_PER_EFAX_EXTENSION",
                  "NFON_PHONE_EXTENSION",
                  "NFON_PHONE_EXTENSION_PLUS",
                  "NFON_EFAX_EXTENSION",
                  "NFON_CALL_CENTER_MONITORING",
                  "NFON_NMEETING",
                  "NFON_MOBILE_NFON_DEVICE",
                  "NFON_ISOFTPHONE_MAC",
                  "NFON_NSOFTPHONE_STANDARD_WINDOWS",
                  "NFON_NSOFTPHONE_PREMIUM_WINDOWS",
                  "NFON_NCTI_STANDARD_WINDOWS",
                  "NFON_NCTI_STANDARD_CRM_WINDOWS",
                  "NFON_NCTI_STANDARD_MAC",
                  "NFON_NSOFTPHONE_STANDARD_WINDOWS_OR_MOBILE",
                  "WESUSTAIN_PERFORMANCE",
                  "WESUSTAIN_STAKEHOLDER_REPUTATION",
                  "WESUSTAIN_WEAPP",
                  "FAX",
                  "FAX_LINE",
                  "ROOM_LINE",
                  "DEPARTMENT_LINE",
                  "INTERNATIONAL_LICENSE",
                  "INTERNATIONAL_DEPARTMENT_LINE",
                  "INTERNATIONAL_ROOM_LINE",
                  "INTERNATIONAL_LINE",
                  "CALLING_CREDIT",
                  "LINE",
                  "TOLLFREE_ROOM_LINE",
                  "TOLLFREE_DEPARTMENT_LINE",
                  "TAXES_AND_FEES",
                  "LEAD",
                  "OPPORTUNITY",
                  "CAMPAIGN",
                  "CASE",
                  "CUSTOMER",
                  "TIER1_STANDARD_LINE",
                  "TIER1_ROOM_LINE",
                  "TIER1_TOLLFREE_ROOM_LINE",
                  "TIER1_TOLLFREE_DEPARTMENT_LINE",
                  "TIER1_FAX_LINE",
                  "TIER1_DEPARTMENT_LINE",
                  "TIER2_STANDARD_LINE",
                  "TIER2_ROOM_LINE",
                  "TIER2_DEPARTMENT_LINE",
                  "TIER3_STANDARD_LINE",
                  "TIER3_ROOM_LINE",
                  "TIER3_DEPARTMENT_LINE",
                  "TIER4_STANDARD_LINE",
                  "TIER4_ROOM_LINE",
                  "TIER4_DEPARTMENT_LINE",
                  "CLUSTER",
                  "NODE_4VCPU",
                  "FIVE_HUNDRED_GB_SSD",
                  "TWELVE_TB_NETWORK_IO",
                  "JBOSS_EAP",
                  "JBOSS_FUSE",
                  "JBOSS_A_MQ",
                  "JBOSS_BRMS",
                  "JBOSS_BPM_SUITE",
                  "JBOSS_DATA_GRID",
                  "JBOSS_DATA_VIRT",
                  "USER_LICENSE",
                  "ADDITIONAL_NUMBER_LICENSE",
                  "ROOM_PHONE_LICENSE",
                  "UBERCONFERENCE_PRO_LICENSE",
                  "UBERCONFERENCE_PRO_LICENSE_UNBUNDLED",
                  "INSTANCE",
                  "INDOOR_CAMERA",
                  "OUTDOOR_CAMERA",
                  "VINGATE_LP_LICENCE",
                  "ADMINISTRATOR",
                  "MOBILE_USER",
                  "G_SUITE",
                  "T1",
                  "PHONE",
                  "AUTO_ATTENDANT",
                  "HUNT_GROUP",
                  "VOICEMAIL_BOX",
                  "TOLL_FREE_NUMBER",
                  "INBOUND_LONG_DISTANCE_MINUTE",
                  "OUTBOUND_LONG_DISTANCE_MINUTE",
                  "INBOUND_OUTBOUND_LONG_DISTANCE_MINUTE",
                  "SET_TOP_BOX",
                  "MODEM",
                  "ACCESS_POINT",
                  "CALLING_FEATURE",
                  "IAD_DEVICE",
                  "ANALOG_LINE",
                  "PRI",
                  "SBC_DEVICE",
                  "ROUTER",
                  "INTERNATIONAL_MINUTE",
                  "PHONE_LINE",
                  "DYNAMIC_IP_ADDRESS",
                  "STATIC_IP_ADDRESS",
                  "GATEWAY",
                  "REMOTE_CONTROL",
                  "TIER1_STANDARD_SEAT",
                  "TIER2_STANDARD_SEAT",
                  "TIER3_STANDARD_SEAT",
                  "TIER4_STANDARD_SEAT",
                  "TIER1_TOLL_FREE_SEAT",
                  "MILLION_MESSAGES",
                  "MESSAGE",
                  "WEEKLY",
                  "PHONE_NUMBER",
                  "GUEST",
                  "REVISION_SAFE_DATAROOM",
                  "GROUP_SESSION",
                  "MAILBOX_AD_SYNC",
                  "PHONE_SUPPORT",
                  "EXTRA_10TB",
                  "EXTRA_50TB",
                  "EXTRA_200TB",
                  "MAP_VIEW",
                  "SVM",
                  "CHANNEL",
                  "NUMBER_PRINTER_TABLET",
                  "NUMBER_ONSITE_SERVER",
                  "NUMBER_VISITS",
                  "ONSITE_TECHNICIAN_PC",
                  "ONSITE_TECHNICIAN_SERVER",
                  "SHORTER_REACTION_TIMES",
                  "E_COMMERCE_INTEGRATION",
                  "LOCATION",
                  "TRAINING_SESSION",
                  "GIGABYTES_PER_HOUR",
                  "FINANCIAL_PLANNING",
                  "ONSITE_WORKPLACE",
                  "INTERNAL_TOOLS_ACCESS",
                  "DUTY_SERVICE",
                  "TERABYTE",
                  "HOST_UNIT_HOURS",
                  "WEB_CHECKS",
                  "ACTIVE_USERS",
                  "ACTIVE_EMPLOYEE",
                  "PC_OF_NET_RECURRING_FEE",
                  "ACTIVE_VENDOR",
                  "ADVERTISEMENT",
                  "ADVERTISER_SPENDS",
                  "ANNUAL_FUNDRAISING_INCOME",
                  "ANNUAL_SUBSCRIPTION",
                  "APPLIANCE",
                  "ASSET",
                  "ASSETS_UNDER_MANAGEMENT",
                  "BUSINESS_PARTNERS",
                  "CASH_FLOWS",
                  "COMPONENT",
                  "CONNECTED_SYSTEMS",
                  "CONTRACTS",
                  "COSTS",
                  "DATA_STREAMS",
                  "DATABASE_SIZE",
                  "EXTERNAL_SERVICE_CALLS",
                  "FILE",
                  "FIXED",
                  "FLAT",
                  "FLAT_FEE_BASED_ON_ASSETS",
                  "FLEET_PLANNING_ORDERS",
                  "FORMS",
                  "GIGABYTE_DATABASE_SIZES",
                  "INSTALLATION",
                  "INSTALLED_CAPACITY",
                  "JOB_POSTING",
                  "LEARNER",
                  "LOGON",
                  "MANAGED_SYSTEM",
                  "MASTER_DATA_OBJECT",
                  "MASTER_RECORDS",
                  "MBPS",
                  "MONITORED_USER",
                  "MPLS",
                  "ORDER",
                  "OUTPATIENT_DAYS",
                  "PAGE_VIEW",
                  "PATIENT_CARE_DAY",
                  "PATIENT_TREATED",
                  "PLANT",
                  "POINTS_OF_DELIVERY",
                  "PREMIUM",
                  "PROCESS",
                  "PRODUCTS",
                  "RECORDS",
                  "RENTAL_UNIT",
                  "RESOURCES",
                  "REVENUE",
                  "SALES_ORDER",
                  "SALES_PORTFOLIOS",
                  "SERVICE_ORDERS",
                  "SITE_VISITS",
                  "SPENDS",
                  "SPEND_VOLUMES",
                  "STREAM",
                  "STUDENT",
                  "SUBSCRIBER",
                  "SUPPLIERS",
                  "TICKETS",
                  "TOTAL_ANNUAL_BUDGET",
                  "TUNNEL",
                  "VIRTUAL_USERS",
                  "SAP_SYSTEM",
                  "POSITION_TYPES",
                  "OVERAGE_FEES",
                  "OVERAGE_FEE_TRANSACTION",
                  "OVERAGE_FEES_DOCUMENT",
                  "OVERAGE_FEES_ITEM",
                  "EVENT",
                  "BUSINESS_EVENT",
                  "LEGAL_TENDER",
                  "ANNUAL_REVENUE",
                  "AD_SYNC",
                  "FULL_DATA_RESTORE",
                  "USED_STORAGE_100GB",
                  "COMPANY",
                  "ADDITIONAL_USER",
                  "VISIT",
                  "VIDEO",
                  "ELECTRONIC_PAYMENT",
                  "CHECK_PAYMENT",
                  "EXPRESS_PAY_ELECTRONIC_PAYMENT",
                  "EXPRESS_PAY_CHECK_PAYMENT",
                  "DATA_ENTRY_SERVICE",
                  "MONTHLY_VISIT",
                  "SCRUB_TRANSACTION",
                  "DEVICE_LICENSE",
                  "SERVER_LICENSE",
                  "BASE_LICENSE",
                  "SERVICE_CALL",
                  "SUPPORT_INCIDENT_TICKET",
                  "CUSTOM_REPORT_BUILDING_TRAINING",
                  "QUOTA",
                  "DOMESTIC_TRANSACTION",
                  "BEE",
                  "BEE_FLEET",
                  "BEE_BEACON_AMBIENT_LIGHT",
                  "BEE_BEACON_TEMPERATURE_HUMIDITY",
                  "CONTACTS_100",
                  "TEMPLATE",
                  "TEMPLATE_PACKS_10",
                  "PACK",
                  "SMS_TEXT_MESSAGE_10",
                  "VIRTUAL_SERVER",
                  "PHYSICAL_SERVER",
                  "WORKSTATION",
                  "CHATS",
                  "MATCH_LIST",
                  "CERTIFICATE_12_MONTHS",
                  "CERTIFICATE_24_MONTHS",
                  "PRIVACY",
                  "PAGE_VIEWS_100000",
                  "VOICE_OUT",
                  "EXAM",
                  "PARTICIPANT",
                  "ENCRYPTION_ADDON",
                  "ESS",
                  "ETI",
                  "ATP_ADDON",
                  "PBE_ADDO",
                  "NETI_ADDON",
                  "HUNDRED_SMS_REMINDER",
                  "CALENDAR_SYNC",
                  "PAYMENT_INTERFACE",
                  "MULTILINGUAL_ONLINE_EVENT_BOOKING",
                  "SOCKET",
                  "OFFER",
                  "FREELANCER",
                  "SOAP",
                  "DATEV_LEXWARE_INTERFACE",
                  "TOKEN",
                  "SERVICE_MONTH",
                  "VIDEO_PACKAGE_50_HOURS",
                  "INTERFACE",
                  "TEST_CASE",
                  "MINUTES_15",
                  "MINUTES_30",
                  "CONNECTED_ACCESS_POINT",
                  "DAY",
                  "SATURDAY_SURCHARGE",
                  "NIGHT_SURCHARGE",
                  "SUNDAY_SURCHARGE",
                  "PUBLIC_HOLIDAY_SURCHARGE",
                  "BASIC_PACKAGE",
                  "STANDARD_PACKAGE",
                  "PREMIUM_PACKAGE",
                  "REPORTS_MODULE",
                  "WORKFLOW_MODULE",
                  "NBV_250K",
                  "NBV",
                  "INVENTORY",
                  "ADDITIONAL_COMPANY",
                  "TRANSACTION",
                  "PREMIUM_CREDIT_REPORTS",
                  "ADDITIONAL_CONNECTION",
                  "STOCK_UNIT",
                  "MONTHLY_USAGE_FEE",
                  "USAGE_FEE",
                  "MONTHLY_CHARGES",
                  "STANDARD_USER",
                  "ADDITIONAL_UNIT",
                  "COMMISSION",
                  "KITTING",
                  "WOP",
                  "SFDC",
                  "NAMED_USER_LICENSE",
                  "BARCODING_AND_WAREHOUSING",
                  "MODULE",
                  "MANUFACTURING_MODULE",
                  "MRP",
                  "CONSOLE_MODULE",
                  "CONSOLIDATIONS",
                  "MULTI_CURRENCY",
                  "ADDON_LICENSE",
                  "INBOUND_PAGE",
                  "OUTBOUND_PAGE",
                  "OPPORTUNITY_RETENTION",
                  "SOCIAL_SENTIMENT",
                  "DEMAND_PRICE",
                  "SETUP_FEE",
                  "SHAREPOINT",
                  "INTEGRATION_MAINTENANCE",
                  "VIEWER",
                  "MANAGEMENT_USER",
                  "SQ_FT",
                  "LOCATION_UPTO_10_EMPLOYEES",
                  "LOCATION_UPTO_20_EMPLOYEES",
                  "LOCATION_UPTO_30_EMPLOYEES",
                  "LOCATION_UPTO_60_EMPLOYEES",
                  "LOCATION_UPTO_99_EMPLOYEES",
                  "M365_ONLINE",
                  "WEB_HOSTING_SERVER",
                  "STANDARD_EDITION_GIGABYTE",
                  "STORAGE_GIGABYTE",
                  "EGRESS_GIGABYTE",
                  "FEE_HW_DEFECT_NO_WARRANTY_CASE",
                  "SIM_CARD",
                  "SIM_CARDS_10",
                  "APPLICATION_CONNECTOR",
                  "ADDITIONAL_API_CALLS",
                  "USED_STORAGE_PER_GB",
                  "CERTIFICATION",
                  "MACHINE",
                  "CALCULATION_USER",
                  "MAILBOX_S",
                  "MAILBOX_M",
                  "MAILBOX_L",
                  "STORAGE",
                  "GROUP",
                  "VEHICLE",
                  "ENDPOINT",
                  "MANAGED_SERVICE",
                  "SOC",
                  "ONLINE_PLAN",
                  "ENTERPRISE_PLAN",
                  "FLOATING_LICENSE",
                  "USER_PER_LICENSE",
                  "CONCURRENT_USER_PER_LICENSE",
                  "DASHBOARD",
                  "IT_INTERFACE",
                  "CONNECTABLE_IOT_DEVICE_VIA_USB",
                  "CONNECTABLE_IOT_DEVICE_VIA_TULIP_GATEWAY",
                  "CONNECTABLE_MACHINE_PER_LICENSE",
                  "OBJECT_TO_BE_CHECKED",
                  "MACHINE_WITH_BI_SUPPORT",
                  "CONNECTED_DEVICE",
                  "LISTING",
                  "TLS_ENCRYPTION",
                  "DOMAIN_LEVEL_SEND",
                  "EFAX_ROUTER",
                  "PRORATED_CREDIT",
                  "NEW_HIRE",
                  "NAS",
                  "SALESFORCE_USER",
                  "INTERVIEW",
                  "ASSESSMENT",
                  "NU_WEBEX_CALLING_ENHANCED",
                  "NU_WEBEX_CALLING_PROFESSIONAL",
                  "WEBEX_ASSISTANT_FOR_WEBEX_MEETINGS_NU",
                  "NU_MEETINGS_BRIDGE_COUNTRY_CALL_BACK_AUDIO",
                  "FLEX_TEAMS_MESSAGING",
                  "ADDON_ANALYSES",
                  "ADDITIONAL_LISTING",
                  "MIGRATION_TENANT",
                  "MIGRATION_GROUP",
                  "MIGRATION_DOCUMENT",
                  "MIGRATION_GSUITE",
                  "MIGRATION_FOLDER",
                  "ENHANCED_USER",
                  "SINGLE_NAME_CERTIFICATE",
                  "SETUP",
                  "WILDCARD_CERTIFICATE",
                  "SECURITY_PACKAGE",
                  "ADDITIONAL_LANGUAGE",
                  "VANITY_URL",
                  "BRANDING",
                  "DATA_SOURCE",
                  "CREATOR_USER",
                  "ESIGN_USER",
                  "READ_ONLY_USER",
                  "MEASURING_POINT",
                  "ANDON_TV",
                  "TABLET",
                  "USER_10000",
                  "USER_100",
                  "PUBLIC_IP",
                  "WORKLOAD",
                  "PUBLIC_IP_ADDRESS",
                  "COMPUTE_POINT",
                  "RESOURCE_UNIT",
                  "VALUE_POINT",
                  "ACCOUNT",
                  "REQUEST",
                  "TRANSCRIPT",
                  "NOTIFICATION",
                  "CLAIM",
                  "MID",
                  "ENGAGEMENT",
                  "TEAM_LICENSE_DIGITAL_TEAMBOARD",
                  "TEAM_LICENSE_MODULE_CONNECTIVITY",
                  "TEAM_LICENSE_MODULE_PROBLEM_SOLUTION",
                  "TEAM_LICENSE_MODULE_AUDITS",
                  "TEAM_LICENSE_MODULE_PROCESS_CONFIRMATION",
                  "TEAM_LICENSE_MODULE_QUALIFICATION_MATRIX",
                  "TEAM_LICENSE_MODULE_STANDARD_WORK_INSTRUCTION",
                  "TEAM_LICENSE_MODULE_PARETO_ANALYSIS",
                  "KPI",
                  "YEAR_KPI_ARCHIVAL",
                  "CORPORATE_CLOUD_HOSTING",
                  "ON_PREMISES_HOSTING",
                  "SUPPORT_SERVICE_HOUR",
                  "CLASS",
                  "EXPERT",
                  "SPINDLE_HOUR",
                  "ADDON_ADMINISTRATION",
                  "ADDON_CONFIGURATION",
                  "ADDON_PLANNING",
                  "ADDON_PLANNING_OBJECTS",
                  "ADDON_MASTER_DATA",
                  "ADDON_CAPACITY_PLANS_CALENDAR",
                  "ADDON_CONFLICT_RADAR",
                  "ADDON_GAP_LIST",
                  "ADDON_DASHBOARD",
                  "ADDON_PLANNING_READ_ONLY",
                  "ADDON_UTILIZATION_POOLS",
                  "ADDON_FIXED_SCHEDULES",
                  "ADDON_ASSEMBLY_GROUPS",
                  "ADDON_ORDER_ON_HOLD",
                  "ADDON_PARALLEL_RESSOURCES",
                  "ADDON_MULTI_FUNCTIONAL_RESSOURCES",
                  "ADDON_PLANEUS_TV_PER_TERMINAL",
                  "ADDON_MASTER_DATA_WORK_PROCEDURES",
                  "ADDON_MANUAL_IMPORT",
                  "ADDON_AUTOMATIC_IMPORT",
                  "ADDON_REPORTING_BASIC",
                  "ADDON_REPORTING_ADVANCED",
                  "ADDON_REPORT_RESOURCES_AVAILABILITY_PER_DAY",
                  "ADDON_REPORT_OEE",
                  "ADDON_REPORT_ON_TIME_DELIVERY_HISTORY",
                  "ADDON_REPORT_PROCESS_PERFORMANCE_HISTORY",
                  "ADDON_REPORT_UTILIZATION_PER_RESOURCE",
                  "ADDON_REPORT_REPORTING_PLUG_IN",
                  "ADDON_EXTERNAL_PARTNERS_BASIC_LICENSE",
                  "ADDON_WORKBENCH_PACK_OF_5",
                  "ADDON_WORKBENCH_PACK_OF_10",
                  "ADDON_WORKBENCH_PACK_OF_15",
                  "CLIENT",
                  "VIRTUAL_MACHINE",
                  "MODEL_TRANSFORMATION",
                  "CASE_REFRESH",
                  "CASE_VIEW",
                  "CASE_DOCUMENT_DOWNLOAD",
                  "VERIFICATION",
                  "ADDON_CORPORATE_BRANDING",
                  "CLIENT_TAX_FILINGS",
                  "CLIENT_COMPLIANCE_SERVICES",
                  "PROPOSAL",
                  "UK_ID_CHECK",
                  "INTERNATIONAL_ID_CHECK",
                  "CREDIT_SCREEN",
                  "UK_COMPANY_REPORT",
                  "NON_UK_COMPANY_REPORT",
                  "HR_SCREEN",
                  "COMPANY_FORMATION",
                  "CLIENT_ACCOUNTS",
                  "SMARTKIT",
                  "WORKFLOW",
                  "EDITOR",
                  "WORKER",
                  "ADDON_POTENTIAL_ANALYSIS",
                  "TRAINING_PACKAGE_SMALL",
                  "TRAINING_PACKAGE_LARGE",
                  "TOOL_PATH_OPTIMIZATION",
                  "CLIENT_VAT_FILINGS",
                  "BUNDLE",
                  "PACKAGE",
                  "VM",
                  "INCIDENT",
                  "SEND",
                  "INTEGRATION",
                  "BILLABLE_HOUR",
                  "TB",
                  "SOURCE",
                  "TRAINING",
                  "SITE",
                  "CONSULTING_UNIT",
                  "CAPACITY",
                  "MIGRATION",
                  "WORKSHOP",
                  "ONBOARDING",
                  "BENEFIT_ELIGIBLE_EMPLOYEE",
                  "SEAT",
                  "MS365_SEAT",
                  "MS_EXCHANGE_MAILBOX",
                  "GWORKSPACE_SEAT",
                  "INTERNET_LINE",
                  "BACKUP_LINE",
                  "USER_PACK_50",
                  "USER_PACK_100",
                  "CIRCUIT",
                  "NAC"
                ]
              }
            },
            "example": {
              "customUnit": "...",
              "description": "...",
              "price": 12345,
              "quantity": 12345,
              "unit": "OPERATOR"
            }
          }
        }
      },
      "example": {
        "account": {
          "accountIdentifier": "...",
          "parentAccountIdentifier": "...",
          "status": "CANCELLED"
        },
        "addonInstance": {
          "id": "..."
        },
        "item": [
          {
            "customUnit": "...",
            "description": "...",
            "price": 12345,
            "quantity": 12345,
            "unit": "TIER3_STANDARD_LINE"
          },
          {
            "customUnit": "...",
            "description": "...",
            "price": 12345,
            "quantity": 12345,
            "unit": "CONTACTS_1000"
          }
        ]
      }
    },
    {
      "description": "Usage data information.",
      "example": {
        "account": {
          "accountIdentifier": "1-account-identifier",
          "parentAccountIdentifier": null,
          "status": "INITIALIZED"
        },
        "addonInstance": null,
        "items": [
          {
            "customUnit": null,
            "description": null,
            "price": null,
            "quantity": 10,
            "unit": "GIGABYTE"
          }
        ]
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v1/billing/usage',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/integration/v1/billing/usage', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/integration/v1/billing/usage',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v1/billing/usage");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "account": {
    "accountIdentifier": "1-account-identifier",
    "parentAccountIdentifier": null,
    "status": "INITIALIZED"
  },
  "addonInstance": null,
  "items": [
    {
      "customUnit": null,
      "description": null,
      "price": null,
      "quantity": 10,
      "unit": "GIGABYTE"
    }
  ]
}

Example response

{
  "message": "Bill usage API call succeeded.",
  "success": true
}

POST/integration/v1/billing/usage

Submit usage data to be billed for the given account identifier

Parameters

Parameter Type Data Type Default Description
async query boolean false True if asynchronous. Default value is false.

Body Parameters

Usage data information.

UsageBean object:

Property Type Description
account AccountInfo

Account information

addonInstance AddonInstanceInfo

Add-on instance information

item array of UsageItemBean

Responses

Status Meaning Description Definition
200 OK Success (only returned when async=false) BillingAPIResult
202 Accepted Accepted (only returned when async=true)
400 Bad Request Bad Request
404 Not Found Not Found
500 Internal Server Error Internal Server Error

MyApps

Read application with pending assignment

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps/pending/{pendingAppId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps/pending/{pendingAppId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps/pending/{pendingAppId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps/pending/{pendingAppId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps/pending/{pendingAppId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps/pending/{pendingAppId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps/pending/{pendingAppId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "addon": false,
  "addonParentApplicationId": null,
  "addonParentEntitlementId": 1,
  "appLinkLocation": null,
  "appLinkUuid": null,
  "appLinkVersions": null,
  "applicationId": 1,
  "applicationProfileUrl": "http://appdirect.com/apps/3281",
  "assignUrl": null,
  "assigned": false,
  "assignmentEnabled": true,
  "authenticationMethod": "SAML",
  "autoUpgradeToPaid": false,
  "baseUrl": "http://appdirect.com",
  "billableEntitlementId": 1,
  "blurb": "C24769040",
  "bundled": false,
  "bypassTermsWhenDefault": false,
  "changeSubscriptionEnabled": true,
  "companyEntitlementExternalPartnerIdentifier": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "companyEntitlementExternalVendorIdentifier": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "companyEntitlementId": 1,
  "companyEntitlementMetadata": {},
  "companyEntitlementStatus": "INITIALIZED",
  "companyEntitlementSuspensionReason": "PAYMENT_OVERDUE",
  "companyEntitlementUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "companyWide": false,
  "contractExpired": false,
  "contractExpiring": false,
  "customIntegration": "NEW_RELIC",
  "daysUntilPayment": 0,
  "description": "Description",
  "developerName": "Developer",
  "editionCode": "RECURRING",
  "editionId": 1,
  "editionName": "Recurring Edition",
  "endOfContractDate": 1504072800000,
  "free": false,
  "gridImagePath": null,
  "gridImageSrcset": {},
  "hideAppTile": false,
  "imageBaseUrl": "http://appdirect.com",
  "imageUrl": null,
  "importableApplicationUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "imported": false,
  "importedPasswordManager": false,
  "invoiceExternallyProcessed": false,
  "invoiceStatus": "PAID",
  "keychainApplicationId": 1,
  "keychainCredentialsId": 1,
  "launchUrl": "http://appdirect.com/launch?userEntitlementId=1891",
  "legacyBundleCompanyEntitlementId": 1,
  "linkUrl": null,
  "links": [
    {
      "href": "http://appdirect.com/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/memberships/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1/myapps/password-manager",
      "rel": "self"
    }
  ],
  "manageOnVendorUrl": null,
  "manageUrl": null,
  "name": "Password.Manager",
  "newSubscriptionEnabled": true,
  "newUpload": false,
  "openIdConnectInitiateLoginMethod": "GET",
  "openIdLoginMethod": "GET",
  "openIdLoginUrl": "http://openid.login",
  "orderDuration": "ONE_TIME",
  "overdue": true,
  "overview": "C24769040",
  "ownerFirstName": "First",
  "ownerId": 1,
  "ownerLastName": "Last",
  "ownerUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "partner": "APPDIRECT",
  "payUrl": null,
  "paymentDueDate": 1504072800000,
  "pending": false,
  "pendingAppId": 1,
  "pendingAppType": "REQUESTED",
  "pendingAsync": false,
  "pendingCreation": false,
  "pendingEventType": "USER_UPDATED",
  "preDisabled": false,
  "privacyUrl": "http://privacy.url.com",
  "productType": "WEB_APP",
  "publishedOn": 1504072800000,
  "purchaseOrderId": 1,
  "purchaseUrl": null,
  "purchased": false,
  "remainingFreeTrialDays": 0,
  "requestable": false,
  "requested": false,
  "samlProviderUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "sampleApp": false,
  "shortcut": "http://shortcut.url.com",
  "simple": false,
  "simpleEntitlementId": 1,
  "simpleEntitlementUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "slogan": null,
  "ssoEnabled": true,
  "startDate": 1504072800000,
  "state": "ACTIVE",
  "subscriptionEventPending": false,
  "supportEmail": "help@support.com",
  "supportKb": "1024",
  "supportPhone": "1-800-9000",
  "systemTileType": "PASSWORD_MANAGER",
  "termsUrl": "http://terms.url.com",
  "upgradeToPaid": false,
  "usageType": "MULTI_USER",
  "useMessage": null,
  "useMessageTitle": null,
  "userEntitlementCreatedOn": 1504147976000,
  "userEntitlementExternalVendorIdentifier": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "userEntitlementId": 1,
  "userEntitlementMetadata": {},
  "userEntitlementStatus": "ACTIVE",
  "userEntitlementUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "userUuid": "2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1"
}

GET/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps/pending/{pendingAppId}

Retrieve a marketplace user's application when assignment is pending.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER_READ Allows access to read all marketplace data.
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_SUPERUSER Allows access as a Super User for the marketplace.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.
ROLE_USER Allows access as the owner of the user entitlement.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Company UUID
*pendingAppId path integer Pending App ID
*userUuid path string User UUID

Responses

Status Meaning Description Definition
200 OK Success UserApplication
401 Unauthorized Unauthorized
404 Not Found Not Found

Read application with completed assignment

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps/assigned/{userEntitlementId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps/assigned/{userEntitlementId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps/assigned/{userEntitlementId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps/assigned/{userEntitlementId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps/assigned/{userEntitlementId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps/assigned/{userEntitlementId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps/assigned/{userEntitlementId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "addon": false,
  "addonParentApplicationId": null,
  "addonParentEntitlementId": 1,
  "appLinkLocation": null,
  "appLinkUuid": null,
  "appLinkVersions": null,
  "applicationId": 1,
  "applicationProfileUrl": "http://appdirect.com/apps/3281",
  "assignUrl": null,
  "assigned": false,
  "assignmentEnabled": true,
  "authenticationMethod": "SAML",
  "autoUpgradeToPaid": false,
  "baseUrl": "http://appdirect.com",
  "billableEntitlementId": 1,
  "blurb": "C24769040",
  "bundled": false,
  "bypassTermsWhenDefault": false,
  "changeSubscriptionEnabled": true,
  "companyEntitlementExternalPartnerIdentifier": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "companyEntitlementExternalVendorIdentifier": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "companyEntitlementId": 1,
  "companyEntitlementMetadata": {},
  "companyEntitlementStatus": "INITIALIZED",
  "companyEntitlementSuspensionReason": "PAYMENT_OVERDUE",
  "companyEntitlementUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "companyWide": false,
  "contractExpired": false,
  "contractExpiring": false,
  "customIntegration": "NEW_RELIC",
  "daysUntilPayment": 0,
  "description": "Description",
  "developerName": "Developer",
  "editionCode": "RECURRING",
  "editionId": 1,
  "editionName": "Recurring Edition",
  "endOfContractDate": 1504072800000,
  "free": false,
  "gridImagePath": null,
  "gridImageSrcset": {},
  "hideAppTile": false,
  "imageBaseUrl": "http://appdirect.com",
  "imageUrl": null,
  "importableApplicationUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "imported": false,
  "importedPasswordManager": false,
  "invoiceExternallyProcessed": false,
  "invoiceStatus": "PAID",
  "keychainApplicationId": 1,
  "keychainCredentialsId": 1,
  "launchUrl": "http://appdirect.com/launch?userEntitlementId=1891",
  "legacyBundleCompanyEntitlementId": 1,
  "linkUrl": null,
  "links": [
    {
      "href": "http://appdirect.com/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/memberships/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1/myapps/password-manager",
      "rel": "self"
    }
  ],
  "manageOnVendorUrl": null,
  "manageUrl": null,
  "name": "Password.Manager",
  "newSubscriptionEnabled": true,
  "newUpload": false,
  "openIdConnectInitiateLoginMethod": "GET",
  "openIdLoginMethod": "GET",
  "openIdLoginUrl": "http://openid.login",
  "orderDuration": "ONE_TIME",
  "overdue": true,
  "overview": "C24769040",
  "ownerFirstName": "First",
  "ownerId": 1,
  "ownerLastName": "Last",
  "ownerUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "partner": "APPDIRECT",
  "payUrl": null,
  "paymentDueDate": 1504072800000,
  "pending": false,
  "pendingAppId": 1,
  "pendingAppType": "REQUESTED",
  "pendingAsync": false,
  "pendingCreation": false,
  "pendingEventType": "USER_UPDATED",
  "preDisabled": false,
  "privacyUrl": "http://privacy.url.com",
  "productType": "WEB_APP",
  "publishedOn": 1504072800000,
  "purchaseOrderId": 1,
  "purchaseUrl": null,
  "purchased": false,
  "remainingFreeTrialDays": 0,
  "requestable": false,
  "requested": false,
  "samlProviderUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "sampleApp": false,
  "shortcut": "http://shortcut.url.com",
  "simple": false,
  "simpleEntitlementId": 1,
  "simpleEntitlementUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "slogan": null,
  "ssoEnabled": true,
  "startDate": 1504072800000,
  "state": "ACTIVE",
  "subscriptionEventPending": false,
  "supportEmail": "help@support.com",
  "supportKb": "1024",
  "supportPhone": "1-800-9000",
  "systemTileType": "PASSWORD_MANAGER",
  "termsUrl": "http://terms.url.com",
  "upgradeToPaid": false,
  "usageType": "MULTI_USER",
  "useMessage": null,
  "useMessageTitle": null,
  "userEntitlementCreatedOn": 1504147976000,
  "userEntitlementExternalVendorIdentifier": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "userEntitlementId": 1,
  "userEntitlementMetadata": {},
  "userEntitlementStatus": "ACTIVE",
  "userEntitlementUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "userUuid": "2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1"
}

GET/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps/assigned/{userEntitlementId}

Retrieve a marketplace user's application when assignment is complete.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER_READ Allows access to read all marketplace data.
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.
ROLE_USER Allows access as the owner of the user entitlement.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Company UUID
*userEntitlementId path integer User entitlement ID
*userUuid path string User UUID

Responses

Status Meaning Description Definition
200 OK Success UserApplication
401 Unauthorized Unauthorized
404 Not Found Not Found

List applications

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "addon": false,
      "addonParentApplicationId": null,
      "addonParentEntitlementId": null,
      "appLinkLocation": null,
      "appLinkUuid": null,
      "appLinkVersions": null,
      "applicationId": 3281,
      "applicationProfileUrl": "http://appdirect.com/apps/3281",
      "assignUrl": "http://appdirect.com/account/assign?companyEntitlementId=1603",
      "assigned": true,
      "assignmentEnabled": true,
      "authenticationMethod": "OPENID",
      "autoUpgradeToPaid": false,
      "baseUrl": "http://localhost:8080",
      "billableEntitlementId": 1603,
      "blurb": "C24769040",
      "bundled": false,
      "bypassTermsWhenDefault": false,
      "changeSubscriptionEnabled": true,
      "companyEntitlementExternalPartnerIdentifier": null,
      "companyEntitlementExternalVendorIdentifier": null,
      "companyEntitlementId": 1603,
      "companyEntitlementLabel": "Acme Utilities",
      "companyEntitlementMetadata": {},
      "companyEntitlementStatus": "ACTIVE",
      "companyEntitlementSuspensionReason": "PAYMENT_OVERDUE",
      "companyEntitlementUuid": "79c142b0-12bd-441c-ad2d-f5b3d21034be",
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "companyWide": true,
      "contractExpired": false,
      "contractExpiring": false,
      "customIntegration": "NEW_RELIC",
      "daysUntilPayment": -998,
      "description": null,
      "developerName": "Appdirect",
      "editionCode": "RECURRING",
      "editionId": 7283,
      "editionName": "Recurring Edition",
      "endOfContractDate": null,
      "free": false,
      "gridImagePath": null,
      "gridImageSrcset": {},
      "hideAppTile": false,
      "imageBaseUrl": "http://localhost:8080",
      "imageUrl": null,
      "importableApplicationUuid": null,
      "imported": false,
      "importedPasswordManager": false,
      "invoiceExternallyProcessed": false,
      "invoiceStatus": "PAID",
      "keychainApplicationId": null,
      "keychainCredentialsId": null,
      "launchUrl": "http://appdirect.com/launch?userEntitlementId=1891",
      "legacyBundleCompanyEntitlementId": null,
      "linkUrl": null,
      "links": [
        {
          "href": "http://appdirect.com/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/memberships/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1/myapps/assigned/1891",
          "rel": "self"
        }
      ],
      "manageOnVendorUrl": null,
      "manageUrl": "http://appdirect.com/account/apps/1603",
      "name": "C24769040_B",
      "newSubscriptionEnabled": true,
      "newUpload": false,
      "openIdConnectInitiateLoginMethod": "GET",
      "openIdLoginMethod": "GET",
      "openIdLoginUrl": null,
      "orderDuration": "MONTHLY",
      "overdue": false,
      "overview": "C24769040",
      "ownerFirstName": "super",
      "ownerId": 1,
      "ownerLastName": "user",
      "ownerUuid": "2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1",
      "partner": "APPDIRECT",
      "payUrl": null,
      "paymentDueDate": 1425798000000,
      "pending": false,
      "pendingAppId": null,
      "pendingAppType": "REQUESTED",
      "pendingAsync": true,
      "pendingCreation": false,
      "pendingEventType": "SUBSCRIPTION_CANCEL",
      "preDisabled": false,
      "privacyUrl": null,
      "productType": "WEB_APP",
      "publishedOn": 1490375822000,
      "purchaseOrderId": 3756,
      "purchaseUrl": null,
      "purchased": true,
      "remainingFreeTrialDays": -92,
      "requestable": false,
      "requested": false,
      "samlProviderUuid": null,
      "sampleApp": false,
      "shortcut": null,
      "simple": false,
      "simpleEntitlementId": null,
      "simpleEntitlementUuid": null,
      "slogan": null,
      "ssoEnabled": true,
      "startDate": 1504072800000,
      "state": "ACTIVE",
      "subscriptionEventPending": true,
      "supportEmail": null,
      "supportKb": null,
      "supportPhone": null,
      "systemTileType": "PASSWORD_MANAGER",
      "termsUrl": null,
      "upgradeToPaid": false,
      "usageType": "MULTI_USER",
      "useMessage": null,
      "useMessageTitle": null,
      "userEntitlementCreatedOn": 1504147976000,
      "userEntitlementExternalVendorIdentifier": null,
      "userEntitlementId": 1891,
      "userEntitlementMetadata": {},
      "userEntitlementStatus": "ACTIVE",
      "userEntitlementUuid": "42bdd7be-9807-45f5-ab97-4b345a59e89f",
      "userUuid": "2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1"
    }
  ],
  "links": []
}

GET/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps

List all applications assigned to a marketplace company user.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER_READ Allows access to read all marketplace data.
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.
ROLE_USER Allows access as the owner of the user entitlements.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Company UUID
*userUuid path string User UUID

Responses

Status Meaning Description Definition
200 OK Success MyAppsList
401 Unauthorized Unauthorized

Update MyApps order

Example request

curl -X PUT https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '[
  "http://appdirect.com/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/memberships/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1/myapps/assigned/1891",
  "http://appdirect.com/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/memberships/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1/myapps/assigned/1892"
]';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

[
  "http://appdirect.com/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/memberships/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1/myapps/assigned/1891",
  "http://appdirect.com/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/memberships/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1/myapps/assigned/1892"
]

PUT/account/v2/companies/{companyUuid}/memberships/{userUuid}/myapps

Update the order in which applications will should show up on the MyApps page.

Required Scope and Authorization Rules

Scope Rule
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 Allows access to read and write all marketplace data.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.
ROLE_USER Allows access as the owner of the user entitlements.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Company UUID
*userUuid path string User UUID

Body Parameters

Ordered list of app hrefs

Array of MyAppsUrl

Property Type Description
MyAppsUrl string

MyApps URL link

Responses

Status Meaning Description Definition
204 No Content No Content
401 Unauthorized Unauthorized
404 Not Found Not Found

Navigation

List all product tags

This call lists all product groups (attributes, categories, and customer tags) that are used on your marketplace.

Example request

curl -X GET https://{marketplaceURL}/api/marketplace/v1/navigator \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/marketplace/v1/navigator HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/navigator',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/navigator',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/marketplace/v1/navigator', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/marketplace/v1/navigator',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/navigator");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "attributeGroups": [],
  "categories": [],
  "categorySortOrder": "NONE",
  "customerTagGroups": [
    {
      "customerTags": [],
      "hideOnNavigation": true,
      "id": 3,
      "name": "INDUSTRY"
    }
  ]
}

GET/marketplace/v1/navigator

List all product tags This call lists all product groups (attributes, categories, and customer tags) that are used on your marketplace.

Parameters

Parameter Type Data Type Default Description
locale query string Specify the locale context
pl query array of number The IDs of the product line to filter on. This is an optional parameter

Responses

Status Meaning Description Definition
200 OK Product tags information Navigator

Opportunities

Add items

Example request

curl -X POST https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '[
  {
    "billingConfiguration": {
      "date": "1546300800000",
      "strategy": "CUSTOM"
    },
    "pricingPlanId": "a22c03e9-9e27-4e85-8433-78f246345685",
    "provisioningConfiguration": {
      "date": "1546300800000",
      "strategy": "CUSTOM"
    },
    "subscriptionCustomAttributes": {
      "intended_os": [
        "other",
        "ios",
        "macos"
      ],
      "sales_agent_id": [
        "R353113R"
      ]
    },
    "units": [
      {
        "quantity": "8",
        "unit": "USER"
      }
    ],
    "vendorRequiredFields": {
      "email": [
        "john.doe@acme.com"
      ],
      "lastname": [
        "doe"
      ],
      "name": [
        "jonh"
      ]
    }
  }
]';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

[
  {
    "billingConfiguration": {
      "date": "1546300800000",
      "strategy": "CUSTOM"
    },
    "pricingPlanId": "a22c03e9-9e27-4e85-8433-78f246345685",
    "provisioningConfiguration": {
      "date": "1546300800000",
      "strategy": "CUSTOM"
    },
    "subscriptionCustomAttributes": {
      "intended_os": [
        "other",
        "ios",
        "macos"
      ],
      "sales_agent_id": [
        "R353113R"
      ]
    },
    "units": [
      {
        "quantity": "8",
        "unit": "USER"
      }
    ],
    "vendorRequiredFields": {
      "email": [
        "john.doe@acme.com"
      ],
      "lastname": [
        "doe"
      ],
      "name": [
        "jonh"
      ]
    }
  }
]

Example response

[
  {
    "billingConfiguration": {
      "date": "1546300800000",
      "strategy": "CUSTOM"
    },
    "id": "37f56046-2cec-4bf4-a4e2-5a733dc849a9",
    "pricingPlanId": "a22c03e9-9e27-4e85-8433-78f246345685",
    "provisioningConfiguration": {
      "date": "1546300800000",
      "strategy": "CUSTOM"
    },
    "subscriptionCustomAttributes": {
      "intended_os": [
        "other",
        "ios",
        "macos"
      ],
      "sales_agent_id": [
        "R353113R"
      ]
    },
    "units": [
      {
        "quantity": "8",
        "unit": "USER"
      }
    ],
    "vendorRequiredFields": {
      "email": [
        "john.doe@acme.com"
      ],
      "lastname": [
        "doe"
      ],
      "name": [
        "jonh"
      ]
    }
  }
]

POST/assistedSales/v1/opportunities/{opportunityId}/items

Add one or more items to an opportunity

Required: Accept-Language header with Locale format. For example: en-US

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager to the opportunity
ROLE_PARTNER Allows access as a Partner to the opportunity
ROLE_RESELLER Allows access as a Reseller for the opportunity
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager to the opportunity. Role permissions are required to execute this action.
ROLE_SALES_SUPPORT Allows access as a Sales Support for the opportunity

Parameters

Parameter Type Data Type Default Description
*opportunityId path string Opportunity ID

Body Parameters

Information about the items being added to the opportunity. Request body must include either a product ID or pricing plan ID for each item. Item IDs are returned by the API after the items are added to the opportunity

Array of OpportunityItem

Property Type Description
billingConfiguration BillingConfiguration

Custom billing dates

id string

Item ID

parentItemId string

The parent product's Product ID. Only relevant to and required for add-on products.

pricingPlanId string

Pricing plan ID

productId string

Product ID

provisioningConfiguration ProvisioningConfiguration

Custom service activation dates

subscriptionCustomAttributes CustomAttribute

Custom attributes related to the subscription

units array of BillingConfiguration

List of units (quantity and type) associated with the item

vendorRequiredFields CustomAttribute

Custom attributes related to vendor required fields for the subscription

Responses

Status Meaning Description Definition
200 OK Success array of OpportunityItem
400 Bad Request Missing or invalid required parameter OpportunityError
401 Unauthorized Unauthorized OpportunityError
403 Forbidden The user does not have access to the opportunity, or the user does not have permission to execute the action, or the opportunity status does not allow the action OpportunityError
404 Not Found Invalid opportunity ID, or product or pricing plan not found OpportunityError
409 Conflict Restrictions apply to one or more products OpportunityError

Apply discount

Example request

curl -X POST https://{marketplaceURL}/api/assistedSales/v2/opportunities/{opportunityId}/applyDiscount \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/assistedSales/v2/opportunities/{opportunityId}/applyDiscount HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/assistedSales/v2/opportunities/{opportunityId}/applyDiscount',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "discountCode": "10%OFF",
  "itemIds": [
    "166e0ce6-4309-4a16-ac9b-61bea7ce1cbc",
    "fa776d2e-cda5-4256-9a27-125a0fe3f448"
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/assistedSales/v2/opportunities/{opportunityId}/applyDiscount',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/assistedSales/v2/opportunities/{opportunityId}/applyDiscount', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/assistedSales/v2/opportunities/{opportunityId}/applyDiscount',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/assistedSales/v2/opportunities/{opportunityId}/applyDiscount");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "discountCode": "10%OFF",
  "itemIds": [
    "166e0ce6-4309-4a16-ac9b-61bea7ce1cbc",
    "fa776d2e-cda5-4256-9a27-125a0fe3f448"
  ]
}

Example response

{
  "amountDueAfterTax": "-8.0000000000",
  "amountDueBeforeTax": "-8.0000000000",
  "items": [
    {
      "discount": {
        "code": "DISCOUNT_ABC",
        "description": "10% off, applicable to all products"
      },
      "id": "ea1e0548-888b-402a-8cbc-1e3c6754a2bd",
      "pricing": [
        {
          "costType": "RECURRING_FLAT",
          "description": "Gold plan",
          "quantity": "1.0000000000",
          "totalSalePrice": "12.0000000000"
        },
        {
          "costType": "INCLUDED",
          "description": "INCLUDED",
          "quantity": "1.0000000000",
          "totalSalePrice": "0.0000000000"
        },
        {
          "costType": "DISCOUNT_FLAT",
          "description": "10% off, applicable to all products",
          "quantity": "1.0000000000",
          "totalSalePrice": "-20.0000000000"
        }
      ],
      "pricingPlan": {
        "editionCode": "1",
        "id": "19c06143-b21c-43c4-b236-eeca61512753",
        "name": "Gold plan"
      },
      "product": {
        "hasAddons": false,
        "id": "fa776d2e-cda5-4256-9a27-125a0fe3f448",
        "isAddon": false,
        "name": "Supported Product for Opportunity MVP",
        "type": "WEB_APP_STACKED"
      },
      "unitDefinitions": [
        {
          "allowDecimals": false,
          "meteredUsage": false,
          "minimum": "1.0000000000",
          "pricePerIncrement": false,
          "readOnly": true,
          "unit": "USER"
        }
      ]
    }
  ],
  "recurringTotals": [
    {
      "billingCycle": {
        "dayOfMonth": 10,
        "period": "MONTHLY"
      },
      "totalSalePrice": "-8.0000000000"
    }
  ],
  "taxSummary": []
}

POST/assistedSales/v2/opportunities/{opportunityId}/applyDiscount

Apply a discount to an opportunity. More than one discount (one per call) can be applied to an opportunity. The response is an updated opportunity summary. The discount is applied to all eligible products. However, redemption limits apply. When the redemption limits exceed the contents of the opportunity, the discount is not applied.

Required: Accept-Language header with Locale format. For example: en-US

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager to the opportunity
ROLE_PARTNER Allows access as a Partner to the opportunity
ROLE_RESELLER Allows access as a Reseller to the opportunity
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager to the opportunity
ROLE_SALES_SUPPORT Allows access as Sales Support to the opportunity

Parameters

Parameter Type Data Type Default Description
*opportunityId path string Opportunity ID

Body Parameters

The discount to be applied

DiscountRequest object:

Property Type Description
discountCode string

The discount code can be a combination of letters, numbers, and special characters

itemIds array of string

The opportunity's item IDs to which the discount is applied or removed

Responses

Status Meaning Description Definition
200 OK The discount was applied and the request returned an updated opportunity summary OpportunitySummary
400 Bad Request Either the discount code is invalid or one of the required parameters is missing or invalid OpportunityError
401 Unauthorized Unauthorized OpportunityError
403 Forbidden The user does not have access to the opportunity or have the permission to execute the action, or the opportunity status does not allow the action OpportunityError
404 Not Found Invalid opportunity ID OpportunityError
409 Conflict The discount could not be applied because the redemption limits have exceeded OpportunityError
410 Gone The discount has expired OpportunityError

Change opportunity owner

Example request

curl -X PATCH https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/owner \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PATCH https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/owner HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/owner',
  method: 'patch',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "ownerCompanyId": "6a62244e-aa2f-461b-8c7a-3a0e091be9d3",
  "ownerId": "d781ac09-b4fe-4d57-8ba2-4640fc5b7c49"
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/owner',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.patch('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/owner', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.patch 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/owner',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/owner");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "ownerCompanyId": "6a62244e-aa2f-461b-8c7a-3a0e091be9d3",
  "ownerId": "d781ac09-b4fe-4d57-8ba2-4640fc5b7c49"
}

Example response

{
  "actionRestrictions": {},
  "availableActions": [
    "ADD_PRODUCT"
  ],
  "createdOn": "1546300800000",
  "customerUser": {
    "company": {
      "id": "100",
      "name": "Customer Company"
    },
    "email": "jane.smith@company.com",
    "firstName": "Jane",
    "id": "498c62ea-ad14-48e6-96ce-5400c617444c",
    "lastName": "Smith"
  },
  "id": "ef6c414f-39da-401f-a4b8-81adc6190fda",
  "ownerUser": {
    "company": {
      "id": "6a62244e-aa2f-461b-8c7a-3a0e091be9d3",
      "name": "Acme Corp."
    },
    "email": "john.doe@acme.com",
    "firstName": "John",
    "id": "d781ac09-b4fe-4d57-8ba2-4640fc5b7c49",
    "lastName": "Doe"
  },
  "status": "OPEN"
}

PATCH/assistedSales/v1/opportunities/{opportunityId}/owner

Changes the owner of an opportunity. When the owner changes, all products are removed from the opportunity.

Required: Accept-Language header with Locale format. For example: en-US

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager to the opportunity
ROLE_PARTNER Allows access as a Partner to the opportunity
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager to the opportunity

Parameters

Parameter Type Data Type Default Description
*opportunityId path string Opportunity ID

Body Parameters

Information about the new owner of the opportunity

OpportunityUpdateOwnerRequest object:

Property Type Description
ownerCompanyId string

The unique company ID of the owner

ownerId string

The unique user ID of the owner

Responses

Status Meaning Description Definition
200 OK The updated opportunity with the new owner and empty of products Opportunity
400 Bad Request Missing or invalid required parameter, or the new owner's company membership is invalid, or the Reseller is not linked to the opportunity customer OpportunityError
401 Unauthorized Unauthorized OpportunityError
403 Forbidden The user does not have access to the opportunity, or the user does not have permission to execute the action, or the opportunity status does not allow the action OpportunityError
404 Not Found Invalid opportunity ID OpportunityError

Clone opportunity

Example request

curl -X POST https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/clone \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/clone HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/clone',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "customerCompanyId": "498c62ea-ad14-48e6-96ce-5400c617444c",
  "customerId": "505f0a0c-57a7-4d9e-9fac-66bbf557ac4d",
  "name": "Opportunity name - COPY",
  "ownerCompanyId": "6a62244e-aa2f-461b-8c7a-3a0e091be9d3",
  "ownerId": "d781ac09-b4fe-4d57-8ba2-4640fc5b7c49"
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/clone',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/clone', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/clone',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/clone");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "customerCompanyId": "498c62ea-ad14-48e6-96ce-5400c617444c",
  "customerId": "505f0a0c-57a7-4d9e-9fac-66bbf557ac4d",
  "name": "Opportunity name - COPY",
  "ownerCompanyId": "6a62244e-aa2f-461b-8c7a-3a0e091be9d3",
  "ownerId": "d781ac09-b4fe-4d57-8ba2-4640fc5b7c49"
}

Example response

{
  "opportunityId": "498c62ea-ad14-48e6-96ce-5400c617444c"
}

POST/assistedSales/v1/opportunities/{opportunityId}/clone

Clone an existing opportunity

Required: Accept-Language header with Locale format. For example: en-US

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager to the opportunity
ROLE_PARTNER Allows access as a Partner to the opportunity
ROLE_RESELLER Allows access as a Reseller to the opportunity
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager to the opportunity
ROLE_SALES_SUPPORT Allows access as a Sales Support to the opportunity

Parameters

Parameter Type Data Type Default Description
*opportunityId path string Opportunity ID

Body Parameters

Parameters to be used when cloning the opportunity

OpportunityCloneRequest object:

Property Type Description
customerCompanyId string

The company ID of the customer

customerId string

The user ID of the customer

name string

The name of the opportunity

ownerCompanyId string

The company ID of the sales agent

ownerId string

The user ID of the sales agent

Responses

Status Meaning Description Definition
202 Accepted The response includes the new opportunity ID in the Location header in the following path: /api/assistedSales/v1/opportunities/{opportunityId}. The path contained in the location header is used by the client to fetch the opportunity. OpportunityClone
400 Bad Request Missing or invalid required parameter OpportunityError
401 Unauthorized Unauthorized OpportunityError
403 Forbidden The user does not have access to the opportunity, or the user does not have permission to execute the action OpportunityError
404 Not Found Either the opportunity ID is invalid, or the customer or owner cannot be found. OpportunityError

Create opportunity

Example request

curl -X POST https://{marketplaceURL}/api/assistedSales/v1/opportunities \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/assistedSales/v1/opportunities HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/assistedSales/v1/opportunities',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "currency": "USD",
  "customerCompanyId": "498c62ea-ad14-48e6-96ce-5400c617444c",
  "customerId": "505f0a0c-57a7-4d9e-9fac-66bbf557ac4d",
  "items": [
    {
      "pricingPlanId": "85d30404-c56b-4dff-9f3b-06636477fe55",
      "units": [
        {
          "quantity": 10,
          "unit": "USER"
        }
      ]
    },
    {
      "pricingPlanId": "d12931cf-eac6-45fa-8965-d33b1c5698b0",
      "units": []
    }
  ],
  "ownerCompanyId": "6a62244e-aa2f-461b-8c7a-3a0e091be9d3",
  "ownerId": "d781ac09-b4fe-4d57-8ba2-4640fc5b7c49"
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/assistedSales/v1/opportunities',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/assistedSales/v1/opportunities', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/assistedSales/v1/opportunities',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/assistedSales/v1/opportunities");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "currency": "USD",
  "customerCompanyId": "498c62ea-ad14-48e6-96ce-5400c617444c",
  "customerId": "505f0a0c-57a7-4d9e-9fac-66bbf557ac4d",
  "items": [
    {
      "pricingPlanId": "85d30404-c56b-4dff-9f3b-06636477fe55",
      "units": [
        {
          "quantity": 10,
          "unit": "USER"
        }
      ]
    },
    {
      "pricingPlanId": "d12931cf-eac6-45fa-8965-d33b1c5698b0",
      "units": []
    }
  ],
  "ownerCompanyId": "6a62244e-aa2f-461b-8c7a-3a0e091be9d3",
  "ownerId": "d781ac09-b4fe-4d57-8ba2-4640fc5b7c49"
}

Example response

{
  "actionRestrictions": {},
  "availableActions": [
    "ADD_PRODUCT",
    "EDIT",
    "FINALIZE",
    "SET_CUSTOM_PRICE",
    "SET_CUSTOM_CONTRACT",
    "SET_PROVISIONING_DATE",
    "SET_BILLING_DATE",
    "CHANGE_OPPORTUNITY_OWNER"
  ],
  "createdOn": "1546300800000",
  "currency": "USD",
  "customerUser": {
    "company": {
      "id": "100",
      "name": "Customer Company"
    },
    "email": "jane.smith@company.com",
    "firstName": "Jane",
    "id": "498c62ea-ad14-48e6-96ce-5400c617444c",
    "lastName": "Smith"
  },
  "id": "ef6c414f-39da-401f-a4b8-81adc6190fda",
  "items": [
    {
      "id": "4ccf689b-4339-4fc9-a8b3-b05c5a87c1be",
      "pricingPlanId": "4bc864b5-f63f-4933-be19-3700aa9a8cc4",
      "subscriptionCustomAttributes": {
        "intended_os": [
          "other",
          "ios",
          "macos"
        ],
        "sales_agent_id": [
          "R353113R"
        ]
      },
      "units": [
        {
          "quantity": "20",
          "unit": "USER"
        }
      ],
      "vendorRequiredFields": {
        "email": [
          "john.doe@acme.com"
        ],
        "lastname": [
          "Doe"
        ],
        "name": [
          "John"
        ]
      }
    },
    {
      "id": "dece524d-0466-4185-b3bb-1f8a300c37cd",
      "pricingPlanId": "80b85538-ffc1-4c4b-acb1-1bf87c8c2fc4",
      "units": []
    }
  ],
  "name": "Prospect N1",
  "ownerUser": {
    "company": {
      "id": "1",
      "name": "Acme Corp."
    },
    "email": "john.doe@acme.com",
    "firstName": "John",
    "id": "d781ac09-b4fe-4d57-8ba2-4640fc5b7c49",
    "lastName": "Doe"
  },
  "purchaseEffectiveDate": "1577750400000",
  "status": "OPEN"
}

POST/assistedSales/v1/opportunities

Creates a new opportunity

Required: Accept-Language header with Locale format. For example: en-US

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager to the opportunity
ROLE_PARTNER Allows access as a Partner to the opportunity
ROLE_RESELLER Allows access as a Reseller to the opportunity
ROLE_SALES_SUPPORT Allows access as a Sales Support Representative to the opportunity

Parameters

Parameter Type Data Type Default Description
context query string of enum:
RESELLER
SSR
Deprecated. Parameter has no impact on this endpoint.

Body Parameters

Information about the opportunity being created

OpportunityCreationRequest object:

Property Type Description
currency OpportunityCurrency

The currency using the ISO-4217 currency code

customerCompanyId string

Customer company ID

customerId string

Customer user ID

items array of OpportunityItem

List of items in the opportunity

name string

Opportunity name

ownerCompanyId string

Sales agent company ID

ownerId string

Sales agent user ID

purchaseEffectiveDate number

Opportunity purchase effective date, in UNIX Epoch milliseconds

Responses

Status Meaning Description Definition
200 OK Opportunity created Opportunity
400 Bad Request The owner's or customer's company membership is invalid, or the owner is a Reseller who is not linked to the opportunity customer OpportunityError
401 Unauthorized Unauthorized OpportunityError
409 Conflict There is at least one restriction for a product in the opportunity OpportunityError

Create or replace shipping address

Example request

curl -X POST https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/shipping \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/shipping HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/shipping',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "deliveryAddress": {
    "addressLine1": "Main Street 446",
    "city": "Greenbow",
    "countryCode": "US",
    "name": "John Smith",
    "postalCode": "50505",
    "subdivisionCode": "AL"
  },
  "sameAsBillingAddress": false
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/shipping',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/shipping', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/shipping',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/shipping");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "deliveryAddress": {
    "addressLine1": "Main Street 446",
    "city": "Greenbow",
    "countryCode": "US",
    "name": "John Smith",
    "postalCode": "50505",
    "subdivisionCode": "AL"
  },
  "sameAsBillingAddress": false
}

Example response

{
  "deliveryAddress": {
    "addressLine1": "Main Street 446",
    "city": "Greenbow",
    "countryCode": "US",
    "name": "John Smith",
    "postalCode": "50505",
    "subdivisionCode": "AL"
  },
  "sameAsBillingAddress": false
}

POST/assistedSales/v1/opportunities/{opportunityId}/shipping

Create or replace a shipping address for physical goods that require one on an opportunity. There is one shipping address per opportunity.

Required: Accept-Language header with Locale format. For example: en-US

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager to the opportunity
ROLE_PARTNER Allows access as a Partner to the opportunity
ROLE_RESELLER Allows access as a Reseller to the opportunity
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager to the opportunity
ROLE_SALES_SUPPORT Allows access as a Sales Support to the opportunity

Parameters

Parameter Type Data Type Default Description
*opportunityId path string Opportunity ID

Body Parameters

The shipping address information

OpportunityShipping object:

Property Type Description
deliveryAddress DeliveryAddress

The shipping address

sameAsBillingAddress boolean

Whether customer requests to use billing address as shipping address. WARNING: Does not manage addresses; does not change shipping address to billing address, nor update shipping address if billing address changes.

Responses

Status Meaning Description Definition
200 OK Shipping address created or replaced successfully OpportunityShipping
400 Bad Request Missing or invalid required parameter, or the vendor does not ship to the provided address OpportunityError
401 Unauthorized Unauthorized OpportunityError
404 Not Found No opportunity found with the given ID OpportunityError
409 Conflict Conflict OpportunityError

Remove opportunities

Example request

curl -X DELETE https://{marketplaceURL}/api/assistedSales/v1/opportunities?type=array&items=%5Bobject%20Object%5D \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/assistedSales/v1/opportunities?type=array&items=%5Bobject%20Object%5D HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/assistedSales/v1/opportunities',
  method: 'delete',
  data: '?type=array&items=%5Bobject%20Object%5D',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/assistedSales/v1/opportunities?type=array&items=%5Bobject%20Object%5D',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/assistedSales/v1/opportunities', params={
  'opportunityId': {
  "type": "array",
  "items": {
    "type": "string"
  }
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/assistedSales/v1/opportunities',
  params: {
  'opportunityId' => 'array[string]'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/assistedSales/v1/opportunities?type=array&items=%5Bobject%20Object%5D");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "code": "UNAUTHORIZED",
  "message": "HTTP 401 Unauthorized",
  "status": 401
}

DELETE/assistedSales/v1/opportunities

Removes a list of opportunities

Required: Accept-Language header with Locale format. For example: en-US

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager to the opportunity
ROLE_PARTNER Allows access as a Partner to the opportunity
ROLE_RESELLER Allows access as a Reseller to the opportunity
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager to the opportunity
ROLE_SALES_SUPPORT Allows Sales Support Representative access to opportunity

Parameters

Parameter Type Data Type Default Description
*opportunityId query array of string This parameter is required. The parameter lists the opportunity IDs.

Responses

Status Meaning Description Definition
204 No Content No Content
400 Bad Request Bad Request OpportunityError
401 Unauthorized Unauthorized OpportunityError

Remove item

Example request

curl -X DELETE https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items/{itemId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items/{itemId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items/{itemId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items/{itemId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items/{itemId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items/{itemId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items/{itemId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "code": "NOT_FOUND",
  "message": "Invalid opportunity ID",
  "status": 404
}

DELETE/assistedSales/v1/opportunities/{opportunityId}/items/{itemId}

Removes an item from the opportunity

Required: Accept-Language header with Locale format. For example: en-US

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager to the opportunity
ROLE_PARTNER Allows access as a Partner to the opportunity
ROLE_RESELLER Allows access as a Reseller to the opportunity
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager to the opportunity
ROLE_SALES_SUPPORT Allows access as a Sales Support to the opportunity

Parameters

Parameter Type Data Type Default Description
*itemId path string Item ID
*opportunityId path string Opportunity ID

Responses

Status Meaning Description Definition
204 No Content No Content
401 Unauthorized Unauthorized OpportunityError
403 Forbidden The user does not have access to the opportunity or the opportunity status does not allow the action OpportunityError
404 Not Found Invalid opportunity ID OpportunityError

Edit item

Example request

curl -X PUT https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items/{itemId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items/{itemId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items/{itemId}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "billingConfiguration": {
    "date": "1546300800000",
    "strategy": "CUSTOM"
  },
  "contractConfiguration": {
    "blockContractDowngrades": true,
    "blockContractUpgrades": false,
    "blockSwitchToShorterContract": true,
    "contractCancellationPeriodLimit": null,
    "contractCancellationPeriodUnit": "NONE",
    "endOfContractGracePeriod": null,
    "endOfContractGracePeriodUnit": "INFINITY",
    "keepContractDateOnPlanChange": false,
    "minimumServiceLength": "3",
    "minimumServiceLengthUnit": "MONTHLY",
    "renewalConfiguration": "MONTH_TO_MONTH",
    "terminationFee": {
      "amount": "2",
      "feeType": "FIXED"
    },
    "terminationFeeGracePeriod": "7",
    "terminationFeeGracePeriodUnit": "DAY",
    "unitTerms": {
      "USER": {
        "blockContractDecrease": true,
        "blockContractIncrease": false,
        "blockOriginalContractDecrease": false
      }
    }
  },
  "customPrices": [
    {
      "costId": "e5f403a3-7ba0-45d4-8117-8dd8cbceb6c6",
      "price": 100
    },
    {
      "costId": "9742e09a-e1b4-4b9e-b1a7-66df3e41cebe",
      "price": 20
    }
  ],
  "id": "37f56046-2cec-4bf4-a4e2-5a733dc849a9",
  "pricingPlanId": "a22c03e9-9e27-4e85-8433-78f246345685",
  "provisioningConfiguration": {
    "date": "1546300800000",
    "strategy": "CUSTOM"
  },
  "subscriptionCustomAttributes": {
    "intended_os": [
      "other",
      "ios",
      "macos"
    ],
    "sales_agent_id": [
      "R353113R"
    ]
  },
  "units": [
    {
      "quantity": "8",
      "unit": "USER"
    }
  ],
  "vendorRequiredFields": {
    "email": [
      "john.doe@acme.com"
    ],
    "lastname": [
      "Doe"
    ],
    "name": [
      "John"
    ]
  }
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items/{itemId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items/{itemId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items/{itemId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items/{itemId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "billingConfiguration": {
    "date": "1546300800000",
    "strategy": "CUSTOM"
  },
  "contractConfiguration": {
    "blockContractDowngrades": true,
    "blockContractUpgrades": false,
    "blockSwitchToShorterContract": true,
    "contractCancellationPeriodLimit": null,
    "contractCancellationPeriodUnit": "NONE",
    "endOfContractGracePeriod": null,
    "endOfContractGracePeriodUnit": "INFINITY",
    "keepContractDateOnPlanChange": false,
    "minimumServiceLength": "3",
    "minimumServiceLengthUnit": "MONTHLY",
    "renewalConfiguration": "MONTH_TO_MONTH",
    "terminationFee": {
      "amount": "2",
      "feeType": "FIXED"
    },
    "terminationFeeGracePeriod": "7",
    "terminationFeeGracePeriodUnit": "DAY",
    "unitTerms": {
      "USER": {
        "blockContractDecrease": true,
        "blockContractIncrease": false,
        "blockOriginalContractDecrease": false
      }
    }
  },
  "customPrices": [
    {
      "costId": "e5f403a3-7ba0-45d4-8117-8dd8cbceb6c6",
      "price": 100
    },
    {
      "costId": "9742e09a-e1b4-4b9e-b1a7-66df3e41cebe",
      "price": 20
    }
  ],
  "id": "37f56046-2cec-4bf4-a4e2-5a733dc849a9",
  "pricingPlanId": "a22c03e9-9e27-4e85-8433-78f246345685",
  "provisioningConfiguration": {
    "date": "1546300800000",
    "strategy": "CUSTOM"
  },
  "subscriptionCustomAttributes": {
    "intended_os": [
      "other",
      "ios",
      "macos"
    ],
    "sales_agent_id": [
      "R353113R"
    ]
  },
  "units": [
    {
      "quantity": "8",
      "unit": "USER"
    }
  ],
  "vendorRequiredFields": {
    "email": [
      "john.doe@acme.com"
    ],
    "lastname": [
      "Doe"
    ],
    "name": [
      "John"
    ]
  }
}

Example response

{
  "billingConfiguration": {
    "date": "1546300800000",
    "strategy": "CUSTOM"
  },
  "contractConfiguration": {
    "blockContractDowngrades": true,
    "blockContractUpgrades": false,
    "blockSwitchToShorterContract": true,
    "contractCancellationPeriodLimit": null,
    "contractCancellationPeriodUnit": "NONE",
    "endOfContractGracePeriod": null,
    "endOfContractGracePeriodUnit": "INFINITY",
    "keepContractDateOnPlanChange": false,
    "minimumServiceLength": "3",
    "minimumServiceLengthUnit": "MONTHLY",
    "renewalConfiguration": "MONTH_TO_MONTH",
    "terminationFee": {
      "amount": "2",
      "feeType": "FIXED"
    },
    "terminationFeeGracePeriod": "7",
    "terminationFeeGracePeriodUnit": "DAY",
    "unitTerms": {
      "USER": {
        "blockContractDecrease": true,
        "blockContractIncrease": false,
        "blockOriginalContractDecrease": false
      }
    }
  },
  "id": "37f56046-2cec-4bf4-a4e2-5a733dc849a9",
  "pricing": [
    {
      "costId": "cd3c7c22-sd64-4bag-8a4v-5e84d90ab291",
      "costType": "RECURRING_FLAT",
      "costTypeCategory": "RECURRING",
      "description": "RECURRING_FLAT",
      "priceRanges": [],
      "pricingStrategy": "FREE",
      "quantity": "1.0000000000",
      "salePrice": "0.0000000000",
      "totalSalePrice": "0.0000000000",
      "wholesalePrice": "0.0000000000"
    },
    {
      "costId": "kl3c7c24-sd33-4bui-8a4v-8u84d98ab333",
      "costType": "INCLUDED",
      "costTypeCategory": "RECURRING",
      "description": "INCLUDED",
      "priceRanges": [],
      "pricingStrategy": "UNLIMITED",
      "salePrice": "0.0000000000",
      "totalSalePrice": "0.0000000000",
      "unit": "USER",
      "wholesalePrice": "0.0000000000"
    }
  ],
  "pricingPlan": {
    "id": "031d9ed2-3df1-44f5-876a-6b4318ba7bdb",
    "name": "Recurring Edition with Unlimited Included Users"
  },
  "product": {
    "id": "cc0c7c28-ea65-4bab-8a4a-5e84d90ab291",
    "logo": "https://logs.acme.com/400x400/ddd/000.png&text=Appsome+App",
    "name": "Appsome Webapp",
    "type": "WEB_APP"
  },
  "provisioningConfiguration": {
    "date": "1546300800000",
    "strategy": "CUSTOM"
  },
  "subscriptionCustomAttributes": {
    "intended_os": [
      "other",
      "ios",
      "macos"
    ],
    "sales_agent_id": [
      "R353113R"
    ]
  },
  "units": [
    {
      "quantity": "8",
      "unit": "USER"
    }
  ],
  "vendorRequiredFields": {
    "email": [
      "john.doe@acme.com"
    ],
    "lastname": [
      "Doe"
    ],
    "name": [
      "John"
    ]
  }
}

PUT/assistedSales/v1/opportunities/{opportunityId}/items/{itemId}

Edit an item on the opportunity.

Required: Accept-Language header with Locale format. For example: en-US

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager to the opportunity
ROLE_PARTNER Allows access as a Partner to the opportunity
ROLE_RESELLER Allow access as a Reseller to the opportunity. Role permissions are required to update, for example, custom prices, custom contracts, provisioning configuration, and billing configuration.
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager to the opportunity. Role permissions are required to update, for example, custom prices.
ROLE_SALES_SUPPORT Allows access as a Sales Support Representative to the opportunity. Role permissions are required to update, for example, custom prices, custom contracts, provisioning configuration, and billing configuration.

Parameters

Parameter Type Data Type Default Description
*itemId path string Item ID
*opportunityId path string Opportunity ID

Body Parameters

Information about the item being edited

OpportunityItemUpdateRequest object:

Property Type Description
billingConfiguration BillingConfiguration

Determines when the billing cycle starts. Set UPON_SERVICE_ACTIVATION to start the billing cycle according to the specified provisioning strategy (either immediately after the opportunity is finalized or on a custom provisioning date). Set NEXT_BILLING_CYCLE to start the billing cycle according to the marketplace billing configuration (for example, first of the month). Set CUSTOM to start the billing cycle on a specified date in the future.

contractConfiguration ContractConfiguration

Contract configuration options for subscriptions that customers purchase. For example: contract length and cancellation penalities.

customPrices array of CustomPrice

List of custom prices per cost

id string

Item ID

pricingPlanId string

Pricing plan ID

provisioningConfiguration ProvisioningConfiguration

Determines when to send the service activation request to the vendor, either immediately after the opportunity is finalized (set the provisioning strategy to IMMEDIATELY) or at a future date (set the provisioning strategy to CUSTOM and set the desired date).

subscriptionCustomAttributes CustomAttribute

Custom attributes as key-value pairs. Values must be a string array

units array of Unit

List of units (quantity and type) associated with the item

vendorRequiredFields CustomAttribute

Custom attributes as key-value pairs. Values must be a string array

Responses

Status Meaning Description Definition
200 OK Success OpportunityItemDetail
400 Bad Request Missing or invalid required parameter OpportunityError
401 Unauthorized Unauthorized OpportunityError
403 Forbidden The user does not have access to the opportunity, or does not have permission to update part or the whole item information, or the opportunity status does not allow the action OpportunityError
404 Not Found Invalid opportunity ID OpportunityError

Finalize opportunity

Example request

curl -X POST https://{marketplaceURL}/api/assistedSales/v2/opportunities/{opportunityId}/finalize \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/assistedSales/v2/opportunities/{opportunityId}/finalize HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/assistedSales/v2/opportunities/{opportunityId}/finalize',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/assistedSales/v2/opportunities/{opportunityId}/finalize',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/assistedSales/v2/opportunities/{opportunityId}/finalize', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/assistedSales/v2/opportunities/{opportunityId}/finalize',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/assistedSales/v2/opportunities/{opportunityId}/finalize");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "availableActions": [],
  "createdOn": "1546300800000",
  "currency": "USD",
  "customerUser": {
    "company": {
      "id": "100",
      "name": "Customer Company"
    },
    "email": "jane.smith@company.com",
    "firstName": "Jane",
    "id": "498c62ea-ad14-48e6-96ce-5400c617444c",
    "lastName": "Smith"
  },
  "id": "ef6c414f-39da-401f-a4b8-81adc6190fda",
  "items": [
    {
      "id": "4ccf689b-4339-4fc9-a8b3-b05c5a87c1be",
      "pricingPlanId": "4bc864b5-f63f-4933-be19-3700aa9a8cc4",
      "subscriptionCustomAttributes": {
        "intended_os": [
          "other",
          "ios",
          "macos"
        ],
        "sales_agent_id": [
          "R353113R"
        ]
      },
      "units": [
        {
          "quantity": "20",
          "unit": "USER"
        }
      ],
      "vendorRequiredFields": {
        "email": [
          "john.doe@acme.com"
        ],
        "lastname": [
          "Doe"
        ],
        "name": [
          "John"
        ]
      }
    },
    {
      "id": "dece524d-0466-4185-b3bb-1f8a300c37cd",
      "pricingPlanId": "80b85538-ffc1-4c4b-acb1-1bf87c8c2fc4",
      "units": []
    }
  ],
  "name": "Prospect N1",
  "ownerUser": {
    "company": {
      "id": "1",
      "name": "Acme Corp."
    },
    "email": "john.doe@acme.com",
    "firstName": "John",
    "id": "d781ac09-b4fe-4d57-8ba2-4640fc5b7c49",
    "lastName": "Doe"
  },
  "status": "PROCESSING"
}

POST/assistedSales/v2/opportunities/{opportunityId}/finalize

Finalize an opportunity

Required: Accept-Language header with Locale format. For example: en-US

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager to the opportunity
ROLE_PARTNER Allows access as a Partner to the opportunity
ROLE_RESELLER Allows access as a Reseller to the opportunity. Role permissions are required to execute this action.
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager to the opportunity. Role permissions are required to execute this action.
ROLE_SALES_SUPPORT Allows access as a Sales Support to the opportunity. Role permissions are required to execute this action.

Parameters

Parameter Type Data Type Default Description
*opportunityId path string Opportunity ID

Responses

Status Meaning Description Definition
202 Accepted Accepted Opportunity
401 Unauthorized Unauthorized OpportunityError
403 Forbidden The user does not have access to the opportunity, or the user does not have permission to execute the action, or the opportunity status does not allow the action, or restrictions apply such as customer account being inactive. OpportunityError
404 Not Found Invalid opportunity ID OpportunityError

Retrieve validation results

Example request

curl -X GET https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/validation \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/validation HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/validation',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/validation',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/validation', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/validation',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/validation");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "blockingErrors": [
    {
      "code": "ASSOCIATION_VALIDATION_API_ERROR",
      "itemId": "f9b31739-ee52-42dd-bd3c-44d40d4875f9",
      "message": "Invalid parent product",
      "messageParameters": []
    },
    {
      "code": "REQUIRED_FIELD_VALIDATION_ERROR",
      "itemId": "eb690c8d-1c57-497c-82bf-a4194362d954",
      "message": "There are validation errors",
      "messageParameters": [
        {
          "key": "REQUIRED_FIELD_KEY",
          "value": "DOMAIN"
        },
        {
          "key": "REQUIRED_FIELD_ERROR_MESSAGE",
          "value": "The domain is not valid"
        }
      ]
    },
    {
      "code": "REQUIRED_FIELD_VALIDATION_ERROR",
      "itemId": "eb690c8d-1c57-497c-82bf-a4194362d954",
      "message": "There are validation errors",
      "messageParameters": [
        {
          "key": "REQUIRED_FIELD_KEY",
          "value": "USERNAME"
        },
        {
          "key": "REQUIRED_FIELD_ERROR_MESSAGE",
          "value": "The username is not valid"
        }
      ]
    }
  ],
  "pendingValidations": [
    "SUBSCRIPTION_VALIDATIONS"
  ]
}

GET/assistedSales/v1/opportunities/{opportunityId}/validation

Retrieve the latest validation results for an opportunity

Required: Accept-Language header with Locale format. For example: en-US

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager to the opportunity
ROLE_PARTNER Allows access as a Partner to the opportunity
ROLE_PARTNER_READ Allows read access as a Partner to the opportunity
ROLE_RESELLER Allows access as a Reseller to the opportunity
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager to the opportunity
ROLE_SALES_SUPPORT Allows access as a Sales Support to the opportunity

Parameters

Parameter Type Data Type Default Description
enforce query boolean Indicates that a new validation must be executed and returned
*opportunityId path string Opportunity ID

Responses

Status Meaning Description Definition
200 OK Validation results were retrieved successfully OpportunityValidation
400 Bad Request Missing required parameter OpportunityError
401 Unauthorized Unauthorized OpportunityError
403 Forbidden The user does not have access to the opportunity, or the user does not have permission to execute the action. OpportunityError
404 Not Found Invalid opportunity ID OpportunityError
503 Service Unavailable Unable to retrieve validation results because the service is unavailable OpportunityError

Required field definitions

Example request

curl -X POST https://{marketplaceURL}/api/assistedSales/v1/opportunities/items/requiredFields/definitions?userId=type,string&companyId=type,string&salesAgentUserId=type,string&salesAgentCompanyId=type,string \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/assistedSales/v1/opportunities/items/requiredFields/definitions?userId=type,string&companyId=type,string&salesAgentUserId=type,string&salesAgentCompanyId=type,string HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json
Accept-Language: [object Object]

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/items/requiredFields/definitions',
  method: 'post',
  data: '?userId=type,string&companyId=type,string&salesAgentUserId=type,string&salesAgentCompanyId=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '[
  {
    "editionId": "EDITION_CODE",
    "productId": "dfc9cefb-610b-4e49-ade8-6ae51a4d35c9"
  }
]';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/assistedSales/v1/opportunities/items/requiredFields/definitions?userId=type,string&companyId=type,string&salesAgentUserId=type,string&salesAgentCompanyId=type,string',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/assistedSales/v1/opportunities/items/requiredFields/definitions', params={
  'userId': {
  "type": "string"
},  'companyId': {
  "type": "string"
},  'salesAgentUserId': {
  "type": "string"
},  'salesAgentCompanyId': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/items/requiredFields/definitions',
  params: {
  'userId' => 'string',
'companyId' => 'string',
'salesAgentUserId' => 'string',
'salesAgentCompanyId' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/assistedSales/v1/opportunities/items/requiredFields/definitions?userId=type,string&companyId=type,string&salesAgentUserId=type,string&salesAgentCompanyId=type,string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

[
  {
    "editionId": "EDITION_CODE",
    "productId": "dfc9cefb-610b-4e49-ade8-6ae51a4d35c9"
  }
]

Example response

{
  "editionId": "EDITION_CODE",
  "forms": [
    {
      "context": "CART_LEVEL",
      "fields": [
        {
          "fieldType": "TEXT",
          "inputCode": "FirstName",
          "inputTitle": "First name",
          "options": {
            "suffix": {
              "inputCode": "",
              "text": ""
            }
          },
          "subTitle": "",
          "tooltip": "",
          "validations": {
            "expression": "^[A-Za-z]+(((\\'|\\-|\\.(\\s)?|\\,(\\s)?|\\s)?([A-Za-z])+))*$",
            "maxLength": "255",
            "minLength": "2",
            "readonly": false,
            "required": true
          },
          "value": "John"
        },
        {
          "fieldType": "COUNTRY",
          "inputCode": "Address/ISO3Country",
          "inputTitle": "Country",
          "options": {
            "placeholder": "",
            "suffix": {
              "text": ""
            }
          },
          "subTitle": "",
          "tooltip": "",
          "validations": {
            "expression": "^[A-Za-z]{2}$",
            "maxLength": "3",
            "minLength": "2",
            "readonly": false,
            "required": true
          },
          "value": "USA"
        },
        {
          "fieldType": "TEXT",
          "inputCode": "SubDomain",
          "inputTitle": "Your primary domain name",
          "options": {
            "placeholder": "movies.entertainment.com",
            "suffix": {
              "inputCode": "",
              "text": ".thedomain.com"
            }
          },
          "subTitle": "",
          "tooltip": "Your subdomain and domain names. For example: When subdomain=movies, and domain=entertainment.com, the subdomain value is: movies.entertainment.com",
          "validations": {
            "expression": "^([^\\W|http(s?)://][a-zA-Z]+)(\\.[a-zA-Z]+)*",
            "maxLength": "255",
            "minLength": "1",
            "readonly": false,
            "required": true
          },
          "value": ""
        }
      ],
      "isvIdentifier": "ISV",
      "subTitle": "Additional Information Subtitle",
      "title": "Additional Information"
    }
  ],
  "productId": "dfc9cefb-610b-4e49-ade8-6ae51a4d35c9"
}

POST/assistedSales/v1/opportunities/items/requiredFields/definitions

For a customer/sales agent combination, returns the vendor-required fields for one or more products, and a description of the fields. Request can be made before or after an opportunity is created. It returns the fields that will be required, and any values previously saved on the AppDirect platform that can be prepopulated when an opportunity is created. It does not return required field values edited, added, or saved with an opportunity.

Some vendors (for example, Microsoft) have business rules that exclude required fields from the response when the vendor already has the information stored on their platform for the customer/sales agent/product combination.

Required: Accept-Language header with Locale format. For example: en-US

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager to the opportunity
ROLE_PARTNER Allows access as a Partner to the opportunity
ROLE_PARTNER_READ Allows read access as a Partner to the opportunity
ROLE_RESELLER Allows access as a Reseller to the opportunity
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager to the opportunity
ROLE_SALES_SUPPORT Allows access as a Sales Support Representative to the opportunity

Parameters

Parameter Type Data Type Default Description
*companyId query string Customer's company's unique identifier
*salesAgentCompanyId query string Sales agent's company's unique identifier
*salesAgentUserId query string Sales agent's unique user identifier
*userId query string Customer's unique identifier

Body Parameters

List of product IDs for which to retrieve required field details. Required: editionID and productID.

Array of ProductIds

Property Type Description
editionId string

The edition code

productId string

The product ID

Responses

Status Meaning Description Definition
200 OK Required field definitions retrieved successfully array of RequiredFields
400 Bad Request Missing or invalid required parameter OpportunityError
401 Unauthorized Unauthorized OpportunityError
404 Not Found Product ID not found OpportunityError

Get shipping address

Example request

curl -X GET https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/shipping \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/shipping HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/shipping',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/shipping',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/shipping', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/shipping',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/shipping");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "deliveryAddress": {
    "addressLine1": "Main Street 446",
    "city": "Greenbow",
    "countryCode": "US",
    "name": "John Smith",
    "postalCode": "50505",
    "subdivisionCode": "AL"
  },
  "sameAsBillingAddress": false
}

GET/assistedSales/v1/opportunities/{opportunityId}/shipping

Retrieve the shipping address for the opportunity

Required: Accept-Language header with Locale format. For example: en-US

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager to the opportunity
ROLE_PARTNER Allows access as a Partner to the opportunity
ROLE_PARTNER_READ Allows read access as a Partner to the opportunity
ROLE_RESELLER Allows access as a Reseller to the opportunity
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager to the opportunity
ROLE_SALES_SUPPORT Allows access as a Sales Support to the opportunity

Parameters

Parameter Type Data Type Default Description
*opportunityId path string Opportunity ID

Responses

Status Meaning Description Definition
200 OK Shipping address retrieved successfully OpportunityShipping
401 Unauthorized Unauthorized OpportunityError
403 Forbidden The user does not have access to the opportunity, or the user does not have permission to execute the action, or the opportunity status does not allow the action OpportunityError
404 Not Found Invalid opportunity ID OpportunityError

List items

Example request

curl -X GET https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "billingConfiguration": {
      "date": "1546300800000",
      "strategy": "CUSTOM"
    },
    "contractConfiguration": {
      "blockContractDowngrades": true,
      "blockContractUpgrades": false,
      "blockSwitchToShorterContract": true,
      "contractCancellationPeriodLimit": null,
      "contractCancellationPeriodUnit": "NONE",
      "endOfContractGracePeriod": null,
      "endOfContractGracePeriodUnit": "INFINITY",
      "keepContractDateOnPlanChange": false,
      "minimumServiceLength": 3,
      "minimumServiceLengthUnit": "MONTHLY",
      "renewalConfiguration": "MONTH_TO_MONTH",
      "terminationFee": {
        "amount": 2,
        "feeType": "FIXED"
      },
      "terminationFeeGracePeriod": 7,
      "terminationFeeGracePeriodUnit": "DAY",
      "unitTerms": {
        "USER": {
          "blockContractDecrease": true,
          "blockContractIncrease": false,
          "blockOriginalContractDecrease": false
        }
      }
    },
    "id": "37f56046-2cec-4bf4-a4e2-5a733dc849a9",
    "pricing": [
      {
        "costId": "cd3c7c22-sd64-4bag-8a4v-5e84d90ab291",
        "costType": "RECURRING_FLAT",
        "costTypeCategory": "RECURRING",
        "description": "RECURRING_FLAT",
        "priceRanges": [],
        "pricingStrategy": "FREE",
        "quantity": "1.0000000000",
        "salePrice": "0.0000000000",
        "totalSalePrice": "0.0000000000",
        "wholesalePrice": "0.0000000000"
      },
      {
        "costId": "kl3c7c24-sd33-4bui-8a4v-8u84d98ab333",
        "costType": "INCLUDED",
        "costTypeCategory": "RECURRING",
        "description": "INCLUDED",
        "priceRanges": [],
        "pricingStrategy": "UNLIMITED",
        "salePrice": "0.0000000000",
        "totalSalePrice": "0.0000000000",
        "unit": "USER",
        "wholesalePrice": "0.0000000000"
      }
    ],
    "pricingPlan": {
      "id": "031d9ed2-3df1-44f5-876a-6b4318ba7bdb",
      "name": "Recurring Edition with Unlimited Included Users"
    },
    "product": {
      "id": "cc0c7c28-ea65-4bab-8a4a-5e84d90ab291",
      "logo": "https://logs.acme.com/400x400/ddd/000.png&text=Appsome+App",
      "name": "Appsome Webapp",
      "type": "WEB_APP"
    },
    "provisioningConfiguration": {
      "date": "1546300800000",
      "strategy": "CUSTOM"
    },
    "subscriptionCustomAttributes": {
      "intended_os": [
        "other",
        "ios",
        "macos"
      ],
      "sales_agent_id": [
        "R353113R"
      ]
    },
    "units": [
      {
        "quantity": "8",
        "unit": "USER"
      }
    ],
    "vendorRequiredFields": {
      "email": [
        "john.doe@acme.com"
      ],
      "lastname": [
        "Doe"
      ],
      "name": [
        "John"
      ]
    }
  }
]

GET/assistedSales/v1/opportunities/{opportunityId}/items

Lists all items in an opportunity.

Required: Accept-Language header with Locale format. For example: en-US

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager to the opportunity
ROLE_PARTNER Allows access as a Partner to the opportunity
ROLE_PARTNER_READ Allows read access as a Partner to the opportunity
ROLE_RESELLER Allows access as a Reseller to the opportunity
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager to the opportunity
ROLE_SALES_SUPPORT Allows access as a Sales Support to the opportunity

Parameters

Parameter Type Data Type Default Description
*opportunityId path string Opportunity ID

Responses

Status Meaning Description Definition
200 OK Success OpportunityItemDetail
401 Unauthorized Unauthorized OpportunityError
403 Forbidden The user does not have access to the opportunity OpportunityError
404 Not Found Invalid opportunity ID OpportunityError

List opportunities

Example request

curl -X GET https://{marketplaceURL}/api/assistedSales/v1/opportunities \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/assistedSales/v1/opportunities HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/assistedSales/v1/opportunities',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/assistedSales/v1/opportunities',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/assistedSales/v1/opportunities', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/assistedSales/v1/opportunities',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/assistedSales/v1/opportunities");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "createdOn": 1557861989000,
      "customerUser": {
        "company": {
          "id": "100",
          "name": "Customer Company"
        },
        "email": "jane.smith@company.com",
        "firstName": "Jane",
        "id": "498c62ea-ad14-48e6-96ce-5400c617444c",
        "lastName": "Smith"
      },
      "id": "ef6c414f-39da-401f-a4b8-81adc6190fda",
      "name": "Prospect N1",
      "ownerType": "PLATFORM_OWNER",
      "ownerUser": {
        "company": {
          "id": "1",
          "name": "Acme Corp."
        },
        "email": "john.doe@acme.com",
        "firstName": "John",
        "id": "d781ac09-b4fe-4d57-8ba2-4640fc5b7c49",
        "lastName": "Doe"
      },
      "purchaseEffectiveDate": 1577750400000,
      "status": "CLOSED"
    },
    {
      "createdOn": 1557861989000,
      "customerUser": {
        "company": {
          "id": "100",
          "name": "Customer Company"
        },
        "email": "gsymons@stark.com",
        "firstName": "Gary",
        "id": "e0a6bec0-7e25-43a1-b601-6a8cec5a847f",
        "lastName": "Symons"
      },
      "id": "70826bb4-bb6c-43b8-9c39-2c4e481a8b5e",
      "name": null,
      "ownerType": "PLATFORM_OWNER",
      "ownerUser": {
        "company": {
          "id": "2",
          "name": "Globex Inc."
        },
        "email": "jane.smith@globex.com",
        "firstName": "Jane",
        "id": "d11cf5ef-6270-492f-9d2c-07fa01eeb5c2",
        "lastName": "Smith"
      },
      "purchaseEffectiveDate": null,
      "status": "OPEN"
    }
  ],
  "page": {
    "number": 1,
    "size": 10,
    "totalElements": 2,
    "totalPages": 1
  }
}

GET/assistedSales/v1/opportunities

Retrieve a list of opportunities. Returned opportunities are limited to role visibility: Marketplace Manager, Partner, Partner Read: all opportunities. Reseller Manager: all opportunities owned by Reseller companies. Reseller, SSR: all opportunities owned by the company to which the Reseller or SSR belongs. When users have multiple roles, visibility is the sum of visibility for all their roles. Additional filter parameters are available for some roles.

Required: Accept-Language header with Locale format. For example: en-US

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager to the opportunity
ROLE_PARTNER Allows access as a Partner to the opportunity
ROLE_PARTNER_READ Allows read access as a Partner to the opportunity
ROLE_RESELLER Allows access as a Reseller to the opportunity
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager to the opportunity
ROLE_SALES_SUPPORT Allows access as a Sales Support to the opportunity

Parameters

Parameter Type Data Type Default Description
context query string of enum:
RESELLER
SSR
Optional. For Marketplace Manager, Partner, and Partner Read roles, filter the returned opportunities by those owned by SSRs or Resellers.
createdOn query array of string Opportunity creation date filter, defined by upper or lower inclusive or exclusive limits, in Unix timestamp format. Acceptable values are: gte([timestamp]) - 'greater than or equal to'; or lte([timestamp]) - 'less than or equal to'
customerCompanyId query string Customer's company ID
customerId query string Customer's user ID
number query integer 1 Page number
ownerCompanyId query string Sales agent's company ID, which defines which company owns opportunities. This is an optional filter to only return opportunities that the sale's agent's company owns. Only valid for Marketplace Manager, Reseller Manager, Partner, and Partner Read roles (invalid for Reseller and SSR roles because they can only see opportunities owned by their company). No opportunities are returned when the call is filtered by a company ID for which the user does not have access.
ownerId query string Sales agent's user ID
purchaseEffectiveDate query array of string Opportunity purchase effective date filter, defined by upper or lower inclusive or exclusive limits, in Unix timestamp format. Acceptable values are: gte([timestamp]) - 'greater than or equal to'; or lte([timestamp]) - 'less than or equal to'
searchText query string General text search filter used for any ID (opportunity, sales agent, sales agent company, customer, or customer company) and opportunity name
size query integer 10 Number of results per page
sort query string Sort field and order. For ascending sort order, use the '+[FieldName]' format. For descending order, use the '-[FieldName]' format.
status query string of enum:
OPEN
CLOSED
PENDING_REVIEW
Opportunity status

Responses

Status Meaning Description Definition
200 OK Success OpportunityPage
403 Forbidden The user does not have permission to execute the action OpportunityError

Get opportunity details

Example request

curl -X GET https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "actionRestrictions": {},
  "availableActions": [
    "ADD_PRODUCT",
    "EDIT",
    "FINALIZE",
    "SET_CUSTOM_PRICE",
    "SET_CUSTOM_CONTRACT",
    "SET_PROVISIONING_DATE",
    "SET_BILLING_DATE",
    "CHANGE_OPPORTUNITY_OWNER"
  ],
  "createdOn": "1546300800000",
  "currency": "USD",
  "customerUser": {
    "company": {
      "id": "100",
      "name": "Customer Company"
    },
    "email": "jane.smith@company.com",
    "firstName": "Jane",
    "id": "498c62ea-ad14-48e6-96ce-5400c617444c",
    "lastName": "Smith"
  },
  "id": "ef6c414f-39da-401f-a4b8-81adc6190fda",
  "items": [
    {
      "id": "4ccf689b-4339-4fc9-a8b3-b05c5a87c1be",
      "pricingPlanId": "4bc864b5-f63f-4933-be19-3700aa9a8cc4",
      "subscriptionCustomAttributes": {
        "intended_os": [
          "other",
          "ios",
          "macos"
        ],
        "sales_agent_id": [
          "R353113R"
        ]
      },
      "units": [
        {
          "quantity": "20",
          "unit": "USER"
        }
      ],
      "vendorRequiredFields": {
        "email": [
          "john.doe@acme.com"
        ],
        "lastname": [
          "Doe"
        ],
        "name": [
          "John"
        ]
      }
    },
    {
      "id": "dece524d-0466-4185-b3bb-1f8a300c37cd",
      "pricingPlanId": "80b85538-ffc1-4c4b-acb1-1bf87c8c2fc4",
      "units": []
    }
  ],
  "name": "Prospect N1",
  "ownerUser": {
    "company": {
      "id": "1",
      "name": "Acme Corp."
    },
    "email": "john.doe@acme.com",
    "firstName": "John",
    "id": "d781ac09-b4fe-4d57-8ba2-4640fc5b7c49",
    "lastName": "Doe"
  },
  "purchaseEffectiveDate": "1577750400000",
  "status": "OPEN"
}

GET/assistedSales/v1/opportunities/{opportunityId}

Read an opportunity

Required: Accept-Language header with Locale format. For example: en-US

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager to the opportunity
ROLE_PARTNER Allows access as a Partner to the opportunity
ROLE_PARTNER_READ Allows read access as a Partner to the opportunity
ROLE_RESELLER Allows access as a Reseller to the opportunity
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager to the opportunity
ROLE_SALES_SUPPORT Allows access as a Sales Support to the opportunity

Parameters

Parameter Type Data Type Default Description
*opportunityId path string Opportunity ID

Responses

Status Meaning Description Definition
200 OK Success Opportunity
206 Partial Content The creation of the opportunity is still in progress and a partial result is returned. Opportunity
401 Unauthorized Unauthorized OpportunityError
403 Forbidden The user does not have access to the opportunity OpportunityError
404 Not Found Invalid opportunity ID OpportunityError

Get opportunity summary

Example request

curl -X GET https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/summary \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/summary HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/summary',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/summary',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/summary', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/summary',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/summary");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "amountDueAfterTax": "13.0000000000",
  "amountDueBeforeTax": "11.0000000000",
  "items": [
    {
      "contractConfiguration": {
        "blockContractDowngrades": true,
        "blockContractUpgrades": true,
        "blockSwitchToShorterContract": true,
        "keepContractDateOnPlanChange": true,
        "minimumServiceLength": 1,
        "minimumServiceLengthUnit": "YEARLY",
        "unitTerms": {}
      },
      "id": "c57331b7-0820-44ac-ad75-ee4ab2783b7c",
      "pricing": [
        {
          "costType": "RECURRING_FLAT",
          "description": "Tiered monthly+yearly flat with included",
          "quantity": "1.0000000000",
          "totalSalePrice": "240.0000000000"
        },
        {
          "costType": "INCLUDED",
          "description": "INCLUDED",
          "quantity": "1.0000000000",
          "totalSalePrice": "0.0000000000"
        }
      ],
      "pricingPlan": {
        "editionCode": "Tiered monthly+yearly flat with included",
        "id": "7e1fd1fa-de0e-49e9-9e6a-9c474c57f22d",
        "name": "Tiered monthly+yearly flat with included YEARLY"
      },
      "product": {
        "hasAddons": false,
        "id": "fa776d2e-cda5-4256-9a27-125a0fe3f448",
        "isAddon": false,
        "name": "Supported Product for Opportunity MVP",
        "type": "WEB_APP_STACKED"
      },
      "unitDefinitions": [
        {
          "allowDecimals": false,
          "meteredUsage": false,
          "minimum": "1.0000000000",
          "pricePerIncrement": false,
          "readOnly": true,
          "unit": "USER"
        }
      ]
    }
  ],
  "recurringTotals": [
    {
      "billingCycle": {
        "dayOfMonth": 17,
        "period": "YEARLY"
      },
      "totalSalePrice": "240.0000000000"
    }
  ],
  "taxSummary": [
    {
      "description": "Flat Tax",
      "taxAmount": "2.0000000000"
    }
  ]
}

GET/assistedSales/v1/opportunities/{opportunityId}/summary

Read the pricing summary of an opportunity

Required: Accept-Language header with Locale format. For example: en-US

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager to the opportunity
ROLE_PARTNER Allows access as a Partner to the opportunity
ROLE_PARTNER_READ Allows read access as a Partner to the opportunity
ROLE_RESELLER Allows access as a Reseller to the opportunity
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager to the opportunity
ROLE_SALES_SUPPORT Allows access as a Sales Support to the opportunity

Parameters

Parameter Type Data Type Default Description
*opportunityId path string Opportunity ID

Responses

Status Meaning Description Definition
200 OK Success OpportunitySummary
401 Unauthorized Unauthorized OpportunityError
403 Forbidden The user does not have access to the opportunity OpportunityError
404 Not Found Invalid opportunity ID OpportunityError

Get opportunity pricing plan costs

Example request

curl -X GET https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/pricingPlanCosts?pricingPlanId=type,string&currency=type,string \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/pricingPlanCosts?pricingPlanId=type,string&currency=type,string HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/pricingPlanCosts',
  method: 'get',
  data: '?pricingPlanId=type,string&currency=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/pricingPlanCosts?pricingPlanId=type,string&currency=type,string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/pricingPlanCosts', params={
  'pricingPlanId': {
  "type": "string"
},  'currency': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/pricingPlanCosts',
  params: {
  'pricingPlanId' => 'string',
'currency' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/pricingPlanCosts?pricingPlanId=type,string&currency=type,string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "contractConfiguration": {
    "blockContractDowngrades": false,
    "blockContractUpgrades": false,
    "blockSwitchToShorterContract": false,
    "contractCancellationPeriodUnit": "NONE",
    "endOfContractGracePeriodUnit": "INFINITY",
    "isDefault": true,
    "keepContractDateOnPlanChange": false,
    "minimumServiceLength": 12,
    "minimumServiceLengthUnit": "MONTHLY",
    "renewalConfiguration": "AUTO_RENEW",
    "terminationFee": {
      "amount": 400,
      "description": "Termination fee!",
      "feeType": "FIXED"
    },
    "terminationFeeGracePeriodUnit": "NONE",
    "unitTerms": {}
  },
  "pricing": [
    {
      "costId": "0121502b-0bac-4927-825c-d1f6c19e79c7",
      "costType": "CONTRACT_FEE",
      "costTypeCategory": "ONE_TIME",
      "description": "Contract charge",
      "frequency": "ONE_TIME",
      "priceRanges": [],
      "pricingStrategy": "FLAT",
      "quantity": "1.0000000000",
      "salePrice": "300.0000000000",
      "totalSalePrice": "300.0000000000",
      "unit": "CONTRACT_FEE",
      "wholesalePrice": "300.0000000000"
    },
    {
      "costId": "78092def-eeb6-42dc-917e-182e38b53d16",
      "costType": "RECURRING_FLAT",
      "costTypeCategory": "RECURRING",
      "description": "Recurring monthly flat+ppu+ot with contract+ot+tf with included",
      "frequency": "MONTHLY",
      "priceRanges": [],
      "pricingStrategy": "FLAT",
      "quantity": "1.0000000000",
      "salePrice": "10.0000000000",
      "totalSalePrice": "10.0000000000",
      "wholesalePrice": "10.0000000000"
    },
    {
      "costId": "ea5b596d-950f-427b-87d0-7c82340b468b",
      "costType": "SETUP_FEE",
      "costTypeCategory": "ONE_TIME",
      "description": "Recurring monthly flat+ppu+ot with contract+ot+tf with included",
      "frequency": "ONE_TIME",
      "priceRanges": [],
      "pricingStrategy": "FLAT",
      "quantity": "1.0000000000",
      "salePrice": "100.0000000000",
      "totalSalePrice": "100.0000000000",
      "wholesalePrice": "100.0000000000"
    },
    {
      "costId": "6160b953-88f7-49ec-a90d-aef0f9ae5d17",
      "costType": "RECURRING_PER_UNIT",
      "costTypeCategory": "RECURRING",
      "description": "Per User Fee",
      "frequency": "MONTHLY",
      "priceRanges": [
        {
          "min": "0.0000000000"
        }
      ],
      "pricingStrategy": "UNIT",
      "quantity": "0.0000000000",
      "salePrice": "8.5000000000",
      "totalSalePrice": "0.0000000000",
      "unit": "USER",
      "wholesalePrice": "8.5000000000"
    },
    {
      "costType": "INCLUDED",
      "costTypeCategory": "RECURRING",
      "description": "INCLUDED",
      "frequency": "MONTHLY",
      "priceRanges": [
        {
          "max": "1.0000000000",
          "min": "1.0000000000"
        }
      ],
      "pricingStrategy": "UNIT",
      "quantity": "1.0000000000",
      "salePrice": "0.0000000000",
      "totalSalePrice": "0.0000000000",
      "unit": "USER",
      "wholesalePrice": "0.0000000000"
    }
  ],
  "pricingPlanId": "a01c46d4-8925-4719-a891-2c036e2216a1",
  "unitDefinitions": [
    {
      "allowDecimals": false,
      "increment": 1,
      "meteredUsage": false,
      "minimum": "1.0000000000",
      "pricePerIncrement": false,
      "quantity": "1.0000000000",
      "readOnly": false,
      "unit": "USER"
    }
  ]
}

GET/assistedSales/v1/opportunities/{opportunityId}/pricingPlanCosts

Read initial costs for a pricing plan of an opportunity item.

'Required: Accept-Language' header with Locale format. For example: en-US

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager to the opportunity
ROLE_PARTNER Allows access as a Partner to the opportunity
ROLE_PARTNER_READ Allows read access as a Partner to the opportunity
ROLE_RESELLER Allows access as a Reseller to the opportunity
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager to the opportunity
ROLE_SALES_SUPPORT Allows access as a Sales Support to the opportunity

Parameters

Parameter Type Data Type Default Description
*currency query string Opportunity currency, using the ISO-4217 currency code
*opportunityId path string Opportunity ID
*pricingPlanId query string Pricing plan ID

Responses

Status Meaning Description Definition
200 OK Success PricingPlanCosts
401 Unauthorized Unauthorized OpportunityError
403 Forbidden The user does not have access to the opportunity OpportunityError
404 Not Found Invalid opportunity ID OpportunityError

Remove discount

Example request

curl -X POST https://{marketplaceURL}/api/assistedSales/v2/opportunities/{opportunityId}/deleteDiscount \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/assistedSales/v2/opportunities/{opportunityId}/deleteDiscount HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/assistedSales/v2/opportunities/{opportunityId}/deleteDiscount',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "discountCode": "10%OFF",
  "itemIds": [
    "166e0ce6-4309-4a16-ac9b-61bea7ce1cbc",
    "fa776d2e-cda5-4256-9a27-125a0fe3f448"
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/assistedSales/v2/opportunities/{opportunityId}/deleteDiscount',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/assistedSales/v2/opportunities/{opportunityId}/deleteDiscount', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/assistedSales/v2/opportunities/{opportunityId}/deleteDiscount',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/assistedSales/v2/opportunities/{opportunityId}/deleteDiscount");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "discountCode": "10%OFF",
  "itemIds": [
    "166e0ce6-4309-4a16-ac9b-61bea7ce1cbc",
    "fa776d2e-cda5-4256-9a27-125a0fe3f448"
  ]
}

Example response

{
  "amountDueAfterTax": "13.0000000000",
  "amountDueBeforeTax": "11.0000000000",
  "items": [
    {
      "contractConfiguration": {
        "blockContractDowngrades": true,
        "blockContractUpgrades": true,
        "blockSwitchToShorterContract": true,
        "keepContractDateOnPlanChange": true,
        "minimumServiceLength": 1,
        "minimumServiceLengthUnit": "YEARLY",
        "unitTerms": {}
      },
      "id": "c57331b7-0820-44ac-ad75-ee4ab2783b7c",
      "pricing": [
        {
          "costType": "RECURRING_FLAT",
          "description": "Tiered monthly+yearly flat with included",
          "quantity": "1.0000000000",
          "totalSalePrice": "240.0000000000"
        },
        {
          "costType": "INCLUDED",
          "description": "INCLUDED",
          "quantity": "1.0000000000",
          "totalSalePrice": "0.0000000000"
        }
      ],
      "pricingPlan": {
        "editionCode": "Tiered monthly+yearly flat with included",
        "id": "7e1fd1fa-de0e-49e9-9e6a-9c474c57f22d",
        "name": "Tiered monthly+yearly flat with included YEARLY"
      },
      "product": {
        "hasAddons": false,
        "id": "fa776d2e-cda5-4256-9a27-125a0fe3f448",
        "isAddon": false,
        "name": "Supported Product for Opportunity MVP",
        "type": "WEB_APP_STACKED"
      },
      "unitDefinitions": [
        {
          "allowDecimals": false,
          "meteredUsage": false,
          "minimum": "1.0000000000",
          "pricePerIncrement": false,
          "readOnly": true,
          "unit": "USER"
        }
      ]
    }
  ],
  "recurringTotals": [
    {
      "billingCycle": {
        "dayOfMonth": 17,
        "period": "YEARLY"
      },
      "totalSalePrice": "240.0000000000"
    }
  ],
  "taxSummary": [
    {
      "description": "Flat Tax",
      "taxAmount": "2.0000000000"
    }
  ]
}

POST/assistedSales/v2/opportunities/{opportunityId}/deleteDiscount

Remove a discount from an opportunity. The response is an updated opportunity summary.

Required: Accept-Language header with Locale format. For example: en-US

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager to the opportunity
ROLE_PARTNER Allows access as a Partner to the opportunity
ROLE_RESELLER Allows access as a Reseller to the opportunity
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager to the opportunity
ROLE_SALES_SUPPORT Allow access as Sales Support to the opportunity

Parameters

Parameter Type Data Type Default Description
*opportunityId path string Opportunity ID

Body Parameters

The discount to be removed

DiscountRequest object:

Property Type Description
discountCode string

The discount code can be a combination of letters, numbers, and special characters

itemIds array of string

The opportunity's item IDs to which the discount is applied or removed

Responses

Status Meaning Description Definition
200 OK The discount was removed and the request returned an updated opportunity summary OpportunitySummary
400 Bad Request Either the discount code is invalid or one of the required parameters is missing or invalid OpportunityError
401 Unauthorized Unauthorized OpportunityError
403 Forbidden The user does not have access to the opportunity or have the permission to execute the action, or the opportunity status does not allow the action OpportunityError
404 Not Found Invalid opportunity ID OpportunityError

Request opportunity review

Example request

curl -X POST https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/requestReview \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/requestReview HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/requestReview',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/requestReview',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/requestReview', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/requestReview',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/requestReview");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "availableActions": [],
  "createdOn": "1546300800000",
  "currency": "USD",
  "customerUser": {
    "company": {
      "id": "100",
      "name": "Customer Company"
    },
    "email": "jane.smith@company.com",
    "firstName": "Jane",
    "id": "498c62ea-ad14-48e6-96ce-5400c617444c",
    "lastName": "Smith"
  },
  "id": "ef6c414f-39da-401f-a4b8-81adc6190fda",
  "items": [
    {
      "id": "4ccf689b-4339-4fc9-a8b3-b05c5a87c1be",
      "pricingPlanId": "4bc864b5-f63f-4933-be19-3700aa9a8cc4",
      "subscriptionCustomAttributes": {
        "intended_os": [
          "other",
          "ios",
          "macos"
        ],
        "sales_agent_id": [
          "R353113R"
        ]
      },
      "units": [
        {
          "quantity": "20",
          "unit": "USER"
        }
      ],
      "vendorRequiredFields": {
        "email": [
          "john.doe@acme.com"
        ],
        "lastname": [
          "Doe"
        ],
        "name": [
          "John"
        ]
      }
    },
    {
      "id": "dece524d-0466-4185-b3bb-1f8a300c37cd",
      "pricingPlanId": "80b85538-ffc1-4c4b-acb1-1bf87c8c2fc4",
      "units": []
    }
  ],
  "name": "Prospect N1",
  "ownerUser": {
    "company": {
      "id": "1",
      "name": "Acme Corp."
    },
    "email": "john.doe@acme.com",
    "firstName": "John",
    "id": "d781ac09-b4fe-4d57-8ba2-4640fc5b7c49",
    "lastName": "Doe"
  },
  "purchaseEffectiveDate": "1577750400000",
  "status": "PENDING_REVIEW"
}

POST/assistedSales/v1/opportunities/{opportunityId}/requestReview

Submit the opportunity to the manager for review. After it is submitted, the sales agent cannot modify the opportunity. Managers can still modify and finalize it.

Required: Accept-Language header with Locale format. For example: en-US

Required Scope and Authorization Rules

Scope Rule
ROLE_RESELLER Allows access as a Reseller to the opportunity
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager to the opportunity. Role permmission required to execute this action.
ROLE_SALES_SUPPORT Allows access as a Sales Support to the opportunity

Parameters

Parameter Type Data Type Default Description
*opportunityId path string Opportunity ID

Responses

Status Meaning Description Definition
200 OK Success Opportunity
401 Unauthorized Unauthorized OpportunityError
403 Forbidden The user does not have access to the opportunity, or the user does not have permissions to execute the action, or the opportunity status does not allow the action, or restrictions apply such as customer account being inactive. OpportunityError
404 Not Found Invalid opportunity ID OpportunityError

Update opportunity

Example request

curl -X PATCH https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PATCH https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}',
  method: 'patch',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "name": "New opportunity",
  "purchaseCustomAttributes": {
    "paid_off_platform_contact": [
      "janet.doe@accounting.acme.com"
    ]
  },
  "purchaseEffectiveDate": 1577750400000
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.patch('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.patch 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "name": "New opportunity",
  "purchaseCustomAttributes": {
    "paid_off_platform_contact": [
      "janet.doe@accounting.acme.com"
    ]
  },
  "purchaseEffectiveDate": 1577750400000
}

Example response

{
  "actionRestrictions": {},
  "availableActions": [
    "ADD_PRODUCT",
    "EDIT",
    "FINALIZE",
    "SET_CUSTOM_PRICE",
    "SET_CUSTOM_CONTRACT",
    "SET_PROVISIONING_DATE",
    "SET_BILLING_DATE",
    "CHANGE_OPPORTUNITY_OWNER"
  ],
  "createdOn": "1546300800000",
  "currency": "USD",
  "customerUser": {
    "company": {
      "id": "100",
      "name": "Customer Company"
    },
    "email": "jane.smith@company.com",
    "firstName": "Jane",
    "id": "498c62ea-ad14-48e6-96ce-5400c617444c",
    "lastName": "Smith"
  },
  "id": "ef6c414f-39da-401f-a4b8-81adc6190fda",
  "items": [
    {
      "id": "4ccf689b-4339-4fc9-a8b3-b05c5a87c1be",
      "pricingPlanId": "4bc864b5-f63f-4933-be19-3700aa9a8cc4",
      "subscriptionCustomAttributes": {
        "intended_os": [
          "other",
          "ios",
          "macos"
        ],
        "sales_agent_id": [
          "R353113R"
        ]
      },
      "units": [
        {
          "quantity": "20",
          "unit": "USER"
        }
      ],
      "vendorRequiredFields": {
        "email": [
          "john.doe@acme.com"
        ],
        "lastname": [
          "Doe"
        ],
        "name": [
          "John"
        ]
      }
    },
    {
      "id": "dece524d-0466-4185-b3bb-1f8a300c37cd",
      "pricingPlanId": "80b85538-ffc1-4c4b-acb1-1bf87c8c2fc4",
      "units": []
    }
  ],
  "name": "Prospect N1",
  "ownerUser": {
    "company": {
      "id": "1",
      "name": "Acme Corp."
    },
    "email": "john.doe@acme.com",
    "firstName": "John",
    "id": "d781ac09-b4fe-4d57-8ba2-4640fc5b7c49",
    "lastName": "Doe"
  },
  "purchaseEffectiveDate": "1577750400000",
  "status": "OPEN"
}

PATCH/assistedSales/v1/opportunities/{opportunityId}

Updates an existing opportunity: name, purchase effective date and purchase custom attributes

Required: Accept-Language header with Locale format. For example: en-US

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager to the opportunity
ROLE_PARTNER Allows access as a Partner to the opportunity
ROLE_RESELLER Allows access as a Reseller to the opportunity
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager to the opportunity
ROLE_SALES_SUPPORT Allows access as a Sales Support to the opportunity

Parameters

Parameter Type Data Type Default Description
*opportunityId path string Opportunity ID

Body Parameters

Information about the opportunity being updated

OpportunityUpdateRequest object:

Property Type Description
name string

Opportunity name

purchaseCustomAttributes CustomAttribute

Custom attributes related to the purchase

purchaseEffectiveDate number

Opportunity purchase effective date, in UNIX Epoch milliseconds

Responses

Status Meaning Description Definition
200 OK Success Opportunity
401 Unauthorized Unauthorized OpportunityError
403 Forbidden The user does not have access to the opportunity or the opportunity status does not allow the action OpportunityError
404 Not Found Invalid opportunity ID OpportunityError

Update required fields

Example request

curl -X PUT https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items/requiredFields \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items/requiredFields HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items/requiredFields',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "itemIds": [
    "a11b60a8-a16a-4aaf-8696-dadb738496fa",
    "eb690c8d-1c57-497c-82bf-a4194362d954"
  ],
  "requiredFields": {
    "Address/City": [
      "Greenbow"
    ],
    "Address/ISO3Country": [
      "USA"
    ],
    "Address/Line1": [
      "Main Street 465"
    ],
    "Address/Line2": [
      ""
    ],
    "Address/PhoneNumber": [
      "5417543010"
    ],
    "Address/PostalCode": [
      "50505"
    ],
    "Address/State": [
      "AL"
    ],
    "AlternateEmail": [
      "secondary@acme.com"
    ],
    "BusinessName": [
      "Acme Corp"
    ],
    "ConsentUser/Email": [
      "john.smith@acme.com"
    ],
    "ConsentUser/FirstName": [
      "John"
    ],
    "ConsentUser/LastName": [
      "Smith"
    ],
    "ConsentUser/PhoneNumber": [
      "5417543010"
    ],
    "DateConsentConfirmed": [
      "2021-06-02T00:00:00Z"
    ],
    "FirstName": [
      "John"
    ],
    "LastName": [
      "Smith"
    ],
    "SubDomain": [
      "acme.entertainment.com"
    ],
    "UserPrincipleName": [
      "john.smith"
    ]
  }
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items/requiredFields',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items/requiredFields', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items/requiredFields',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/assistedSales/v1/opportunities/{opportunityId}/items/requiredFields");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "itemIds": [
    "a11b60a8-a16a-4aaf-8696-dadb738496fa",
    "eb690c8d-1c57-497c-82bf-a4194362d954"
  ],
  "requiredFields": {
    "Address/City": [
      "Greenbow"
    ],
    "Address/ISO3Country": [
      "USA"
    ],
    "Address/Line1": [
      "Main Street 465"
    ],
    "Address/Line2": [
      ""
    ],
    "Address/PhoneNumber": [
      "5417543010"
    ],
    "Address/PostalCode": [
      "50505"
    ],
    "Address/State": [
      "AL"
    ],
    "AlternateEmail": [
      "secondary@acme.com"
    ],
    "BusinessName": [
      "Acme Corp"
    ],
    "ConsentUser/Email": [
      "john.smith@acme.com"
    ],
    "ConsentUser/FirstName": [
      "John"
    ],
    "ConsentUser/LastName": [
      "Smith"
    ],
    "ConsentUser/PhoneNumber": [
      "5417543010"
    ],
    "DateConsentConfirmed": [
      "2021-06-02T00:00:00Z"
    ],
    "FirstName": [
      "John"
    ],
    "LastName": [
      "Smith"
    ],
    "SubDomain": [
      "acme.entertainment.com"
    ],
    "UserPrincipleName": [
      "john.smith"
    ]
  }
}

Example response

[
  {
    "id": "a11b60a8-a16a-4aaf-8696-dadb738496fa",
    "pricingPlanId": "a22c03e9-9e27-4e85-8433-78f246345685",
    "units": [
      {
        "quantity": "8",
        "unit": "USER"
      }
    ],
    "vendorRequiredFields": {
      "Address/City": [
        "Greenbow"
      ],
      "Address/ISO3Country": [
        "USA"
      ],
      "Address/Line1": [
        "Main Street 465"
      ],
      "Address/Line2": [
        ""
      ],
      "Address/PhoneNumber": [
        "5417543010"
      ],
      "Address/PostalCode": [
        "50505"
      ],
      "Address/State": [
        "AL"
      ],
      "AlternateEmail": [
        "secondary@acme.com"
      ],
      "BusinessName": [
        "Acme Corp"
      ],
      "ConsentUser/Email": [
        "john.smith@acme.com"
      ],
      "ConsentUser/FirstName": [
        "John"
      ],
      "ConsentUser/LastName": [
        "Smith"
      ],
      "ConsentUser/PhoneNumber": [
        "5417543010"
      ],
      "DateConsentConfirmed": [
        "2021-06-02T00:00:00Z"
      ],
      "FirstName": [
        "John"
      ],
      "LastName": [
        "Smith"
      ],
      "SubDomain": [
        "acme.entertainment.com"
      ],
      "UserPrincipleName": [
        "john.smith"
      ]
    }
  },
  {
    "id": "eb690c8d-1c57-497c-82bf-a4194362d954",
    "pricingPlanId": "4bc864b5-f63f-4933-be19-3700aa9a8cc4",
    "units": [
      {
        "quantity": "8",
        "unit": "USER"
      }
    ],
    "vendorRequiredFields": {
      "Address/City": [
        "Greenbow"
      ],
      "Address/ISO3Country": [
        "USA"
      ],
      "Address/Line1": [
        "Main Street 465"
      ],
      "Address/Line2": [
        ""
      ],
      "Address/PhoneNumber": [
        "5417543010"
      ],
      "Address/PostalCode": [
        "50505"
      ],
      "Address/State": [
        "AL"
      ],
      "AlternateEmail": [
        "secondary@acme.com"
      ],
      "BusinessName": [
        "Acme Corp"
      ],
      "ConsentUser/Email": [
        "john.smith@acme.com"
      ],
      "ConsentUser/FirstName": [
        "John"
      ],
      "ConsentUser/LastName": [
        "Smith"
      ],
      "ConsentUser/PhoneNumber": [
        "5417543010"
      ],
      "DateConsentConfirmed": [
        "2021-06-02T00:00:00Z"
      ],
      "FirstName": [
        "John"
      ],
      "LastName": [
        "Smith"
      ],
      "SubDomain": [
        "acme.entertainment.com"
      ],
      "UserPrincipleName": [
        "john.smith"
      ]
    }
  }
]

PUT/assistedSales/v1/opportunities/{opportunityId}/items/requiredFields

Update required fields for all products from the same vendor on an opportunity, with identical required field values.

When a vendor requires the same required fields for all products (also known as vendor 'cart level' required fields), the required field values must be identical for all the vendor's products on an opportunity. To ensure all values remain identical, always include the itemIds for all the vendor's products on the opportunity in the array, even if required field values are already saved for some items.

Warning: Previously saved required field values for the items in the array will be removed.

Required: Accept-Language header with Locale format. For example: en-US

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager to the opportunity
ROLE_PARTNER Allows access as a Partner to the opportunity
ROLE_RESELLER Allows access as a Reseller to the opportunity
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager to the opportunity
ROLE_SALES_SUPPORT Allows access as a Sales Support to the opportunity

Parameters

Parameter Type Data Type Default Description
*opportunityId path string Opportunity ID

Body Parameters

Required fields update request with the item IDs to be updated and required field values. Required.

RequiredFieldsUpdate object:

Property Type Description
itemIds array of string

IDs of the items to be updated

requiredFields CustomAttribute

The required fields and required field values, listed as custom attribute key-value pairs. Values must be a string array.

Responses

Status Meaning Description Definition
200 OK Required fields updated successfully array of OpportunityItem
400 Bad Request Missing or invalid data, or one or more items not found OpportunityError
401 Unauthorized Unauthorized OpportunityError
403 Forbidden The user does not have access to the opportunity, or the user does not have permission to execute the action, or the opportunity status does not allow the action OpportunityError
404 Not Found Invalid opportunity ID OpportunityError

Payment Instruments

Create a payment instrument

Example request

curl -X POST https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/paymentInstruments \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/paymentInstruments HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/paymentInstruments',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "type": "object",
      "title": "PaymentInstrument",
      "properties": {
        "accountDisplay": {
          "description": "Account display text.",
          "type": "string",
          "maxLength": 255,
          "minLength": 0
        },
        "billingAddress": {
          "allOf": [
            {
              "allOf": [
                {
                  "type": "object",
                  "title": "Address",
                  "required": [
                    "country",
                    "city",
                    "zip",
                    "firstName",
                    "phone",
                    "lastName",
                    "street1"
                  ],
                  "properties": {
                    "city": {},
                    "country": {},
                    "firstName": {},
                    "lastName": {},
                    "phone": {},
                    "state": {},
                    "street1": {},
                    "street2": {},
                    "zip": {}
                  },
                  "example": {
                    "city": "...",
                    "country": "...",
                    "state": "...",
                    "street1": "...",
                    "street2": "...",
                    "zip": "..."
                  }
                },
                {
                  "type": "object",
                  "title": "BillingAddress",
                  "properties": {
                    "companyName": {},
                    "fax": {},
                    "faxExtension": {},
                    "phoneExtension": {},
                    "poBox": {},
                    "salutation": {}
                  },
                  "example": {
                    "city": "...",
                    "companyName": "...",
                    "country": "...",
                    "fax": "...",
                    "faxExtension": "...",
                    "firstName": "...",
                    "lastName": "...",
                    "phone": "...",
                    "phoneExtension": "...",
                    "poBox": "...",
                    "salutation": "...",
                    "state": "...",
                    "street1": "...",
                    "street2": "...",
                    "zip": "..."
                  }
                }
              ]
            },
            {
              "description": "Billing address."
            }
          ]
        },
        "company": {
          "allOf": [
            {
              "type": "object",
              "title": "LinkWS",
              "properties": {
                "href": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                }
              },
              "example": {
                "href": "...",
                "id": "..."
              },
              "nullable": true
            },
            {
              "description": "Link to company information."
            }
          ]
        },
        "createdOn": {
          "description": "Payment instrument creation date.",
          "type": "number"
        },
        "creditCard": {
          "allOf": [
            {
              "type": "object",
              "title": "CreditCard",
              "required": [
                "name",
                "number",
                "securityCode",
                "expirationMonth",
                "expirationYear"
              ],
              "properties": {
                "expirationMonth": {
                  "description": "Expiration month. Required field.",
                  "type": "number",
                  "maxLength": 12,
                  "minLength": 1
                },
                "expirationYear": {
                  "description": "Expiration year. Required field.",
                  "type": "number"
                },
                "name": {
                  "description": "Name as it appears on credit card. Required field.",
                  "type": "string",
                  "maxLength": 255,
                  "minLength": 0
                },
                "number": {
                  "description": "Credit card number. Required field.",
                  "type": "string",
                  "maxLength": 19,
                  "minLength": 0,
                  "nullable": true
                },
                "securityCode": {
                  "description": "Credit card security code. Required field.",
                  "type": "string",
                  "maxLength": 4,
                  "minLength": 3,
                  "nullable": true
                },
                "type": {
                  "allOf": [
                    {},
                    {}
                  ]
                }
              },
              "example": {
                "expirationMonth": 12345,
                "expirationYear": 12345,
                "name": "...",
                "number": "...",
                "securityCode": "...",
                "type": "JCB"
              }
            },
            {
              "description": "Credit card information."
            }
          ]
        },
        "id": {
          "description": "ID",
          "type": "string"
        },
        "isDefault": {
          "description": "True if this payment instrument is the default.",
          "type": "boolean"
        },
        "paymentMethod": {
          "allOf": [
            {
              "description": "The supported payment methods",
              "type": "string",
              "title": "PaymentMethod",
              "enum": [
                "CREDIT_CARD",
                "PAYPAL",
                "MANUAL",
                "EXTERNAL_INVOICE",
                "MARKETPLACE_CREDITS"
              ]
            },
            {
              "description": "Payment method. Most often CREDIT_CARD, PAYPAL, or MANUAL. Other options are supported."
            }
          ]
        },
        "user": {
          "allOf": [
            {
              "type": "object",
              "title": "LinkWS",
              "properties": {
                "href": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                }
              },
              "example": {
                "href": "...",
                "id": "..."
              },
              "nullable": true
            },
            {
              "description": "Link to user information."
            }
          ]
        },
        "vatId": {
          "description": "VAT ID.",
          "type": "string"
        }
      },
      "example": {
        "accountDisplay": "...",
        "billingAddress": {
          "city": "...",
          "companyName": "...",
          "country": "...",
          "fax": "...",
          "faxExtension": "...",
          "firstName": "...",
          "lastName": "...",
          "phone": "...",
          "phoneExtension": "...",
          "poBox": "...",
          "salutation": "...",
          "state": "...",
          "street1": "...",
          "street2": "...",
          "zip": "..."
        },
        "company": {
          "href": "...",
          "id": "..."
        },
        "createdOn": 12345,
        "creditCard": {
          "expirationMonth": 12345,
          "expirationYear": 12345,
          "name": "...",
          "number": "...",
          "securityCode": "...",
          "type": "AMEX"
        },
        "id": "...",
        "isDefault": true,
        "paymentMethod": "MANO_TEO_BILL",
        "user": {
          "href": "...",
          "id": "..."
        },
        "vatId": "..."
      }
    },
    {
      "description": "Payment instrument data object"
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/paymentInstruments',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/paymentInstruments', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/paymentInstruments',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/paymentInstruments");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "accountDisplay": "...",
  "billingAddress": {
    "city": "...",
    "companyName": "...",
    "country": "...",
    "fax": "...",
    "faxExtension": "...",
    "firstName": "...",
    "lastName": "...",
    "phone": "...",
    "phoneExtension": "...",
    "poBox": "...",
    "salutation": "...",
    "state": "...",
    "street1": "...",
    "street2": "...",
    "zip": "..."
  },
  "company": {
    "href": "...",
    "id": "..."
  },
  "createdOn": 12345,
  "creditCard": {
    "expirationMonth": 12345,
    "expirationYear": 12345,
    "name": "...",
    "number": "...",
    "securityCode": "...",
    "type": "AMEX"
  },
  "id": "...",
  "isDefault": true,
  "paymentMethod": "MANO_TEO_BILL",
  "user": {
    "href": "...",
    "id": "..."
  },
  "vatId": "..."
}

Example response

{
  "accountDisplay": "1111",
  "billingAddress": {
    "city": "Somerville",
    "companyName": "AppDirect",
    "country": "US",
    "firstName": "John",
    "lastName": "Doe",
    "phone": "9999999999",
    "state": "Massachusetts",
    "street1": "50 Grove St.",
    "street2": "500 Grove St.",
    "zip": "02114"
  },
  "company": {
    "href": "http://appdirect/api/account/v1/companies/7ee20d50-8147-482e-839c-775c02e73c45",
    "id": "7ee20d50-8147-482e-839c-775c02e73c45"
  },
  "createdOn": 1481002402567,
  "creditCard": {
    "expirationMonth": 12,
    "expirationYear": 2016,
    "name": "John Doe",
    "number": "12655615611",
    "securityCode": "111",
    "type": "VISA"
  },
  "default": false,
  "id": "e3f7f37b-1e0b-4f05-a8b2-aae74e2f5f2d",
  "paymentMethod": "CREDIT_CARD",
  "user": {
    "href": "http://appdirect/api/account/v1/users/952105f7-ad15-4fa3-bdbf-f25736a0dc48",
    "id": "952105f7-ad15-4fa3-bdbf-f25736a0dc48"
  }
}

POST/billing/v1/companies/{companyId}/users/{userId}/paymentInstruments

Create a payment instrument for the given user and company using the provided data

Parameters

Parameter Type Data Type Default Description
*companyId path string User's company UUID
*userId path string User UUID

Body Parameters

Payment instrument data object

PaymentInstrument object:

Property Type Description
accountDisplay string

Account display text.

billingAddress BillingAddress

Billing address.

company LinkWS

Link to company information.

createdOn number

Payment instrument creation date.

creditCard CreditCard

Credit card information.

id string

ID

isDefault boolean

True if this payment instrument is the default.

paymentMethod PaymentMethod

Payment method. Most often CREDIT_CARD, PAYPAL, or MANUAL. Other options are supported.

user LinkWS

Link to user information.

vatId string

VAT ID.

Responses

Status Meaning Description Definition
201 Created Created PaymentInstrument
400 Bad Request Bad Request
404 Not Found Not Found
409 Conflict Conflict

Delete a payment instrument

Example request

curl -X DELETE https://{marketplaceURL}/api/billing/v1/paymentInstruments/{paymentInstrumentId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/billing/v1/paymentInstruments/{paymentInstrumentId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/paymentInstruments/{paymentInstrumentId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/paymentInstruments/{paymentInstrumentId}',
{
  method: 'DELETE'

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/billing/v1/paymentInstruments/{paymentInstrumentId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/billing/v1/paymentInstruments/{paymentInstrumentId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/paymentInstruments/{paymentInstrumentId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE/billing/v1/paymentInstruments/{paymentInstrumentId}

Delete a payment instrument

Parameters

Parameter Type Data Type Default Description
*paymentInstrumentId path string Payment Instrument Id

Responses

Status Meaning Description Definition
204 No Content No Content
404 Not Found Not Found

Retrieve the default payment instrument

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/paymentInstruments/default \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/paymentInstruments/default HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/paymentInstruments/default',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/paymentInstruments/default',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/paymentInstruments/default', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/paymentInstruments/default',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/paymentInstruments/default");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "accountDisplay": "1111",
  "billingAddress": {
    "city": "Somerville",
    "companyName": "AppDirect",
    "country": "US",
    "firstName": "John",
    "lastName": "Doe",
    "phone": "9999999999",
    "state": "Massachusetts",
    "street1": "50 Grove St.",
    "street2": "500 Grove St.",
    "zip": "02114"
  },
  "company": {
    "href": "http://appdirect/api/account/v1/companies/81ae9b52-f6d6-446e-a1b7-7107998cb4e0",
    "id": "81ae9b52-f6d6-446e-a1b7-7107998cb4e0"
  },
  "createdOn": 1481065767448,
  "creditCard": {
    "expirationMonth": 12,
    "expirationYear": 2016,
    "name": "John Doe",
    "number": "333",
    "securityCode": "333",
    "type": "VISA"
  },
  "default": false,
  "id": "ce6266c9-7939-42ee-8cdb-a7a2bc240be4",
  "paymentMethod": "CREDIT_CARD",
  "user": {
    "href": "http://appdirect/api/account/v1/users/b665be4f-42a8-47d8-bebc-8e2387fb86d8",
    "id": "b665be4f-42a8-47d8-bebc-8e2387fb86d8"
  }
}

GET/billing/v1/paymentInstruments/default

Retrieve the default payment instrument for a given user and company

Parameters

Parameter Type Data Type Default Description
companyUuid query string User's company UUID
userUuid query string User's UUID

Responses

Status Meaning Description Definition
200 OK OK PaymentInstrument
404 Not Found Not Found

Retrieve a payment instrument

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/paymentInstruments/{paymentInstrumentId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/paymentInstruments/{paymentInstrumentId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/paymentInstruments/{paymentInstrumentId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/paymentInstruments/{paymentInstrumentId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/paymentInstruments/{paymentInstrumentId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/paymentInstruments/{paymentInstrumentId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/paymentInstruments/{paymentInstrumentId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "accountDisplay": "1111",
  "billingAddress": {
    "city": "Somerville",
    "companyName": "AppDirect",
    "country": "US",
    "firstName": "John",
    "lastName": "Doe",
    "phone": "9999999999",
    "state": "Massachusetts",
    "street1": "50 Grove St.",
    "street2": "500 Grove St.",
    "zip": "02114"
  },
  "company": {
    "href": "http://appdirect/api/account/v1/companies/709997cb-f3b9-42ea-8e8f-2ea0ada4f9e2",
    "id": "709997cb-f3b9-42ea-8e8f-2ea0ada4f9e2"
  },
  "createdOn": 1481065768024,
  "creditCard": {
    "expirationMonth": 12,
    "expirationYear": 2016,
    "name": "John Doe",
    "number": "333",
    "securityCode": "333",
    "type": "VISA"
  },
  "default": false,
  "id": "3aa51449-474d-4a2e-974c-b9b390e9cd54",
  "paymentMethod": "CREDIT_CARD",
  "user": {
    "href": "http://appdirect/api/account/v1/users/81a3aa25-4da1-4322-8fb2-1a7c79a9f5ff",
    "id": "81a3aa25-4da1-4322-8fb2-1a7c79a9f5ff"
  }
}

GET/billing/v1/paymentInstruments/{paymentInstrumentId}

Parameters

Parameter Type Data Type Default Description
*paymentInstrumentId path string Payment Instrument Id

Responses

Status Meaning Description Definition
200 OK OK PaymentInstrument
404 Not Found Not Found

List all payment instruments for a user

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/paymentInstruments \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/paymentInstruments HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/paymentInstruments',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/paymentInstruments',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/paymentInstruments', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/paymentInstruments',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/paymentInstruments");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "accountDisplay": "1111",
    "billingAddress": {
      "city": "Somerville",
      "companyName": "AppDirect",
      "country": "US",
      "firstName": "John",
      "lastName": "Doe",
      "phone": "9999999999",
      "state": "Massachusetts",
      "street1": "50 Grove St.",
      "street2": "500 Grove St.",
      "zip": "02114"
    },
    "company": {
      "href": "http://appdirect/api/account/v1/companies/7ee20d50-8147-482e-839c-775c02e73c45",
      "id": "7ee20d50-8147-482e-839c-775c02e73c45"
    },
    "createdOn": 1481002402567,
    "creditCard": {
      "expirationMonth": 12,
      "expirationYear": 2016,
      "name": "John Doe",
      "number": "12655615611",
      "securityCode": "111",
      "type": "VISA"
    },
    "default": false,
    "id": "e3f7f37b-1e0b-4f05-a8b2-aae74e2f5f2d",
    "paymentMethod": "CREDIT_CARD",
    "user": {
      "href": "http://appdirect/api/account/v1/users/952105f7-ad15-4fa3-bdbf-f25736a0dc48",
      "id": "952105f7-ad15-4fa3-bdbf-f25736a0dc48"
    }
  }
]

GET/billing/v1/companies/{companyId}/users/{userId}/paymentInstruments

List all of the payment instruments for the given user

Parameters

Parameter Type Data Type Default Description
*companyId path string User's company UUID
*userId path string User UUID

Responses

Status Meaning Description Definition
200 OK OK array of PaymentInstrument
404 Not Found Not Found

Update a payment instrument

Example request

curl -X PUT https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/paymentInstruments/{paymentInstrumentId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/paymentInstruments/{paymentInstrumentId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/paymentInstruments/{paymentInstrumentId}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "type": "object",
      "title": "PaymentInstrument",
      "properties": {
        "accountDisplay": {
          "description": "Account display text.",
          "type": "string",
          "maxLength": 255,
          "minLength": 0
        },
        "billingAddress": {
          "allOf": [
            {
              "type": "object",
              "title": "BillingAddress",
              "required": [
                "country",
                "city",
                "zip",
                "firstName",
                "phone",
                "lastName",
                "street1"
              ],
              "properties": {
                "city": {
                  "description": "The name of the city or town",
                  "type": "string",
                  "maxLength": 255,
                  "minLength": 0
                },
                "companyName": {
                  "description": "The name of the company",
                  "type": "string"
                },
                "country": {
                  "description": "The country code, in ISO-3166 format",
                  "type": "string",
                  "maxLength": 2,
                  "minLength": 0
                },
                "fax": {
                  "description": "The fax number",
                  "type": "string"
                },
                "faxExtension": {
                  "description": "The fax extension number",
                  "type": "string"
                },
                "firstName": {
                  "description": "The first name",
                  "type": "string",
                  "maxLength": 255,
                  "minLength": 0
                },
                "lastName": {
                  "description": "The last name",
                  "type": "string",
                  "maxLength": 255,
                  "minLength": 0
                },
                "phone": {
                  "description": "The phone number",
                  "type": "string",
                  "maxLength": 255,
                  "minLength": 0
                },
                "phoneExtension": {
                  "description": "The phone extension number",
                  "type": "string"
                },
                "poBox": {
                  "description": "The post office box number",
                  "type": "string"
                },
                "salutation": {
                  "description": "The title in a person's name, for example, Mr or Ms",
                  "type": "string"
                },
                "state": {
                  "description": "The state, province, or region",
                  "type": "string",
                  "maxLength": 255,
                  "minLength": 0
                },
                "street1": {
                  "description": "The first line of a street address",
                  "type": "string",
                  "maxLength": 255,
                  "minLength": 0
                },
                "street2": {
                  "description": "The second line of a street address, for example, an apartment or office number",
                  "type": "string",
                  "maxLength": 255,
                  "minLength": 0
                },
                "zip": {
                  "description": "The ZIP or postal code of the address",
                  "type": "string",
                  "maxLength": 255,
                  "minLength": 0
                }
              },
              "example": {
                "city": "...",
                "companyName": "...",
                "country": "...",
                "fax": "...",
                "faxExtension": "...",
                "firstName": "...",
                "lastName": "...",
                "phone": "...",
                "phoneExtension": "...",
                "poBox": "...",
                "salutation": "...",
                "state": "...",
                "street1": "...",
                "street2": "...",
                "zip": "..."
              }
            },
            {
              "description": "Billing address."
            }
          ]
        },
        "company": {
          "allOf": [
            {
              "type": "object",
              "title": "LinkWS",
              "properties": {
                "href": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                }
              },
              "example": {
                "href": "...",
                "id": "..."
              },
              "nullable": true
            },
            {
              "description": "Link to company information."
            }
          ]
        },
        "createdOn": {
          "description": "Payment instrument creation date.",
          "type": "number"
        },
        "creditCard": {
          "allOf": [
            {
              "type": "object",
              "title": "CreditCard",
              "required": [
                "name",
                "number",
                "securityCode",
                "expirationMonth",
                "expirationYear"
              ],
              "properties": {
                "expirationMonth": {
                  "description": "Expiration month. Required field.",
                  "type": "number",
                  "maxLength": 12,
                  "minLength": 1
                },
                "expirationYear": {
                  "description": "Expiration year. Required field.",
                  "type": "number"
                },
                "name": {
                  "description": "Name as it appears on credit card. Required field.",
                  "type": "string",
                  "maxLength": 255,
                  "minLength": 0
                },
                "number": {
                  "description": "Credit card number. Required field.",
                  "type": "string",
                  "maxLength": 19,
                  "minLength": 0,
                  "nullable": true
                },
                "securityCode": {
                  "description": "Credit card security code. Required field.",
                  "type": "string",
                  "maxLength": 4,
                  "minLength": 3,
                  "nullable": true
                },
                "type": {
                  "allOf": [
                    {},
                    {}
                  ]
                }
              },
              "example": {
                "expirationMonth": 12345,
                "expirationYear": 12345,
                "name": "...",
                "number": "...",
                "securityCode": "...",
                "type": "JCB"
              }
            },
            {
              "description": "Credit card information."
            }
          ]
        },
        "id": {
          "description": "ID",
          "type": "string"
        },
        "isDefault": {
          "description": "True if this payment instrument is the default.",
          "type": "boolean"
        },
        "paymentMethod": {
          "allOf": [
            {
              "description": "The supported payment methods",
              "type": "string",
              "title": "PaymentMethod",
              "enum": [
                "CREDIT_CARD",
                "PAYPAL",
                "MANUAL",
                "EXTERNAL_INVOICE",
                "MARKETPLACE_CREDITS"
              ]
            },
            {
              "description": "Payment method. Most often CREDIT_CARD, PAYPAL, or MANUAL. Other options are supported."
            }
          ]
        },
        "user": {
          "allOf": [
            {
              "type": "object",
              "title": "LinkWS",
              "properties": {
                "href": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                }
              },
              "example": {
                "href": "...",
                "id": "..."
              },
              "nullable": true
            },
            {
              "description": "Link to user information."
            }
          ]
        },
        "vatId": {
          "description": "VAT ID.",
          "type": "string"
        }
      },
      "example": {
        "accountDisplay": "...",
        "billingAddress": {
          "city": "...",
          "companyName": "...",
          "country": "...",
          "fax": "...",
          "faxExtension": "...",
          "firstName": "...",
          "lastName": "...",
          "phone": "...",
          "phoneExtension": "...",
          "poBox": "...",
          "salutation": "...",
          "state": "...",
          "street1": "...",
          "street2": "...",
          "zip": "..."
        },
        "company": {
          "href": "...",
          "id": "..."
        },
        "createdOn": 12345,
        "creditCard": {
          "expirationMonth": 12345,
          "expirationYear": 12345,
          "name": "...",
          "number": "...",
          "securityCode": "...",
          "type": "AMEX"
        },
        "id": "...",
        "isDefault": true,
        "paymentMethod": "MANO_TEO_BILL",
        "user": {
          "href": "...",
          "id": "..."
        },
        "vatId": "..."
      }
    },
    {
      "description": "Payment instrument data object"
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/paymentInstruments/{paymentInstrumentId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/paymentInstruments/{paymentInstrumentId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/paymentInstruments/{paymentInstrumentId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/paymentInstruments/{paymentInstrumentId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "accountDisplay": "...",
  "billingAddress": {
    "city": "...",
    "companyName": "...",
    "country": "...",
    "fax": "...",
    "faxExtension": "...",
    "firstName": "...",
    "lastName": "...",
    "phone": "...",
    "phoneExtension": "...",
    "poBox": "...",
    "salutation": "...",
    "state": "...",
    "street1": "...",
    "street2": "...",
    "zip": "..."
  },
  "company": {
    "href": "...",
    "id": "..."
  },
  "createdOn": 12345,
  "creditCard": {
    "expirationMonth": 12345,
    "expirationYear": 12345,
    "name": "...",
    "number": "...",
    "securityCode": "...",
    "type": "AMEX"
  },
  "id": "...",
  "isDefault": true,
  "paymentMethod": "MANO_TEO_BILL",
  "user": {
    "href": "...",
    "id": "..."
  },
  "vatId": "..."
}

Example response

{
  "accountDisplay": "1111",
  "billingAddress": {
    "city": "Somerville",
    "companyName": "AppDirect",
    "country": "US",
    "firstName": "John",
    "lastName": "Doe",
    "phone": "9999999999",
    "state": "Massachusetts",
    "street1": "50 Grove St.",
    "street2": "500 Grove St.",
    "zip": "02114"
  },
  "company": {
    "href": "http://appdirect/api/account/v1/companies/7ee20d50-8147-482e-839c-775c02e73c45",
    "id": "7ee20d50-8147-482e-839c-775c02e73c45"
  },
  "creditCard": {
    "expirationMonth": 12,
    "expirationYear": 2016,
    "name": "Updated Credit Card name",
    "number": "13688112366",
    "securityCode": "111",
    "type": "VISA"
  },
  "default": false,
  "id": "e3f7f37b-1e0b-4f05-a8b2-aae74e2f5f2d",
  "paymentMethod": "CREDIT_CARD",
  "user": {
    "href": "http://appdirect/api/account/v1/users/952105f7-ad15-4fa3-bdbf-f25736a0dc48",
    "id": "952105f7-ad15-4fa3-bdbf-f25736a0dc48"
  }
}

PUT/billing/v1/companies/{companyId}/users/{userId}/paymentInstruments/{paymentInstrumentId}

Update the payment instrument for the given user and company using the provided data

Parameters

Parameter Type Data Type Default Description
*companyId path string User's company UUID
*paymentInstrumentId path string Existing payment instrument UUID
*userId path string User UUID

Body Parameters

Payment instrument data object

PaymentInstrument object:

Property Type Description
accountDisplay string

Account display text.

billingAddress BillingAddress

Billing address.

company LinkWS

Link to company information.

createdOn number

Payment instrument creation date.

creditCard CreditCard

Credit card information.

id string

ID

isDefault boolean

True if this payment instrument is the default.

paymentMethod PaymentMethod

Payment method. Most often CREDIT_CARD, PAYPAL, or MANUAL. Other options are supported.

user LinkWS

Link to user information.

vatId string

VAT ID.

Responses

Status Meaning Description Definition
200 OK OK PaymentInstrument
400 Bad Request Bad Request
404 Not Found Not Found
409 Conflict Conflict

Payment Methods

Create payment methods using a token OR by providing all of the payment method data

Example request

curl -X POST https://{marketplaceURL}/api/appMarket/v2/paymentMethods \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/appMarket/v2/paymentMethods HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appMarket/v2/paymentMethods',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "companyId": "9c130291-cf29-4272-8005-a280b1e81388",
  "ownerId": "40e8af95-4caf-415a-96d9-7b023207b535",
  "token": "pm_0838a859-dfa6-4863-aa38-042d50a9e69a"
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appMarket/v2/paymentMethods',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/appMarket/v2/paymentMethods', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/appMarket/v2/paymentMethods',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appMarket/v2/paymentMethods");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "companyId": "9c130291-cf29-4272-8005-a280b1e81388",
  "ownerId": "40e8af95-4caf-415a-96d9-7b023207b535",
  "token": "pm_0838a859-dfa6-4863-aa38-042d50a9e69a"
}

Example response

{
  "accountDisplay": "1111",
  "billingAddress": {
    "city": "Montreal",
    "country": "CA",
    "state": "Quebec",
    "street1": "279 Prince St",
    "zip": "H3C 2N4"
  },
  "default": true,
  "id": "e35c2f85-ef92-4a8f-89f0-45b62fb95fa7",
  "paymentMethodType": "CARD",
  "properties": {
    "brand": "VISA",
    "cardHolderName": "John Smith",
    "expirationMonth": "5",
    "expirationYear": "2019"
  }
}

POST/appMarket/v2/paymentMethods

When using a token, the validated payment method is assigned to the current user on the current marketplace. When providing all of the payment method data, the payment gateway is called, and the payment method is validated and assigned to the user.

Required Scope and Authorization Rules

Scope Rule
ROLE_PARTNER Allows access to create a payment method with a token.
ROLE_USER Allows access to create a payment method with a full payload.

Body Parameters

PMPaymentMethodRequest object:

Property Type Description
billingAddress BillingAddress

Required when creating a payment method from payment method data, not applicable when creating it from token.

companyId string

The ID of the company in which to create the payment method.

ownerId string

The ID of the user who owns the payment method.

paymentMethodType string

The type of payment method, such as CARD, BANKACCOUNT, and so on.

Required when creating a payment method from payment method data, not applicable when creating it from token.

properties object

The properties of the payment method, as listed in getPaymentMethodTypes

Required when creating a payment method from payment method data, not applicable when creating it from token.

token string

Token of the payment method, as returned by createPaymentMethodToken.

Required when creating a payment method from a token, not applicable when creating it from payment method data.

Responses

Status Meaning Description Definition
200 OK OK PMPaymentMethodAppMarket
400 Bad Request Bad Request ErrorResponse
401 Unauthorized Unauthorized
500 Internal Server Error Internal Server Error ErrorResponse
502 Bad Gateway Bad Gateway ErrorResponse
504 Gateway Time-out Gateway Timeout ErrorResponse

Tokenize payment methods

Example request

curl -X POST https://{marketplaceURL}/api/appMarket/v2/paymentMethodTokens \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/appMarket/v2/paymentMethodTokens HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json
AD-Public-Developer-Key: [object Object]

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appMarket/v2/paymentMethodTokens',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Payment method base fields.",
      "title": "PMBasePaymentMethod",
      "required": [
        "paymentMethodType",
        "properties",
        "billingAddress"
      ],
      "properties": {
        "billingAddress": {
          "allOf": [
            {
              "description": "Billing address",
              "type": "object",
              "title": "BillingAddress",
              "required": [
                "street1",
                "city",
                "country",
                "state",
                "zip"
              ],
              "properties": {
                "city": {
                  "description": "City or town",
                  "type": "string"
                },
                "companyName": {
                  "description": "Company name",
                  "type": "string",
                  "nullable": true
                },
                "country": {
                  "description": "Country code in ISO-3166 format",
                  "type": "string"
                },
                "fax": {
                  "description": "Fax number",
                  "type": "string",
                  "nullable": true
                },
                "faxExtension": {
                  "description": "Fax number extension",
                  "type": "string",
                  "nullable": true
                },
                "phone": {
                  "description": "Phone number",
                  "type": "string",
                  "nullable": true
                },
                "poBox": {
                  "description": "Post office box number",
                  "type": "string",
                  "nullable": true
                },
                "salutation": {
                  "description": "Personal salutation",
                  "type": "string",
                  "nullable": true
                },
                "state": {
                  "description": "State, province, or region",
                  "type": "string"
                },
                "street1": {
                  "description": "First line of a street address",
                  "type": "string"
                },
                "street2": {
                  "description": "Second line of a street address, such as apartment or unit number",
                  "type": "string",
                  "nullable": true
                },
                "zip": {
                  "description": "ZIP or postal code",
                  "type": "string"
                }
              },
              "example": {
                "city": "Beverly Hills",
                "country": "US",
                "state": "CA",
                "street1": "Alden",
                "zip": "94203"
              }
            },
            {
              "description": "The billing for the payment method."
            }
          ]
        },
        "paymentMethodType": {
          "description": "The type of payment method, such as CARD, BANKACCOUNT, and so on.",
          "type": "string"
        },
        "properties": {
          "description": "The properties of the payment method, as listed in [getPaymentMethodTypes](#returns-all-supported-payment-method-types)",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "example": {
        "billingAddress": {
          "city": "Montreal",
          "country": "CA",
          "state": "Quebec",
          "street1": "279 Prince St",
          "zip": "H3C 2N4"
        },
        "paymentMethodType": "CARD",
        "properties": {
          "brand": "VISA",
          "cardHolderName": "John Smith",
          "expirationMonth": "5",
          "expirationYear": "2019",
          "number": "4111111111111111"
        }
      }
    },
    {
      "description": "The Payload used to tokenize a Payment Method.",
      "type": "object",
      "title": "PaymentMethodTokenRequest",
      "example": {
        "billingAddress": {
          "city": "Montreal",
          "country": "CA",
          "state": "Quebec",
          "street1": "279 Prince St",
          "zip": "H3C 2N4"
        },
        "paymentMethodType": "CARD",
        "properties": {
          "brand": "VISA",
          "cardHolderName": "John Smith",
          "expirationMonth": "5",
          "expirationYear": "2019",
          "number": "4111111111111111",
          "securityCode": "123"
        }
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appMarket/v2/paymentMethodTokens',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/appMarket/v2/paymentMethodTokens', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/appMarket/v2/paymentMethodTokens',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appMarket/v2/paymentMethodTokens");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "billingAddress": {
    "city": "Montreal",
    "country": "CA",
    "state": "Quebec",
    "street1": "279 Prince St",
    "zip": "H3C 2N4"
  },
  "paymentMethodType": "CARD",
  "properties": {
    "brand": "VISA",
    "cardHolderName": "John Smith",
    "expirationMonth": "5",
    "expirationYear": "2019",
    "number": "4111111111111111",
    "securityCode": "123"
  }
}

Example response

{
  "expiration": "2018-04-112T19:15:00Z",
  "id": "pm_0838a859-dfa6-4863-aa38-042d50a9e69a",
  "paymentMethod": {
    "accountDisplay": "1111",
    "billingAddress": {
      "city": "Montreal",
      "country": "CA",
      "state": "Quebec",
      "street1": "279 Prince St",
      "zip": "H3C 2N4"
    },
    "paymentMethodType": "CARD",
    "properties": {
      "brand": "VISA",
      "cardHolderName": "John Smith",
      "expirationMonth": "5",
      "expirationYear": "2019"
    }
  }
}

POST/appMarket/v2/paymentMethodTokens

Calls the payment gateway to validate the payment method, which is not yet associated with a user. A front-end should call this endpoint directly, not a back-end. Requires a public developer key (use the AD-Public-Developer-Key header), which you must obtain from AppDirect.

Body Parameters

The payment method to tokenize

PaymentMethodTokenRequest object:

Property Type Description
billingAddress BillingAddress

The billing for the payment method.

paymentMethodType string

The type of payment method, such as CARD, BANKACCOUNT, and so on.

properties object

The properties of the payment method, as listed in getPaymentMethodTypes

Responses

Status Meaning Description Definition
200 OK OK PMPaymentMethodTokenResponse
400 Bad Request Bad Request ErrorResponse
401 Unauthorized Unauthorized
500 Internal Server Error Internal Server Error ErrorResponse
502 Bad Gateway Bad Gateway ErrorResponse
504 Gateway Time-out Gateway Timeout ErrorResponse

List default payment methods

Example request

curl -X GET https://{marketplaceURL}/api/appMarket/v2/paymentMethods/defaults?ownerId=type,string&companyId=type,string \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/appMarket/v2/paymentMethods/defaults?ownerId=type,string&companyId=type,string HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appMarket/v2/paymentMethods/defaults',
  method: 'get',
  data: '?ownerId=type,string&companyId=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appMarket/v2/paymentMethods/defaults?ownerId=type,string&companyId=type,string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/appMarket/v2/paymentMethods/defaults', params={
  'ownerId': {
  "type": "string"
},  'companyId': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/appMarket/v2/paymentMethods/defaults',
  params: {
  'ownerId' => 'string',
'companyId' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appMarket/v2/paymentMethods/defaults?ownerId=type,string&companyId=type,string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "paymentMethodId": "e35c2f85-ef92-4a8f-89f0-45b62fb95fa7"
  }
]

GET/appMarket/v2/paymentMethods/defaults

Returns the default payment methods for the specified user in the specified company

Required Scope and Authorization Rules

Scope Rule
ROLE_USER Allows access to get default payment method(s).

Parameters

Parameter Type Data Type Default Description
*companyId query string ID of the company of which the user is a member
*ownerId query string ID of the user whose default payment method you want to retrieve

Responses

Status Meaning Description Definition
200 OK OK array of PMDefaultPaymentMethod
401 Unauthorized Unauthorized
500 Internal Server Error Internal Server Error ErrorResponse
502 Bad Gateway Bad Gateway ErrorResponse
504 Gateway Time-out Gateway Timeout ErrorResponse

Returns all supported Payment Method Types

Example request

curl -X GET https://{marketplaceURL}/api/appMarket/v2/paymentMethodTypes \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/appMarket/v2/paymentMethodTypes HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appMarket/v2/paymentMethodTypes',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appMarket/v2/paymentMethodTypes',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/appMarket/v2/paymentMethodTypes', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/appMarket/v2/paymentMethodTypes',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appMarket/v2/paymentMethodTypes");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "addressNeeded": true,
    "paymentMethodType": "CARD",
    "propertyDefinitions": [
      {
        "maxLength": 255,
        "minLength": 0,
        "name": "cardHolderName",
        "type": "string"
      },
      {
        "maxLength": 255,
        "minLength": 0,
        "name": "number",
        "type": "string"
      },
      {
        "maxLength": 4,
        "minLength": 0,
        "name": "securityCode",
        "secret": true,
        "type": "string"
      },
      {
        "maxLength": 2,
        "minLength": 1,
        "name": "expirationMonth",
        "type": "number"
      },
      {
        "maxLength": 4,
        "minLength": 2,
        "name": "expirationYear",
        "type": "number"
      },
      {
        "maxLength": 255,
        "minLength": 0,
        "name": "brand",
        "possibleValues": [
          "VISA",
          "MASTERCARD",
          "AMEX",
          "DINERS_CLUB",
          "DISCOVER",
          "JCB",
          "UNKNOWN",
          "GATEWAY"
        ],
        "readOnly": true,
        "type": "string"
      }
    ]
  },
  {
    "addressNeeded": true,
    "paymentMethodType": "BANKACCOUNT",
    "propertyDefinitions": [
      {
        "maxLength": 9,
        "minLength": 9,
        "name": "routingNumber",
        "required": true,
        "type": "string"
      },
      {
        "maxLength": 17,
        "minLength": 4,
        "name": "accountNumber",
        "required": true,
        "type": "string"
      },
      {
        "name": "accountType",
        "possibleValues": [
          "CHECKING",
          "SAVINGS",
          "CORPORATE_CHECKING",
          "CORPORATE_SAVINGS"
        ],
        "required": true,
        "type": "string"
      },
      {
        "name": "isCorporateAccount",
        "required": true,
        "type": "boolean"
      },
      {
        "maxLength": 255,
        "minLength": 0,
        "name": "companyName",
        "required": false,
        "type": "string"
      },
      {
        "maxLength": 255,
        "name": "firstName",
        "required": true,
        "type": "string"
      },
      {
        "maxLength": 255,
        "name": "lastName",
        "required": true,
        "type": "string"
      }
    ]
  }
]

GET/appMarket/v2/paymentMethodTypes

Returns all supported Payment Method Types. These are the only types of payment method that can be created.

Responses

Status Meaning Description Definition
200 OK OK array of PMPaymentMethodType
401 Unauthorized Unauthorized
500 Internal Server Error Internal Server Error ErrorResponse
502 Bad Gateway Bad Gateway ErrorResponse
504 Gateway Time-out Gateway Timeout ErrorResponse

List payment methods for a user

Example request

curl -X GET https://{marketplaceURL}/api/appMarket/v2/paymentMethods?ownerId=type,string&companyId=type,string \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/appMarket/v2/paymentMethods?ownerId=type,string&companyId=type,string HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appMarket/v2/paymentMethods',
  method: 'get',
  data: '?ownerId=type,string&companyId=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appMarket/v2/paymentMethods?ownerId=type,string&companyId=type,string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/appMarket/v2/paymentMethods', params={
  'ownerId': {
  "type": "string"
},  'companyId': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/appMarket/v2/paymentMethods',
  params: {
  'ownerId' => 'string',
'companyId' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appMarket/v2/paymentMethods?ownerId=type,string&companyId=type,string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "accountDisplay": "1111",
    "billingAddress": {
      "city": "Montreal",
      "country": "CA",
      "state": "Quebec",
      "street1": "279 Prince St",
      "zip": "H3C 2N4"
    },
    "default": false,
    "id": "e35c2f85-ef92-4a8f-89f0-45b62fb95fa7",
    "paymentMethodType": "CARD",
    "properties": {
      "brand": "VISA",
      "cardHolderName": "John Smith",
      "expirationMonth": "5",
      "expirationYear": "2019"
    }
  },
  {
    "accountDisplay": "11111111",
    "billingAddress": {
      "city": "Montreal",
      "country": "CA",
      "state": "Quebec",
      "street1": "279 Prince St",
      "zip": "H3C 2N4"
    },
    "default": false,
    "id": "e35c2f85-ef92-4a8f-89f0-45b62fb95fa7",
    "paymentMethodType": "BANKACCOUNT",
    "properties": {
      "accountNumber": "11111111",
      "accountType": "CHECKING",
      "firstName": "John",
      "isCorporateAccount": "false",
      "lastname": "Smith",
      "routingNumber": "123456789"
    }
  },
  {
    "accountDisplay": "5555555555",
    "billingAddress": {
      "city": "Montreal",
      "country": "CA",
      "state": "Quebec",
      "street1": "279 Prince St",
      "zip": "H3C 2N4"
    },
    "default": false,
    "id": "e35c2f85-ef92-4a8f-89f0-45b62fb95fa7",
    "paymentMethodType": "MYRANDOMTYPE",
    "properties": {
      "msisdn": "5555555555"
    }
  }
]

GET/appMarket/v2/paymentMethods

Returns all available payment methods for the specified user in the specified company.

Required Scope and Authorization Rules

Scope Rule
ROLE_PARTNER Allows access to read all marketplace data.

Parameters

Parameter Type Data Type Default Description
*companyId query string ID of the company of which the user is a member
*ownerId query string ID of the user whose payment method you want to retrieve

Responses

Status Meaning Description Definition
200 OK OK array of PaymentMethodAppMarket
401 Unauthorized Unauthorized
500 Internal Server Error Internal Server Error ErrorResponse

Set default payment methods

Example request

curl -X POST https://{marketplaceURL}/api/appMarket/v2/paymentMethods/defaults \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/appMarket/v2/paymentMethods/defaults HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appMarket/v2/paymentMethods/defaults',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "companyId": "9c130291-cf29-4272-8005-a280b1e81388",
  "ownerId": "40e8af95-4caf-415a-96d9-7b023207b535",
  "paymentMethodId": "e35c2f85-ef92-4a8f-89f0-45b62fb95fa7"
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appMarket/v2/paymentMethods/defaults',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/appMarket/v2/paymentMethods/defaults', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/appMarket/v2/paymentMethods/defaults',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appMarket/v2/paymentMethods/defaults");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "companyId": "9c130291-cf29-4272-8005-a280b1e81388",
  "ownerId": "40e8af95-4caf-415a-96d9-7b023207b535",
  "paymentMethodId": "e35c2f85-ef92-4a8f-89f0-45b62fb95fa7"
}

Example response

[
  {
    "paymentMethodId": "e35c2f85-ef92-4a8f-89f0-45b62fb95fa7"
  }
]

POST/appMarket/v2/paymentMethods/defaults

Sets a default payment method for the specified user

Required Scope and Authorization Rules

Scope Rule
ROLE_USER Allows access to set default payment method(s).

Body Parameters

PMDefaultPaymentMethodRequest object:

Property Type Description
companyId string

ID of the company of which the user is a member

ownerId string

ID of the user who owns the default payment method

paymentMethodId string

ID of the default payment method

Responses

Status Meaning Description Definition
200 OK OK PMDefaultPaymentMethod
400 Bad Request Bad Request ErrorResponse
401 Unauthorized Unauthorized
500 Internal Server Error Internal Server Error ErrorResponse
502 Bad Gateway Bad Gateway ErrorResponse
504 Gateway Time-out Gateway Timeout ErrorResponse

Payment Methods (Reseller)

Remove payment methods

Example request

curl -X DELETE https://{marketplaceURL}/api/appReseller/v1/paymentMethods/{paymentMethodId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/appReseller/v1/paymentMethods/{paymentMethodId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appReseller/v1/paymentMethods/{paymentMethodId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appReseller/v1/paymentMethods/{paymentMethodId}',
{
  method: 'DELETE'

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/appReseller/v1/paymentMethods/{paymentMethodId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/appReseller/v1/paymentMethods/{paymentMethodId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appReseller/v1/paymentMethods/{paymentMethodId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE/appReseller/v1/paymentMethods/{paymentMethodId}

Deletes a user's payment methods

Required Scope and Authorization Rules

Scope Rule
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_SALES_SUPPORT Allows access as a Sales Support Representative.

Parameters

Parameter Type Data Type Default Description
*paymentMethodId path string Payment method ID

Responses

Status Meaning Description Definition
204 No Content No Content

Create payment method

Example request

curl -X POST https://{marketplaceURL}/api/appReseller/v1/paymentMethods \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/appReseller/v1/paymentMethods HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appReseller/v1/paymentMethods',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "billingAddress": {
    "city": "Beverly Hills",
    "country": "US",
    "state": "CA",
    "street1": "Alden",
    "zip": "94203"
  },
  "companyId": "6b4bd452-895d-0000-0000-e6046b230000",
  "ownerId": "833d4c99-1939-0000-0000-6fb7ae30000",
  "paymentMethodType": "CARD",
  "properties": {
    "brand": "VISA",
    "cardHolderName": "John Jordan",
    "expirationMonth": "10",
    "expirationYear": "2100",
    "number": "0000-0000-0000-0000",
    "securityCode": "000"
  }
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appReseller/v1/paymentMethods',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/appReseller/v1/paymentMethods', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/appReseller/v1/paymentMethods',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appReseller/v1/paymentMethods");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "billingAddress": {
    "city": "Beverly Hills",
    "country": "US",
    "state": "CA",
    "street1": "Alden",
    "zip": "94203"
  },
  "companyId": "6b4bd452-895d-0000-0000-e6046b230000",
  "ownerId": "833d4c99-1939-0000-0000-6fb7ae30000",
  "paymentMethodType": "CARD",
  "properties": {
    "brand": "VISA",
    "cardHolderName": "John Jordan",
    "expirationMonth": "10",
    "expirationYear": "2100",
    "number": "0000-0000-0000-0000",
    "securityCode": "000"
  }
}

Example response

{
  "accountDisplay": "1111",
  "billingAddress": {
    "city": "Beverly Hills",
    "country": "US",
    "state": "CA",
    "street1": "Alden",
    "zip": "94203"
  },
  "default": true,
  "id": "5d399e4a-cae3-0000-0000-85be1db90000",
  "owner": {
    "firstName": "John",
    "id": "833d4c99-1939-0000-0000-6fb7ae30000",
    "lastName": "Jordan"
  },
  "paymentMethodType": "CARD",
  "properties": {
    "brand": "VISA",
    "cardHolderName": "John Jordan",
    "expirationMonth": "10",
    "expirationYear": "2100"
  }
}

POST/appReseller/v1/paymentMethods

Creates a payment method on behalf of the specified user

Required Scope and Authorization Rules

Scope Rule
ROLE_RESELLER Allows access as a Reseller.
ROLE_SALES_SUPPORT Allows access as a Sales Support Representative.

Body Parameters

Information about the user and the new payment method

AppResellerPaymentMethodRequest object:

Property Type Description
billingAddress BillingAddress

User's billing address

companyId string

ID of the user's company

ownerId string

ID of the user for whom to create the payment method

paymentMethodType string

Payment method types supported by AppReseller

properties object

List of payment method properties. Varies by payment method type

Responses

Status Meaning Description Definition
200 OK Success AppResellerPaymentMethod
401 Unauthorized Unauthorized

List payment methods

Example request

curl -X GET https://{marketplaceURL}/api/appReseller/v1/paymentMethods?ownerId=type,string&companyId=type,string \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/appReseller/v1/paymentMethods?ownerId=type,string&companyId=type,string HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appReseller/v1/paymentMethods',
  method: 'get',
  data: '?ownerId=type,string&companyId=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appReseller/v1/paymentMethods?ownerId=type,string&companyId=type,string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/appReseller/v1/paymentMethods', params={
  'ownerId': {
  "type": "string"
},  'companyId': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/appReseller/v1/paymentMethods',
  params: {
  'ownerId' => 'string',
'companyId' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appReseller/v1/paymentMethods?ownerId=type,string&companyId=type,string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "accountDisplay": "1111",
      "billingAddress": {
        "city": "Beverly Hills",
        "country": "US",
        "state": "CA",
        "street1": "Alden",
        "zip": "94203"
      },
      "default": true,
      "id": "5d399e4a-cae3-0000-0000-85be1db90000",
      "owner": {
        "firstName": "John",
        "id": "833d4c99-1939-0000-0000-6fb7ae30000",
        "lastName": "Jordan"
      },
      "paymentMethodType": "CARD",
      "properties": {
        "brand": "VISA",
        "cardHolderName": "John Jordan",
        "expirationMonth": "10",
        "expirationYear": "2100"
      }
    }
  ],
  "page": {
    "number": 0,
    "size": 1,
    "totalElements": 1,
    "totalPages": 1
  }
}

GET/appReseller/v1/paymentMethods

Retrieves a list of the specified user's payment methods

Required Scope and Authorization Rules

Scope Rule
ROLE_RESELLER Allows access as a Reseller for the company.
ROLE_SALES_SUPPORT Allows access as a Sales Support Representative.

Parameters

Parameter Type Data Type Default Description
*companyId query string Company ID
number query integer Page number starting at 1. The default value is 1.
*ownerId query string User ID
paymentMethodType query string Payment method type
size query integer Number of results per page. The default value is 50.

Responses

Status Meaning Description Definition
200 OK Success AppResellerPaymentMethodPagedReadResponse
401 Unauthorized Unauthorized

Payment Plans

Read payment plan by product edition

Example request

curl -X GET https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/editions/{editionId}/paymentPlans/{paymentPlanId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/editions/{editionId}/paymentPlans/{paymentPlanId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/editions/{editionId}/paymentPlans/{paymentPlanId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/editions/{editionId}/paymentPlans/{paymentPlanId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/editions/{editionId}/paymentPlans/{paymentPlanId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/editions/{editionId}/paymentPlans/{paymentPlanId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/editions/{editionId}/paymentPlans/{paymentPlanId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "allowCustomUsage": false,
  "contract": {
    "autoExtensionPricingId": 648,
    "blockContractDowngrades": false,
    "blockContractUpgrades": false,
    "blockSwitchToShorterContract": false,
    "cancellationPeriodLimit": null,
    "endOfContractGracePeriod": null,
    "gracePeriod": null,
    "minimumServiceLength": 3,
    "terminationFee": null
  },
  "costs": [
    {
      "amount": {
        "USD": 10
      },
      "blockContractDecrease": false,
      "blockContractIncrease": false,
      "blockOriginalContractDecrease": false,
      "increment": 1,
      "maxUnits": null,
      "meteredUsage": false,
      "minUnits": 0,
      "pricePerIncrement": false,
      "unit": "USER",
      "unitDependency": null
    }
  ],
  "discount": null,
  "frequency": "MONTHLY",
  "href": "http://localhost/api/marketplace/v1/products/328/editions/328/paymentPlans/648",
  "id": 648,
  "isPrimaryPrice": false,
  "keepBillDateOnUsageChange": false,
  "primaryPrice": false,
  "separatePrepaid": false,
  "uuid": null
}

GET/marketplace/v1/products/{applicationId}/editions/{editionId}/paymentPlans/{paymentPlanId}

Read payment plan by product edition

Parameters

Parameter Type Data Type Default Description
*applicationId path number Application id
*editionId path number Edition id
*paymentPlanId path number Payment plan id

Responses

Status Meaning Description Definition
200 OK Payment plan information returned. PaymentPlan
404 Not Found Application, edition or payment plan not found.

Read payment plan

Example request

curl -X GET https://{marketplaceURL}/api/marketplace/v1/paymentPlans/{paymentPlanId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/marketplace/v1/paymentPlans/{paymentPlanId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/paymentPlans/{paymentPlanId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/paymentPlans/{paymentPlanId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/marketplace/v1/paymentPlans/{paymentPlanId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/marketplace/v1/paymentPlans/{paymentPlanId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/paymentPlans/{paymentPlanId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "allowCustomUsage": false,
  "contract": {
    "autoExtensionPricingId": 640,
    "blockContractDowngrades": false,
    "blockContractUpgrades": false,
    "blockSwitchToShorterContract": false,
    "cancellationPeriodLimit": null,
    "endOfContractGracePeriod": null,
    "gracePeriod": null,
    "minimumServiceLength": 3,
    "terminationFee": null
  },
  "costs": [
    {
      "amount": {
        "USD": 10
      },
      "blockContractDecrease": false,
      "blockContractIncrease": false,
      "blockOriginalContractDecrease": false,
      "increment": 1,
      "maxUnits": null,
      "meteredUsage": false,
      "minUnits": 0,
      "pricePerIncrement": false,
      "unit": "USER",
      "unitDependency": null
    }
  ],
  "discount": null,
  "frequency": "MONTHLY",
  "href": "http://localhost/api/marketplace/v1/products/324/editions/324/paymentPlans/640",
  "id": 640,
  "isPrimaryPrice": false,
  "keepBillDateOnUsageChange": false,
  "links": [
    {
      "href": "http://appdirect/api/marketplace/v1/paymentPlans/640",
      "rel": "self"
    },
    {
      "href": "http://appdirect/api/marketplace/v1/products/324",
      "rel": "product"
    },
    {
      "href": "http://appdirect/api/marketplace/v1/products/324/editions/324",
      "rel": "edition"
    }
  ],
  "primaryPrice": false,
  "separatePrepaid": false,
  "uuid": null
}

GET/marketplace/v1/paymentPlans/{paymentPlanId}

Read payment plan information

Parameters

Parameter Type Data Type Default Description
*paymentPlanId path number Payment plan id

Responses

Status Meaning Description Definition
200 OK Payment plan information returned. PaymentPlanResource
404 Not Found Payment plan not found.

List payment plans

Example request

curl -X GET https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/editions/{editionId}/paymentPlans \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/editions/{editionId}/paymentPlans HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/editions/{editionId}/paymentPlans',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/editions/{editionId}/paymentPlans',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/editions/{editionId}/paymentPlans', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/editions/{editionId}/paymentPlans',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/editions/{editionId}/paymentPlans");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "allowCustomUsage": false,
    "contract": {
      "autoExtensionPricingId": 657,
      "blockContractDowngrades": false,
      "blockContractUpgrades": false,
      "blockSwitchToShorterContract": false,
      "cancellationPeriodLimit": null,
      "endOfContractGracePeriod": null,
      "gracePeriod": null,
      "minimumServiceLength": 6,
      "terminationFee": null
    },
    "costs": [
      {
        "amount": {
          "USD": 10
        },
        "blockContractDecrease": false,
        "blockContractIncrease": false,
        "blockOriginalContractDecrease": false,
        "increment": 1,
        "maxUnits": null,
        "meteredUsage": false,
        "minUnits": 0,
        "pricePerIncrement": false,
        "unit": "USER",
        "unitDependency": null
      }
    ],
    "discount": null,
    "frequency": "MONTHLY",
    "href": "http://localhost/api/marketplace/v1/products/332/editions/332/paymentPlans/657",
    "id": 657,
    "isPrimaryPrice": false,
    "keepBillDateOnUsageChange": false,
    "primaryPrice": false,
    "separatePrepaid": false,
    "uuid": null
  },
  {
    "allowCustomUsage": false,
    "contract": {
      "autoExtensionPricingId": 656,
      "blockContractDowngrades": false,
      "blockContractUpgrades": false,
      "blockSwitchToShorterContract": false,
      "cancellationPeriodLimit": null,
      "endOfContractGracePeriod": null,
      "gracePeriod": null,
      "minimumServiceLength": 3,
      "terminationFee": null
    },
    "costs": [
      {
        "amount": {
          "USD": 10
        },
        "blockContractDecrease": false,
        "blockContractIncrease": false,
        "blockOriginalContractDecrease": false,
        "increment": 1,
        "maxUnits": null,
        "meteredUsage": false,
        "minUnits": 0,
        "pricePerIncrement": false,
        "unit": "USER",
        "unitDependency": null
      }
    ],
    "discount": null,
    "frequency": "MONTHLY",
    "href": "http://localhost/api/marketplace/v1/products/332/editions/332/paymentPlans/656",
    "id": 656,
    "isPrimaryPrice": false,
    "keepBillDateOnUsageChange": false,
    "primaryPrice": false,
    "separatePrepaid": false,
    "uuid": null
  }
]

GET/marketplace/v1/products/{applicationId}/editions/{editionId}/paymentPlans

List payment plans for a given product edition

Parameters

Parameter Type Data Type Default Description
*applicationId path number Application id
*editionId path number Edition id

Responses

Status Meaning Description Definition
200 OK Payment plans read. array of PaymentPlan
404 Not Found Application or edition not found.

Payments v1

List all payments for a company

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/companies/{companyId}/payments \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/companies/{companyId}/payments HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/payments',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/payments',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/payments', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/payments',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/companies/{companyId}/payments");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "amount": 10,
    "company": {
      "href": "http://appdirect/api/account/v1/companies/644eb32e-4afa-4699-9dae-5d3394320968",
      "id": "644eb32e-4afa-4699-9dae-5d3394320968"
    },
    "currency": "USD",
    "date": 1481002410613,
    "gatewayResponse": {
      "avs": true,
      "code": null,
      "cvv": true,
      "message": null
    },
    "links": [
      {
        "href": "http://appdirect/api/billing/v1/payments/21",
        "rel": "self"
      }
    ],
    "method": "CREDIT_CARD",
    "paymentNumber": 21,
    "result": "SUCCESSFUL",
    "transactionId": "123456abcdef",
    "user": {
      "href": "http://appdirect/api/account/v1/users/a18c91e8-d5d5-4fb8-915c-726535a0bc8a",
      "id": "a18c91e8-d5d5-4fb8-915c-726535a0bc8a"
    }
  }
]

GET/billing/v1/companies/{companyId}/payments

List all of the payments for the given company

Parameters

Parameter Type Data Type Default Description
*companyId path string Company UUID
count query integer 250 Number of results to fetch. Used for paging.
fromDate query number From date
method query string of enum:
ADP_INVOICE
ARIBAPAY
BT_BILL
CLICKANDBUY
CLOUDFOUNDRY
CREDIT_CARD
CUMULA_BILL
DTAG
EXTERNAL_INVOICE
KREDITKARTE
LASTSCHRIFT_MRNEXNET
MANO_TEO_BILL
MANUAL
MARKETPLACE_CREDITS
NETS_ARVATO_INVOICE
NEXTEL
PAYPAL
ROGERS_CC_DTMF
ROGERS_CC_POS
SNAP
TBILL
THISTLE
TOICLEARING
Payment method
result query string of enum:
FAILED
GATEWAY_NOT_AVAILABLE
MANUAL
SUCCESSFUL
Payment result
sortField query string of enum:
AMOUNT
DATE
PAYMENT_ID
PAYMENT_ID Sort field
sortOrder query string of enum:
ASC
DESC
DESC Sort order
start query integer 0 First result index. Used for paging.
toDate query number To date

Responses

Status Meaning Description Definition
200 OK OK array of Payment
404 Not Found Not Found

List all payment invoices

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/payments/{paymentNumber}/invoices \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/payments/{paymentNumber}/invoices HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/payments/{paymentNumber}/invoices',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/payments/{paymentNumber}/invoices',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/payments/{paymentNumber}/invoices', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/payments/{paymentNumber}/invoices',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/payments/{paymentNumber}/invoices");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "company": {
      "href": "http://appdirect/api/account/v1/companies/6a8921e7-6f15-4f36-9ab3-5663d67ba88f",
      "id": "6a8921e7-6f15-4f36-9ab3-5663d67ba88f"
    },
    "creationDate": null,
    "currency": "USD",
    "dueDate": null,
    "invoiceId": 1,
    "links": [
      {
        "href": "http://appdirect/api/account/v2/users/5e496e63-0ccd-42e1-a880-8c636619df7d",
        "rel": "user"
      },
      {
        "href": "http://appdirect/api/account/v2/companies/6a8921e7-6f15-4f36-9ab3-5663d67ba88f",
        "rel": "company"
      },
      {
        "href": "http://appdirect/api/billing/v1/invoices/1",
        "rel": "self"
      }
    ],
    "referenceNumber": null,
    "status": "PAID",
    "total": null,
    "user": {
      "href": "http://appdirect/api/account/v1/users/5e496e63-0ccd-42e1-a880-8c636619df7d",
      "id": "5e496e63-0ccd-42e1-a880-8c636619df7d"
    }
  }
]

GET/billing/v1/payments/{paymentNumber}/invoices

List all invoices attached to a given payment

Parameters

Parameter Type Data Type Default Description
count query string 250 Number of results to fetch. Used for paging.
excludeFree query boolean Exclude free invoices
fromDate query number From date
*paymentNumber path integer Payment number
sortField query string of enum:
DATE
INVOICE_ID
TOTAL
INVOICE_ID Sort field
sortOrder query string of enum:
ASC
DESC
ASC Sort order
start query string 0 First result index. Used for paging.
status query string of enum:
CARRIED
PAID
UNPAID
VOIDED
Status of the related invoice(s)
toDate query number To date

Responses

Status Meaning Description Definition
200 OK OK array of InvoiceListing
204 No Content No content array of InvoiceListing
404 Not Found Not Found

Retrieve a payment

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/payments/{paymentNumber} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/payments/{paymentNumber} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/payments/{paymentNumber}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/payments/{paymentNumber}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/payments/{paymentNumber}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/payments/{paymentNumber}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/payments/{paymentNumber}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "amount": 10,
  "company": {
    "href": "http://appdirect/api/account/v1/companies/a5e58cc5-1162-4066-9d07-2275d9759d4e",
    "id": "a5e58cc5-1162-4066-9d07-2275d9759d4e"
  },
  "currency": "USD",
  "date": 1480980388022,
  "gatewayResponse": {
    "avs": true,
    "code": null,
    "cvv": true,
    "message": null
  },
  "links": [],
  "method": "CREDIT_CARD",
  "paymentNumber": 1,
  "result": "SUCCESSFUL",
  "transactionId": null,
  "user": {
    "href": "http://appdirect/api/account/v1/users/24cf38da-ca99-4ea6-ac63-ed7b310456bc",
    "id": "24cf38da-ca99-4ea6-ac63-ed7b310456bc"
  }
}

GET/billing/v1/payments/{paymentNumber}

Retrieve a payment given its payment number

Parameters

Parameter Type Data Type Default Description
*paymentNumber path integer Payment number

Responses

Status Meaning Description Definition
200 OK OK Payment
404 Not Found Not Found

List all payments

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/payments \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/payments HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/payments',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/payments',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/payments', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/payments',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/payments");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "amount": 10,
    "company": {
      "href": "http://appdirect/api/account/v1/companies/13febe65-6774-4c99-aee4-85a57dab94e4",
      "id": "13febe65-6774-4c99-aee4-85a57dab94e4"
    },
    "currency": "USD",
    "date": 1480980392947,
    "gatewayResponse": {
      "avs": true,
      "code": null,
      "cvv": true,
      "message": null
    },
    "links": [
      {
        "href": "http://appdirect/api/billing/v1/payments/1",
        "rel": "self"
      }
    ],
    "method": "CREDIT_CARD",
    "paymentNumber": 1,
    "result": "SUCCESSFUL",
    "transactionId": null,
    "user": {
      "href": "http://appdirect/api/account/v1/users/46b7ee79-5cb4-4ccf-b6cb-5ec869c67ffc",
      "id": "46b7ee79-5cb4-4ccf-b6cb-5ec869c67ffc"
    }
  }
]

GET/billing/v1/payments

List all payments matching the input filters

Parameters

Parameter Type Data Type Default Description
count query string 250 Number of results to fetch. Used for paging.
fromDate query number From date
method query string of enum:
ADP_INVOICE
ARIBAPAY
BT_BILL
CLICKANDBUY
CLOUDFOUNDRY
CREDIT_CARD
CUMULA_BILL
DTAG
EXTERNAL_INVOICE
KREDITKARTE
LASTSCHRIFT_MRNEXNET
MANO_TEO_BILL
MANUAL
MARKETPLACE_CREDITS
NETS_ARVATO_INVOICE
NEXTEL
PAYPAL
ROGERS_CC_DTMF
ROGERS_CC_POS
SNAP
TBILL
THISTLE
TOICLEARING
Payment method
result query string of enum:
FAILED
GATEWAY_NOT_AVAILABLE
MANUAL
SUCCESSFUL
Payment result
sortField query string of enum:
AMOUNT
DATE
PAYMENT_ID
PAYMENT_ID Sort field
sortOrder query string of enum:
ASC
DESC
ASC Sort order
start query string 0 First result index. Used for paging.
toDate query number To date

Responses

Status Meaning Description Definition
200 OK OK array of Payment
204 No Content No content array of Payment

List all payments for a user

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/payments \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/payments HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/payments',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/payments',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/payments', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/payments',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/payments");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "amount": 10,
    "company": {
      "href": "http://appdirect/api/account/v1/companies/644eb32e-4afa-4699-9dae-5d3394320968",
      "id": "644eb32e-4afa-4699-9dae-5d3394320968"
    },
    "currency": "USD",
    "date": 1481002410613,
    "gatewayResponse": {
      "avs": true,
      "code": null,
      "cvv": true,
      "message": null
    },
    "links": [
      {
        "href": "http://appdirect/api/billing/v1/payments/21",
        "rel": "self"
      }
    ],
    "method": "CREDIT_CARD",
    "paymentNumber": 21,
    "result": "SUCCESSFUL",
    "transactionId": "123456abcdef",
    "user": {
      "href": "http://appdirect/api/account/v1/users/a18c91e8-d5d5-4fb8-915c-726535a0bc8a",
      "id": "a18c91e8-d5d5-4fb8-915c-726535a0bc8a"
    }
  }
]

GET/billing/v1/companies/{companyId}/users/{userId}/payments

List all of the payments for the given user

Parameters

Parameter Type Data Type Default Description
*companyId path string Company UUID
count query integer 250 Number of results to fetch. Used for paging.
fromDate query number From date
method query string of enum:
ADP_INVOICE
ARIBAPAY
BT_BILL
CLICKANDBUY
CLOUDFOUNDRY
CREDIT_CARD
CUMULA_BILL
DTAG
EXTERNAL_INVOICE
KREDITKARTE
LASTSCHRIFT_MRNEXNET
MANO_TEO_BILL
MANUAL
MARKETPLACE_CREDITS
NETS_ARVATO_INVOICE
NEXTEL
PAYPAL
ROGERS_CC_DTMF
ROGERS_CC_POS
SNAP
TBILL
THISTLE
TOICLEARING
Payment method
result query string of enum:
FAILED
GATEWAY_NOT_AVAILABLE
MANUAL
SUCCESSFUL
Payment result
sortField query string of enum:
AMOUNT
DATE
PAYMENT_ID
PAYMENT_ID Sort field
sortOrder query string of enum:
ASC
DESC
ASC Sort order
start query integer 0 First result index. Used for paging.
toDate query number To date
*userId path string User UUID

Responses

Status Meaning Description Definition
200 OK OK array of Payment
404 Not Found Not Found

Payments v2

Create transfer methods

Example request

curl -X POST https://{marketplaceURL}/api/api/appMarket/v2/transferMethods \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/api/appMarket/v2/transferMethods HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/api/appMarket/v2/transferMethods',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Transfer method base fields",
      "title": "PayAbstractTransferMethod",
      "required": [
        "properties",
        "platformType",
        "partyId",
        "partyType"
      ],
      "properties": {
        "partyId": {
          "description": "The ID of the transfer method's party",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        "partyType": {
          "description": "The type of the transfer method's party (USER, CHANNEL, and so on)",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        "platformType": {
          "description": "The transfer platform type",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        "properties": {
          "description": "The transfer method properties",
          "type": "object",
          "minProperties": 1,
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "example": {
        "partyId": "1",
        "partyType": "USER",
        "platformType": "stripe",
        "properties": [
          {
            "property1": "property1 value"
          }
        ]
      }
    },
    {
      "description": "The transfer method creation payload",
      "title": "TransferMethodRequest",
      "example": {
        "partyId": "1",
        "partyType": "USER",
        "platformType": "stripe",
        "properties": {
          "account_id": "123456"
        }
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/api/appMarket/v2/transferMethods',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/api/appMarket/v2/transferMethods', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/api/appMarket/v2/transferMethods',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/api/appMarket/v2/transferMethods");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "partyId": "1",
  "partyType": "USER",
  "platformType": "stripe",
  "properties": {
    "account_id": "123456"
  }
}

Example response

{
  "balance": {
    "amount": "10.0000000000",
    "currency": "USD"
  },
  "displayName": "****3456",
  "id": "ab65d3e8-4ee0-11e8-9c2d-222222222222",
  "partyId": "1",
  "partyType": "USER",
  "platformType": "stripe",
  "properties": {
    "account_id": "123456"
  }
}

POST/api/appMarket/v2/transferMethods

Creates a new Transfer Method for the requesting (authenticated) user

Body Parameters

The transfer method to create

TransferMethodRequest object:

Property Type Description
partyId string

The ID of the transfer method's party

partyType string

The type of the transfer method's party (USER, CHANNEL, and so on)

platformType string

The transfer platform type

properties object

The transfer method properties

Responses

Status Meaning Description Definition
201 Created The transfer method request has been created successfully PayTransferMethodResponse
400 Bad Request Indicates a bad request, which can be due to violation(s) of HTTP or API rules ErrorResponse
401 Unauthorized Unauthorized
409 Conflict Cannot create duplicate transfer method. A transfer method already exists for this party and platformType
500 Internal Server Error Indicates an unknown internal error that prevents the server from processing the request ErrorResponse

Create transfer platform configurations

Example request

curl -X POST https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Transfer platform configuration base fields",
      "title": "PayAbstractTransferPlatformConfiguration",
      "required": [
        "platformType",
        "parameters"
      ],
      "properties": {
        "parameters": {
          "description": "The transfer platform parameters.",
          "type": "object",
          "minProperties": 1,
          "additionalProperties": {
            "type": "string"
          }
        },
        "platformType": {
          "description": "The transfer platform type",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        }
      },
      "example": {
        "parameters": {
          "base_url": "https://api.stripe.com/testupdate",
          "username": "secret"
        },
        "platformType": "stripe"
      }
    },
    {
      "description": "A transfer platform configuration request",
      "title": "TransferPlatformConfigurationRequest",
      "example": {
        "parameters": {
          "base_url": "https://api.stripe.com/testupdate",
          "username": "secret"
        },
        "platformType": "stripe"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "parameters": {
    "base_url": "https://api.stripe.com/testupdate",
    "username": "secret"
  },
  "platformType": "stripe"
}

Example response

{
  "id": "9dfabd43-a34b-46e1-bc40-7ddd92cc228a",
  "parameters": {
    "base_url": "https://api.stripe.com/testupdate",
    "username": "secret"
  },
  "platformType": "stripe"
}

POST/api/appMarket/v2/transferPlatformConfigurations

Create a transfer platform configuration in the marketplace of the current user

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access to create transfer platform configurations.

Body Parameters

The transfer platform configuration request

TransferPlatformConfigurationRequest object:

Property Type Description
parameters object

The transfer platform parameters.

platformType string

The transfer platform type

Responses

Status Meaning Description Definition
201 Created The transfer platform configuration request has been treated successfully PayTransferPlatformConfigurationResponse
400 Bad Request Indicates a bad request, which can be due to violation(s) of HTTP or API rules ErrorResponse
401 Unauthorized Unauthorized
409 Conflict Cannot create duplicate configuration. A transfer platform configuration already exists for this tenant and type.
500 Internal Server Error Indicates an unknown internal error that prevents the server from processing the request ErrorResponse

Delete transfer methods

Example request

curl -X DELETE https://{marketplaceURL}/api/api/appMarket/v2/transferMethods/{transferMethodId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/api/appMarket/v2/transferMethods/{transferMethodId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/api/appMarket/v2/transferMethods/{transferMethodId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/api/appMarket/v2/transferMethods/{transferMethodId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/api/appMarket/v2/transferMethods/{transferMethodId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/api/appMarket/v2/transferMethods/{transferMethodId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/api/appMarket/v2/transferMethods/{transferMethodId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE/api/appMarket/v2/transferMethods/{transferMethodId}

Deletes the transfer method with the specified ID

Parameters

Parameter Type Data Type Default Description
*transferMethodId path string The Transfer Method ID

Responses

Status Meaning Description Definition
204 No Content No Content
401 Unauthorized Unauthorized
500 Internal Server Error Indicates an unknown internal error that prevents the server from processing the request ErrorResponse

Delete transfer platform configurations

Example request

curl -X DELETE https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations/{transferPlatformConfigurationId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations/{transferPlatformConfigurationId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations/{transferPlatformConfigurationId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations/{transferPlatformConfigurationId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations/{transferPlatformConfigurationId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations/{transferPlatformConfigurationId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations/{transferPlatformConfigurationId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE/api/appMarket/v2/transferPlatformConfigurations/{transferPlatformConfigurationId}

Deletes the specified transfer platform configuration. It cannot be used anymore

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access to delete one transfer platform configuration.

Parameters

Parameter Type Data Type Default Description
*transferPlatformConfigurationId path string The transfer platform configuration ID

Responses

Status Meaning Description Definition
204 No Content No Content
401 Unauthorized Unauthorized
500 Internal Server Error Indicates an unknown internal error that prevents the server from processing the request ErrorResponse

Retrieves Transfer Method by ID

Example request

curl -X GET https://{marketplaceURL}/api/api/appMarket/v2/transferMethods/{transferMethodId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/api/appMarket/v2/transferMethods/{transferMethodId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/api/appMarket/v2/transferMethods/{transferMethodId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/api/appMarket/v2/transferMethods/{transferMethodId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/api/appMarket/v2/transferMethods/{transferMethodId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/api/appMarket/v2/transferMethods/{transferMethodId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/api/appMarket/v2/transferMethods/{transferMethodId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "balance": {
    "amount": "10.00",
    "currency": "USD"
  },
  "displayName": "****3456",
  "id": "ab65d3e8-4ee0-11e8-9c2d-222222222222",
  "partyId": "1",
  "partyType": "USER",
  "platformType": "stripe",
  "properties": {
    "account_id": "123456"
  }
}

GET/api/appMarket/v2/transferMethods/{transferMethodId}

Retrieves the Transfer Method for the given ID

Parameters

Parameter Type Data Type Default Description
*transferMethodId path string The Transfer Method ID

Responses

Status Meaning Description Definition
200 OK OK PayTransferMethodResponse
401 Unauthorized Unauthorized
404 Not Found Resource Not Found ErrorResponse
500 Internal Server Error Indicates an unknown internal error that prevents the server from processing the request ErrorResponse

Retrieve transfer methods

Example request

curl -X GET https://{marketplaceURL}/api/api/appMarket/v2/transferMethods \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/api/appMarket/v2/transferMethods HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/api/appMarket/v2/transferMethods',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/api/appMarket/v2/transferMethods',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/api/appMarket/v2/transferMethods', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/api/appMarket/v2/transferMethods',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/api/appMarket/v2/transferMethods");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "balance": {
      "amount": "10.00",
      "currency": "USD"
    },
    "displayName": "****3456",
    "id": "ab65d3e8-4ee0-11e8-9c2d-222222222222",
    "partyId": "1",
    "partyType": "USER",
    "platformType": "stripe",
    "properties": {
      "account_id": "123456"
    }
  },
  {
    "balance": {
      "amount": "10.00",
      "currency": "USD"
    },
    "displayName": "****WXYZ",
    "id": "a20b2ad9-2248-4393-ad35-8c27dd01c11e",
    "partyId": "1",
    "partyType": "USER",
    "platformType": "Paypal",
    "properties": {
      "account_id": "ABCDWXYZ"
    }
  }
]

GET/api/appMarket/v2/transferMethods

Retrieves the transfer methods associated with the requesting (authenticated) user

Parameters

Parameter Type Data Type Default Description
includeBalance query boolean false Determines whether the response should include the transfer method balance

Responses

Status Meaning Description Definition
200 OK OK array of TransferMethodResponse
401 Unauthorized Unauthorized
500 Internal Server Error Indicates an unknown internal error that prevents the server from processing the request ErrorResponse

Retrieve transfer platform configurations

Example request

curl -X GET https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations/{transferPlatformConfigurationId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations/{transferPlatformConfigurationId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations/{transferPlatformConfigurationId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations/{transferPlatformConfigurationId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations/{transferPlatformConfigurationId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations/{transferPlatformConfigurationId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations/{transferPlatformConfigurationId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "code": "NOT_FOUND",
  "message": "Not found",
  "status": 404
}

GET/api/appMarket/v2/transferPlatformConfigurations/{transferPlatformConfigurationId}

Retrieves the transfer platform configuration by ID

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access to retrieve one transfer platform configuration.

Parameters

Parameter Type Data Type Default Description
*transferPlatformConfigurationId path string The transfer platform configuration ID

Responses

Status Meaning Description Definition
200 OK OK PayTransferPlatformConfigurationResponse
401 Unauthorized Unauthorized
404 Not Found Resource Not Found ErrorResponse
500 Internal Server Error Indicates an unknown internal error that prevents the server from processing the request ErrorResponse

Retrieve all transfer platform configurations

Example request

curl -X GET https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "id": "9dfabd43-a34b-46e1-bc40-7ddd92cc228a",
    "parameters": {
      "base_url": "https://api.stripe.com/testupdate",
      "username": "secret"
    },
    "platformType": "stripe"
  },
  {
    "id": "6ef5eb40-4520-49b6-97f6-d09dfa84e52a",
    "parameters": {
      "base_url": "https://api.paypal.com/testupdate",
      "username": "secret"
    },
    "platformType": "paypal"
  }
]

GET/api/appMarket/v2/transferPlatformConfigurations

Retrieves all transfer platform configurations for the marketplace of the current user

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access to retrieve transfer platform configurations.

Responses

Status Meaning Description Definition
200 OK OK array of TransferPlatformConfigurationResponse
401 Unauthorized Unauthorized
500 Internal Server Error Indicates an unknown internal error that prevents the server from processing the request ErrorResponse

Update transfer platform configurations

Example request

curl -X PUT https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations/{transferPlatformConfigurationId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations/{transferPlatformConfigurationId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations/{transferPlatformConfigurationId}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Transfer platform configuration base fields",
      "title": "PayAbstractTransferPlatformConfiguration",
      "required": [
        "platformType",
        "parameters"
      ],
      "properties": {
        "parameters": {
          "description": "The transfer platform parameters.",
          "type": "object",
          "minProperties": 1,
          "additionalProperties": {
            "type": "string"
          }
        },
        "platformType": {
          "description": "The transfer platform type",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        }
      },
      "example": {
        "parameters": {
          "base_url": "https://api.stripe.com/testupdate",
          "username": "secret"
        },
        "platformType": "stripe"
      }
    },
    {
      "description": "A transfer platform configuration request",
      "title": "TransferPlatformConfigurationRequest",
      "example": {
        "parameters": {
          "base_url": "https://api.stripe.com/testupdate",
          "username": "secret"
        },
        "platformType": "stripe"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations/{transferPlatformConfigurationId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations/{transferPlatformConfigurationId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations/{transferPlatformConfigurationId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/api/appMarket/v2/transferPlatformConfigurations/{transferPlatformConfigurationId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "parameters": {
    "base_url": "https://api.stripe.com/testupdate",
    "username": "secret"
  },
  "platformType": "stripe"
}

Example response

{
  "id": "9dfabd43-a34b-46e1-bc40-7ddd92cc228a",
  "parameters": {
    "base_url": "https://api.stripe.com/testupdate",
    "username": "secret"
  },
  "platformType": "stripe"
}

PUT/api/appMarket/v2/transferPlatformConfigurations/{transferPlatformConfigurationId}

Updates the specified transfer platform configuration

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access to update one transfer platform configuration.

Parameters

Parameter Type Data Type Default Description
*transferPlatformConfigurationId path string The transfer platform configuration ID

Body Parameters

The transfer platform configuration request

TransferPlatformConfigurationRequest object:

Property Type Description
parameters object

The transfer platform parameters.

platformType string

The transfer platform type

Responses

Status Meaning Description Definition
200 OK The transfer platform configuration request has been treated successfully PayTransferPlatformConfigurationResponse
400 Bad Request Indicates a bad request, which can be due to violation(s) of HTTP or API rules ErrorResponse
401 Unauthorized Unauthorized
404 Not Found Resource Not Found ErrorResponse
500 Internal Server Error Indicates an unknown internal error that prevents the server from processing the request ErrorResponse

Product Answers

Create an answer

This call creates an answer to a product question submitted on your marketplace.

Example request

curl -X POST https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Answer to a question on a product",
      "type": "object",
      "title": "QuestionAnswer",
      "properties": {
        "author": {
          "allOf": [
            {
              "description": "Author of a question, an answer, a review or a review comment",
              "type": "object",
              "title": "Author",
              "properties": {
                "name": {
                  "description": "Name",
                  "type": "string"
                },
                "profilePicUrl": {
                  "description": "Profile pic URL",
                  "type": "string",
                  "nullable": true
                },
                "uuid": {
                  "description": "Unique identifier",
                  "type": "string",
                  "nullable": true
                }
              },
              "example": {
                "name": "...",
                "profilePicUrl": "...",
                "uuid": "..."
              }
            },
            {
              "description": "Author",
              "type": "object",
              "x-nullable": true
            }
          ]
        },
        "comment": {
          "description": "Comment",
          "type": "string"
        },
        "id": {
          "description": "ID",
          "type": "number",
          "nullable": true
        },
        "lastModified": {
          "description": "Last modified date",
          "type": "number",
          "nullable": true
        },
        "official": {
          "description": "Is the official answer",
          "type": "boolean"
        }
      },
      "example": {
        "author": {
          "name": "...",
          "profilePicUrl": "...",
          "uuid": "..."
        },
        "comment": "...",
        "id": 12345,
        "lastModified": 12345,
        "official": true
      }
    },
    {
      "description": "Question answer data",
      "example": {
        "author": null,
        "comment": "Sample Answer",
        "id": null,
        "lastModified": null,
        "official": false
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "author": null,
  "comment": "Sample Answer",
  "id": null,
  "lastModified": null,
  "official": false
}

Example response

{
  "author": {
    "name": "user.test",
    "profilePicUrl": null,
    "uuid": "a7723111-f4c6-4510-aba4-2f4bef9d2ce5"
  },
  "comment": "Sample Answer",
  "id": 4,
  "lastModified": null,
  "official": true
}

POST/marketplace/v1/products/{applicationId}/questions/{questionId}/answers

Create an answer This call creates an answer to a product question submitted on your marketplace.

Parameters

Parameter Type Data Type Default Description
*applicationId path number Application id
*questionId path number Question id

Body Parameters

Question answer data

QuestionAnswer object:

Property Type Description
author Author

Author

comment string

Comment

id number

ID

lastModified number

Last modified date

official boolean

Is the official answer

Responses

Status Meaning Description Definition
201 Created Created question answer QuestionAnswer

Delete an answer

This call deletes an answer from your marketplace.

Example request

curl -X DELETE https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers/{answerId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers/{answerId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers/{answerId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers/{answerId}',
{
  method: 'DELETE'

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers/{answerId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers/{answerId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers/{answerId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE/marketplace/v1/products/{applicationId}/questions/{questionId}/answers/{answerId}

Delete an answer This call deletes an answer from your marketplace.

Parameters

Parameter Type Data Type Default Description
*answerId path number Answer id
*applicationId path number Application id
*questionId path number Question id

Responses

Status Meaning Description Definition
204 No Content Question answer deleted.
404 Not Found Application, question or answer not found.

Retrieve an answer

This call returns all answer details for a specific product.

Example request

curl -X GET https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers/{answerId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers/{answerId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers/{answerId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers/{answerId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers/{answerId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers/{answerId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers/{answerId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "author": {
    "name": "user.test",
    "profilePicUrl": null,
    "uuid": "3885644f-89b3-4b42-9293-d9fa446d2125"
  },
  "comment": "Sample Answer",
  "id": 3,
  "lastModified": 1461792715058,
  "official": true
}

GET/marketplace/v1/products/{applicationId}/questions/{questionId}/answers/{answerId}

Retrieve an answer This call returns all answer details for a specific product.

Parameters

Parameter Type Data Type Default Description
*answerId path number Answer id
*applicationId path number Application id
*questionId path number Question id

Responses

Status Meaning Description Definition
200 OK Question answer read. QuestionAnswer
404 Not Found Application, question or answer not found.

List all answers

List answers of a given question on an product.

Example request

curl -X GET https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "author": {
      "name": "user.test",
      "profilePicUrl": null,
      "uuid": "c1490377-953d-4701-8356-b1454b816476"
    },
    "comment": "Sample Answer",
    "id": 1,
    "lastModified": 1461792712537,
    "official": true
  }
]

GET/marketplace/v1/products/{applicationId}/questions/{questionId}/answers

List all answers List answers of a given question on an product

Parameters

Parameter Type Data Type Default Description
*applicationId path number Application id
*questionId path number Question id

Responses

Status Meaning Description Definition
200 OK Question answers read. array of QuestionAnswer
404 Not Found Application or question not found.

Update an answer

This call updates an existing answer on your marketplace.

Example request

curl -X PUT https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers/{answerId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers/{answerId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers/{answerId}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Answer to a question on a product",
      "type": "object",
      "title": "QuestionAnswer",
      "properties": {
        "author": {
          "allOf": [
            {
              "description": "Author of a question, an answer, a review or a review comment",
              "type": "object",
              "title": "Author",
              "properties": {
                "name": {
                  "description": "Name",
                  "type": "string"
                },
                "profilePicUrl": {
                  "description": "Profile pic URL",
                  "type": "string",
                  "nullable": true
                },
                "uuid": {
                  "description": "Unique identifier",
                  "type": "string",
                  "nullable": true
                }
              },
              "example": {
                "name": "...",
                "profilePicUrl": "...",
                "uuid": "..."
              }
            },
            {
              "description": "Author",
              "type": "object",
              "x-nullable": true
            }
          ]
        },
        "comment": {
          "description": "Comment",
          "type": "string"
        },
        "id": {
          "description": "ID",
          "type": "number",
          "nullable": true
        },
        "lastModified": {
          "description": "Last modified date",
          "type": "number",
          "nullable": true
        },
        "official": {
          "description": "Is the official answer",
          "type": "boolean"
        }
      },
      "example": {
        "author": {
          "name": "...",
          "profilePicUrl": "...",
          "uuid": "..."
        },
        "comment": "...",
        "id": 12345,
        "lastModified": 12345,
        "official": true
      }
    },
    {
      "description": "Question answer data"
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers/{answerId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers/{answerId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers/{answerId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}/answers/{answerId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "author": {
    "name": "...",
    "profilePicUrl": "...",
    "uuid": "..."
  },
  "comment": "...",
  "id": 12345,
  "lastModified": 12345,
  "official": true
}

Example response

{
  "author": {
    "name": "user.test",
    "profilePicUrl": null,
    "uuid": "a7723111-f4c6-4510-aba4-2f4bef9d2ce5"
  },
  "comment": "Sample Answer",
  "id": 4,
  "lastModified": null,
  "official": true
}

PUT/marketplace/v1/products/{applicationId}/questions/{questionId}/answers/{answerId}

Update an answer This call updates an existing answer on your marketplace.

Parameters

Parameter Type Data Type Default Description
*answerId path number Answer id
*applicationId path number Application id
*questionId path number Question id

Body Parameters

Question answer data

QuestionAnswer object:

Property Type Description
author Author

Author

comment string

Comment

id number

ID

lastModified number

Last modified date

official boolean

Is the official answer

Responses

Status Meaning Description Definition
200 OK Question answers updated. QuestionAnswer
404 Not Found Application, question or answer not found.

Product Comments

Create a comment

This call creates a new review comment on your marketplace.

Example request

curl -X POST https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Comment on a review of a product",
      "type": "object",
      "title": "ReviewComment",
      "properties": {
        "author": {
          "allOf": [
            {
              "description": "Author of a question, an answer, a review or a review comment",
              "type": "object",
              "title": "Author",
              "properties": {
                "name": {
                  "description": "Name",
                  "type": "string"
                },
                "profilePicUrl": {
                  "description": "Profile pic URL",
                  "type": "string",
                  "nullable": true
                },
                "uuid": {
                  "description": "Unique identifier",
                  "type": "string",
                  "nullable": true
                }
              },
              "example": {
                "name": "...",
                "profilePicUrl": "...",
                "uuid": "..."
              }
            },
            {
              "description": "Author",
              "type": [
                "object",
                "null"
              ]
            }
          ]
        },
        "comment": {
          "description": "Comment",
          "type": "string"
        },
        "id": {
          "description": "ID",
          "type": "number",
          "nullable": true
        },
        "lastModified": {
          "description": "Last modified date",
          "type": "number",
          "nullable": true
        },
        "official": {
          "description": "Is an official comment",
          "type": "boolean"
        }
      },
      "example": {
        "author": {
          "name": "...",
          "profilePicUrl": "...",
          "uuid": "..."
        },
        "comment": "...",
        "id": 12345,
        "lastModified": 12345,
        "official": true
      }
    },
    {
      "description": "Review comment data",
      "example": {
        "author": null,
        "comment": "Sample Comment",
        "id": null,
        "lastModified": null,
        "official": false
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "author": null,
  "comment": "Sample Comment",
  "id": null,
  "lastModified": null,
  "official": false
}

Example response

{
  "author": {
    "name": "user.test",
    "profilePicUrl": null,
    "uuid": "92b4573e-81d2-4d20-bda0-93be2ce9a966"
  },
  "comment": "Sample Comment",
  "id": 12,
  "lastModified": null,
  "official": true
}

POST/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments

Create a comment This call creates a new review comment on your marketplace.

Parameters

Parameter Type Data Type Default Description
*applicationId path number Application id
*reviewId path number Review id

Body Parameters

Review comment data

ReviewComment object:

Property Type Description
author Author

Author

comment string

Comment

id number

ID

lastModified number

Last modified date

official boolean

Is an official comment

Responses

Status Meaning Description Definition
201 Created Review comment created. ReviewComment
404 Not Found Application, review or comment not found.

Delete a comment

This call deletes a review comment from your marketplace.

Example request

curl -X DELETE https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments/{commentId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments/{commentId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments/{commentId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments/{commentId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments/{commentId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments/{commentId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments/{commentId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments/{commentId}

Delete a comment This call deletes a review comment from your marketplace.

Parameters

Parameter Type Data Type Default Description
*applicationId path number Application id
*commentId path number Comment id
*reviewId path number Review id

Responses

Status Meaning Description Definition
200 OK Review comments deleted.
404 Not Found Application, review or comment not found.

Retrieve a comment

This call returns all the comment details from a specific product.

Example request

curl -X GET https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments/{commentId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments/{commentId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments/{commentId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments/{commentId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments/{commentId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments/{commentId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments/{commentId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "author": {
    "name": "user.test",
    "profilePicUrl": null,
    "uuid": "e003b878-4c08-43b3-bcda-90a4813efb44"
  },
  "comment": "Sample Comment",
  "id": 6,
  "lastModified": 1461792757753,
  "official": true
}

GET/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments/{commentId}

Retrieve a comment This call returns all the comment details from a specific product.

Parameters

Parameter Type Data Type Default Description
*applicationId path number Application id
*commentId path number Comment id
*reviewId path number Review id

Responses

Status Meaning Description Definition
200 OK Review comment read. ReviewComment
404 Not Found Application, review or comment not found.

List all comments

This call lists all review comments on your marketplace.

Example request

curl -X GET https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "author": {
      "name": "user.test",
      "profilePicUrl": null,
      "uuid": "5330591d-cd96-43c6-8644-2d41d6f39e28"
    },
    "comment": "Sample Comment",
    "id": 2,
    "lastModified": 1461792756274,
    "official": true
  }
]

GET/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments

List all comments This call lists all review comments on your marketplace.

Parameters

Parameter Type Data Type Default Description
*applicationId path number Application id
*reviewId path number Review id

Responses

Status Meaning Description Definition
200 OK Review comments read. array of ReviewComment
404 Not Found Application or review not found.

Update a comment

This call updates a product comment on your marketplace.

Example request

curl -X PUT https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments/{commentId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments/{commentId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments/{commentId}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Comment on a review of a product",
      "type": "object",
      "title": "ReviewComment",
      "properties": {
        "author": {
          "allOf": [
            {
              "description": "Author of a question, an answer, a review or a review comment",
              "type": "object",
              "title": "Author",
              "properties": {
                "name": {
                  "description": "Name",
                  "type": "string"
                },
                "profilePicUrl": {
                  "description": "Profile pic URL",
                  "type": "string",
                  "nullable": true
                },
                "uuid": {
                  "description": "Unique identifier",
                  "type": "string",
                  "nullable": true
                }
              },
              "example": {
                "name": "...",
                "profilePicUrl": "...",
                "uuid": "..."
              }
            },
            {
              "description": "Author",
              "type": [
                "object",
                "null"
              ]
            }
          ]
        },
        "comment": {
          "description": "Comment",
          "type": "string"
        },
        "id": {
          "description": "ID",
          "type": "number",
          "nullable": true
        },
        "lastModified": {
          "description": "Last modified date",
          "type": "number",
          "nullable": true
        },
        "official": {
          "description": "Is an official comment",
          "type": "boolean"
        }
      },
      "example": {
        "author": {
          "name": "...",
          "profilePicUrl": "...",
          "uuid": "..."
        },
        "comment": "...",
        "id": 12345,
        "lastModified": 12345,
        "official": true
      }
    },
    {
      "description": "Review comment data",
      "example": {
        "author": null,
        "comment": "Sample Answer",
        "id": null,
        "lastModified": null,
        "official": false
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments/{commentId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments/{commentId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments/{commentId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments/{commentId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "author": null,
  "comment": "Sample Answer",
  "id": null,
  "lastModified": null,
  "official": false
}

Example response

{
  "author": {
    "name": "user.test",
    "profilePicUrl": null,
    "uuid": "7977159d-33f6-4334-8a7e-8b2de85cf6df"
  },
  "comment": "Sample Comment",
  "id": 8,
  "lastModified": null,
  "official": false
}

PUT/marketplace/v1/products/{applicationId}/reviews/{reviewId}/comments/{commentId}

Update a comment This call updates a product comment on your marketplace.

Parameters

Parameter Type Data Type Default Description
*applicationId path number Application id
*commentId path number Comment id
*reviewId path number Review id

Body Parameters

Review comment data

ReviewComment object:

Property Type Description
author Author

Author

comment string

Comment

id number

ID

lastModified number

Last modified date

official boolean

Is an official comment

Responses

Status Meaning Description Definition
200 OK Review comment updated. ReviewComment
404 Not Found Application, review or comment not found.

Product Context

Retrieve a product context for a supplied user and a company they belong to

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/userProductContext/{applicationId}/companies/{companyId}/users/{userId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/userProductContext/{applicationId}/companies/{companyId}/users/{userId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/userProductContext/{applicationId}/companies/{companyId}/users/{userId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/userProductContext/{applicationId}/companies/{companyId}/users/{userId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/userProductContext/{applicationId}/companies/{companyId}/users/{userId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/userProductContext/{applicationId}/companies/{companyId}/users/{userId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/userProductContext/{applicationId}/companies/{companyId}/users/{userId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "assigned": true,
  "editionId": 22,
  "freeTrialAllowed": false,
  "freeTrialDaysLeft": null,
  "maxUsers": 2,
  "numAssignedUsers": 1,
  "owner": {
    "href": "http://appdirect/api/account/v1/users/7e5ff840-1e1b-4b8f-b243-26ac12ebd427",
    "id": "7e5ff840-1e1b-4b8f-b243-26ac12ebd427"
  },
  "partOfExistingBundle": false,
  "paymentPlan": {
    "href": "http://appdirect/api/marketplace/v1/products/22/editions/22/paymentPlans/41",
    "id": "41"
  },
  "pendingEventType": "",
  "purchaseRestrictions": [],
  "status": "ACTIVE",
  "subscription": {
    "href": "http://appdirect/api/billing/v1/subscriptions/da43fcb9-988e-48d8-a132-fbc465e10aab",
    "id": "da43fcb9-988e-48d8-a132-fbc465e10aab"
  }
}

GET/billing/v1/userProductContext/{applicationId}/companies/{companyId}/users/{userId}

Retrieve a product context for a supplied user and a company they belong to

Parameters

Parameter Type Data Type Default Description
*applicationId path number id of the application
*companyId path string uuid of the desired users' company
*userId path string uuid of the desired user

Responses

Status Meaning Description Definition
200 OK OK UserProductContext
404 Not Found User, Company or Application Not Found

Retrieve a product context for the current user

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/userProductContext/{applicationId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/userProductContext/{applicationId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/userProductContext/{applicationId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/userProductContext/{applicationId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/userProductContext/{applicationId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/userProductContext/{applicationId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/userProductContext/{applicationId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "assigned": false,
  "editionId": null,
  "freeTrialAllowed": true,
  "freeTrialDaysLeft": null,
  "maxUsers": null,
  "numAssignedUsers": null,
  "owner": null,
  "partOfExistingBundle": false,
  "paymentPlan": null,
  "pendingEventType": "",
  "purchaseRestrictions": [],
  "status": null,
  "subscription": null
}

GET/billing/v1/userProductContext/{applicationId}

Retrieve a product context for the current user

Parameters

Parameter Type Data Type Default Description
*applicationId path number id of the application

Responses

Status Meaning Description Definition
200 OK OK UserProductContext
404 Not Found Application Not Found

Product Questions

Delete a question

Example request

curl -X DELETE https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE/marketplace/v1/products/{applicationId}/questions/{questionId}

This call deletes a product question from your marketplace.

Parameters

Parameter Type Data Type Default Description
*applicationId path number Application id
*questionId path number Question id

Responses

Status Meaning Description Definition
204 No Content Question deleted.
404 Not Found Application or question not found.

Retrieve a question

Example request

curl -X GET https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "answerCount": 0,
  "author": {
    "name": "user.test",
    "profilePicUrl": null,
    "uuid": "5893f822-368e-45a6-9190-0eb23055b6d3"
  },
  "comment": "Sample Question",
  "id": 6,
  "lastModified": 1461792771695,
  "title": "Sample Question Title"
}

GET/marketplace/v1/products/{applicationId}/questions/{questionId}

This call returns all question details for a specific product.

Parameters

Parameter Type Data Type Default Description
*applicationId path number Application id
*questionId path number Question id

Responses

Status Meaning Description Definition
200 OK Question read. Question
404 Not Found Application or question not found.

List all questions

Example request

curl -X GET https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET/marketplace/v1/products/{applicationId}/questions

This call lists all questions listed on your marketplace.

Parameters

Parameter Type Data Type Default Description
*applicationId path number Application id

Responses

Status Meaning Description Definition
200 OK Questions read. array of Question
404 Not Found Application not found.

Update a question

Example request

curl -X PUT https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Question on a product",
      "type": "object",
      "title": "Question",
      "properties": {
        "answerCount": {
          "description": "Number of answers",
          "type": "number",
          "nullable": true
        },
        "author": {
          "allOf": [
            {
              "description": "Author of a question, an answer, a review or a review comment",
              "type": "object",
              "title": "Author",
              "properties": {
                "name": {
                  "description": "Name",
                  "type": "string"
                },
                "profilePicUrl": {
                  "description": "Profile pic URL",
                  "type": "string",
                  "nullable": true
                },
                "uuid": {
                  "description": "Unique identifier",
                  "type": "string",
                  "nullable": true
                }
              },
              "example": {
                "name": "...",
                "profilePicUrl": "...",
                "uuid": "..."
              }
            },
            {
              "description": "Author",
              "type": [
                "object",
                "null"
              ]
            }
          ]
        },
        "comment": {
          "description": "Comment",
          "type": "string"
        },
        "id": {
          "description": "ID",
          "type": "number",
          "nullable": true
        },
        "lastModified": {
          "description": "Last modified date",
          "type": "number",
          "nullable": true
        },
        "title": {
          "description": "Title",
          "type": "string"
        }
      },
      "example": {
        "answerCount": 12345,
        "author": {
          "name": "...",
          "profilePicUrl": "...",
          "uuid": "..."
        },
        "comment": "...",
        "id": 12345,
        "lastModified": 12345,
        "title": "..."
      }
    },
    {
      "description": "Question data",
      "example": {
        "answerCount": null,
        "author": null,
        "comment": "Sample Question",
        "id": null,
        "lastModified": null,
        "title": "Sample Question Title"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/questions/{questionId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "answerCount": null,
  "author": null,
  "comment": "Sample Question",
  "id": null,
  "lastModified": null,
  "title": "Sample Question Title"
}

Example response

[
  {
    "answerCount": null,
    "author": {
      "name": "user.test",
      "profilePicUrl": null,
      "uuid": "b8ba2b9e-5dd7-41fe-833a-3984117314c3"
    },
    "comment": "Sample Question",
    "id": 8,
    "lastModified": null,
    "title": "Sample Question Title"
  }
]

PUT/marketplace/v1/products/{applicationId}/questions/{questionId}

This call allows you to update a product question on your marketplace.

Parameters

Parameter Type Data Type Default Description
*applicationId path number Application id
*questionId path number Question id

Body Parameters

Question data

Question object:

Property Type Description
answerCount number

Number of answers

author Author

Author

comment string

Comment

id number

ID

lastModified number

Last modified date

title string

Title

Responses

Status Meaning Description Definition
200 OK Question updated. array of Question
404 Not Found Application or question not found.

Product Reviews

Create a review

This call creates a new product review on your marketplace.

Example request

curl -X POST https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Review on a product",
      "type": "object",
      "title": "Review",
      "properties": {
        "author": {
          "allOf": [
            {
              "description": "Author of a question, an answer, a review or a review comment",
              "type": "object",
              "title": "Author",
              "properties": {
                "name": {
                  "description": "Name",
                  "type": "string"
                },
                "profilePicUrl": {
                  "description": "Profile pic URL",
                  "type": "string",
                  "nullable": true
                },
                "uuid": {
                  "description": "Unique identifier",
                  "type": "string",
                  "nullable": true
                }
              },
              "example": {
                "name": "...",
                "profilePicUrl": "...",
                "uuid": "..."
              }
            },
            {
              "description": "Author",
              "type": "object",
              "x-nullable": true
            }
          ]
        },
        "comment": {
          "description": "Comment",
          "type": "string"
        },
        "commentCount": {
          "description": "Number of comment",
          "type": "number",
          "nullable": true
        },
        "id": {
          "description": "ID",
          "type": "number",
          "nullable": true
        },
        "lastModified": {
          "description": "Last modified date",
          "type": "number",
          "nullable": true
        },
        "rating": {
          "description": "Rating",
          "type": "number",
          "nullable": true
        },
        "source": {
          "description": "Source",
          "type": "string",
          "nullable": true
        },
        "title": {
          "description": "Title",
          "type": "string"
        }
      },
      "example": {
        "author": {
          "name": "...",
          "profilePicUrl": "...",
          "uuid": "..."
        },
        "comment": "...",
        "commentCount": 12345,
        "id": 12345,
        "lastModified": 12345,
        "rating": 12345,
        "source": "...",
        "title": "..."
      }
    },
    {
      "description": "Review data",
      "example": {
        "author": null,
        "comment": "Sample Review",
        "commentCount": null,
        "id": null,
        "lastModified": null,
        "rating": null,
        "source": "Sample Source",
        "title": "Sample Review Title"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "author": null,
  "comment": "Sample Review",
  "commentCount": null,
  "id": null,
  "lastModified": null,
  "rating": null,
  "source": "Sample Source",
  "title": "Sample Review Title"
}

Example response

{
  "author": {
    "name": "",
    "profilePicUrl": null,
    "uuid": null
  },
  "comment": "Sample Review",
  "commentCount": null,
  "id": 17,
  "lastModified": null,
  "rating": null,
  "source": null,
  "title": "Sample Review Title"
}

POST/marketplace/v1/products/{applicationId}/reviews

Create a review This call creates a new product review on your marketplace.

Parameters

Parameter Type Data Type Default Description
*applicationId path number Application id

Body Parameters

Review data

Review object:

Property Type Description
author Author

Author

comment string

Comment

commentCount number

Number of comment

id number

ID

lastModified number

Last modified date

rating number

Rating

source string

Source

title string

Title

Responses

Status Meaning Description Definition
201 Created Review created. Review
400 Bad Request Error creating the review.
404 Not Found Application not found.

Delete a review

This call deletes a product review from your marketplace.

Example request

curl -X DELETE https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE/marketplace/v1/products/{applicationId}/reviews/{reviewId}

Delete a review This call deletes a product review from your marketplace.

Parameters

Parameter Type Data Type Default Description
*applicationId path number Application id
*reviewId path number Review id

Responses

Status Meaning Description Definition
204 No Content Review deleted.
404 Not Found Application or review not found.

Retrieve a review

This call returns all details for a specific review.

Example request

curl -X GET https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "author": {
    "name": "",
    "profilePicUrl": null,
    "uuid": null
  },
  "comment": "Sample Review",
  "commentCount": 0,
  "id": 15,
  "lastModified": 1461792775539,
  "rating": null,
  "source": null,
  "title": "Sample Review Title"
}

GET/marketplace/v1/products/{applicationId}/reviews/{reviewId}

Retrieve a review This call returns all details for a specific review.

Parameters

Parameter Type Data Type Default Description
*applicationId path number Application id
*reviewId path number Review id

Responses

Status Meaning Description Definition
200 OK Review read. Review
404 Not Found Application or review not found.

List all reviews

This call lists all reviews and associated information listed on your marketplace.

Example request

curl -X GET https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "author": {
      "name": "user.test",
      "profilePicUrl": null,
      "uuid": "d13a652c-f88b-43a2-a907-63fd9fc36b83"
    },
    "comment": "Sample Review",
    "commentCount": 0,
    "id": 13,
    "lastModified": 1461792774445,
    "rating": null,
    "source": null,
    "title": "Sample Review Title"
  }
]

GET/marketplace/v1/products/{applicationId}/reviews

List all reviews This call lists all reviews and associated information listed on your marketplace.

Parameters

Parameter Type Data Type Default Description
*applicationId path number Application id

Responses

Status Meaning Description Definition
200 OK Reviews read. array of Review
404 Not Found Application not found.

Update a review

This call updates an existing product review on your marketplace.

Example request

curl -X PUT https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Review on a product",
      "type": "object",
      "title": "Review",
      "properties": {
        "author": {
          "allOf": [
            {
              "description": "Author of a question, an answer, a review or a review comment",
              "type": "object",
              "title": "Author",
              "properties": {
                "name": {
                  "description": "Name",
                  "type": "string"
                },
                "profilePicUrl": {
                  "description": "Profile pic URL",
                  "type": "string",
                  "nullable": true
                },
                "uuid": {
                  "description": "Unique identifier",
                  "type": "string",
                  "nullable": true
                }
              },
              "example": {
                "name": "...",
                "profilePicUrl": "...",
                "uuid": "..."
              }
            },
            {
              "description": "Author",
              "type": "object",
              "x-nullable": true
            }
          ]
        },
        "comment": {
          "description": "Comment",
          "type": "string"
        },
        "commentCount": {
          "description": "Number of comment",
          "type": "number",
          "nullable": true
        },
        "id": {
          "description": "ID",
          "type": "number",
          "nullable": true
        },
        "lastModified": {
          "description": "Last modified date",
          "type": "number",
          "nullable": true
        },
        "rating": {
          "description": "Rating",
          "type": "number",
          "nullable": true
        },
        "source": {
          "description": "Source",
          "type": "string",
          "nullable": true
        },
        "title": {
          "description": "Title",
          "type": "string"
        }
      },
      "example": {
        "author": {
          "name": "...",
          "profilePicUrl": "...",
          "uuid": "..."
        },
        "comment": "...",
        "commentCount": 12345,
        "id": 12345,
        "lastModified": 12345,
        "rating": 12345,
        "source": "...",
        "title": "..."
      }
    },
    {
      "description": "Review data",
      "example": {
        "author": null,
        "comment": "Sample Review",
        "commentCount": null,
        "id": null,
        "lastModified": null,
        "rating": null,
        "source": "Sample Source",
        "title": "Sample Review Title"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/reviews/{reviewId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "author": null,
  "comment": "Sample Review",
  "commentCount": null,
  "id": null,
  "lastModified": null,
  "rating": null,
  "source": "Sample Source",
  "title": "Sample Review Title"
}

Example response

{
  "author": {
    "name": "",
    "profilePicUrl": null,
    "uuid": null
  },
  "comment": "Sample Review",
  "commentCount": null,
  "id": 16,
  "lastModified": null,
  "rating": null,
  "source": null,
  "title": "Sample Review Title"
}

PUT/marketplace/v1/products/{applicationId}/reviews/{reviewId}

Update a review This call updates an existing product review on your marketplace.

Parameters

Parameter Type Data Type Default Description
*applicationId path number Application id
*reviewId path number Review id

Body Parameters

Review data

Review object:

Property Type Description
author Author

Author

comment string

Comment

commentCount number

Number of comment

id number

ID

lastModified number

Last modified date

rating number

Rating

source string

Source

title string

Title

Responses

Status Meaning Description Definition
200 OK Review updated. Review
404 Not Found Application or review not found.

Products

List all products

This call lists products based on specific parameters such as attribute, category, date, or type.

Example request

curl -X GET https://{marketplaceURL}/api/marketplace/v1/listing \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/marketplace/v1/listing HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/listing',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/listing',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/marketplace/v1/listing', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/marketplace/v1/listing',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/listing");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "addon": false,
    "billingFrequency": "MONTHLY",
    "blurb": "App Blurb",
    "bundleUrls": [],
    "buyable": false,
    "collectLeads": false,
    "description": "App Description",
    "developerName": "Appdirect",
    "discountDetails": null,
    "downloadFileSize": null,
    "featured": false,
    "featuredSliderPosition": null,
    "free": false,
    "freeTrialOrEditionPresent": true,
    "hasLyncToPhone": false,
    "hidePricings": false,
    "href": "http://localhost/api/marketplace/v1/products/336",
    "iconUrl": null,
    "id": 336,
    "lastModified": 1461792766422,
    "name": "MockApp6205935388023038001",
    "numRatings": null,
    "overview": null,
    "overviewImageUrl": null,
    "popular": false,
    "popularity": null,
    "productType": "WEB_APP",
    "profileLogoUrl": null,
    "publishedOn": 1461792766320,
    "rating": null,
    "referable": false,
    "sortRank": 5,
    "staffPick": false,
    "staffPickSliderPosition": null,
    "startingPrice": "$0.00/User/Mo",
    "supportedLanguages": [
      "en"
    ],
    "tags": [],
    "url": "http://localhost/apps/336",
    "uuid": "9b96574b-1686-44c4-a84d-f79f28d2b79f",
    "vendorName": "Appdirect"
  }
]

GET/marketplace/v1/listing

List all products This call lists products based on specific parameters such as attribute, category, date, or type.

Parameters

Parameter Type Data Type Default Description
a query array of number Only return products for these attribute ids
approvalAfter query number Search products published after this date in milliseconds
approvalBefore query number Search products published before this date in milliseconds
c query array of number Only return products for these categories
count query string 500 Limit number of products returned
filter query array of enum:
DISCOUNT
FEATURED
FREE
FREE_TRIAL
PAID
POPULAR
STAFFPICK
Only return products for these characteristics
i query array of number Only return products for these sub category ids
locale query string Specify the locale context
order query string of enum:
ALPHABETICAL
NEWEST_FIRST
NEWEST_PUBLISHED
POPULARITY
RATING
Ordering type
pl query array of number
platform query array of string
q query string Search term used to search on different fields of an product
s query array of number Only return products for these category ids
start query integer Start to return product after this offset
type query array of enum:
APPDIRECT_SERVICE
BUNDLE
CLOUDFOUNDRY_DEPLOYABLE
CLOUD_SERVICES
DESIGN_ELEMENT
DOMAIN_REGISTRATION
DOMAIN_RESELLER
DOWNLOAD
DOWNLOADABLE_BUNDLE
DOWNLOAD_WITH_FULL_PROFILE
EMBEDDED_VIDEO
EXTERNAL
MODULE
OPEN_SOURCE
RACKSPACE_IMAGE
STANDING_CLOUD
STATIC
SUPPORT
TEMPLATE
WEB_APP
WEB_APP_MANUAL_SETUP
WEB_APP_STACKED
Only return product for these product types
vendor query array of string Only return products for the specified vendor IDs

Responses

Status Meaning Description Definition
200 OK List of products array of ProductListing

List all product recommendations

Example request

curl -X GET https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/recommendations \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/recommendations HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/recommendations',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/recommendations',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/recommendations', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/recommendations',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/recommendations");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET/marketplace/v1/products/{applicationId}/recommendations

This call lists all products that other customers have bought in addition to the one specified. Returns recommendations for additional purchases (currently simply returning what others who have bought the product have also bought). This may be augmented later to include additional recommendation strategies but always in the context of a single product

Parameters

Parameter Type Data Type Default Description
*applicationId path number Application id

Responses

Status Meaning Description Definition
200 OK List of recommended applications array of ProductListing

Retrieve a product

Example request

curl -X GET https://{marketplaceURL}/api/marketplace/v1/products/{applicationId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/marketplace/v1/products/{applicationId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "addonOfferings": [],
  "autoUpgradeToPaid": false,
  "bundledPlanIds": null,
  "buyable": false,
  "changeSubscriptionAllowed": true,
  "collectLeads": false,
  "collectLeadsWithPurchaseEnabled": false,
  "customIntegration": null,
  "displayQuestions": true,
  "displayReviews": true,
  "downloadFileSize": null,
  "featuredCustomers": [],
  "featuredMedia": [],
  "features": [],
  "free": false,
  "freeTrialOrEditionPresent": true,
  "hidePricings": false,
  "highestFixedDiscount": {},
  "highestPercentageDiscount": null,
  "hostedLocation": null,
  "href": "http://localhost/api/marketplace/v1/products/348",
  "id": 348,
  "lastModified": 1461792768086,
  "linkedImportableApplicationUuid": null,
  "listing": {
    "blurb": "App Blurb",
    "imageUrl": null,
    "myAppLogoIconUrl": null,
    "overview": null,
    "profileImageUrl": null,
    "rating": null,
    "reviewCount": 0
  },
  "liveChatAvailable": false,
  "liveChatEnabled": false,
  "name": "MockApp-4367741647933991053",
  "newSubscriptionEnabled": true,
  "numRatings": null,
  "oneClickPurchasable": false,
  "orderFormFields": [],
  "overview": {
    "benefits": [],
    "demoUrl": null,
    "documentationUrl": null,
    "downloadDocumentationUrl": null,
    "downloadFileSize": null,
    "imageUrl": null,
    "splashDescription": "App Description",
    "splashTitle": null,
    "systemRequirements": null,
    "versions": {}
  },
  "pricing": {
    "bullets": [],
    "editions": [
      {
        "bullets": [],
        "bundleOnly": false,
        "code": "OS5WH",
        "customerContractRestricted": false,
        "customizations": [],
        "defaultFreeTrial": false,
        "expiredTrialGracePeriod": null,
        "freeTrialDuration": 1,
        "freeTrialType": "MONTH",
        "id": 348,
        "invisible": false,
        "items": [],
        "lastModified": 1461792767969,
        "leadGen": false,
        "name": "jEGpImFXPG",
        "plans": [
          {
            "allowCustomUsage": false,
            "contract": {
              "autoExtensionPricingId": 688,
              "blockContractDowngrades": false,
              "blockContractUpgrades": false,
              "blockSwitchToShorterContract": false,
              "cancellationPeriodLimit": null,
              "endOfContractGracePeriod": null,
              "gracePeriod": null,
              "minimumServiceLength": 3,
              "terminationFee": null
            },
            "costs": [
              {
                "amount": {
                  "USD": 10
                },
                "blockContractDecrease": false,
                "blockContractIncrease": false,
                "blockOriginalContractDecrease": false,
                "increment": 1,
                "maxUnits": null,
                "meteredUsage": false,
                "minUnits": 0,
                "pricePerIncrement": false,
                "unit": "USER",
                "unitDependency": null
              }
            ],
            "discount": null,
            "frequency": "MONTHLY",
            "href": "http://localhost/api/marketplace/v1/products/348/editions/348/paymentPlans/688",
            "id": 688,
            "isPrimaryPrice": false,
            "keepBillDateOnUsageChange": false,
            "primaryPrice": false,
            "separatePrepaid": false,
            "uuid": null
          },
          {
            "allowCustomUsage": false,
            "contract": {
              "autoExtensionPricingId": 689,
              "blockContractDowngrades": false,
              "blockContractUpgrades": false,
              "blockSwitchToShorterContract": false,
              "cancellationPeriodLimit": null,
              "endOfContractGracePeriod": null,
              "gracePeriod": null,
              "minimumServiceLength": 6,
              "terminationFee": null
            },
            "costs": [
              {
                "amount": {
                  "USD": 10
                },
                "blockContractDecrease": false,
                "blockContractIncrease": false,
                "blockOriginalContractDecrease": false,
                "increment": 1,
                "maxUnits": null,
                "meteredUsage": false,
                "minUnits": 0,
                "pricePerIncrement": false,
                "unit": "USER",
                "unitDependency": null
              }
            ],
            "discount": null,
            "frequency": "MONTHLY",
            "href": "http://localhost/api/marketplace/v1/products/348/editions/348/paymentPlans/689",
            "id": 689,
            "isPrimaryPrice": false,
            "keepBillDateOnUsageChange": false,
            "primaryPrice": false,
            "separatePrepaid": false,
            "uuid": null
          }
        ],
        "primary": false,
        "rank": 1,
        "restricted": false,
        "revenueType": "RECURRING",
        "targetAudience": null,
        "trial": {
          "length": 1,
          "unit": "MONTH"
        },
        "uuid": "e01e484b-4894-4136-8afc-8d1d50d8c04d"
      }
    ],
    "footnotes": [],
    "pricingSummary": null
  },
  "privacyUrl": null,
  "provider": {
    "name": "Appdirect",
    "url": "appdirect.com",
    "uuid": "4a74d22c-8391-4c8c-8fc5-807a193a613e"
  },
  "publishedApp": null,
  "publishedOn": 1461792767968,
  "rating": null,
  "referUrl": null,
  "referable": false,
  "resources": [],
  "screenshots": [],
  "startingPrice": {
    "amount": {
      "USD": 0
    },
    "billingFrequency": "MONTHLY",
    "discount": null,
    "unit": "USER"
  },
  "support": {
    "description": null,
    "email": null,
    "knowledgebaseUrl": null,
    "phone": null
  },
  "supportedLanguages": [
    "en"
  ],
  "tags": [],
  "termsUrl": null,
  "type": "WEB_APP",
  "usageType": "MULTI_USER",
  "uuid": "c3775161-9ca4-4b5d-bf9f-3f8785063962",
  "workingApp": {
    "href": "http://localhost/api/marketplace/v1/products/347",
    "id": "347"
  }
}

GET/marketplace/v1/products/{applicationId}

This request returns all details about a specific product on your marketplace. The product in the response contains invisible editions if you are using OAuth to access the endpoint and the current user has either a Marketplace Manager role or a Sales Support role.
Maximum of 5 requests per second per caller.
To receive language-specific content in your response, ensure that your marketplace supports the specified language. Also ensure that you have a version of your product in the specified language.

Parameters

Parameter Type Data Type Default Description
*applicationId path number Application ID

Responses

Status Meaning Description Definition
200 OK product information Product
429 Too Many Requests Too many requests

Retrieve buyable products

Example request

curl -X GET https://{marketplaceURL}/api/channel/v1/applications \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/channel/v1/applications HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/applications',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/applications',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/channel/v1/applications', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/channel/v1/applications',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/applications");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "addon": false,
      "billingFrequency": "ONE_TIME",
      "blurb": "Support for cloud apps and devices",
      "bundleUrls": [],
      "buyable": true,
      "channelStartingPrice": {
        "free": false,
        "freeTrial": true,
        "prices": {
          "CAD": {
            "duration": "ONE_TIME",
            "price": 60
          },
          "EUR": {
            "duration": "ONE_TIME",
            "price": 60
          },
          "GBP": {
            "duration": "ONE_TIME",
            "price": 60
          },
          "IDR": {
            "duration": "ONE_TIME",
            "price": 0
          },
          "MXN": {
            "duration": "ONE_TIME",
            "price": 0
          },
          "USD": {
            "duration": "ONE_TIME",
            "price": 60
          }
        }
      },
      "collectLeads": false,
      "description": "Whether you need advice on managing a SaaS or cloud application, deploying and configuring a backup system, or help setting up BYOD for the office, our Business Cloud HelpDesk experts are available 24x7x365 to assist with any cloud or IT support need your business has.",
      "developerName": "RP QA",
      "discountDetails": null,
      "downloadFileSize": null,
      "featured": false,
      "featuredSliderPosition": null,
      "free": false,
      "freeTrialOrEditionPresent": true,
      "hasLyncToPhone": false,
      "hidePricings": false,
      "href": "http://dockerdev.appdirect.com:8080/api/marketplace/v1/products/4644",
      "iconSrcset": {
        "default": "https://ad-dev-dump1.s3.amazonaws.com/app_resources/4644/thumbs_64/img5679336365844850048.png"
      },
      "iconUrl": "https://ad-dev-dump1.s3.amazonaws.com/app_resources/4644/thumbs_64/img5679336365844850048.png",
      "id": 4644,
      "importable": false,
      "lastModified": 1519248072000,
      "links": [
        {
          "href": "http://dockerdev.appdirect.com:8080/api/marketplace/v1/products/4644?country=&currency=",
          "rel": "self"
        }
      ],
      "merchandisingBadges": [],
      "name": "[SB] Platform Product AppHelp Business Cloud HelpDesk",
      "numRatings": null,
      "overview": "As your business adopts more software and devices to operate and run, it's critical that you have access to quick, effective technical support to assist with the use and troubleshooting of your devices and cloud applications. AppHelp IT HelpDesk gives you an easy and affordable way to address SaaS and IT needs, without having to own your own IT staff. Need help installing software? Configuring backups? Recovering lost files? AppHelp IT HelpDesk has you covered",
      "overviewImageSrcset": {
        "default": "https://ad-dev-dump1.s3.amazonaws.com/app_resources/4644/overview/img7694979340532479102.png"
      },
      "overviewImageUrl": "https://ad-dev-dump1.s3.amazonaws.com/app_resources/4644/overview/img7694979340532479102.png",
      "popular": false,
      "popularity": null,
      "productRibbon": {},
      "productType": "WEB_APP",
      "profileLogoSrcset": {
        "default": "https://ad-dev-dump1.s3.amazonaws.com/app_resources/4644/thumbs_112/img7862680650740192899.png"
      },
      "profileLogoUrl": "https://ad-dev-dump1.s3.amazonaws.com/app_resources/4644/thumbs_112/img7862680650740192899.png",
      "publishedOn": 1519248071000,
      "rating": null,
      "referable": false,
      "showRating": true,
      "sortRank": 3,
      "staffPick": false,
      "staffPickSliderPosition": null,
      "startingPrice": "$60.00",
      "supportedCountries": [],
      "supportedLanguages": [
        "en"
      ],
      "tags": [
        {
          "badge": null,
          "children": [],
          "description": null,
          "id": 6,
          "name": "Web Development",
          "showBadge": false,
          "showOnNavigation": true,
          "type": "CATEGORY"
        }
      ],
      "url": "http://dockerdev.appdirect.com:8080/apps/4644/sb-platform-product-apphelp-business-cloud-helpdesk",
      "uuid": "cf6ab187-628b-4571-8089-d97319d68801",
      "vendorName": "Appdirect"
    },
    {
      "addon": false,
      "billingFrequency": "ONE_TIME",
      "blurb": "Support for cloud apps and devices",
      "bundleUrls": [],
      "buyable": true,
      "channelStartingPrice": {
        "free": false,
        "freeTrial": true,
        "prices": {
          "CAD": {
            "duration": "ONE_TIME",
            "price": 60
          },
          "EUR": {
            "duration": "ONE_TIME",
            "price": 60
          },
          "GBP": {
            "duration": "ONE_TIME",
            "price": 60
          },
          "IDR": {
            "duration": "ONE_TIME",
            "price": 0
          },
          "MXN": {
            "duration": "ONE_TIME",
            "price": 60
          },
          "USD": {
            "duration": "ONE_TIME",
            "price": 60
          }
        }
      },
      "collectLeads": false,
      "description": "Whether you need advice on managing a SaaS or cloud application, deploying and configuring a backup system, or help setting up BYOD for the office, our Business Cloud HelpDesk experts are available 24x7x365 to assist with any cloud or IT support need your business has.",
      "developerName": "AppHelp",
      "discountDetails": null,
      "downloadFileSize": null,
      "featured": false,
      "featuredSliderPosition": null,
      "free": false,
      "freeTrialOrEditionPresent": true,
      "hasLyncToPhone": false,
      "hidePricings": false,
      "href": "http://dockerdev.appdirect.com:8080/api/marketplace/v1/products/4645",
      "iconSrcset": {
        "default": "https://ad-dev-dump1.s3.amazonaws.com/app_resources/4645/thumbs_64/img6332905770460652831.png"
      },
      "iconUrl": "https://ad-dev-dump1.s3.amazonaws.com/app_resources/4645/thumbs_64/img6332905770460652831.png",
      "id": 4645,
      "importable": false,
      "lastModified": 1519248114000,
      "links": [
        {
          "href": "http://dockerdev.appdirect.com:8080/api/marketplace/v1/products/4645?country=&currency=",
          "rel": "self"
        }
      ],
      "merchandisingBadges": [],
      "name": "[UQA] Platform Product AppHelp Business Cloud HelpDesk",
      "numRatings": null,
      "overview": "As your business adopts more software and devices to operate and run, it's critical that you have access to quick, effective technical support to assist with the use and troubleshooting of your devices and cloud applications. AppHelp IT HelpDesk gives you an easy and affordable way to address SaaS and IT needs, without having to own your own IT staff. Need help installing software? Configuring backups? Recovering lost files? AppHelp IT HelpDesk has you covered",
      "overviewImageSrcset": {
        "default": "https://ad-dev-dump1.s3.amazonaws.com/app_resources/4645/overview/img6165482937306752085.png"
      },
      "overviewImageUrl": "https://ad-dev-dump1.s3.amazonaws.com/app_resources/4645/overview/img6165482937306752085.png",
      "popular": false,
      "popularity": null,
      "productRibbon": {},
      "productType": "WEB_APP",
      "profileLogoSrcset": {
        "default": "https://ad-dev-dump1.s3.amazonaws.com/app_resources/4645/thumbs_112/img6663136721171420581.png"
      },
      "profileLogoUrl": "https://ad-dev-dump1.s3.amazonaws.com/app_resources/4645/thumbs_112/img6663136721171420581.png",
      "publishedOn": 1519248113000,
      "rating": null,
      "referable": false,
      "showRating": true,
      "sortRank": 3,
      "staffPick": false,
      "staffPickSliderPosition": null,
      "startingPrice": "$60.00",
      "supportedCountries": [],
      "supportedLanguages": [
        "en"
      ],
      "tags": [
        {
          "badge": null,
          "children": [],
          "description": null,
          "id": 6,
          "name": "Web Development",
          "showBadge": false,
          "showOnNavigation": true,
          "type": "CATEGORY"
        }
      ],
      "url": "http://dockerdev.appdirect.com:8080/apps/4645/uqa-platform-product-apphelp-business-cloud-helpdesk",
      "uuid": "9b997bfc-c68c-4ee3-b9f2-66d634ee993f",
      "vendorName": "Appdirect"
    },
    {
      "addon": true,
      "billingFrequency": "MONTHLY",
      "blurb": null,
      "bundleUrls": [],
      "buyable": true,
      "channelStartingPrice": {
        "free": false,
        "freeTrial": false,
        "prices": {}
      },
      "collectLeads": false,
      "description": "1 Month Contract Recurring Addon V2",
      "developerName": "developer+channeladmin",
      "discountDetails": null,
      "downloadFileSize": null,
      "featured": false,
      "featuredSliderPosition": null,
      "free": false,
      "freeTrialOrEditionPresent": false,
      "hasLyncToPhone": false,
      "hidePricings": false,
      "href": "http://dockerdev.appdirect.com:8080/api/marketplace/v1/products/3732",
      "iconSrcset": {},
      "iconUrl": null,
      "id": 3732,
      "importable": false,
      "lastModified": 1500540244000,
      "links": [
        {
          "href": "http://dockerdev.appdirect.com:8080/api/marketplace/v1/products/3732?country=&currency=",
          "rel": "self"
        }
      ],
      "merchandisingBadges": [],
      "name": "1 Month Contract Recurring Addon V2",
      "numRatings": null,
      "overview": null,
      "overviewImageSrcset": {},
      "overviewImageUrl": null,
      "popular": false,
      "popularity": 0,
      "productRibbon": {},
      "productType": "WEB_APP",
      "profileLogoSrcset": {},
      "profileLogoUrl": null,
      "publishedOn": 1500463144000,
      "rating": null,
      "referable": false,
      "showRating": true,
      "sortRank": 3,
      "staffPick": false,
      "staffPickSliderPosition": null,
      "startingPrice": "",
      "supportedCountries": [],
      "supportedLanguages": [
        "en"
      ],
      "tags": [],
      "url": "http://dockerdev.appdirect.com:8080/apps/3732/1-month-contract-recurring-addon-v2",
      "uuid": "531b7811-2372-47a3-8d04-40e66205d2db",
      "vendorName": "developer+channeladmin"
    }
  ],
  "links": [
    {
      "href": "http://dockerdev.appdirect.com:8080/api/channel/v1/applications?page=1&size=3&sortField=NAME&sortOrder=ASC",
      "rel": "next"
    }
  ],
  "page": {
    "number": 0,
    "size": 3,
    "totalElements": 932,
    "totalPages": 311
  }
}

GET/channel/v1/applications

Retrieve all products in the production catalog, including products that are not marked as visible on either the marketplace or network.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_PARTNER_READ Allows access to read all marketplace data.
ROLE_RESELLER Allows access as a Reseller for the marketplace.
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager for the marketplace.

Parameters

Parameter Type Data Type Default Description
categoryId query array of number Product category IDs. If specified, only products belonging to these categories are returned.
page query string 0 The page number. Defaults to 0.
searchText query string Search text.
size query string 20 The maximum number of products to return. The default is 20.
sortField query string of enum:
RATING
POPULARITY
NEWEST_FIRST
NAME
NAME The field by which to sort results. The default is NAME. RATING: Sort by the rating in descending order. POPULARITY: Sort by product popularity, from most to least popular. Popularity is calculated from the number of purchases. NEWEST_FIRST: Sort by product creation date/time. NAME: Sort by the product name in alphabetic order.
sortOrder query string of enum:
ASC
DESC
ASC Sort order, either ASC (ascending) or DESC (descending). The default is ASC.

Responses

Status Meaning Description Definition
200 OK Success PagedProductListingWS

Read staging catalog

This call lists all products in the Staging Catalog of your marketplace.

Example request

curl -X GET https://{marketplaceURL}/api/channel/v1/stagingCatalog \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/channel/v1/stagingCatalog HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/stagingCatalog',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/stagingCatalog',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/channel/v1/stagingCatalog', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/channel/v1/stagingCatalog',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/stagingCatalog");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "addon": false,
      "addonOfferings": [],
      "applicationStatus": "NEW",
      "autoUpgradeToPaid": false,
      "bundledPlanIds": null,
      "buyable": false,
      "changeSubscriptionAllowed": true,
      "collectLeads": false,
      "collectLeadsWithPurchaseEnabled": false,
      "customIntegration": null,
      "displayQuestions": false,
      "displayReviews": false,
      "downloadFileSize": null,
      "featuredCustomers": [],
      "featuredMedia": [],
      "features": [],
      "free": false,
      "freeTrialOrEditionPresent": false,
      "hidePricings": false,
      "highestFixedDiscount": null,
      "highestPercentageDiscount": null,
      "hostedLocation": null,
      "href": "http://appdirect/api/marketplace/v1/products/4",
      "id": 4,
      "integrationConfiguration": {
        "domainManagementEnabled": false,
        "productSettings": null
      },
      "lastModified": 1487267935599,
      "linkedImportableApplicationUuid": null,
      "links": [
        {
          "href": "http://appdirect/api/marketplace/v1/products/4",
          "rel": "self"
        }
      ],
      "listing": {
        "blurb": null,
        "imageSrcset": {},
        "imageUrl": null,
        "mobileAppStoreId": null,
        "mobileBundleId": null,
        "myAppLogoIconSrcset": {},
        "myAppLogoIconUrl": null,
        "overview": null,
        "profileImageSrcset": {},
        "profileImageUrl": null,
        "rating": null,
        "reviewCount": 0
      },
      "liveChatAvailable": false,
      "liveChatEnabled": false,
      "name": "test",
      "newSubscriptionEnabled": true,
      "numRatings": null,
      "oneClickPurchasable": false,
      "overview": {
        "benefits": [],
        "demoUrl": null,
        "documentationUrl": null,
        "downloadDocumentationUrl": null,
        "downloadFileSize": null,
        "imageSrcset": {},
        "imageUrl": null,
        "splashDescription": null,
        "splashTitle": null,
        "systemRequirements": null,
        "versions": {}
      },
      "pricing": {
        "bullets": [],
        "editions": [
          {
            "bullets": [],
            "bundleOnly": false,
            "code": "739C6527-7C18-45cf-B567-E886800C3532",
            "customerContractRestricted": false,
            "customizations": [],
            "defaultFreeTrial": false,
            "expiredTrialGracePeriod": null,
            "freeTrialDuration": 0,
            "freeTrialType": "DAY",
            "id": 4,
            "invisible": false,
            "items": [],
            "lastModified": 1487267935792,
            "leadGen": false,
            "name": "65PdwyUfbf",
            "plans": [
              {
                "allowCustomUsage": false,
                "contract": null,
                "costs": [
                  {
                    "amount": {
                      "USD": 10
                    },
                    "blockContractDecrease": false,
                    "blockContractIncrease": false,
                    "blockOriginalContractDecrease": false,
                    "id": 6,
                    "increment": 1,
                    "maxUnits": null,
                    "meteredUsage": false,
                    "minUnits": 0,
                    "pricePerIncrement": false,
                    "pricingStrategy": "UNIT",
                    "unit": "USER",
                    "unitDependency": null
                  }
                ],
                "discount": null,
                "frequency": "MONTHLY",
                "href": "http://appdirect/api/marketplace/v1/products/4/editions/4/paymentPlans/6",
                "id": 6,
                "isPrimaryPrice": false,
                "keepBillDateOnUsageChange": false,
                "primaryPrice": false,
                "separatePrepaid": false,
                "uuid": "bc8bd303-14e1-4b3f-9dc4-bc5fd408a3e3"
              }
            ],
            "primary": false,
            "rank": 1,
            "restricted": false,
            "revenueType": "RECURRING",
            "targetAudience": null,
            "trial": {
              "length": 0,
              "unit": "DAY"
            },
            "uuid": "d4e94846-2483-429a-8312-5e0ffd2bb3ac"
          }
        ],
        "footnotes": [],
        "pricingSummary": null
      },
      "privacyUrl": null,
      "provider": {
        "name": "Appdirect",
        "url": "appdirect.com",
        "uuid": "d83b2364-6cfb-4f53-afab-195732ed1064"
      },
      "publishedApp": null,
      "publishedOn": 1487267935599,
      "rating": null,
      "referUrl": null,
      "referable": false,
      "resources": [],
      "screenshots": [],
      "showSelfServiceRestriction": false,
      "showThirdPartyLegalDisclosure": false,
      "startingPrice": {
        "amount": {},
        "billingFrequency": null,
        "discount": null,
        "unit": null
      },
      "support": {
        "description": null,
        "email": null,
        "knowledgebaseUrl": null,
        "phone": null
      },
      "supportedLanguages": [
        "en"
      ],
      "tags": [],
      "termsUrl": null,
      "type": "TEMPLATE",
      "usageType": "MULTI_USER",
      "uuid": "659172ed-de2b-4668-bef1-2305543981c2",
      "vendorUUID": "d83b2364-6cfb-4f53-afab-195732ed1064",
      "workingApp": null
    },
    {
      "addon": false,
      "addonOfferings": [],
      "applicationStatus": "LAUNCHED",
      "autoUpgradeToPaid": false,
      "bundledPlanIds": null,
      "buyable": true,
      "changeSubscriptionAllowed": true,
      "collectLeads": false,
      "collectLeadsWithPurchaseEnabled": false,
      "customIntegration": null,
      "displayQuestions": false,
      "displayReviews": false,
      "downloadFileSize": null,
      "featuredCustomers": [],
      "featuredMedia": [],
      "features": [],
      "free": false,
      "freeTrialOrEditionPresent": true,
      "hidePricings": false,
      "highestFixedDiscount": null,
      "highestPercentageDiscount": null,
      "hostedLocation": null,
      "href": "http://appdirect/api/marketplace/v1/products/5",
      "id": 5,
      "integrationConfiguration": {
        "domainManagementEnabled": false,
        "productSettings": null
      },
      "lastModified": 1487267936024,
      "linkedImportableApplicationUuid": null,
      "links": [
        {
          "href": "http://appdirect/api/marketplace/v1/products/5",
          "rel": "self"
        }
      ],
      "listing": {
        "blurb": null,
        "imageSrcset": {},
        "imageUrl": null,
        "mobileAppStoreId": null,
        "mobileBundleId": null,
        "myAppLogoIconSrcset": {},
        "myAppLogoIconUrl": null,
        "overview": null,
        "profileImageSrcset": {},
        "profileImageUrl": null,
        "rating": null,
        "reviewCount": 0
      },
      "liveChatAvailable": false,
      "liveChatEnabled": false,
      "name": "MockApp-6924690453261933046",
      "newSubscriptionEnabled": true,
      "numRatings": null,
      "oneClickPurchasable": true,
      "overview": {
        "benefits": [],
        "demoUrl": null,
        "documentationUrl": null,
        "downloadDocumentationUrl": null,
        "downloadFileSize": null,
        "imageSrcset": {},
        "imageUrl": null,
        "splashDescription": null,
        "splashTitle": null,
        "systemRequirements": null,
        "versions": {}
      },
      "pricing": {
        "bullets": [],
        "editions": [
          {
            "bullets": [],
            "bundleOnly": false,
            "code": "CiMjK",
            "customerContractRestricted": false,
            "customizations": [],
            "defaultFreeTrial": false,
            "expiredTrialGracePeriod": null,
            "freeTrialDuration": 1,
            "freeTrialType": "MONTH",
            "id": 5,
            "invisible": false,
            "items": [],
            "lastModified": 1487267936025,
            "leadGen": false,
            "name": "dEnkTi8Hjp",
            "plans": [
              {
                "allowCustomUsage": false,
                "contract": {
                  "alignWithParentCycleStartDate": false,
                  "autoExtensionPricingId": 7,
                  "blockContractDowngrades": false,
                  "blockContractUpgrades": false,
                  "blockSwitchToShorterContract": false,
                  "cancellationPeriodLimit": null,
                  "endOfContractGracePeriod": null,
                  "gracePeriod": null,
                  "minimumServiceLength": 3,
                  "terminationFee": null
                },
                "costs": [
                  {
                    "amount": {
                      "USD": 10
                    },
                    "blockContractDecrease": false,
                    "blockContractIncrease": false,
                    "blockOriginalContractDecrease": false,
                    "id": 7,
                    "increment": 1,
                    "maxUnits": null,
                    "meteredUsage": false,
                    "minUnits": 0,
                    "pricePerIncrement": false,
                    "pricingStrategy": "UNIT",
                    "unit": "USER",
                    "unitDependency": null
                  }
                ],
                "discount": null,
                "frequency": "MONTHLY",
                "href": "http://appdirect/api/marketplace/v1/products/5/editions/5/paymentPlans/7",
                "id": 7,
                "isPrimaryPrice": false,
                "keepBillDateOnUsageChange": false,
                "primaryPrice": false,
                "separatePrepaid": false,
                "uuid": "aae2ed68-ed82-45f9-98c9-cca791d6c9d3"
              },
              {
                "allowCustomUsage": false,
                "contract": {
                  "alignWithParentCycleStartDate": false,
                  "autoExtensionPricingId": 8,
                  "blockContractDowngrades": false,
                  "blockContractUpgrades": false,
                  "blockSwitchToShorterContract": false,
                  "cancellationPeriodLimit": null,
                  "endOfContractGracePeriod": null,
                  "gracePeriod": null,
                  "minimumServiceLength": 6,
                  "terminationFee": null
                },
                "costs": [
                  {
                    "amount": {
                      "USD": 10
                    },
                    "blockContractDecrease": false,
                    "blockContractIncrease": false,
                    "blockOriginalContractDecrease": false,
                    "id": 8,
                    "increment": 1,
                    "maxUnits": null,
                    "meteredUsage": false,
                    "minUnits": 0,
                    "pricePerIncrement": false,
                    "pricingStrategy": "UNIT",
                    "unit": "USER",
                    "unitDependency": null
                  }
                ],
                "discount": null,
                "frequency": "MONTHLY",
                "href": "http://appdirect/api/marketplace/v1/products/5/editions/5/paymentPlans/8",
                "id": 8,
                "isPrimaryPrice": false,
                "keepBillDateOnUsageChange": false,
                "primaryPrice": false,
                "separatePrepaid": false,
                "uuid": "a24e51eb-7560-48fd-9e22-7fb85b32d081"
              }
            ],
            "primary": false,
            "rank": 1,
            "restricted": false,
            "revenueType": "RECURRING",
            "targetAudience": null,
            "trial": {
              "length": 1,
              "unit": "MONTH"
            },
            "uuid": "1b0417a8-7f5b-43ab-8761-3c2c58d985ad"
          }
        ],
        "footnotes": [],
        "pricingSummary": null
      },
      "privacyUrl": null,
      "provider": {
        "name": "Jp4CqQsc5sXUxq0j",
        "url": null,
        "uuid": "6a91b983-7faa-4629-96ad-59036439034a"
      },
      "publishedApp": {
        "href": "http://appdirect/api/marketplace/v1/products/6",
        "id": "6"
      },
      "publishedOn": 1487267935827,
      "rating": null,
      "referUrl": null,
      "referable": false,
      "resources": [],
      "screenshots": [],
      "showSelfServiceRestriction": false,
      "showThirdPartyLegalDisclosure": false,
      "startingPrice": {
        "amount": {
          "USD": 0
        },
        "billingFrequency": "MONTHLY",
        "discount": null,
        "unit": "USER"
      },
      "support": {
        "description": null,
        "email": null,
        "knowledgebaseUrl": null,
        "phone": null
      },
      "supportedLanguages": [
        "en"
      ],
      "tags": [],
      "termsUrl": null,
      "type": "WEB_APP",
      "usageType": "MULTI_USER",
      "uuid": "ca3ff213-2436-4c51-bc35-006083ab2411",
      "vendorUUID": "6a91b983-7faa-4629-96ad-59036439034a",
      "workingApp": null
    }
  ],
  "links": [],
  "page": {
    "number": 0,
    "size": 20,
    "totalElements": 2,
    "totalPages": 1
  }
}

GET/channel/v1/stagingCatalog

Read staging catalog This call lists all products in the Staging Catalog of your marketplace.

Parameters

Parameter Type Data Type Default Description
appStatus query string of enum:
DEVELOPMENT
PENDING
PRODUCTION
The status of the application, optional.
page query string 0 The page number. Optional, defaults to 0.
productType query string of enum:
APPDIRECT_SERVICE
BUNDLE
CLOUDFOUNDRY_DEPLOYABLE
CLOUD_SERVICES
DESIGN_ELEMENT
DOMAIN_REGISTRATION
DOMAIN_RESELLER
DOWNLOAD
DOWNLOADABLE_BUNDLE
DOWNLOAD_WITH_FULL_PROFILE
EMBEDDED_VIDEO
EXTERNAL
MODULE
OPEN_SOURCE
RACKSPACE_IMAGE
STANDING_CLOUD
STATIC
SUPPORT
TEMPLATE
WEB_APP
WEB_APP_MANUAL_SETUP
WEB_APP_STACKED
The product type, optional.
searchText query string The search text, optional.
size query string 20 The number of application returned. Optional, defaults to 20.
sortOrder query string of enum:
ASC
DESC
ASC The order. Optional, default to ascending.
sortProperty query string createdOn The sort field. Optional, defaults to the creation date of the application.
vendorUuid query string (Optional) ID of the vendor company

Responses

Status Meaning Description Definition
200 OK A paginated list of Staging products. PagedStagingProduct

Retrieve a product status

This call returns the status of a product on your marketplace.

Example request

curl -X GET https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/status \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/status HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/status',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/status',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/status', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/status',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/status");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "assigned": false,
  "companyEntitlementId": null,
  "companyEntitlementPending": false,
  "companyWide": false,
  "editionId": null,
  "freeTrialAllowed": true,
  "ownerAdmin": false,
  "ownerFullName": null,
  "ownerUuid": null,
  "partOfExistingBundle": false,
  "pending": false,
  "pendingAppType": "SUGGESTED",
  "purchaseRestrictions": [],
  "requested": false
}

GET/marketplace/v1/products/{applicationId}/status

Retrieve a product status This call returns the status of a product on your marketplace.

Parameters

Parameter Type Data Type Default Description
*applicationId path number Application id

Responses

Status Meaning Description Definition
200 OK products status Status

List all products by vendor

Example request

curl -X GET https://{marketplaceURL}/api/marketplace/v1/vendors/{vendorUuid}/products \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/marketplace/v1/vendors/{vendorUuid}/products HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/marketplace/v1/vendors/{vendorUuid}/products',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/marketplace/v1/vendors/{vendorUuid}/products',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/marketplace/v1/vendors/{vendorUuid}/products', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/marketplace/v1/vendors/{vendorUuid}/products',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/marketplace/v1/vendors/{vendorUuid}/products");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "addon": false,
    "billingFrequency": "MONTHLY",
    "blurb": "App Blurb",
    "bundleUrls": [],
    "buyable": false,
    "collectLeads": false,
    "description": "App Description",
    "developerName": "Appdirect",
    "discountDetails": null,
    "downloadFileSize": null,
    "featured": false,
    "featuredSliderPosition": null,
    "free": false,
    "freeTrialOrEditionPresent": true,
    "hasLyncToPhone": false,
    "hidePricings": false,
    "href": "http://localhost/api/marketplace/v1/products/365",
    "iconUrl": null,
    "id": 365,
    "lastModified": 1461792770406,
    "name": "MockApp3254535959504925520",
    "numRatings": null,
    "overview": null,
    "overviewImageUrl": null,
    "popular": false,
    "popularity": null,
    "productType": "WEB_APP",
    "profileLogoUrl": null,
    "publishedOn": 1461792770306,
    "rating": null,
    "referable": false,
    "sortRank": 5,
    "staffPick": false,
    "staffPickSliderPosition": null,
    "startingPrice": "$0.00/User/Mo",
    "supportedLanguages": [
      "en"
    ],
    "tags": [],
    "url": "http://localhost/apps/365",
    "uuid": "f7a480c9-ddaf-4645-bbf2-94cdf94a476a",
    "vendorName": "Appdirect"
  }
]

GET/marketplace/v1/vendors/{vendorUuid}/products

Lists all products offered by the specified vendor. On the product profile page, the results appear in the Related Products list, in ascending order by product ID. To retrieve the vendor ID, use the List all companies endpoint (vendor companies have the "vendor" property set to "true").

Parameters

Parameter Type Data Type Default Description
*vendorUuid path string ID of the vendor company

Responses

Status Meaning Description Definition
200 OK Success array of ProductListing
404 Not Found Vendor not found

Purchase Orders

List all purchase orders for a company

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/companies/{companyId}/orders \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/companies/{companyId}/orders HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/orders',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/orders',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/orders', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/orders',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/companies/{companyId}/orders");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "orders": [
    {
      "activated": false,
      "company": {
        "href": "http://appdirect/api/account/v1/companies/e83cd3d6-7865-4fc2-9d7c-603ad17dd639",
        "id": "e83cd3d6-7865-4fc2-9d7c-603ad17dd639"
      },
      "contract": null,
      "currency": "USD",
      "discount": null,
      "discountId": null,
      "endDate": null,
      "endOfDiscountDate": null,
      "frequency": "MONTHLY",
      "id": 1,
      "links": [
        {
          "href": "http://appdirect/api/billing/v1/subscriptions/1b577640-9b77-47bc-beb8-ed59accb4836",
          "rel": "subscription"
        }
      ],
      "nextBillingDate": 1483599600000,
      "nextOrder": null,
      "oneTimeOrders": [],
      "orderLines": [
        {
          "description": "Test App 1 - null - Per User Fee",
          "id": 1,
          "listingPrice": 10,
          "price": 10,
          "quantity": 1,
          "totalPrice": 10,
          "type": "ITEM",
          "unit": "USER"
        }
      ],
      "parameters": [],
      "paymentPlan": {
        "allowCustomUsage": false,
        "contract": {
          "alignWithParentCycleStartDate": false,
          "autoExtensionPricingId": null,
          "blockContractDowngrades": false,
          "blockContractUpgrades": false,
          "blockSwitchToShorterContract": false,
          "cancellationPeriodLimit": null,
          "endOfContractGracePeriod": null,
          "gracePeriod": null,
          "minimumServiceLength": null,
          "terminationFee": null
        },
        "costs": [
          {
            "amount": {
              "USD": 10
            },
            "blockContractDecrease": false,
            "blockContractIncrease": false,
            "blockOriginalContractDecrease": false,
            "id": 2,
            "increment": 1,
            "maxUnits": null,
            "meteredUsage": false,
            "minUnits": 0,
            "pricePerIncrement": false,
            "pricingStrategy": "UNIT",
            "unit": "USER",
            "unitDependency": null
          }
        ],
        "discount": null,
        "frequency": "MONTHLY",
        "href": "http://appdirect/api/marketplace/v1/products/2/editions/2/paymentPlans/2",
        "id": 2,
        "isPrimaryPrice": false,
        "keepBillDateOnUsageChange": false,
        "primaryPrice": false,
        "separatePrepaid": false,
        "uuid": "eaca1aa5-4c4f-44cb-8cf4-eb0aa9267273"
      },
      "paymentPlanId": 2,
      "previousOrder": null,
      "referenceCode": null,
      "salesSupportUser": null,
      "startDate": 1480921200000,
      "status": "ACTIVE",
      "totalPrice": 10,
      "type": "NEW",
      "user": {
        "href": "http://appdirect/api/account/v1/users/c47d0fd7-b67a-4e07-84f8-f93dfafbeecc",
        "id": "c47d0fd7-b67a-4e07-84f8-f93dfafbeecc"
      }
    }
  ],
  "total": 1
}

GET/billing/v1/companies/{companyId}/orders

List all of the purchase orders for the given company

Parameters

Parameter Type Data Type Default Description
applicationIds query number Filters subscriptions by internal application ID
*companyId path string Company ID
count query integer 250 Number of results to fetch. Used for paging.
currency query string of enum:
USD
CAD
EUR
JPY
GBP
KRW
CHF
SEK
SGD
MYR
AUD
MXN
INR
BRL
DKK
NZD
NOK
ZAR
PHP
CNY
SAR
GTQ
IDR
ARS
COP
PEN
Filters subscriptions by currency
frequency query string of enum:
ONE_TIME
MONTHLY
QUARTERLY
SIX_MONTHS
YEARLY
TWO_YEARS
THREE_YEARS
DAILY
Filters subscriptions by pricing frequency
fromCreationDate query number Filters results to only include subscriptions that were created on or after the specified date
orderReferenceCode query string Filters subscriptions by order reference code
sortField query string of enum:
DATE
ORDER_ID
TOTAL
DATE Sort field.
sortOrder query string of enum:
ASC
DESC
ASC Sort order.
start query integer 0 First result index. Used for paging.
startDateFrom query number Filters results to only include subscriptions that were started on or after the specified date
startDateTo query number Filters results to only include subscriptions that were started on or before the specified date
status query string of enum:
INITIALIZED
PENDING_USER_APPROVAL
PENDING_REMOTE_CREATION
PENDING_MANUAL_RECOVERY
PENDING_ASYNCHRONOUS_CREATION
FREE_TRIAL
ACTIVE
FINISHED
ONE_TIME
CANCELLED
SUSPENDED
FREE_TRIAL_EXPIRED
FREE_TRIAL_CANCELLED
DELETED
FAILED
UPCOMING
PENDING_MIGRATION_ACTIVATION
PENDING_DELAYED_PROVISIONING
Filters subscriptions by order status
toCreationDate query number Filters results to only include subscriptions that were created on or before the specified date
type query string of enum:
NEW
MIGRATION
ADOPTION
FREE_TRIAL_ACTIVATION
TERMINATION_FEE
END_OF_CONTRACT_MIGRATION
REFUND
CREDIT
ONE_TIME_FEE
ADDITIONAL_FEE
END_OF_DISCOUNT_MIGRATION
METERED_USAGE
Filters subscriptions by order type.
NEW: The first order of a subscription. The order contains flat fees (one time or recurring) for this subscription. It is active until the subscription is updated or canceled.
MIGRATION: The order created after a subscription change. The order includes flat fees for both one-time and recurring editions.
ADOPTION: The order created by an administrator who has taken ownership of an application from another user within the same company.
FREE_TRIAL_ACTIVATION: Created when a free trial is manually upgraded to a paid subscription. Any subscription that is updated from free trial to paid automatically keeps the original NEW purchase order type.
TERMINATION_FEE: A subscription is canceled that had a termination fee. This purchase order represents the fees incurred as a result of the cancellation.
END_OF_CONTRACT_MIGRATION: Created when a subscription update takes place as a result of a contract extension. If the contract autorenewal is set to either continue without a contract or renew the contract with the same pricing plan, then no migration occurs and the original purchase order is updated to include the new end date for the contract.
REFUND: Created when a refund is performed. The refund purchase order is created for only on-platform refunds. Off-platform refunds do not generate this type of purchase order.
CREDIT: Created during subscription update events. Any subscription update calculates a paid period and a credit period. The credit is then provided to the user to prorate the subscription.
ONE_TIME_FEE: Created if an edition includes one-time setup fees.
ADDITIONAL_FEE: Used for off-order charges. A developer change creates an off-order charge and charges their customer a custom amount outside of the normal subscription cycle.
END_OF_DISCOUNT_MIGRATION: Created after a discount of limited duration expires. This purchase order is created to represent the updated costs without the discount.
METERED_USAGE: A purchase order created to accumulate usage fees during a billing period. The order is only valid for the billing period but it is updated with usage lines over the course of the billing period. A metered purchase order is invoiced in arrears at the end of the billing cycle.

Responses

Status Meaning Description Definition
200 OK OK OrderDetailedListing
404 Not Found Not Found

List all purchase order invoices

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/orders/{orderId}/invoices \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/orders/{orderId}/invoices HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/orders/{orderId}/invoices',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/orders/{orderId}/invoices',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/orders/{orderId}/invoices', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/orders/{orderId}/invoices',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/orders/{orderId}/invoices");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "company": {
      "href": "http://appdirect/api/account/v1/companies/5df15aa3-a3f3-4c6f-a434-9a85545e9c95",
      "id": "5df15aa3-a3f3-4c6f-a434-9a85545e9c95"
    },
    "creationDate": 1481001027061,
    "currency": "USD",
    "dueDate": 1481353200000,
    "invoiceId": 16,
    "links": [
      {
        "href": "http://appdirect/api/account/v2/users/091d24f6-7b0c-42a0-84ff-86e1cdcf893c",
        "rel": "user"
      },
      {
        "href": "http://appdirect/api/account/v2/companies/5df15aa3-a3f3-4c6f-a434-9a85545e9c95",
        "rel": "company"
      },
      {
        "href": "http://appdirect/api/billing/v1/invoices/16",
        "rel": "self"
      }
    ],
    "orderIds": [
      "3754"
    ],
    "referenceNumber": null,
    "status": "PAID",
    "total": 10,
    "user": {
      "href": "http://appdirect/api/account/v1/users/091d24f6-7b0c-42a0-84ff-86e1cdcf893c",
      "id": "091d24f6-7b0c-42a0-84ff-86e1cdcf893c"
    }
  }
]

GET/billing/v1/orders/{orderId}/invoices

List all purchase order invoices

Parameters

Parameter Type Data Type Default Description
count query string 250 Number of results to fetch. Used for paging.
excludeFree query boolean Exclude invoices whose amount is zero
fromDate query number Filter by the start date of the invoice
*orderId path number The specific order id for which information is requested
sortField query string of enum:
DATE
INVOICE_ID
TOTAL
INVOICE_ID The filed to be used for sorting com.appdirect.backend.api.billing.types.OrderSortWS.
sortOrder query string of enum:
ASC
DESC
ASC Sort order org.springframework.data.domain.Sort.Direction.
start query string 0 First result index. Used for paging.
status query string of enum:
CARRIED
PAID
UNPAID
VOIDED
Filter by the status of the invoice
toDate query number Filter by the end date of the invoice

Responses

Status Meaning Description Definition
200 OK OK array of InvoiceListing
404 Not Found Not Found

List all purchase order payments

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/orders/{orderId}/payments \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/orders/{orderId}/payments HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/orders/{orderId}/payments',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/orders/{orderId}/payments',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/orders/{orderId}/payments', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/orders/{orderId}/payments',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/orders/{orderId}/payments");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "amount": 10,
    "company": {
      "href": "http://appdirect/api/account/v1/companies/5df15aa3-a3f3-4c6f-a434-9a85545e9c95",
      "id": "5df15aa3-a3f3-4c6f-a434-9a85545e9c95"
    },
    "currency": "USD",
    "date": 1481001027061,
    "gatewayResponse": {
      "avs": true,
      "code": null,
      "cvv": true,
      "message": null
    },
    "links": [
      {
        "href": "http://appdirect/api/billing/v1/payments/17",
        "rel": "self"
      }
    ],
    "method": "CREDIT_CARD",
    "paymentNumber": 17,
    "result": "SUCCESSFUL",
    "transactionId": "123456abcdef",
    "user": {
      "href": "http://appdirect/api/account/v1/users/091d24f6-7b0c-42a0-84ff-86e1cdcf893c",
      "id": "091d24f6-7b0c-42a0-84ff-86e1cdcf893c"
    }
  }
]

GET/billing/v1/orders/{orderId}/payments

List all purchase order payments

Parameters

Parameter Type Data Type Default Description
count query string 250 Number of results to fetch. Used for paging.
fromDate query number Filter by the start date of the invoice
method query string of enum:
ADP_INVOICE
ARIBAPAY
BT_BILL
CLICKANDBUY
CLOUDFOUNDRY
CREDIT_CARD
CUMULA_BILL
DTAG
EXTERNAL_INVOICE
KREDITKARTE
LASTSCHRIFT_MRNEXNET
MANO_TEO_BILL
MANUAL
MARKETPLACE_CREDITS
NETS_ARVATO_INVOICE
NEXTEL
PAYPAL
ROGERS_CC_DTMF
ROGERS_CC_POS
SNAP
TBILL
THISTLE
TOICLEARING
Filter by method of the payment
*orderId path number The specific order id for which information is requested
result query string of enum:
FAILED
GATEWAY_NOT_AVAILABLE
MANUAL
SUCCESSFUL
Filter by results of the payment
sortField query string of enum:
AMOUNT
DATE
PAYMENT_ID
PAYMENT_ID The filed to be used for sorting com.appdirect.backend.api.billing.types.OrderSortWS.
sortOrder query string of enum:
ASC
DESC
ASC Sort order org.springframework.data.domain.Sort.Direction.
start query string 0 First result index. Used for paging.
toDate query number Filter by the end date of the invoice

Responses

Status Meaning Description Definition
200 OK OK array of Payment
404 Not Found Not Found

Retrieve a purchase order

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/orders/{orderId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/orders/{orderId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/orders/{orderId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/orders/{orderId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/orders/{orderId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/orders/{orderId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/orders/{orderId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "activated": false,
  "company": {
    "href": "http://appdirect/api/account/v1/companies/5df15aa3-a3f3-4c6f-a434-9a85545e9c95",
    "id": "5df15aa3-a3f3-4c6f-a434-9a85545e9c95"
  },
  "contract": null,
  "currency": "USD",
  "discount": null,
  "discountId": null,
  "endDate": null,
  "endOfDiscountDate": null,
  "frequency": "MONTHLY",
  "id": 4,
  "links": [
    {
      "href": "http://appdirect/api/billing/v1/subscriptions/6d2a0cb2-aa95-48d4-a0c3-37427164475e",
      "rel": "subscription"
    }
  ],
  "nextBillingDate": 1483679427061,
  "nextOrder": null,
  "oneTimeOrders": [],
  "orderLines": [],
  "parameters": [],
  "parentSubscriptionId": 5,
  "paymentPlan": {
    "allowCustomUsage": false,
    "contract": {
      "alignWithParentCycleStartDate": false,
      "autoExtensionPricingId": 7,
      "blockContractDowngrades": false,
      "blockContractUpgrades": false,
      "blockSwitchToShorterContract": false,
      "cancellationPeriodLimit": null,
      "endOfContractGracePeriod": null,
      "gracePeriod": null,
      "minimumServiceLength": 3,
      "terminationFee": null
    },
    "costs": [
      {
        "amount": {
          "USD": 10
        },
        "blockContractDecrease": false,
        "blockContractIncrease": false,
        "blockOriginalContractDecrease": false,
        "id": 7,
        "increment": 1,
        "maxUnits": null,
        "meteredUsage": false,
        "minUnits": 0,
        "pricePerIncrement": false,
        "pricingStrategy": "UNIT",
        "unit": "USER",
        "unitDependency": null
      }
    ],
    "discount": null,
    "frequency": "MONTHLY",
    "href": "http://appdirect/api/marketplace/v1/products/4/editions/4/paymentPlans/7",
    "id": 7,
    "isPrimaryPrice": false,
    "keepBillDateOnUsageChange": false,
    "primaryPrice": false,
    "separatePrepaid": false,
    "uuid": "4e29be4a-142b-482f-938c-418720bfd092"
  },
  "paymentPlanId": 7,
  "previousOrder": null,
  "referenceCode": null,
  "salesSupportCompany": null,
  "salesSupportUser": null,
  "serviceStartDate": 1483679427061,
  "startDate": 1481001027061,
  "status": "ACTIVE",
  "totalPrice": 0,
  "type": "NEW",
  "user": {
    "href": "http://appdirect/api/account/v1/users/091d24f6-7b0c-42a0-84ff-86e1cdcf893c",
    "id": "091d24f6-7b0c-42a0-84ff-86e1cdcf893c"
  }
}

GET/billing/v1/orders/{orderId}

Retrieve a purchase order.

Rate limit: Bucket size is 20 requests, with a leak rate of 4 requests per second.

Rate limit uses leaky bucket algorithm. Usage of a leaky bucket algorithm allows client applications to make an unlimited number of requests over a large time horizon but prevents excessively large bursts over a short one.

Parameters

Parameter Type Data Type Default Description
expand query array of string Provide the list of comma separated resource name (possible values = "user,company,salesSupportUser") which is needed to be expanded in the response
*orderId path number The specific order id for which information is requested

Responses

Status Meaning Description Definition
200 OK OK Order
404 Not Found Not Found

List all purchase orders

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/orders \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/orders HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/orders',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/orders',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/orders', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/orders',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/orders");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "orders": [
    {
      "activated": false,
      "company": {
        "href": "http://appdirect/api/account/v1/companies/5df15aa3-a3f3-4c6f-a434-9a85545e9c95",
        "id": "5df15aa3-a3f3-4c6f-a434-9a85545e9c95"
      },
      "contract": null,
      "currency": "USD",
      "discount": null,
      "discountId": null,
      "endDate": null,
      "endOfDiscountDate": null,
      "frequency": "MONTHLY",
      "id": 4,
      "links": [
        {
          "href": "http://appdirect/api/billing/v1/subscriptions/6d2a0cb2-aa95-48d4-a0c3-37427164475e",
          "rel": "subscription"
        }
      ],
      "nextBillingDate": 1483679427061,
      "nextOrder": null,
      "oneTimeOrders": [],
      "orderLines": [],
      "parameters": [],
      "parentSubscriptionId": 5,
      "paymentPlan": {
        "allowCustomUsage": false,
        "contract": {
          "alignWithParentCycleStartDate": false,
          "autoExtensionPricingId": 7,
          "blockContractDowngrades": false,
          "blockContractUpgrades": false,
          "blockSwitchToShorterContract": false,
          "cancellationPeriodLimit": null,
          "endOfContractGracePeriod": null,
          "gracePeriod": null,
          "minimumServiceLength": 3,
          "terminationFee": null
        },
        "costs": [
          {
            "amount": {
              "USD": 10
            },
            "blockContractDecrease": false,
            "blockContractIncrease": false,
            "blockOriginalContractDecrease": false,
            "id": 7,
            "increment": 1,
            "maxUnits": null,
            "meteredUsage": false,
            "minUnits": 0,
            "pricePerIncrement": false,
            "pricingStrategy": "UNIT",
            "unit": "USER",
            "unitDependency": null
          }
        ],
        "discount": null,
        "frequency": "MONTHLY",
        "href": "http://appdirect/api/marketplace/v1/products/4/editions/4/paymentPlans/7",
        "id": 7,
        "isPrimaryPrice": false,
        "keepBillDateOnUsageChange": false,
        "primaryPrice": false,
        "separatePrepaid": false,
        "uuid": "4e29be4a-142b-482f-938c-418720bfd092"
      },
      "paymentPlanId": 7,
      "previousOrder": null,
      "referenceCode": null,
      "salesSupportCompany": null,
      "salesSupportUser": null,
      "serviceStartDate": 1483679427061,
      "startDate": 1481001027061,
      "status": "ACTIVE",
      "totalPrice": 0,
      "type": "NEW",
      "user": {
        "href": "http://appdirect/api/account/v1/users/091d24f6-7b0c-42a0-84ff-86e1cdcf893c",
        "id": "091d24f6-7b0c-42a0-84ff-86e1cdcf893c"
      }
    }
  ],
  "total": 1
}

GET/billing/v1/orders

List all purchase orders

Parameters

Parameter Type Data Type Default Description
applicationIds query number Filters orders by internal application ID
currency query string of enum:
USD
CAD
EUR
JPY
GBP
KRW
CHF
SEK
SGD
MYR
AUD
MXN
INR
BRL
DKK
NZD
NOK
ZAR
PHP
CNY
SAR
GTQ
IDR
ARS
COP
PEN
Filters orders by currency
frequency query string of enum:
ONE_TIME
MONTHLY
QUARTERLY
SIX_MONTHS
YEARLY
TWO_YEARS
THREE_YEARS
DAILY
Filters orders by payment frequency
fromCreationDate query number Filters results to only include subscriptions that were created on or after the specified date
orderReferenceCode query string Filters orders by order reference code
page query integer 0 First result index. Used for paging.
referenceCode query string Code provided by resellers and Sales Reps while purchasing a subscription
size query integer 50 Number of results to fetch. Used for paging.
sortField query string of enum:
DATE
ORDER_ID
TOTAL
DATE The filed to be used for sorting com.appdirect.backend.api.billing.types.OrderSortWS.
sortOrder query string of enum:
ASC
DESC
ASC Sort order org.springframework.data.domain.Sort.Direction.
startDateFrom query number Filters results to only include subscriptions that were started on or after the specified date
startDateTo query number Filters results to only include subscriptions that were started on or before the specified date
status query string of enum:
INITIALIZED
PENDING_USER_APPROVAL
PENDING_REMOTE_CREATION
PENDING_MANUAL_RECOVERY
PENDING_ASYNCHRONOUS_CREATION
FREE_TRIAL
ACTIVE
FINISHED
ONE_TIME
CANCELLED
SUSPENDED
FREE_TRIAL_EXPIRED
FREE_TRIAL_CANCELLED
DELETED
FAILED
UPCOMING
PENDING_MIGRATION_ACTIVATION
PENDING_DELAYED_PROVISIONING
Filters orders with an order status
toCreationDate query number Filters results to only include subscriptions that were created on or before the specified date
type query string of enum:
NEW
MIGRATION
ADOPTION
FREE_TRIAL_ACTIVATION
TERMINATION_FEE
END_OF_CONTRACT_MIGRATION
REFUND
CREDIT
ONE_TIME_FEE
ADDITIONAL_FEE
END_OF_DISCOUNT_MIGRATION
METERED_USAGE
Filters orders by type.
NEW: The first order of a subscription. The order contains flat fees (one time or recurring) for this subscription. It is active until the subscription is updated or canceled.
MIGRATION: The order created after a subscription change. The order includes flat fees for both one-time and recurring editions.
ADOPTION: The order created by an administrator who has taken ownership of an application from another user within the same company.
FREE_TRIAL_ACTIVATION: Created when a free trial is manually upgraded to a paid subscription. Any subscription that is updated from free trial to paid automatically keeps its NEW status purchase order.
TERMINATION_FEE: A subscription is canceled that had a termination fee. This purchase order represents the fees incurred as a result of the cancellation.
END_OF_CONTRACT_MIGRATION: Created when a subscription update takes place as a result of a contract extension. If the contract autorenewal is set to either continue without a contract or renew the contract with the same pricing plan, then no migration occurs and the original purchase order is updated to include the new end date for the contract.
REFUND: Created when a refund is performed. The refund purchase order is created for only on-platform refunds. Off-platform refunds do not generate this type of purchase order.
CREDIT: Created during subscription update events. Any subscription update calculates a paid period and a credit period. The credit is then provided to the user to prorate the subscription.
ONE_TIME_FEE: Created if an edition includes one-time setup fees.
ADDITIONAL_FEE: Used for off-order charges. A developer change creates an off-order charge and charges their customer a custom amount outside of the normal subscription cycle.
END_OF_DISCOUNT_MIGRATION: Created after a discount of limited duration expires. This purchase order is created to represent the updated costs without the discount.
METERED_USAGE: A purchase order created to accumulate usage fees during a billing period. The order is only valid for the billing period but it is updated with usage lines over the course of the billing period. A metered purchase order is invoiced in arrears at the end of the billing cycle.

Responses

Status Meaning Description Definition
200 OK OK OrderListing
404 Not Found Not Found

List all purchase orders for a user

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/orders \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/orders HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/orders',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/orders',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/orders', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/orders',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/orders");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "orders": [
    {
      "activated": false,
      "company": {
        "href": "http://appdirect/api/account/v1/companies/e83cd3d6-7865-4fc2-9d7c-603ad17dd639",
        "id": "e83cd3d6-7865-4fc2-9d7c-603ad17dd639"
      },
      "contract": null,
      "currency": "USD",
      "discount": null,
      "discountId": null,
      "endDate": null,
      "endOfDiscountDate": null,
      "frequency": "MONTHLY",
      "id": 1,
      "links": [
        {
          "href": "http://appdirect/api/billing/v1/subscriptions/1b577640-9b77-47bc-beb8-ed59accb4836",
          "rel": "subscription"
        }
      ],
      "nextBillingDate": 1483599600000,
      "nextOrder": null,
      "oneTimeOrders": [],
      "orderLines": [
        {
          "description": "Test App 1 - null - Per User Fee",
          "id": 1,
          "listingPrice": 10,
          "price": 10,
          "quantity": 1,
          "totalPrice": 10,
          "type": "ITEM",
          "unit": "USER"
        }
      ],
      "parameters": [],
      "paymentPlan": {
        "allowCustomUsage": false,
        "contract": {
          "alignWithParentCycleStartDate": false,
          "autoExtensionPricingId": null,
          "blockContractDowngrades": false,
          "blockContractUpgrades": false,
          "blockSwitchToShorterContract": false,
          "cancellationPeriodLimit": null,
          "endOfContractGracePeriod": null,
          "gracePeriod": null,
          "minimumServiceLength": null,
          "terminationFee": null
        },
        "costs": [
          {
            "amount": {
              "USD": 10
            },
            "blockContractDecrease": false,
            "blockContractIncrease": false,
            "blockOriginalContractDecrease": false,
            "id": 2,
            "increment": 1,
            "maxUnits": null,
            "meteredUsage": false,
            "minUnits": 0,
            "pricePerIncrement": false,
            "pricingStrategy": "UNIT",
            "unit": "USER",
            "unitDependency": null
          }
        ],
        "discount": null,
        "frequency": "MONTHLY",
        "href": "http://appdirect/api/marketplace/v1/products/2/editions/2/paymentPlans/2",
        "id": 2,
        "isPrimaryPrice": false,
        "keepBillDateOnUsageChange": false,
        "primaryPrice": false,
        "separatePrepaid": false,
        "uuid": "eaca1aa5-4c4f-44cb-8cf4-eb0aa9267273"
      },
      "paymentPlanId": 2,
      "previousOrder": null,
      "referenceCode": null,
      "salesSupportUser": null,
      "startDate": 1480921200000,
      "status": "ACTIVE",
      "totalPrice": 0,
      "type": "NEW",
      "user": {
        "href": "http://appdirect/api/account/v1/users/c47d0fd7-b67a-4e07-84f8-f93dfafbeecc",
        "id": "c47d0fd7-b67a-4e07-84f8-f93dfafbeecc"
      }
    }
  ],
  "total": 1
}

GET/billing/v1/companies/{companyId}/users/{userId}/orders

List all of the purchase orders for the given user

Parameters

Parameter Type Data Type Default Description
applicationIds query number Filters subscriptions by internal application ID
*companyId path string User's company ID
count query integer 250 Number of results to fetch. Used for paging.
currency query string of enum:
USD
CAD
EUR
JPY
GBP
KRW
CHF
SEK
SGD
MYR
AUD
MXN
INR
BRL
DKK
NZD
NOK
ZAR
PHP
CNY
SAR
GTQ
IDR
ARS
COP
PEN
Filters subscriptions by currency
frequency query string of enum:
ONE_TIME
MONTHLY
QUARTERLY
SIX_MONTHS
YEARLY
TWO_YEARS
THREE_YEARS
DAILY
Filters subscriptions by pricing frequency
fromCreationDate query number Filters results to only include subscriptions that were created on or after the specified date
orderReferenceCode query string Filters subscriptions by order reference code
sortField query string of enum:
DATE
ORDER_ID
TOTAL
DATE Sort field.
sortOrder query string of enum:
ASC
DESC
ASC Sort order.
start query integer 0 First result index. Used for paging.
startDateFrom query number Filters results to only include subscriptions that were started on or after the specified date
startDateTo query number Filters results to only include subscriptions that were started on or before the specified date
status query string of enum:
INITIALIZED
PENDING_USER_APPROVAL
PENDING_REMOTE_CREATION
PENDING_MANUAL_RECOVERY
PENDING_ASYNCHRONOUS_CREATION
FREE_TRIAL
ACTIVE
FINISHED
ONE_TIME
CANCELLED
SUSPENDED
FREE_TRIAL_EXPIRED
FREE_TRIAL_CANCELLED
DELETED
FAILED
UPCOMING
PENDING_MIGRATION_ACTIVATION
PENDING_DELAYED_PROVISIONING
Filters subscriptions by order status
toCreationDate query number Filters results to only include subscriptions that were created on or before the specified date
type query string of enum:
NEW
MIGRATION
ADOPTION
FREE_TRIAL_ACTIVATION
TERMINATION_FEE
END_OF_CONTRACT_MIGRATION
REFUND
CREDIT
ONE_TIME_FEE
ADDITIONAL_FEE
END_OF_DISCOUNT_MIGRATION
METERED_USAGE
Filters subscriptions by order type.
NEW: The first order of a subscription. The order contains flat fees (one time or recurring) for this subscription. It is active until the subscription is updated or canceled.
MIGRATION: The order created after a subscription change. The order includes flat fees for both one-time and recurring editions.
ADOPTION: The order created by an administrator who has taken ownership of an application from another user within the same company.
FREE_TRIAL_ACTIVATION: Created when a free trial is manually upgraded to a paid subscription. Any subscription that is updated from free trial to paid automatically keeps its NEW status purchase order.
TERMINATION_FEE: A subscription is canceled that had a termination fee. This purchase order represents the fees incurred as a result of the cancellation.
END_OF_CONTRACT_MIGRATION: Created when a subscription update takes place as a result of a contract extension. If the contract autorenewal is set to either continue without a contract or renew the contract with the same pricing plan, then no migration occurs and the original purchase order is updated to include the new end date for the contract.
REFUND: Created when a refund is performed. The refund purchase order is created for only on-platform refunds. Off-platform refunds do not generate this type of purchase order.
CREDIT: Created during subscription update events. Any subscription update calculates a paid period and a credit period. The credit is then provided to the user to prorate the subscription.
ONE_TIME_FEE: Created if an edition includes one-time setup fees.
ADDITIONAL_FEE: Used for off-order charges. A developer change creates an off-order charge and charges their customer a custom amount outside of the normal subscription cycle.
END_OF_DISCOUNT_MIGRATION: Created after a discount of limited duration expires. This purchase order is created to represent the updated costs without the discount.
METERED_USAGE: A purchase order created to accumulate usage fees during a billing period. The order is only valid for the billing period but it is updated with usage lines over the course of the billing period. A metered purchase order is invoiced in arrears at the end of the billing cycle.
*userId path string User ID

Responses

Status Meaning Description Definition
200 OK Response.

Update purchase order configuration details

Example request

curl -X PUT https://{marketplaceURL}/api/billing/v1/orders/{orderId}/parameters \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/billing/v1/orders/{orderId}/parameters HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/orders/{orderId}/parameters',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "description": "List of parameters which needs to be update",
  "type": "array",
  "items": {
    "type": "object",
    "title": "Parameter",
    "properties": {
      "name": {
        "type": "string",
        "nullable": true
      },
      "value": {
        "type": "string",
        "nullable": true
      }
    },
    "example": {
      "name": "...",
      "value": "..."
    }
  }
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/orders/{orderId}/parameters',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/billing/v1/orders/{orderId}/parameters', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/billing/v1/orders/{orderId}/parameters',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/orders/{orderId}/parameters");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

PUT/billing/v1/orders/{orderId}/parameters

Update purchase order configuration details

Parameters

Parameter Type Data Type Default Description
*orderId path number Id of the specific purchase order to update

Body Parameters

List of parameters which needs to be update

Array of Parameter

Property Type Description
name string

value string

Responses

Status Meaning Description Definition
200 OK OK

Purchase Orders (Reseller)

List orders

Example request

curl -X GET https://{marketplaceURL}/api/appReseller/v1/orders?context=type,string,enum,RESELLER%2C%20RESELLER_MANAGER&resellerCompanyId=type,string&customerCompanyId=type,string \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/appReseller/v1/orders?context=type,string,enum,RESELLER%2C%20RESELLER_MANAGER&resellerCompanyId=type,string&customerCompanyId=type,string HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appReseller/v1/orders',
  method: 'get',
  data: '?context=type,string,enum,RESELLER%2C%20RESELLER_MANAGER&resellerCompanyId=type,string&customerCompanyId=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appReseller/v1/orders?context=type,string,enum,RESELLER%2C%20RESELLER_MANAGER&resellerCompanyId=type,string&customerCompanyId=type,string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/appReseller/v1/orders', params={
  'context': {
  "type": "string",
  "enum": [
    "RESELLER, RESELLER_MANAGER"
  ]
},  'resellerCompanyId': {
  "type": "string"
},  'customerCompanyId': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/appReseller/v1/orders',
  params: {
  'context' => 'string',
'resellerCompanyId' => 'string',
'customerCompanyId' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appReseller/v1/orders?context=type,string,enum,RESELLER%2C%20RESELLER_MANAGER&resellerCompanyId=type,string&customerCompanyId=type,string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "applicationName": "AUTO_DISCOUNTS_APP",
      "company": {
        "id": "698555fc-bc65-4163-9fee-16308edec41b",
        "name": "Company A"
      },
      "createdOn": 1529083173000,
      "editionName": "Edition",
      "frequency": "One Time",
      "id": "1234",
      "orderCardId": "4567",
      "status": "ACTIVE",
      "totalFee": "USD350.00"
    },
    {
      "applicationName": "AUTO_DISCOUNTS_APP",
      "company": {
        "id": "386626c0-53e2-4515-8450-4a720bb5d029",
        "name": "Company B"
      },
      "createdOn": 1529083173000,
      "editionName": "Edition",
      "frequency": "One Time",
      "id": "4567",
      "orderCardId": "4567",
      "status": "PENDING MANUAL RECOVERY",
      "totalFee": "USD350.00"
    }
  ],
  "page": {
    "number": 1,
    "size": 10,
    "totalElements": 2,
    "totalPages": 1
  }
}

GET/appReseller/v1/orders

Retrieves a list of all user orders of a linked company. You can filter the list using optional query parameters.

Required Scope and Authorization Rules

Scope Rule
ROLE_RESELLER Allows access as a Reseller for the company
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager for the company

Parameters

Parameter Type Data Type Default Description
*context query string of enum:
RESELLER, RESELLER_MANAGER
Supported billing contexts
createdOn query string Date filter, defined by upper or lower inclusive or exclusive limits, in Unix timestamp format. Acceptable values are: gte([timestamp]) - 'greater than or equal to'; gt([timestamp]) - 'greater than'; lte([timestamp]) - 'less than or equal to'; or lt([timestamp]) - 'less than.'
*customerCompanyId query string User's company ID. Required only for the RESELLER context.
number query integer Page number
paidStatus query string of enum:
PAID, FREE
Status of the subscription related to the payment of this order
pending query boolean Indicates whether order has pending events
*resellerCompanyId query string Reseller's company ID. Required only for the RESELLER_MANAGER context.
searchText query string Search text
size query integer Number of results per page
sort query string Sort field and order. For ascending sort order, use the '+[FieldName]' format. For descending order, use the '-[FieldName]' format.
status query string Order status (valid status are INITIALIZED, PENDING_USER_APPROVAL, PENDING_REMOTE_CREATION, PENDING_MANUAL_RECOVERY, PENDING_ASYNCHRONOUS_CREATION, FREE_TRIAL, ACTIVE, FINISHED, ONE_TIME, CANCELLED, SUSPENDED, FREE_TRIAL_EXPIRED, FREE_TRIAL_CANCELLED, DELETED, FAILED, UPCOMING, PENDING_MIGRATION_ACTIVATION, PENDING_DELAYED_PROVISIONING)
userId query string For RESELLER, the customer's user ID; for RESELLER_MANAGER, the Reseller's user ID

Responses

Status Meaning Description Definition
200 OK Success OrderPagedReadResponse
401 Unauthorized Unauthorized

Quote Versions

Create quote version

Example request

curl -X POST https://{marketplaceURL}/api/assistedSales/v1/quotes \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/assistedSales/v1/quotes HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/assistedSales/v1/quotes',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "createdBy": {
    "company": {
      "id": "d9a6d470-c69a-4403-9355-5953ddcb9efb"
    },
    "id": "d17fee11-c6ce-4f9f-8fb6-9bc55d583699"
  },
  "name": "Quote version name",
  "source": {
    "id": "1798fb8f-9f55-43f6-9f5e-4980467df9af",
    "type": "OPPORTUNITY"
  }
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/assistedSales/v1/quotes',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/assistedSales/v1/quotes', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/assistedSales/v1/quotes',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/assistedSales/v1/quotes");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "createdBy": {
    "company": {
      "id": "d9a6d470-c69a-4403-9355-5953ddcb9efb"
    },
    "id": "d17fee11-c6ce-4f9f-8fb6-9bc55d583699"
  },
  "name": "Quote version name",
  "source": {
    "id": "1798fb8f-9f55-43f6-9f5e-4980467df9af",
    "type": "OPPORTUNITY"
  }
}

Example response

{
  "availableActions": [
    "PRINT_PDF",
    "EDIT_NAME",
    "REQUEST_CUSTOMER_APPROVAL"
  ],
  "createdBy": {
    "company": {
      "id": "d9a6d470-c69a-4403-9355-5953ddcb9efb"
    },
    "email": "customer@appdirect.com",
    "firstName": "Customer FirstName",
    "id": "d17fee11-c6ce-4f9f-8fb6-9bc55d583699",
    "lastName": "Customer LastName"
  },
  "createdOn": 1674590164842,
  "customerUser": {
    "company": {
      "id": "d9a6d470-c69a-4403-9355-5953ddcb9efb"
    },
    "email": "customer@appdirect.com",
    "firstName": "Customer FirstName",
    "id": "d17fee11-c6ce-4f9f-8fb6-9bc55d583699",
    "lastName": "Customer LastName"
  },
  "id": "e8801dc6-8c0f-4c0b-82bc-99c4ebfb5e8a",
  "name": "API quote version",
  "ownerUser": {
    "company": {
      "id": "05ba75d3-3637-4a7a-807d-f2cb66466348"
    },
    "email": "owner@appdirect.com",
    "firstName": "Owner FirstName",
    "id": "a6cc4e69-74e0-47f4-b36d-215693f47165",
    "lastName": "Owner LastName"
  },
  "status": "OPEN"
}

POST/assistedSales/v1/quotes

Creates a quote version from a quote source

Required: Accept-Language header with Locale format. For example: en-US

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager to the opportunity
ROLE_RESELLER Allows access as a Reseller to the opportunity
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager to the opportunity
ROLE_SALES_SUPPORT Allows access as Sales Support to the opportunity

Body Parameters

Details about the quote version being created

QuoteVersionCreationRequest object:

Property Type Description
createdBy User

Details of the quote creator

name string

The name of the quote version

source QuoteVersionSource

Details about the source of the quote version

Responses

Status Meaning Description Definition
200 OK Success QuoteVersion
401 Unauthorized Unauthorized QuoteVersionError
404 Not Found Not found QuoteVersionError

Execute action on a quote version

Example request

curl -X POST https://{marketplaceURL}/api/assistedSales/v1/quotes/{quoteId}/executeAction \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/assistedSales/v1/quotes/{quoteId}/executeAction HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/assistedSales/v1/quotes/{quoteId}/executeAction',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "action": "REQUEST_CUSTOMER_APPROVAL"
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/assistedSales/v1/quotes/{quoteId}/executeAction',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/assistedSales/v1/quotes/{quoteId}/executeAction', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/assistedSales/v1/quotes/{quoteId}/executeAction',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/assistedSales/v1/quotes/{quoteId}/executeAction");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "action": "REQUEST_CUSTOMER_APPROVAL"
}

Example response

{
  "availableActions": [
    "PRINT_PDF",
    "EDIT_NAME",
    "SHARE_LINK",
    "REVOKE"
  ],
  "createdBy": {
    "company": {
      "id": "d9a6d470-c69a-4403-9355-5953ddcb9efb"
    },
    "id": "d17fee11-c6ce-4f9f-8fb6-9bc55d583699"
  },
  "id": "757d0f09-385c-41df-9781-d6df98584953",
  "name": "API quote version",
  "status": "PENDING"
}

POST/assistedSales/v1/quotes/{quoteId}/executeAction

Execute the action passed by the parameter on the quote version

Required: Accept-Language header with Locale format. For example: en-US"

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager to the opportunity
ROLE_RESELLER Allows access as a Reseller to the opportunity
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager to the opportunity
ROLE_SALES_SUPPORT Allows access as Sales Support to the opportunity

Parameters

Parameter Type Data Type Default Description
*quoteId path string The ID of a quote version

Body Parameters

Details about the action to be executed on the quote version

ExecuteActionRequest object:

Property Type Description
action string

Action name to be executed to a quote version

Responses

Status Meaning Description Definition
200 OK Success ExecuteActionResponse
401 Unauthorized Unauthorized QuoteVersionError
404 Not Found Not found QuoteVersionError

Get a quote version

Example request

curl -X GET https://{marketplaceURL}/api/assistedSales/v1/quotes/{quoteId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/assistedSales/v1/quotes/{quoteId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/assistedSales/v1/quotes/{quoteId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/assistedSales/v1/quotes/{quoteId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/assistedSales/v1/quotes/{quoteId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/assistedSales/v1/quotes/{quoteId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/assistedSales/v1/quotes/{quoteId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "availableActions": [
    "PRINT_PDF",
    "EDIT_NAME",
    "REQUEST_CUSTOMER_APPROVAL"
  ],
  "createdBy": {
    "company": {
      "id": "d9a6d470-c69a-4403-9355-5953ddcb9efb"
    },
    "email": "jane.smith@company.com",
    "firstName": "Jane",
    "id": "d17fee11-c6ce-4f9f-8fb6-9bc55d583699",
    "lastName": "Smith"
  },
  "createdOn": 1674574349898,
  "currency": "USD",
  "customerUser": {
    "company": {
      "id": "d9a6d470-c69a-4403-9355-5953ddcb9efb"
    },
    "email": "jane.smith@company.com",
    "firstName": "Jane",
    "id": "d17fee11-c6ce-4f9f-8fb6-9bc55d583699",
    "lastName": "Smith"
  },
  "displayId": "Q5701241",
  "id": "757d0f09-385c-41df-9781-d6df98584953",
  "items": [
    {
      "id": "166e0ce6-4309-4a16-ac9b-61bea7ce1cbc",
      "pricing": [
        {
          "costType": "RECURRING_FLAT",
          "description": "Gold plan",
          "quantity": "1.0000000000",
          "salePrice": "55.0000000000",
          "totalSalePrice": "55.0000000000"
        },
        {
          "costType": "INCLUDED",
          "description": "Per User Fee Included",
          "quantity": "1.0000000000",
          "salePrice": "0.0000000000",
          "totalSalePrice": "0.0000000000"
        }
      ],
      "pricingPlan": {
        "id": "19c06143-b21c-43c4-b236-eeca61512753",
        "name": "Gold plan"
      },
      "product": {
        "editionId": "b06358bc-cb63-45e6-87c7-19db9b0cf696",
        "id": "fa776d2e-cda5-4256-9a27-125a0fe3f448",
        "name": "Supported Product for Opportunity MVP"
      }
    }
  ],
  "name": "API quote version",
  "ownerUser": {
    "company": {
      "id": "05ba75d3-3637-4a7a-807d-f2cb66466348"
    },
    "email": "john.doe@acme.com",
    "firstName": "John",
    "id": "a6cc4e69-74e0-47f4-b36d-215693f47165",
    "lastName": "Doe"
  },
  "pricingTotals": {
    "amountDueAfterTax": "55.0000000000",
    "amountDueBeforeTax": "55.0000000000",
    "recurringTotals": [
      {
        "billingCycle": {
          "dayOfMonth": 24,
          "period": "MONTHLY"
        },
        "totalSalePrice": "55.0000000000"
      }
    ],
    "taxSummary": []
  },
  "quoteSource": {
    "id": "1798fb8f-9f55-43f6-9f5e-4980467df9af",
    "type": "OPPORTUNITY"
  },
  "status": "OPEN"
}

GET/assistedSales/v1/quotes/{quoteId}

Get a quote version from a quote ID

Required: Accept-Language header with Locale format. For example: en-US

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager to the opportunity
ROLE_RESELLER Allows access as a Reseller to the opportunity
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager to the opportunity
ROLE_SALES_SUPPORT Allows access as Sales Support to the opportunity

Parameters

Parameter Type Data Type Default Description
*quoteId path string The ID of a quote version

Responses

Status Meaning Description Definition
200 OK Success QuoteVersion
401 Unauthorized Unauthorized QuoteVersionError
404 Not Found Not found QuoteVersionError

A list of quote versions

Example request

curl -X GET https://{marketplaceURL}/api/assistedSales/v1/quotes \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/assistedSales/v1/quotes HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/assistedSales/v1/quotes',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/assistedSales/v1/quotes',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/assistedSales/v1/quotes', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/assistedSales/v1/quotes',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/assistedSales/v1/quotes");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "pageInfo": {
    "endCursor": "MA==",
    "hasNextPage": false,
    "hasPreviousPage": false,
    "startCursor": "MA=="
  },
  "quotes": [
    {
      "availableActions": [
        "PRINT_PDF",
        "EDIT_NAME",
        "REQUEST_CUSTOMER_APPROVAL"
      ],
      "createdBy": {
        "company": {
          "id": "d9a6d470-c69a-4403-9355-5953ddcb9efb"
        },
        "email": "jane.smith@company.com",
        "firstName": "Jane",
        "id": "d17fee11-c6ce-4f9f-8fb6-9bc55d583699",
        "lastName": "Smith"
      },
      "createdOn": 1674590164842,
      "customerUser": {
        "company": {
          "id": "d9a6d470-c69a-4403-9355-5953ddcb9efb"
        },
        "email": "jane.smith@company.com",
        "firstName": "Jane",
        "id": "d17fee11-c6ce-4f9f-8fb6-9bc55d583699",
        "lastName": "Smith"
      },
      "displayId": "Q6201242",
      "id": "e8801dc6-8c0f-4c0b-82bc-99c4ebfb5e8a",
      "name": "API quote version",
      "ownerUser": {
        "company": {
          "id": "05ba75d3-3637-4a7a-807d-f2cb66466348"
        },
        "email": "john.doe@acme.com",
        "firstName": "John",
        "id": "a6cc4e69-74e0-47f4-b36d-215693f47165",
        "lastName": "Doe"
      },
      "status": "OPEN"
    },
    {
      "availableActions": [
        "PRINT_PDF",
        "EDIT_NAME",
        "SHARE_LINK",
        "REVOKE"
      ],
      "createdBy": {
        "company": {
          "id": "d9a6d470-c69a-4403-9355-5953ddcb9efb"
        },
        "email": "jane.smith@company.com",
        "firstName": "Jane",
        "id": "d17fee11-c6ce-4f9f-8fb6-9bc55d583699",
        "lastName": "Smith"
      },
      "createdOn": 1674574349898,
      "customerUser": {
        "company": {
          "id": "d9a6d470-c69a-4403-9355-5953ddcb9efb"
        },
        "email": "jane.smith@company.com",
        "firstName": "Jane",
        "id": "d17fee11-c6ce-4f9f-8fb6-9bc55d583699",
        "lastName": "Smith"
      },
      "displayId": "Q5701241",
      "id": "757d0f09-385c-41df-9781-d6df98584953",
      "name": "API quote version",
      "ownerUser": {
        "company": {
          "id": "05ba75d3-3637-4a7a-807d-f2cb66466348"
        },
        "email": "john.doe@acme.com",
        "firstName": "John",
        "id": "a6cc4e69-74e0-47f4-b36d-215693f47165",
        "lastName": "Doe"
      },
      "status": "PENDING"
    }
  ],
  "totalCount": 2
}

GET/assistedSales/v1/quotes

List quote versions based on a source type and ID

Required: Accept-Language header with Locale format. For example: en-US

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager to the opportunity
ROLE_RESELLER Allows access as a Reseller to the opportunity
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager to the opportunity
ROLE_SALES_SUPPORT Allows access as Sales Support to the opportunity

Parameters

Parameter Type Data Type Default Description
after query string The page number
first query integer The number of results per page to return
sourceId query string The source ID
sourceType query string of enum:
OPPORTUNITY
PLACE_HOLDER
The source type of the quote version
status query string The status of the quote version

Responses

Status Meaning Description Definition
200 OK Success QuotePage
401 Unauthorized Unauthorized
404 Not Found Not found

Reconciliation

Retrieve ledger lines

Example request

curl -X GET https://{marketplaceURL}/api/v3/reconciliation/ledgerLines?context=type,string,enum,RESELLER_MANAGER \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/v3/reconciliation/ledgerLines?context=type,string,enum,RESELLER_MANAGER HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/v3/reconciliation/ledgerLines',
  method: 'get',
  data: '?context=type,string,enum,RESELLER_MANAGER',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/v3/reconciliation/ledgerLines?context=type,string,enum,RESELLER_MANAGER',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/v3/reconciliation/ledgerLines', params={
  'context': {
  "type": "string",
  "enum": [
    "RESELLER_MANAGER"
  ]
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/v3/reconciliation/ledgerLines',
  params: {
  'context' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/v3/reconciliation/ledgerLines?context=type,string,enum,RESELLER_MANAGER");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "amount": 10,
      "createdOn": 1506083752000,
      "currency": "JPY",
      "customer": {
        "email": "enduser003@appdirect.com",
        "id": 4712,
        "username": "enduser003@appdirect.com",
        "uuid": "62c8b934-aca8-4ed2-bcd5-8f798fd19355"
      },
      "editionId": 7552,
      "editionName": "Recurring Edition",
      "editionPricingItemId": 14467,
      "id": 6,
      "invoiceId": 8568,
      "issuerParty": {
        "id": "RESELLERSMARKETPLACE",
        "name": "RESELLER MARKETPLACE",
        "type": "CHANNEL",
        "uuid": "5d08ea40-c948-40e2-9335-1f3c513a6524"
      },
      "lastModified": 1506083752000,
      "lineItemDescription": "TEST - Recurring Edition - Monthly Fee Period from 09/22/17 to 10/22/17",
      "lineItemType": "ITEM",
      "orderId": 3598,
      "payments": [
        {
          "id": 5881,
          "type": "MANUAL"
        }
      ],
      "productId": 3402,
      "productName": "TEST",
      "recipientParty": {
        "id": "4052",
        "name": "Reseller Company 02",
        "type": "RESELLER",
        "uuid": "d282c59d-129a-4281-b390-a7d61876d9ce"
      },
      "reconciliationDate": 1506083747000,
      "reconciliationType": "ITEM",
      "transferStatus": "OPEN",
      "type": "DEBIT"
    },
    {
      "amount": 10,
      "createdOn": 1506083752000,
      "currency": "JPY",
      "customer": {
        "email": "enduser003@appdirect.com",
        "id": 4712,
        "username": "enduser003@appdirect.com",
        "uuid": "62c8b934-aca8-4ed2-bcd5-8f798fd19355"
      },
      "editionId": 7552,
      "editionName": "Recurring Edition",
      "editionPricingItemId": 14467,
      "id": 5,
      "invoiceId": 8568,
      "invoiceLineId": 8569,
      "issuerParty": {
        "id": "4052",
        "name": "Reseller Company 02",
        "type": "RESELLER",
        "uuid": "d282c59d-129a-4281-b390-a7d61876d9ce"
      },
      "lastModified": 1506083752000,
      "lineItemDescription": "TEST - Recurring Edition - Monthly Fee Period from 09/22/17 to 10/22/17",
      "lineItemType": "ITEM",
      "orderId": 3598,
      "payments": [
        {
          "id": 5881,
          "type": "MANUAL"
        }
      ],
      "productId": 3402,
      "productName": "TEST",
      "recipientParty": {
        "id": "RESELLERSMARKETPLACE",
        "name": "RESELLER MARKETPLACE",
        "type": "CHANNEL",
        "uuid": "5d08ea40-c948-40e2-9335-1f3c513a6524"
      },
      "reconciliationDate": 1506083747000,
      "reconciliationType": "ITEM",
      "transferStatus": "OPEN",
      "type": "CREDIT"
    }
  ],
  "links": [],
  "page": {
    "number": 1,
    "size": 50,
    "totalElements": 2,
    "totalPages": 1
  }
}

GET/v3/reconciliation/ledgerLines

Retrieve ledger lines generated for a specific role. Example, retrieve all ledger lines that a reseller manager has against all resellers

Parameters

Parameter Type Data Type Default Description
*context query string of enum:
RESELLER_MANAGER
Currently only supported value is 'RESELLER_MANAGER'
fromDate query number Filters ledger lines from given date. Filtering is performed against the reconciliation date of the ledger line. The parameter represents milliseconds since epoch date, but only the date part is taken into account. The time component is ignored
operationType query string of enum:
CREDIT
DEBIT
Filters by ledger line operation type
page query integer Page number to be returned in the result. Default value is 1
reconciliationType query string of enum:
ITEM
TAX
DISCOUNT
TERMINATION_FEE
ADJUSTMENT
RESELLER_MARKUP
CHANNEL_MARKUP
APPDIRECT_FEE
Filters by ledger line reconciliation type
size query integer Size of the page to be returned. Default value is 50, maximum allowed is 250
sortOrder query string of enum:
ASC
DESC
Sorting is done against 'reconciliationDate'. Defaults to sorting in ascending order
toDate query number Filters ledger lines until given date. Filtering is performed against the reconciliation date of the ledger line. The parameter represents milliseconds since epoch date, but only the date part is taken into account. The time component is ignored

Responses

Status Meaning Description Definition
200 OK OK PagedLedgerLineDetailsWS
400 Bad Request Bad Request, typically bad query parameters
401 Unauthorized Invalid authentication
403 Forbidden Invalid authorization

Reconciliation (Reseller)

Retrieve transfer details

Example request

curl -X GET https://{marketplaceURL}/api/reseller/v1/reconciliation/transfers/{transferId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/reseller/v1/reconciliation/transfers/{transferId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/reseller/v1/reconciliation/transfers/{transferId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/reseller/v1/reconciliation/transfers/{transferId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/reseller/v1/reconciliation/transfers/{transferId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/reseller/v1/reconciliation/transfers/{transferId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/reseller/v1/reconciliation/transfers/{transferId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "accountPayable": 52,
  "accountReceivable": 0,
  "currency": "USD",
  "id": "2319ee21-185c-485e-bcb0-18328b49b58f",
  "netPayable": 52,
  "netReceivable": 0,
  "status": "COMPLETE",
  "transferDate": 1572451157602,
  "transferRequestId": 3
}

GET/reseller/v1/reconciliation/transfers/{transferId}

Retrieves the summary of a transfer, which includes the date of the transfer, the transfer status, currency, net payable and net receivable

Required Scope and Authorization Rules

Scope Rule
ROLE_RESELLER Allows Resellers to access their transfer details

Parameters

Parameter Type Data Type Default Description
*transferId path string Transfer ID

Responses

Status Meaning Description Definition
200 OK The overview of the transfer Transfer
403 Forbidden Forbidden ErrorResponse
404 Not Found Not found ErrorResponse
503 Service Unavailable Service unavailable ErrorResponse

List transfer ledger lines

Example request

curl -X GET https://{marketplaceURL}/api/reseller/v1/reconciliation/transfers/{transferId}/details \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/reseller/v1/reconciliation/transfers/{transferId}/details HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/reseller/v1/reconciliation/transfers/{transferId}/details',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/reseller/v1/reconciliation/transfers/{transferId}/details',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/reseller/v1/reconciliation/transfers/{transferId}/details', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/reseller/v1/reconciliation/transfers/{transferId}/details',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/reseller/v1/reconciliation/transfers/{transferId}/details");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "credit": 52,
      "currency": "USD",
      "customer": "Appdirect",
      "debit": 0,
      "id": 72,
      "product": "FEATURED_WEBAPP"
    }
  ],
  "page": {
    "number": 1,
    "size": 1,
    "totalElements": 1,
    "totalPages": 1
  }
}

GET/reseller/v1/reconciliation/transfers/{transferId}/details

Retrieves the ledger lines of a transfer

Required Scope and Authorization Rules

Scope Rule
ROLE_RESELLER Allows Resellers to access their transfer ledger lines

Parameters

Parameter Type Data Type Default Description
number query integer 1 Page number
size query integer 5 Number of results per page
*transferId path string Transfer ID

Responses

Status Meaning Description Definition
200 OK The ledger lines of the transfer TransferDetailsList
403 Forbidden Forbidden ErrorResponse
404 Not Found Not found ErrorResponse
503 Service Unavailable Service unavailable ErrorResponse

List transfers

Example request

curl -X GET https://{marketplaceURL}/api/reseller/v1/reconciliation/transfers \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/reseller/v1/reconciliation/transfers HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/reseller/v1/reconciliation/transfers',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/reseller/v1/reconciliation/transfers',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/reseller/v1/reconciliation/transfers', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/reseller/v1/reconciliation/transfers',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/reseller/v1/reconciliation/transfers");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "accountPayable": 52,
      "accountReceivable": 0,
      "currency": "USD",
      "id": "2319ee21-185c-485e-bcb0-18328b49b58f",
      "netPayable": 52,
      "netReceivable": 0,
      "status": "COMPLETE",
      "transferDate": 1572451157602,
      "transferRequestId": 3
    },
    {
      "accountPayable": 15,
      "accountReceivable": 0,
      "currency": "USD",
      "id": "43a9d114-7157-4e91-a2ed-7c683aba068e",
      "netPayable": 15,
      "netReceivable": 0,
      "status": "COMPLETE",
      "transferDate": 1572378298608,
      "transferRequestId": 2
    },
    {
      "accountPayable": 59,
      "accountReceivable": 13.5,
      "currency": "USD",
      "id": "875ce19f-1dfb-4ff8-aad0-f4c2fe866d44",
      "netPayable": 45.5,
      "netReceivable": 0,
      "status": "COMPLETE",
      "transferDate": 1572359937730,
      "transferRequestId": 1
    }
  ],
  "page": {
    "number": 1,
    "size": 3,
    "totalElements": 3,
    "totalPages": 1
  }
}

GET/reseller/v1/reconciliation/transfers

Retrieves all transfers

Required Scope and Authorization Rules

Scope Rule
ROLE_RESELLER Allows Resellers to access their transfers

Parameters

Parameter Type Data Type Default Description
number query integer 1 Page number
size query integer 10 Number of results per page

Responses

Status Meaning Description Definition
200 OK A pageable list of transfers TransferList
403 Forbidden Forbidden ErrorResponse
404 Not Found Not found ErrorResponse
503 Service Unavailable Service unavailable ErrorResponse

Reports v1

Delete report

Example request

curl -X DELETE https://{marketplaceURL}/api/reporting/v1/report/{id} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/reporting/v1/report/{id} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/reporting/v1/report/{id}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/reporting/v1/report/{id}',
{
  method: 'DELETE'

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/reporting/v1/report/{id}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/reporting/v1/report/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/reporting/v1/report/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE/reporting/v1/report/{id}

This call deletes a report from your marketplace

Parameters

Parameter Type Data Type Default Description
*id path number Report ID

Responses

Status Meaning Description Definition
204 No Content Report deleted.
404 Not Found Report not found.
500 Internal Server Error Internal error during deletion

Retrieve a report

Example request

curl -X GET https://{marketplaceURL}/api/reporting/v1/report/{id} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/reporting/v1/report/{id} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/reporting/v1/report/{id}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/reporting/v1/report/{id}',
{
  method: 'GET'

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/reporting/v1/report/{id}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/reporting/v1/report/{id}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/reporting/v1/report/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET/reporting/v1/report/{id}

This call returns all details from a specific report.

Parameters

Parameter Type Data Type Default Description
*id path number Report ID

Responses

Status Meaning Description Definition
307 Temporary Redirect Report redirect url returned.
404 Not Found Report not found.

List all reports

Example request

curl -X GET https://{marketplaceURL}/api/reporting/v1/reports \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/reporting/v1/reports HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/reporting/v1/reports',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/reporting/v1/reports',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/reporting/v1/reports', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/reporting/v1/reports',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/reporting/v1/reports");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "reports": [
    {
      "createdDate": 1364245815000,
      "endDate": 1364184000000,
      "filename": "reportFiles/appdirect/AppDirect_2013-03-25_17-10-15_payments_detail_csv_report.csv",
      "id": 107,
      "reportType": "PAYMENTS_DETAIL_CSV",
      "startDate": 1363579200000
    },
    {
      "createdDate": 1364245816000,
      "endDate": 1364184000000,
      "filename": "reportFiles/appdirect/AppDirect_2013-03-25_17-10-15_contract_term_report.csv",
      "id": 108,
      "reportType": "CONTRACT_TERM",
      "startDate": 1363579200000
    }
  ],
  "totalCount": 27077
}

GET/reporting/v1/reports

Lists all reports that are automatically generated on your marketplace.

Parameters

Parameter Type Data Type Default Description
count query integer The number of reports to return from the results
fromDate query number The report generation start date and time, in epoch time
start query integer The lower bound index for the requested results
toDate query number The report generation end date and time, in epoch time
type query string of enum:
ACTIVE_UNCONVERTED_USERS
APPLICATION_USAGE
CANCELLED_ENTITLEMENTS
COMPANIES_CSV
CONTRACT_TERM
CUSTOMERS_CSV
CUSTOMER_ACQUISITION_BONUS
CUSTOMER_RETENTION_BONUS
FAILED_ORDERS
FAILURE_INTEGRATION_EVENT
FREE_TRIALS
GENERAL_PERFORMANCE_REPORT
INVOICES
INVOICES_CSV
MICROSOFT_RECONCILIATION
MIGRATION_PRODUCT_DATA
MOSI_ACQUISITION_BONUS
MOSI_RETENTION_BONUS
NOT_USED_APP
ORDER_EDITIONS_CSV
ORDER_PRODUCTS_CSV
PAYMENTS_DETAIL_CSV
PAYMENTS_OVERVIEW_CSV
RECONCILIATION
RE_CALCULATE_SUBSCRIPTION_PRICES
SUSPENDED_PURCHASED
TAXES
TRANSACTIONS
VOICE_CONN_CSV
Report type

Responses

Status Meaning Description Definition
200 OK Success Reports

Reports v2

Download a report file

Example request

curl -X GET https://{marketplaceURL}/api/reporting/v2/reports/{reportUuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/reporting/v2/reports/{reportUuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/reporting/v2/reports/{reportUuid}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/reporting/v2/reports/{reportUuid}',
{
  method: 'GET'

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/reporting/v2/reports/{reportUuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/reporting/v2/reports/{reportUuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/reporting/v2/reports/{reportUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET/reporting/v2/reports/{reportUuid}

Download an individual report

Parameters

Parameter Type Data Type Default Description
*reportUuid path string Report UUID

Responses

Status Meaning Description Definition
307 Temporary Redirect Redirect to the S3-signed URL for downloading the report file
403 Forbidden The user identified by the incoming credentials cannot be resolved, or is not authorized to download the requested report
404 Not Found No report exists for the UUID specified in the request

List all reports

Example request

curl -X GET https://{marketplaceURL}/api/reporting/v2/reports \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/reporting/v2/reports HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/reporting/v2/reports',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/reporting/v2/reports',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/reporting/v2/reports', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/reporting/v2/reports',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/reporting/v2/reports");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "createdBy": "John Smith",
      "formatType": "CSV",
      "fromDate": 1517443200000,
      "jobName": "channel-payment-details-APPDIRECT",
      "name": "A sample report run",
      "ownerCompanyId": null,
      "ownerPartner": "APPDIRECT",
      "ownerType": "ROLE_CHANNEL_ADMIN",
      "params": {
        "excludeFullyDiscounted": "NULL",
        "lineType": "NULL",
        "partner": "APPDIRECT",
        "paymentMethod": "NULL",
        "type": "NULL"
      },
      "reportName": "channel-payment-details",
      "runDate": 1519249651000,
      "status": "IN_PROGRESS",
      "toDate": null,
      "uuid": "adb97bd6-6fc5-4540-939d-8b5b02bcd0a7"
    },
    {
      "createdBy": "John Smith",
      "formatType": "CSV",
      "fromDate": 1517443200000,
      "jobName": "customer-cancelled-entitlements-APPDIRECT",
      "name": "A second sample report run",
      "ownerCompanyId": null,
      "ownerPartner": "APPDIRECT",
      "ownerType": "ROLE_CHANNEL_ADMIN",
      "params": {
        "defaultMarketplaceCurrency": "USD",
        "partner": "APPDIRECT"
      },
      "reportName": "customer-cancelled-entitlements",
      "runDate": 1519249646000,
      "status": "IN_PROGRESS",
      "toDate": null,
      "uuid": "dead040d-6ebf-41db-a554-cf6f7c8e1e25"
    }
  ],
  "page": {
    "number": 1,
    "size": 50,
    "totalElements": 2,
    "totalPages": 1
  }
}

GET/reporting/v2/reports

Lists all reports generated from your marketplace.

Parameters

Parameter Type Data Type Default Description
date query string Time bound for the report creation date: could be of the form 'gte([Unix timestamp])' for a lower bound (inclusive) or 'lte([Unix timestamp])' for an upper bound (inclusive).
number query integer 1 The page number of the requested result. The first page has index 1
ownerType query string of enum:
ROLE_CHANNEL_ADMIN
ROLE_DEVELOPER
ROLE_RESELLER_MANAGER
ROLE_PARTNER
The owner type that is allowed access to the reports
reportName query string Filter reports by name
searchText query string Show only reports whose names contain this text
size query integer 50 The page size of the requested result

Responses

Status Meaning Description Definition
200 OK A list of all all reports matching the search criteria ReportListing
400 Bad Request Input is invalid or malformed
403 Forbidden The user identified by the incoming credentials cannot be resolved, or does not have the authorization to view reports of the requested owner type

Reseller Catalog

Edition details

Example request

curl -X GET https://{marketplaceURL}/api/appReseller/v1/catalog/sellableProducts/{productId}/editions \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/appReseller/v1/catalog/sellableProducts/{productId}/editions HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appReseller/v1/catalog/sellableProducts/{productId}/editions',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appReseller/v1/catalog/sellableProducts/{productId}/editions',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/appReseller/v1/catalog/sellableProducts/{productId}/editions', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/appReseller/v1/catalog/sellableProducts/{productId}/editions',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appReseller/v1/catalog/sellableProducts/{productId}/editions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "id": "12fe4576-0000-4d7b-bdf4-0000cd112b27",
    "name": "IT HelpDesk Session",
    "paymentPlans": [
      {
        "cancellationPeriodLimit": null,
        "costs": [
          {
            "id": 54479,
            "itemPrices": {
              "CAD": 60,
              "GBP": 60,
              "IDR": 0,
              "USD": 60
            },
            "markupPrices": [
              {
                "markupPrices": {
                  "USD": 898989
                },
                "markupType": "CHANNEL_RESELLER_COMPANY"
              }
            ],
            "maxUnits": 111,
            "minUnits": 0,
            "pricingStrategy": "UNIT",
            "unit": "SESSION",
            "unitDependency": null
          }
        ],
        "endOfContractGracePeriod": null,
        "frequency": "ONE_TIME",
        "id": "28e14ece-00a0-0055-8000-0000c4c8e329",
        "minimumServiceLength": null
      }
    ],
    "revenueType": "ONE_TIME"
  }
]

GET/appReseller/v1/catalog/sellableProducts/{productId}/editions

Get product editions, costs and markups.

Required Scope and Authorization Rules

Scope Rule
ROLE_RESELLER Allows access as a Reseller for the company.

Parameters

Parameter Type Data Type Default Description
*productId path string Product ID
targetUserId query string User ID

Responses

Status Meaning Description Definition
200 OK Success array of CatalogEdition
401 Unauthorized Unauthorized

List sellable products

Example request

curl -X GET https://{marketplaceURL}/api/appReseller/v1/catalog/sellableProducts \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/appReseller/v1/catalog/sellableProducts HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appReseller/v1/catalog/sellableProducts',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appReseller/v1/catalog/sellableProducts',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/appReseller/v1/catalog/sellableProducts', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/appReseller/v1/catalog/sellableProducts',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appReseller/v1/catalog/sellableProducts");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "blurb": "Product 1 short description",
      "id": "cf6ab187-000a-4571-8089-000019d68801",
      "imageUrl": "https://appdirect.com/resource1",
      "name": "Product name 1",
      "provider": "Appdirect",
      "visible": true
    },
    {
      "blurb": "Product 2 short description",
      "id": "9b997bfc-000a-4ee3-b9f2-66d634ee993f",
      "imageUrl": "https://appdirect.com/resource2",
      "name": "Product name 2",
      "provider": "Appdirect",
      "visible": true
    }
  ],
  "links": [],
  "page": {
    "number": 0,
    "size": 50,
    "totalElements": 2,
    "totalPages": 1
  }
}

GET/appReseller/v1/catalog/sellableProducts

Retrieve all products that a Reseller can sell.

Required Scope and Authorization Rules

Scope Rule
ROLE_RESELLER Allows access as a Reseller for the company.

Parameters

Parameter Type Data Type Default Description
page query integer Page number
searchText query string Search text
size query integer Number of results per page
targetUserId query string Current user ID

Responses

Status Meaning Description Definition
200 OK Success AppResellerCatalogProductPageWS
401 Unauthorized Unauthorized

Search

Search content

Example request

curl -X GET https://{marketplaceURL}/api/appwise/v2/search?q=type,string \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/appwise/v2/search?q=type,string HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appwise/v2/search',
  method: 'get',
  data: '?q=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appwise/v2/search?q=type,string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/appwise/v2/search', params={
  'q': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/appwise/v2/search',
  params: {
  'q' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appwise/v2/search?q=type,string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "author": "Bob Smith",
      "contentType": "recommendation",
      "description": "Saw this last month. Movie exceeded my expectations, highly recommended. :)",
      "highlight": {
        "description": [
          "Saw this last month. <em>Movie</em> exceeded my expectations, highly recommended. :)"
        ]
      },
      "id": "79009-the-white-tiger-movie",
      "instance": "123",
      "lastModified": "2021-05-28T20:20:06Z",
      "metadataRecommendedBy": "Jardani Reeves",
      "metadataReleaseYear": "2021",
      "metadataType": "Movie",
      "resourceId": "the-white-tiger-movie",
      "source": "5a70e453-49b4-49a5-bef4-879ddddc7e09",
      "title": "The White Tiger",
      "url": "https://www.somemoviewebsite.com/ca/movie/the-white-tiger"
    },
    {
      "author": "Bob Smith",
      "contentType": "recommendation",
      "description": "Best movie in the LOTR trilogy!!",
      "highlight": {
        "description": [
          "Best <em>movie</em> in the LOTR trilogy!!"
        ]
      },
      "id": "79009-the-lord-of-the-rings-the-fellowship-of-the-ring-movie",
      "instance": "123",
      "lastModified": "2021-05-28T20:11:44Z",
      "metadataRecommendedBy": "Mac Parker",
      "metadataReleaseYear": "2001",
      "metadataType": "Movie",
      "resourceId": "the-lord-of-the-rings-the-fellowship-of-the-ring-movie",
      "source": "5a70e453-49b4-49a5-bef4-879ddddc7e09",
      "title": "The Lord of the Rings: The Fellowship of the Ring",
      "url": "https://www.somemoviewebsite.com/ca/movie/the-lord-of-the-rings-the-fellowship-of-the-ring"
    },
    {
      "author": "Bob Smith",
      "contentType": "recommendation",
      "description": "Fun movie",
      "highlight": {
        "description": [
          "Fun <em>movie</em>"
        ]
      },
      "id": "79009-shrek-movie",
      "instance": "123",
      "lastModified": "2021-05-28T17:33:41Z",
      "metadataRecommendedBy": "Mac Parker",
      "metadataReleaseYear": "2001",
      "metadataType": "Movie",
      "resourceId": "shrek-movie",
      "source": "5a70e453-49b4-49a5-bef4-879ddddc7e09",
      "title": "Shrek",
      "url": "https://www.somemoviewebsite.com/ca/movie/shrek"
    }
  ],
  "page": {
    "number": 2,
    "size": 3,
    "totalElements": 8,
    "totalPages": 3
  }
}

GET/appwise/v2/search

Search a unified index of content derived from a user's connected accounts. Requires a user-based token.

Parameters

Parameter Type Data Type Default Description
number query number 1 Which page of results to return. For example, to return the page with the 60th result, when there are 50 results per page (size), submit 2 to return the 2nd page of results. Max value: N/A
*q query string Search query. The term(s) you are searching for. Format: URL-encoded string. For example: To search for Testing String, use Testing%20string
size query number 50 Page size: maximum number of search results per page. Max value: 250
sort query string A URL-encoded value that defines how to sort the results. The supported values are +lastModified or -lastModified to sort by ascending/descending respectively.

Responses

Status Meaning Description Definition
200 OK Success

Segment Folders

Create segment folders

Example request

curl -X POST https://{marketplaceURL}/api/channel/v1/companyGroups \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/channel/v1/companyGroups HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/companyGroups',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Segment folder creation request",
      "type": "object",
      "title": "SegmentFolderRequest",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "description": "Segment folder name",
          "type": "string",
          "maxLength": 255
        }
      },
      "example": {
        "name": "Fortune 500 Companies"
      }
    },
    {
      "example": {
        "name": "Fortune 500 Companies"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/companyGroups',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/channel/v1/companyGroups', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/channel/v1/companyGroups',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/companyGroups");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "name": "Fortune 500 Companies"
}

Example response

{
  "enable": true,
  "id": "7e3b3bb8-1b75-408b-8cbf-561ccd910479",
  "name": "Fortune 500 Companies",
  "partner": "APPDIRECT"
}

POST/channel/v1/companyGroups

Creates a segment folder

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.

Body Parameters

SegmentFolderRequest object:

Property Type Description
name string

Segment folder name

Responses

Status Meaning Description Definition
200 OK Success SegmentFolder
400 Bad Request Bad request Error
409 Conflict The segment folder name already exists for the partner Error

Create dynamic segments

Example request

curl -X POST https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments?companyGroupId=type,string \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments?companyGroupId=type,string HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments',
  method: 'post',
  data: '?companyGroupId=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Data required to create a dynamic segment",
      "type": "object",
      "title": "DynamicSegmentRequest",
      "required": [
        "name",
        "filters"
      ],
      "properties": {
        "code": {
          "description": "Segment code",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        "filters": {
          "description": "Dynamic filter",
          "type": "array",
          "items": {
            "description": "Filters",
            "type": "array",
            "title": "Filters",
            "items": {
              "description": "Filter",
              "type": "object",
              "title": "Filter",
              "required": [
                "operator",
                "conditions"
              ],
              "properties": {
                "conditions": {
                  "type": "array",
                  "items": {
                    "description": "Filter expression",
                    "type": "object",
                    "title": "FilterExpression",
                    "required": [],
                    "properties": {},
                    "example": {}
                  }
                },
                "operator": {
                  "description": "Filter operator",
                  "type": "string"
                }
              },
              "example": {
                "conditions": [
                  {
                    "operator": "matches",
                    "parameter": "company.state",
                    "values": []
                  },
                  {
                    "operator": "matches",
                    "parameter": "company.city",
                    "values": []
                  }
                ],
                "operator": "ALL_OF"
              }
            },
            "example": [
              {
                "conditions": [
                  {
                    "operator": "matches",
                    "parameter": "company.state",
                    "values": []
                  },
                  {
                    "operator": "matches",
                    "parameter": "company.city",
                    "values": []
                  }
                ]
              },
              {
                "conditions": [
                  {
                    "operator": "matches",
                    "parameter": "company.state",
                    "values": []
                  },
                  {
                    "operator": "matches",
                    "parameter": "company.city",
                    "values": []
                  }
                ]
              }
            ]
          }
        },
        "name": {
          "description": "Segment name",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        }
      },
      "example": {
        "code": "XXYU",
        "filters": [
          [
            {
              "conditions": [
                {
                  "operator": "matches",
                  "parameter": "company.state",
                  "values": [
                    "Quebec"
                  ]
                },
                {
                  "operator": "matches",
                  "parameter": "company.city",
                  "values": [
                    "Montreal"
                  ]
                }
              ]
            },
            {
              "conditions": [
                {
                  "operator": "matches",
                  "parameter": "company.state",
                  "values": [
                    "Quebec"
                  ]
                },
                {
                  "operator": "matches",
                  "parameter": "company.city",
                  "values": [
                    "Montreal"
                  ]
                }
              ]
            }
          ]
        ],
        "name": "Canada"
      }
    },
    {
      "example": {
        "code": "CAN",
        "filters": [
          [
            {
              "conditions": [
                {
                  "operator": "matches",
                  "parameter": "company.state",
                  "values": [
                    "Quebec"
                  ]
                },
                {
                  "operator": "matches",
                  "parameter": "company.city",
                  "values": [
                    "Montreal"
                  ]
                }
              ]
            },
            {
              "conditions": [
                {
                  "operator": "matches",
                  "parameter": "company.state",
                  "values": [
                    "Quebec"
                  ]
                },
                {
                  "operator": "matches",
                  "parameter": "company.city",
                  "values": [
                    "Montreal"
                  ]
                }
              ]
            }
          ]
        ],
        "name": "Canada"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments?companyGroupId=type,string',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments', params={
  'companyGroupId': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments',
  params: {
  'companyGroupId' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments?companyGroupId=type,string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "code": "CAN",
  "filters": [
    [
      {
        "conditions": [
          {
            "operator": "matches",
            "parameter": "company.state",
            "values": [
              "Quebec"
            ]
          },
          {
            "operator": "matches",
            "parameter": "company.city",
            "values": [
              "Montreal"
            ]
          }
        ]
      },
      {
        "conditions": [
          {
            "operator": "matches",
            "parameter": "company.state",
            "values": [
              "Quebec"
            ]
          },
          {
            "operator": "matches",
            "parameter": "company.city",
            "values": [
              "Montreal"
            ]
          }
        ]
      }
    ]
  ],
  "name": "Canada"
}

Example response

{
  "code": "CAN",
  "filters": [
    [
      {
        "conditions": [
          {
            "operator": "matches",
            "parameter": "company.state",
            "values": [
              "Quebec"
            ]
          },
          {
            "operator": "matches",
            "parameter": "company.city",
            "values": [
              "Montreal"
            ]
          }
        ]
      },
      {
        "conditions": [
          {
            "operator": "matches",
            "parameter": "company.state",
            "values": [
              "Quebec"
            ]
          },
          {
            "operator": "matches",
            "parameter": "company.city",
            "values": [
              "Montreal"
            ]
          }
        ]
      }
    ]
  ],
  "id": "9f4e5c52-5258-4193-a132-303f06e9eef1",
  "name": "Canada",
  "partner": "APPDIRECT",
  "type": "DYNAMIC"
}

POST/channel/v1/segments/dynamicSegments

Creates a dynamic segment. Dynamic segments contain user selected automatically based on filter values, as opposed to manual segments, in which Marketplace Managers select companies manually.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.

Parameters

Parameter Type Data Type Default Description
*companyGroupId query string Segment folder ID

Body Parameters

DynamicSegmentRequest object:

Property Type Description
code string

Segment code

filters array of Filters

Dynamic filter

name string

Segment name

Responses

Status Meaning Description Definition
200 OK OK DynamicSegment
400 Bad Request Bad request Error
409 Conflict The segment already exists Error

Create manual segment

Example request

curl -X POST https://{marketplaceURL}/api/channel/v1/segments?companyGroupId=type,string \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/channel/v1/segments?companyGroupId=type,string HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/segments',
  method: 'post',
  data: '?companyGroupId=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Data required to create a segment",
      "type": "object",
      "title": "SegmentRequest",
      "required": [
        "name"
      ],
      "properties": {
        "code": {
          "description": "Segment code",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        "name": {
          "description": "Segment name",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        }
      },
      "example": {
        "code": "XXYU",
        "name": "Canada"
      }
    },
    {
      "example": {
        "code": "CAN",
        "name": "Canada"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/segments?companyGroupId=type,string',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/channel/v1/segments', params={
  'companyGroupId': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/channel/v1/segments',
  params: {
  'companyGroupId' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/segments?companyGroupId=type,string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "code": "CAN",
  "name": "Canada"
}

Example response

{
  "code": "CAN",
  "id": "9f4e5c52-5258-4193-a132-303f06e9eef1",
  "name": "Canada",
  "partner": "APPDIRECT",
  "type": "MANUAL"
}

POST/channel/v1/segments

Creates a manual segment. Manual segments allow Marketplace Managers to select companies manually, as opposed to dynamic segments, which contain user selected automatically based on filter values.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.

Parameters

Parameter Type Data Type Default Description
*companyGroupId query string Segment folder ID

Body Parameters

SegmentRequest object:

Property Type Description
code string

Segment code

name string

Segment name

Responses

Status Meaning Description Definition
200 OK OK Segment
400 Bad Request Bad request Error
409 Conflict The segment already exists Error

Create or remove segment-company associations

Example request

curl -X POST https://{marketplaceURL}/api/channel/v1/segments/{companySegmentId}/associationsBatchUpdate \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/channel/v1/segments/{companySegmentId}/associationsBatchUpdate HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/segments/{companySegmentId}/associationsBatchUpdate',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Data required to create or delete an association between segment and companies",
      "type": "object",
      "title": "CompanySegmentAssociationsBatchUpdateRequest",
      "required": [
        "deleteAll",
        "companyIdsToAdd",
        "companyIdsToRemove"
      ],
      "properties": {
        "companyIdsToAdd": {
          "description": "The list of company IDs to associate with the segment, up to a maximum of 1000 IDs",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "companyIdsToRemove": {
          "description": "The list of company IDs to disassociate from the segment, up to a maximum of 1000 IDs",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "deleteAll": {
          "description": "Set to true to delete all associations",
          "type": "boolean"
        }
      },
      "example": {
        "companyIdsToAdd": [
          "7e3b3bb8-1b75-408b-8cbf-561ccd910479"
        ],
        "companyIdsToRemove": [
          "7e3b3bb8-1b75-408b-8cbf-561ccd910478"
        ],
        "deleteAll": "false"
      }
    },
    {
      "example": {
        "companyIdsToAdd": [
          "7e3b3bb8-1b75-408b-8cbf-561ccd910479"
        ],
        "companyIdsToRemove": [
          "7e3b3bb8-1b75-408b-8cbf-561ccd910478"
        ],
        "deleteAll": "false"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/segments/{companySegmentId}/associationsBatchUpdate',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/channel/v1/segments/{companySegmentId}/associationsBatchUpdate', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/channel/v1/segments/{companySegmentId}/associationsBatchUpdate',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/segments/{companySegmentId}/associationsBatchUpdate");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "companyIdsToAdd": [
    "7e3b3bb8-1b75-408b-8cbf-561ccd910479"
  ],
  "companyIdsToRemove": [
    "7e3b3bb8-1b75-408b-8cbf-561ccd910478"
  ],
  "deleteAll": "false"
}

Example response

{
  "code": "EXTERNAL_ERROR",
  "message": "Execution of an external dependency failed with message: User with email random@appdirect.com was not found in the linked account."
}

POST/channel/v1/segments/{companySegmentId}/associationsBatchUpdate

Creates or removes associations between segments and companies

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.

Parameters

Parameter Type Data Type Default Description
*companySegmentId path string Segment ID

Body Parameters

CompanySegmentAssociationsBatchUpdateRequest object:

Property Type Description
companyIdsToAdd array of string

The list of company IDs to associate with the segment, up to a maximum of 1000 IDs

companyIdsToRemove array of string

The list of company IDs to disassociate from the segment, up to a maximum of 1000 IDs

deleteAll boolean

Set to true to delete all associations

Responses

Status Meaning Description Definition
204 No Content The segment to company associations were successfully updated.
400 Bad Request Bad request Error
409 Conflict The association already exists between the segment and company. Error

Delete segment folder

Example request

curl -X DELETE https://{marketplaceURL}/api/channel/v1/companyGroups/{companyGroupId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/channel/v1/companyGroups/{companyGroupId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/companyGroups/{companyGroupId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/companyGroups/{companyGroupId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/channel/v1/companyGroups/{companyGroupId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/channel/v1/companyGroups/{companyGroupId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/companyGroups/{companyGroupId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE/channel/v1/companyGroups/{companyGroupId}

Deletes a segment folder, all associated segments, and all product associations

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.

Parameters

Parameter Type Data Type Default Description
*companyGroupId path string Segment folder ID

Responses

Status Meaning Description Definition
204 No Content The segment folder was successfully deleted
400 Bad Request Bad request Error

Read segment companies

Example request

curl -X GET https://{marketplaceURL}/api/channel/v1/segments/{companySegmentId}/availableAndAssociatedCompanies \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/channel/v1/segments/{companySegmentId}/availableAndAssociatedCompanies HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/segments/{companySegmentId}/availableAndAssociatedCompanies',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/segments/{companySegmentId}/availableAndAssociatedCompanies',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/channel/v1/segments/{companySegmentId}/availableAndAssociatedCompanies', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/channel/v1/segments/{companySegmentId}/availableAndAssociatedCompanies',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/segments/{companySegmentId}/availableAndAssociatedCompanies");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "id": "04f8d043-10f1-4b89-8c0e-0780e5a62299",
      "name": "Canada Company",
      "selected": false
    },
    {
      "id": "04f8d043-10f1-4b89-8c0e-0780e5a62298",
      "name": "US Company",
      "selected": true
    }
  ],
  "page": {
    "number": 1,
    "size": 2,
    "totalElements": 10,
    "totalPages": 2
  }
}

GET/channel/v1/segments/{companySegmentId}/availableAndAssociatedCompanies

Returns a paginated list of all marketplace companies and indicates whether they are associated with the segment

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.

Parameters

Parameter Type Data Type Default Description
*companySegmentId path string Segment ID
number query integer 0 Page number
searchText query string Search text
selected query boolean false If true, returns only associated companies
size query integer 50 Number of results per page
sort query string +name Sort field and order. For ascending sort order, use the '+[FieldName]' format. For descending order, use the '-[FieldName]' format.

Responses

Status Meaning Description Definition
200 OK Success PagedAvailableCompanySegmentAssociation
400 Bad Request Bad request Error

Read segments

Example request

curl -X GET https://{marketplaceURL}/api/channel/v1/segments?companyGroupId=type,string \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/channel/v1/segments?companyGroupId=type,string HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/segments',
  method: 'get',
  data: '?companyGroupId=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/segments?companyGroupId=type,string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/channel/v1/segments', params={
  'companyGroupId': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/channel/v1/segments',
  params: {
  'companyGroupId' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/segments?companyGroupId=type,string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "code": "CAN",
      "id": "9f4e5c52-5258-4193-a132-303f06e9eef1",
      "name": "Canada",
      "partner": "APPDIRECT",
      "type": "MANUAL"
    },
    {
      "code": "FRA",
      "id": "b1f5af35-ca68-431f-83b7-ef56189924ed",
      "name": "France",
      "partner": "APPDIRECT",
      "type": "MANUAL"
    },
    {
      "code": "USA",
      "id": "5ca15227-da6b-413e-a09c-f8d06ab3dcd7",
      "name": "United States",
      "partner": "APPDIRECT",
      "type": "MANUAL"
    }
  ],
  "page": {
    "number": 0,
    "size": 50,
    "totalElements": 3,
    "totalPages": 1
  }
}

GET/channel/v1/segments

Returns a paginated list of segments

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.

Parameters

Parameter Type Data Type Default Description
*companyGroupId query string Segment folder ID
number query integer 0 Page number
searchText query string Search text
size query integer 50 Number of results per page
sort query string +name Sort field and order. For ascending sort order, use the '+[FieldName]' format. For descending order, use the '-[FieldName]' format.

Responses

Status Meaning Description Definition
200 OK OK PagedSegment
400 Bad Request Bad request Error

Read segment folders

Example request

curl -X GET https://{marketplaceURL}/api/channel/v1/companyGroups \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/channel/v1/companyGroups HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/companyGroups',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/companyGroups',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/channel/v1/companyGroups', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/channel/v1/companyGroups',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/companyGroups");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "id": "7e3b3bb8-1b75-408b-8cbf-561ccd910479",
      "name": "Fortune 500 Companies",
      "partner": "APPDIRECT",
      "segments": [
        {
          "code": "IOS",
          "id": "04f8d043-10f1-4b89-8c0e-0780e5a62299",
          "name": "iOS users",
          "partner": "APPDIRECT",
          "type": "MANUAL"
        }
      ]
    },
    {
      "id": "7e3b3bb8-1b75-408b-8cbf-561ccd910479",
      "name": "Fortune 100 Companies",
      "partner": "APPDIRECT",
      "segments": [
        {
          "code": "DROID",
          "id": "04f8d043-10f1-4b89-8c0e-0780e5a62299",
          "name": "Android users",
          "partner": "APPDIRECT",
          "type": "MANUAL"
        }
      ]
    }
  ],
  "page": {
    "number": 1,
    "size": 2,
    "totalElements": 10,
    "totalPages": 2
  }
}

GET/channel/v1/companyGroups

Returns a paginated list of segment folders for the marketplace

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.

Parameters

Parameter Type Data Type Default Description
name query string Search text
number query integer 0 Page number
size query integer 50 Number of results per page
sort query string +name Sort field and order. For ascending sort order, use the '+[FieldName]' format. For descending order, use the '-[FieldName]' format.

Responses

Status Meaning Description Definition
200 OK Success PagedSegmentFolderAndSegments
400 Bad Request Bad request Error

Read dynamic segments

Example request

curl -X GET https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments?dynamicSegmentId=type,string \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments?dynamicSegmentId=type,string HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments',
  method: 'get',
  data: '?dynamicSegmentId=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments?dynamicSegmentId=type,string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments', params={
  'dynamicSegmentId': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments',
  params: {
  'dynamicSegmentId' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments?dynamicSegmentId=type,string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "code": "CAN",
  "filters": [
    [
      {
        "conditions": [
          {
            "operator": "matches",
            "parameter": "company.state",
            "values": [
              "Quebec"
            ]
          },
          {
            "operator": "matches",
            "parameter": "company.city",
            "values": [
              "Montreal"
            ]
          }
        ]
      },
      {
        "conditions": [
          {
            "operator": "matches",
            "parameter": "company.state",
            "values": [
              "Quebec"
            ]
          },
          {
            "operator": "matches",
            "parameter": "company.city",
            "values": [
              "Montreal"
            ]
          }
        ]
      }
    ]
  ],
  "id": "9f4e5c52-5258-4193-a132-303f06e9eef1",
  "name": "Canada",
  "partner": "APPDIRECT",
  "type": "DYNAMIC"
}

GET/channel/v1/segments/dynamicSegments

Reads a dynamic segment

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.

Parameters

Parameter Type Data Type Default Description
*dynamicSegmentId query string Dynamic segment ID

Responses

Status Meaning Description Definition
200 OK OK DynamicSegment
400 Bad Request Bad request Error

Read filter parameters

Example request

curl -X GET https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments/filterParameters \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments/filterParameters HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json
AD-Tenant: [object Object]

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments/filterParameters',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments/filterParameters',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments/filterParameters', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments/filterParameters',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments/filterParameters");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "fields": [
      {
        "dataType": "text",
        "key": "company.state",
        "label": "state"
      }
    ],
    "key": "company",
    "label": "company"
  }
]

GET/channel/v1/segments/dynamicSegments/filterParameters

Returns a list of parameters for the dynamic filter

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.

Parameters

Parameter Type Data Type Default Description
locale query string en_US Locale

Responses

Status Meaning Description Definition
200 OK OK SegmentFilterParamList
500 Internal Server Error Server error Error

Delete segments from segment folders

Example request

curl -X DELETE https://{marketplaceURL}/api/channel/v1/companyGroups/{companyGroupId}/segments/{companySegmentId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/channel/v1/companyGroups/{companyGroupId}/segments/{companySegmentId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/companyGroups/{companyGroupId}/segments/{companySegmentId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/companyGroups/{companyGroupId}/segments/{companySegmentId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/channel/v1/companyGroups/{companyGroupId}/segments/{companySegmentId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/channel/v1/companyGroups/{companyGroupId}/segments/{companySegmentId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/companyGroups/{companyGroupId}/segments/{companySegmentId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE/channel/v1/companyGroups/{companyGroupId}/segments/{companySegmentId}

Deletes a segment from a segment folder

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.

Parameters

Parameter Type Data Type Default Description
*companyGroupId path string Segment folder ID
*companySegmentId path string Segment ID

Responses

Status Meaning Description Definition
204 No Content The segment was successfully deleted.
400 Bad Request Bad request Error

Test dynamic segments

Example request

curl -X POST https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments/matchUser/{userEmail} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments/matchUser/{userEmail} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments/matchUser/{userEmail}',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Data required to create a dynamic segment",
      "type": "object",
      "title": "DynamicSegmentRequest",
      "required": [
        "name",
        "filters"
      ],
      "properties": {
        "code": {
          "description": "Segment code",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        "filters": {
          "description": "Dynamic filter",
          "type": "array",
          "items": {
            "description": "Filters",
            "type": "array",
            "title": "Filters",
            "items": {
              "description": "Filter",
              "type": "object",
              "title": "Filter",
              "required": [
                "operator",
                "conditions"
              ],
              "properties": {
                "conditions": {
                  "type": "array",
                  "items": {
                    "description": "Filter expression",
                    "type": "object",
                    "title": "FilterExpression",
                    "required": [],
                    "properties": {},
                    "example": {}
                  }
                },
                "operator": {
                  "description": "Filter operator",
                  "type": "string"
                }
              },
              "example": {
                "conditions": [
                  {
                    "operator": "matches",
                    "parameter": "company.state",
                    "values": []
                  },
                  {
                    "operator": "matches",
                    "parameter": "company.city",
                    "values": []
                  }
                ],
                "operator": "ALL_OF"
              }
            },
            "example": [
              {
                "conditions": [
                  {
                    "operator": "matches",
                    "parameter": "company.state",
                    "values": []
                  },
                  {
                    "operator": "matches",
                    "parameter": "company.city",
                    "values": []
                  }
                ]
              },
              {
                "conditions": [
                  {
                    "operator": "matches",
                    "parameter": "company.state",
                    "values": []
                  },
                  {
                    "operator": "matches",
                    "parameter": "company.city",
                    "values": []
                  }
                ]
              }
            ]
          }
        },
        "name": {
          "description": "Segment name",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        }
      },
      "example": {
        "code": "XXYU",
        "filters": [
          [
            {
              "conditions": [
                {
                  "operator": "matches",
                  "parameter": "company.state",
                  "values": [
                    "Quebec"
                  ]
                },
                {
                  "operator": "matches",
                  "parameter": "company.city",
                  "values": [
                    "Montreal"
                  ]
                }
              ]
            },
            {
              "conditions": [
                {
                  "operator": "matches",
                  "parameter": "company.state",
                  "values": [
                    "Quebec"
                  ]
                },
                {
                  "operator": "matches",
                  "parameter": "company.city",
                  "values": [
                    "Montreal"
                  ]
                }
              ]
            }
          ]
        ],
        "name": "Canada"
      }
    },
    {
      "example": {
        "code": "CAN",
        "filters": [
          [
            {
              "conditions": [
                {
                  "operator": "matches",
                  "parameter": "company.state",
                  "values": [
                    "Quebec"
                  ]
                },
                {
                  "operator": "matches",
                  "parameter": "company.city",
                  "values": [
                    "Montreal"
                  ]
                }
              ]
            },
            {
              "conditions": [
                {
                  "operator": "matches",
                  "parameter": "company.state",
                  "values": [
                    "Quebec"
                  ]
                },
                {
                  "operator": "matches",
                  "parameter": "company.city",
                  "values": [
                    "Montreal"
                  ]
                }
              ]
            }
          ]
        ],
        "name": "Canada"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments/matchUser/{userEmail}',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments/matchUser/{userEmail}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments/matchUser/{userEmail}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments/matchUser/{userEmail}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "code": "CAN",
  "filters": [
    [
      {
        "conditions": [
          {
            "operator": "matches",
            "parameter": "company.state",
            "values": [
              "Quebec"
            ]
          },
          {
            "operator": "matches",
            "parameter": "company.city",
            "values": [
              "Montreal"
            ]
          }
        ]
      },
      {
        "conditions": [
          {
            "operator": "matches",
            "parameter": "company.state",
            "values": [
              "Quebec"
            ]
          },
          {
            "operator": "matches",
            "parameter": "company.city",
            "values": [
              "Montreal"
            ]
          }
        ]
      }
    ]
  ],
  "name": "Canada"
}

Example response

{
  "matches": "true"
}

POST/channel/v1/segments/dynamicSegments/matchUser/{userEmail}

Determines whether the specified user matches the specified dynamic segment

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.

Parameters

Parameter Type Data Type Default Description
*userEmail path string User email address

Body Parameters

DynamicSegmentRequest object:

Property Type Description
code string

Segment code

filters array of Filters

Dynamic filter

name string

Segment name

Responses

Status Meaning Description Definition
200 OK OK UserMatchResult
400 Bad Request Bad request Error

Update segment folders

Example request

curl -X PUT https://{marketplaceURL}/api/channel/v1/companyGroups/{companyGroupId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/channel/v1/companyGroups/{companyGroupId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/companyGroups/{companyGroupId}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Segment folder creation request",
      "type": "object",
      "title": "SegmentFolderRequest",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "description": "Segment folder name",
          "type": "string",
          "maxLength": 255
        }
      },
      "example": {
        "name": "Fortune 500 Companies"
      }
    },
    {
      "example": {
        "name": "Fortune 500 Companies"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/companyGroups/{companyGroupId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/channel/v1/companyGroups/{companyGroupId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/channel/v1/companyGroups/{companyGroupId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/companyGroups/{companyGroupId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "name": "Fortune 500 Companies"
}

Example response

{
  "code": "EXTERNAL_ERROR",
  "message": "Execution of an external dependency failed with message: User with email random@appdirect.com was not found in the linked account."
}

PUT/channel/v1/companyGroups/{companyGroupId}

Updates a segment folder

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.

Parameters

Parameter Type Data Type Default Description
*companyGroupId path string Segment folder ID

Body Parameters

SegmentFolderRequest object:

Property Type Description
name string

Segment folder name

Responses

Status Meaning Description Definition
204 No Content The segment folder was successfully updated
400 Bad Request Bad request Error
409 Conflict The segment folder name already exists for the partner Error

Update dynamic segments

Example request

curl -X PUT https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments/{dynamicSegmentId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments/{dynamicSegmentId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments/{dynamicSegmentId}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Data required to create a dynamic segment",
      "type": "object",
      "title": "DynamicSegmentRequest",
      "required": [
        "name",
        "filters"
      ],
      "properties": {
        "code": {
          "description": "Segment code",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        "filters": {
          "description": "Dynamic filter",
          "type": "array",
          "items": {
            "description": "Filters",
            "type": "array",
            "title": "Filters",
            "items": {
              "description": "Filter",
              "type": "object",
              "title": "Filter",
              "required": [
                "operator",
                "conditions"
              ],
              "properties": {
                "conditions": {
                  "type": "array",
                  "items": {
                    "description": "Filter expression",
                    "type": "object",
                    "title": "FilterExpression",
                    "required": [],
                    "properties": {},
                    "example": {}
                  }
                },
                "operator": {
                  "description": "Filter operator",
                  "type": "string"
                }
              },
              "example": {
                "conditions": [
                  {
                    "operator": "matches",
                    "parameter": "company.state",
                    "values": []
                  },
                  {
                    "operator": "matches",
                    "parameter": "company.city",
                    "values": []
                  }
                ],
                "operator": "ALL_OF"
              }
            },
            "example": [
              {
                "conditions": [
                  {
                    "operator": "matches",
                    "parameter": "company.state",
                    "values": []
                  },
                  {
                    "operator": "matches",
                    "parameter": "company.city",
                    "values": []
                  }
                ]
              },
              {
                "conditions": [
                  {
                    "operator": "matches",
                    "parameter": "company.state",
                    "values": []
                  },
                  {
                    "operator": "matches",
                    "parameter": "company.city",
                    "values": []
                  }
                ]
              }
            ]
          }
        },
        "name": {
          "description": "Segment name",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        }
      },
      "example": {
        "code": "XXYU",
        "filters": [
          [
            {
              "conditions": [
                {
                  "operator": "matches",
                  "parameter": "company.state",
                  "values": [
                    "Quebec"
                  ]
                },
                {
                  "operator": "matches",
                  "parameter": "company.city",
                  "values": [
                    "Montreal"
                  ]
                }
              ]
            },
            {
              "conditions": [
                {
                  "operator": "matches",
                  "parameter": "company.state",
                  "values": [
                    "Quebec"
                  ]
                },
                {
                  "operator": "matches",
                  "parameter": "company.city",
                  "values": [
                    "Montreal"
                  ]
                }
              ]
            }
          ]
        ],
        "name": "Canada"
      }
    },
    {
      "example": {
        "code": "CAN",
        "filters": [
          [
            {
              "conditions": [
                {
                  "operator": "matches",
                  "parameter": "company.state",
                  "values": [
                    "Quebec"
                  ]
                },
                {
                  "operator": "matches",
                  "parameter": "company.city",
                  "values": [
                    "Montreal"
                  ]
                }
              ]
            },
            {
              "conditions": [
                {
                  "operator": "matches",
                  "parameter": "company.state",
                  "values": [
                    "Quebec"
                  ]
                },
                {
                  "operator": "matches",
                  "parameter": "company.city",
                  "values": [
                    "Montreal"
                  ]
                }
              ]
            }
          ]
        ],
        "name": "Canada"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments/{dynamicSegmentId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments/{dynamicSegmentId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments/{dynamicSegmentId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/segments/dynamicSegments/{dynamicSegmentId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "code": "CAN",
  "filters": [
    [
      {
        "conditions": [
          {
            "operator": "matches",
            "parameter": "company.state",
            "values": [
              "Quebec"
            ]
          },
          {
            "operator": "matches",
            "parameter": "company.city",
            "values": [
              "Montreal"
            ]
          }
        ]
      },
      {
        "conditions": [
          {
            "operator": "matches",
            "parameter": "company.state",
            "values": [
              "Quebec"
            ]
          },
          {
            "operator": "matches",
            "parameter": "company.city",
            "values": [
              "Montreal"
            ]
          }
        ]
      }
    ]
  ],
  "name": "Canada"
}

Example response

{
  "code": "EXTERNAL_ERROR",
  "message": "Execution of an external dependency failed with message: User with email random@appdirect.com was not found in the linked account."
}

PUT/channel/v1/segments/dynamicSegments/{dynamicSegmentId}

Updates a dynamic segment

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.

Parameters

Parameter Type Data Type Default Description
*dynamicSegmentId path string Segment ID

Body Parameters

DynamicSegmentRequest object:

Property Type Description
code string

Segment code

filters array of Filters

Dynamic filter

name string

Segment name

Responses

Status Meaning Description Definition
204 No Content The segment was successfully updated.
400 Bad Request Bad request Error
409 Conflict The segment already exists Error

Update manual segments

Example request

curl -X PUT https://{marketplaceURL}/api/channel/v1/segments/{companySegmentId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/channel/v1/segments/{companySegmentId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/segments/{companySegmentId}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Data required to create a segment",
      "type": "object",
      "title": "SegmentRequest",
      "required": [
        "name"
      ],
      "properties": {
        "code": {
          "description": "Segment code",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        "name": {
          "description": "Segment name",
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        }
      },
      "example": {
        "code": "XXYU",
        "name": "Canada"
      }
    },
    {
      "example": {
        "code": "CAN",
        "name": "Canada"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/segments/{companySegmentId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/channel/v1/segments/{companySegmentId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/channel/v1/segments/{companySegmentId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/segments/{companySegmentId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "code": "CAN",
  "name": "Canada"
}

Example response

{
  "code": "EXTERNAL_ERROR",
  "message": "Execution of an external dependency failed with message: User with email random@appdirect.com was not found in the linked account."
}

PUT/channel/v1/segments/{companySegmentId}

Updates a manual segment

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.

Parameters

Parameter Type Data Type Default Description
*companySegmentId path string Segment ID

Body Parameters

SegmentRequest object:

Property Type Description
code string

Segment code

name string

Segment name

Responses

Status Meaning Description Definition
204 No Content The segment was successfully updated.
400 Bad Request Bad request Error
409 Conflict The segment already exists Error

Subscription Assignments

Create application assignment

Example request

curl -X POST https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments/{userUuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments/{userUuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments/{userUuid}',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "A subscription custom attribute, as defined in the marketplace at Manage > Marketplace > Settings > Custom Attributes > Subscription Custom Attributes",
      "type": "object",
      "title": "SubscriptionCustomAttribute",
      "properties": {
        "name": {
          "description": "The key name of an existing subscription custom attribute",
          "type": "string"
        },
        "values": {
          "description": "Values of the custom attributes. If the attribute definition is MULTISELECT, all values must be a subset of the value options defined in the marketplace. If the attribute definition is TEXT, only one value is allowed.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "example": {
        "name": "test1",
        "values": [
          "value1",
          "value2"
        ]
      }
    },
    {
      "example": {
        "accessRights": "EDIT_AND_VIEW",
        "appAdmin": "false",
        "billRate": "0",
        "department": "IT",
        "idNumber": "3345",
        "password": "password",
        "timezone": "America/New_York",
        "title": "Engineer",
        "userName": "testuser@example.com",
        "zipCode": "95926"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments/{userUuid}',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments/{userUuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments/{userUuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments/{userUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "accessRights": "EDIT_AND_VIEW",
  "appAdmin": "false",
  "billRate": "0",
  "department": "IT",
  "idNumber": "3345",
  "password": "password",
  "timezone": "America/New_York",
  "title": "Engineer",
  "userName": "testuser@example.com",
  "zipCode": "95926"
}

Example response

{
  "href": "http://appdirect/api/account/v2/subscriptions/a9671d54-6c10-4517-9f8a-0c19025566df/assignments/be1abd0d-fe8d-4b3c-994b-39e86d7f68c2",
  "rel": "self"
}

POST/account/v2/subscriptions/{subscriptionUuid}/assignments/{userUuid}

Create an application assignment for a marketplace user.

Required Scope and Authorization Rules

Scope Rule
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 Allows access as a member of the company that owns the subscription.
ROLE_USER Allows access as the user that owns the subscription.

Parameters

Parameter Type Data Type Default Description
creatorUuid query string Optional parameter and will be ignored if the APIs are accessed using any role except ROLE_PARTNER
*subscriptionUuid path string Unique identifier of the company subscription in the API request
*userUuid path string Unique identifier of the user to assign the application to

Body Parameters

Optional custom user attributes to associate with the created application assignment

SubscriptionCustomAttribute object:

Property Type Description
name string

The key name of an existing subscription custom attribute

values array of string

Values of the custom attributes. If the attribute definition is MULTISELECT, all values must be a subset of the value options defined in the marketplace. If the attribute definition is TEXT, only one value is allowed.

Responses

Status Meaning Description Definition
200 OK Success Link
201 Created Success, subscription created (async)
401 Unauthorized Unauthorized or subscription/user not found
502 Bad Gateway Error occurred array of Error

Delete application assignment

Example request

curl -X DELETE https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments/{userUuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments/{userUuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments/{userUuid}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments/{userUuid}',
{
  method: 'DELETE'

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments/{userUuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments/{userUuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments/{userUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE/account/v2/subscriptions/{subscriptionUuid}/assignments/{userUuid}

Delete a marketplace user's application assignment.

Required Scope and Authorization Rules

Scope Rule
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 Allows access to manage all marketplace data.
ROLE_USER Allows access as the user that owns the subscription.

Parameters

Parameter Type Data Type Default Description
disconnectVoiceConnection query boolean Disconnect voice connection of Boost application
source query string Source of event. Possible values are: APP_SYNC, MICROSOFT_PROVISIONING_MIGRATION
*subscriptionUuid path string Unique identifier of the company subscription in the API request
*userUuid path string Unique identifier of the user to remove the application assignment for

Responses

Status Meaning Description Definition
200 OK Success
204 No Content Account not found
401 Unauthorized Unauthorized or subscription/user not found

Read application assignment count

Example request

curl -X HEAD https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

HEAD https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments',
  method: 'head',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments',
{
  method: 'HEAD',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.head('https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.head 'https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("HEAD");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

HEAD/account/v2/subscriptions/{subscriptionUuid}/assignments

Retrieve the number of users assigned to a subscription.

Required Scope and Authorization Rules

Scope Rule
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 access to read all marketplace data.
ROLE_USER Allows access as a member of the company that owns the subscription.

Parameters

Parameter Type Data Type Default Description
*subscriptionUuid path string Unique identifier of the company subscription in the API request

Responses

Status Meaning Description Definition
200 OK Success
401 Unauthorized Unauthorized or subscription not found

Read application assignment for user and subscription

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments/{userUuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments/{userUuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments/{userUuid}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments/{userUuid}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments/{userUuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments/{userUuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments/{userUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "createdOn": 1480699572448,
  "links": [
    {
      "href": "http://appdirect/api/account/v2/subscriptions/147731c4-5f8b-4d94-937f-d433cd074040/assignments/be1abd0d-fe8d-4b3c-994b-39e86d7f68c2",
      "rel": "self"
    },
    {
      "href": "http://appdirect/api/account/v2/users/be1abd0d-fe8d-4b3c-994b-39e86d7f68c2",
      "rel": "user"
    }
  ],
  "lyncToPhoneVoiceConnection": null,
  "membership": {
    "company": {
      "defaultRole": "USER",
      "enabled": true,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/a9671d54-6c10-4517-9f8a-0c19025566df",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/a9671d54-6c10-4517-9f8a-0c19025566df/memberships",
          "rel": "memberships"
        }
      ],
      "name": "Company 4214173420",
      "phoneNumber": null,
      "picture": "http://localhost:8080/profilePics/http://cdn/company.png",
      "uuid": "a9671d54-6c10-4517-9f8a-0c19025566df",
      "vendor": false
    },
    "enabled": true,
    "lastUsed": false,
    "links": [
      {
        "href": "http://appdirect/api/account/v2/companies/a9671d54-6c10-4517-9f8a-0c19025566df/memberships/be1abd0d-fe8d-4b3c-994b-39e86d7f68c2",
        "rel": "self"
      },
      {
        "href": "http://appdirect/api/account/v2/users/be1abd0d-fe8d-4b3c-994b-39e86d7f68c2",
        "rel": "user"
      },
      {
        "href": "http://appdirect/api/account/v2/companies/a9671d54-6c10-4517-9f8a-0c19025566df",
        "rel": "company"
      }
    ],
    "metadata": {
      "mosi_username": null
    },
    "mosiUser": null,
    "position": null,
    "roles": [
      "ROLE_BILLING_ADMIN",
      "ROLE_SYS_ADMIN"
    ],
    "user": {
      "activated": true,
      "allowLogin": true,
      "boostUser": null,
      "email": "susan.wilson@company1702251969.com",
      "firstName": "Susan",
      "lastName": "Wilson",
      "ldapId": null,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/users/be1abd0d-fe8d-4b3c-994b-39e86d7f68c2",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/users/be1abd0d-fe8d-4b3c-994b-39e86d7f68c2/memberships",
          "rel": "memberships"
        }
      ],
      "metadata": {
        "apsUid": null
      },
      "picture": null,
      "roles": [
        "ROLE_USER"
      ],
      "userName": "susan.wilson",
      "uuid": "be1abd0d-fe8d-4b3c-994b-39e86d7f68c2"
    }
  },
  "status": "ACTIVE",
  "user": {
    "activated": true,
    "allowLogin": true,
    "boostUser": null,
    "email": "susan.wilson@company1702251969.com",
    "firstName": "Susan",
    "lastName": "Wilson",
    "ldapId": null,
    "links": [
      {
        "href": "http://appdirect/api/account/v2/users/be1abd0d-fe8d-4b3c-994b-39e86d7f68c2",
        "rel": "self"
      },
      {
        "href": "http://appdirect/api/account/v2/users/be1abd0d-fe8d-4b3c-994b-39e86d7f68c2/memberships",
        "rel": "memberships"
      }
    ],
    "metadata": {
      "apsUid": null
    },
    "picture": null,
    "roles": [
      "ROLE_USER"
    ],
    "userName": "susan.wilson",
    "uuid": "be1abd0d-fe8d-4b3c-994b-39e86d7f68c2"
  },
  "uuid": "86b95a62-15d6-4a52-a4a6-1be619073428"
}

GET/account/v2/subscriptions/{subscriptionUuid}/assignments/{userUuid}

Retrieve a marketplace user's application assignment for a given subscription.

Required Scope and Authorization Rules

Scope Rule
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 access as a member of the company that owns the subscription.
ROLE_USER Allows access as a user and owner of the user entitlement.

Parameters

Parameter Type Data Type Default Description
*subscriptionUuid path string Unique identifier of the company subscription in the API request
*userUuid path string Unique identifier of the user in the API request

Responses

Status Meaning Description Definition
200 OK Success SubscriptionAssignmentAccount
401 Unauthorized Unauthorized
404 Not Found Subscription, user or assignment not found

List application assignments for subscription

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/assignments");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "createdOn": 1480699568720,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/subscriptions/bf0e6097-af4f-489a-9cbc-8f6d20362726/assignments/6558e384-5d62-4412-bb5d-0e2ad7ae3471",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/users/6558e384-5d62-4412-bb5d-0e2ad7ae3471",
          "rel": "user"
        }
      ],
      "lyncToPhoneVoiceConnection": null,
      "membership": {
        "company": {
          "defaultRole": "USER",
          "enabled": true,
          "links": [
            {
              "href": "http://appdirect/api/account/v2/companies/4af63313-a90d-48ff-88fe-02a550f4c90e",
              "rel": "self"
            },
            {
              "href": "http://appdirect/api/account/v2/companies/4af63313-a90d-48ff-88fe-02a550f4c90e/memberships",
              "rel": "memberships"
            }
          ],
          "name": "Company 5730658238",
          "phoneNumber": null,
          "picture": "http://localhost:8080/profilePics/http://cdn/company.png",
          "uuid": "4af63313-a90d-48ff-88fe-02a550f4c90e",
          "vendor": false
        },
        "enabled": true,
        "lastUsed": false,
        "links": [
          {
            "href": "http://appdirect/api/account/v2/companies/4af63313-a90d-48ff-88fe-02a550f4c90e/memberships/6558e384-5d62-4412-bb5d-0e2ad7ae3471",
            "rel": "self"
          },
          {
            "href": "http://appdirect/api/account/v2/users/6558e384-5d62-4412-bb5d-0e2ad7ae3471",
            "rel": "user"
          },
          {
            "href": "http://appdirect/api/account/v2/companies/4af63313-a90d-48ff-88fe-02a550f4c90e",
            "rel": "company"
          }
        ],
        "metadata": {
          "mosi_username": null
        },
        "mosiUser": null,
        "position": null,
        "roles": [
          "ROLE_BILLING_ADMIN",
          "ROLE_SYS_ADMIN"
        ],
        "user": {
          "activated": true,
          "allowLogin": true,
          "boostUser": null,
          "email": "barbara.johnson@company8381074022.com",
          "firstName": "Barbara",
          "lastName": "Johnson",
          "ldapId": null,
          "links": [
            {
              "href": "http://appdirect/api/account/v2/users/6558e384-5d62-4412-bb5d-0e2ad7ae3471",
              "rel": "self"
            },
            {
              "href": "http://appdirect/api/account/v2/users/6558e384-5d62-4412-bb5d-0e2ad7ae3471/memberships",
              "rel": "memberships"
            }
          ],
          "metadata": {
            "apsUid": null
          },
          "picture": null,
          "roles": [
            "ROLE_USER"
          ],
          "userName": "barbara.johnson",
          "uuid": "6558e384-5d62-4412-bb5d-0e2ad7ae3471"
        }
      },
      "status": "ACTIVE",
      "user": {
        "activated": true,
        "allowLogin": true,
        "boostUser": null,
        "email": "barbara.johnson@company8381074022.com",
        "firstName": "Barbara",
        "lastName": "Johnson",
        "ldapId": null,
        "links": [
          {
            "href": "http://appdirect/api/account/v2/users/6558e384-5d62-4412-bb5d-0e2ad7ae3471",
            "rel": "self"
          },
          {
            "href": "http://appdirect/api/account/v2/users/6558e384-5d62-4412-bb5d-0e2ad7ae3471/memberships",
            "rel": "memberships"
          }
        ],
        "metadata": {
          "apsUid": null
        },
        "picture": null,
        "roles": [
          "ROLE_USER"
        ],
        "userName": "barbara.johnson",
        "uuid": "6558e384-5d62-4412-bb5d-0e2ad7ae3471"
      },
      "uuid": "def48c3c-f043-42cc-9b2b-718986ed7c49"
    }
  ],
  "links": [],
  "page": {
    "number": 0,
    "size": 50,
    "totalElements": 1,
    "totalPages": 1
  }
}

GET/account/v2/subscriptions/{subscriptionUuid}/assignments

Retrieve the list of marketplace application assignments for the given subscription.

Required Scope and Authorization Rules

Scope Rule
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 access to read all marketplace data.
ROLE_USER Allows access as a member of the company that owns the subscription.

Parameters

Parameter Type Data Type Default Description
page query integer 0 Zero-based page index
searchText query string Search term used to search on different assignment fields
size query integer 50 The number of search results to return per page
*subscriptionUuid path string Unique identifier of the company subscription in the API request

Responses

Status Meaning Description Definition
200 OK Success PagedSubscriptionAssignmentAccountV2
401 Unauthorized Unauthorized
404 Not Found Subscription or assignments not found

Subscription Assignments (Reseller)

Unassign product

Example request

curl -X DELETE https://{marketplaceURL}/api/appReseller/v1/subscriptionAssignments/{subscriptionAssignmentId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/appReseller/v1/subscriptionAssignments/{subscriptionAssignmentId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appReseller/v1/subscriptionAssignments/{subscriptionAssignmentId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appReseller/v1/subscriptionAssignments/{subscriptionAssignmentId}',
{
  method: 'DELETE'

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/appReseller/v1/subscriptionAssignments/{subscriptionAssignmentId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/appReseller/v1/subscriptionAssignments/{subscriptionAssignmentId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appReseller/v1/subscriptionAssignments/{subscriptionAssignmentId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE/appReseller/v1/subscriptionAssignments/{subscriptionAssignmentId}

Unassign a product from a user.

Required Scope and Authorization Rules

Scope Rule
ROLE_RESELLER Allows access as a Reseller for the company.

Parameters

Parameter Type Data Type Default Description
*subscriptionAssignmentId path string Subscription Assignment ID.

Responses

Status Meaning Description Definition
204 No Content Unassignment request accepted or assignment not found
400 Bad Request Assignment application not enabled for usage
401 Unauthorized User not authenticated
409 Conflict Assignment status not compatible

List subscription assignments

Example request

curl -X GET https://{marketplaceURL}/api/appReseller/v1/subscriptionAssignments?subscriptionId=type,string \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/appReseller/v1/subscriptionAssignments?subscriptionId=type,string HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appReseller/v1/subscriptionAssignments',
  method: 'get',
  data: '?subscriptionId=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appReseller/v1/subscriptionAssignments?subscriptionId=type,string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/appReseller/v1/subscriptionAssignments', params={
  'subscriptionId': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/appReseller/v1/subscriptionAssignments',
  params: {
  'subscriptionId' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appReseller/v1/subscriptionAssignments?subscriptionId=type,string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "createdOn": 1529083173000,
      "id": "63bf81c2-8e01-48b7-a8b1-46a0efa0e823",
      "status": "ACTIVE",
      "subscriptionId": "386626c0-53e2-4515-8450-4a720bb5d029",
      "user": {
        "firstName": "Michael",
        "id": "386626c0-53e2-4515-8450-4a720bb5d029",
        "lastName": "Jordan"
      }
    },
    {
      "createdOn": 1527863555000,
      "id": "5cdf116b-0603-4d26-88d8-5e1afd625931",
      "status": "CANCELLED",
      "subscriptionId": "386626c0-53e2-4515-8450-4a720bb5d029",
      "user": {
        "firstName": "Mary",
        "id": "bb14ace3-4490-47e8-84f1-ab6a85da69e5",
        "lastName": "Gonzalez"
      }
    }
  ],
  "page": {
    "number": 1,
    "size": 50,
    "totalElements": 2,
    "totalPages": 1
  }
}

GET/appReseller/v1/subscriptionAssignments

Retrieves a list of assignments for a given subscription. You can filter the list using optional query parameters.

Required Scope and Authorization Rules

Scope Rule
ROLE_RESELLER Allows access as a Reseller for the company.

Parameters

Parameter Type Data Type Default Description
createdOn query string Date filter, defined by upper or lower inclusive limits, in Unix timestamp format. Acceptable values are: gte([timestamp]) - 'greater than or equal to'; lte([timestamp]) - 'less than or equal to'.
number query integer Page number starting at 1. The default value is 1.
size query integer Number of results per page. The default value is 50.
sort query string Sort field and order. For ascending sort order, use the '+[FieldName]' format. For descending order, use '-[FieldName]' format. The default value is '-createdOn'.
status query string Subscription status (valid values are PENDING_REQUIRED_DATA, PENDING_SEAT_AVAILABILITY, PENDING_USER_ACTIVATION, PENDING_REMOTE_CREATION, SUBSCRIPTION_SUSPENDED_FREE_TRIAL_EXPIRED, SUBSCRIPTION_SUSPENDED_RENEW_CONTRACT, SUBSCRIPTION_SUSPENDED_PAY_INVOICE, SUBSCRIPTION_SUSPENDED_MANUAL_SUSPENSION, FAILED, ACTIVE, PENDING_REMOTE_CANCELLATION, CANCELLED). The filter format is: in([status], ...).
*subscriptionId query string Subscription ID purchased by the Reseller company
userId query string User ID. Use the in([id], ...) format to filter by multiple IDs, or the userId=[id] format to filter by a single ID.

Responses

Status Meaning Description Definition
200 OK Success AppResellerSubscriptionAssignmentList
401 Unauthorized Unauthorized

Assign product

Example request

curl -X POST https://{marketplaceURL}/api/appReseller/v1/subscriptionAssignments \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/appReseller/v1/subscriptionAssignments HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appReseller/v1/subscriptionAssignments',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "subscriptionId": "386626c0-53e2-4515-8450-4a720bb5d029",
  "userId": "2c061df6-4313-45e0-8709-a0ca19b0aaa3"
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appReseller/v1/subscriptionAssignments',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/appReseller/v1/subscriptionAssignments', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/appReseller/v1/subscriptionAssignments',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appReseller/v1/subscriptionAssignments");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "subscriptionId": "386626c0-53e2-4515-8450-4a720bb5d029",
  "userId": "2c061df6-4313-45e0-8709-a0ca19b0aaa3"
}

Example response

{
  "createdOn": 1529083173000,
  "id": "63bf81c2-8e01-48b7-a8b1-46a0efa0e823",
  "status": "ACTIVE",
  "subscriptionId": "386626c0-53e2-4515-8450-4a720bb5d029",
  "user": {
    "firstName": "Michael",
    "id": "386626c0-53e2-4515-8450-4a720bb5d029",
    "lastName": "Jordan"
  }
}

POST/appReseller/v1/subscriptionAssignments

Assign a seat of a purchased product to a user who is a member of a linked marketplace company

Required Scope and Authorization Rules

Scope Rule
ROLE_RESELLER Allows access as a Reseller for the company.

Body Parameters

Information about user and subscription to be assigned

AppResellerSubscriptionAssignmentRequestWS object:

Property Type Description
subscriptionId string

ID of the product subscription to assign to the user

userId string

ID of the user to whom the product will be assigned

Responses

Status Meaning Description Definition
200 OK Assignment created AppResellerSubscriptionAssignmentWS
401 Unauthorized Unauthorized
409 Conflict Conflict SubscriptionAssociationConflictResponse

Subscriptions

Change subscription details

Example request

curl -X PUT https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions/{subscriptionId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions/{subscriptionId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions/{subscriptionId}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "type": "object",
      "title": "Subscription",
      "properties": {
        "assignedUsers": {
          "description": "Number of users assigned to subscription",
          "type": "number",
          "nullable": true
        },
        "bundleApplicationId": {
          "description": "Bundle ID. Specify during subscription creation if you want the subscription to be part of a bundle. Retrieve a list of bundle IDs with the [List all bundles](#list-all-bundles) request, and then specify the desired ID here. Only supported for the [Create a subscription](#create-a-subscription) endpoint and not supported for any other endpoints.",
          "type": "number",
          "nullable": true
        },
        "company": {
          "allOf": [
            {
              "type": "object",
              "title": "LinkWS",
              "properties": {
                "href": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                }
              },
              "example": {
                "href": "...",
                "id": "..."
              },
              "nullable": true
            },
            {
              "description": "Link to company information"
            }
          ]
        },
        "creationDate": {
          "description": "Subscription creation date",
          "type": "number",
          "nullable": true
        },
        "edition": {
          "allOf": [
            {
              "type": "object",
              "title": "LinkWS",
              "properties": {
                "href": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                }
              },
              "example": {
                "href": "...",
                "id": "..."
              },
              "nullable": true
            },
            {
              "description": "Link to edition information"
            }
          ]
        },
        "endDate": {
          "description": "Subscription end date",
          "type": "number",
          "nullable": true
        },
        "externalAccountId": {
          "description": "External account identifier (from vendor)",
          "type": "string",
          "nullable": true
        },
        "externalId": {
          "description": "External ID for a subscription. Not used to change or create a subscription. If a subscription has an external ID, the ID is included in the responses to the [list subscription](#list-subscriptions) or [read subscription](#retrieve-a-subscription) APIs. To set an external ID of a subscription, use the [Update subscriptions](#update-subscriptions) API.",
          "type": "string",
          "nullable": true
        },
        "id": {
          "description": "ID",
          "type": "string",
          "nullable": true
        },
        "internalId": {
          "description": "The UUID for a subscription",
          "type": "string",
          "nullable": true
        },
        "label": {
          "description": "Label for a subscription",
          "type": "string",
          "nullable": true
        },
        "maxUsers": {
          "description": "Maximum number of users allowed to be assigned to subscription",
          "type": "number",
          "nullable": true
        },
        "order": {
          "allOf": [
            {
              "allOf": [
                {
                  "description": "Resource links",
                  "type": "object",
                  "title": "BaseOrder",
                  "properties": {
                    "_embedded": {},
                    "company": {},
                    "currency": {},
                    "endDate": {},
                    "endOfDiscountDate": {},
                    "frequency": {},
                    "id": {},
                    "links": {},
                    "nextBillingDate": {},
                    "parentSubscriptionId": {},
                    "referenceCode": {},
                    "salesSupportCompany": {},
                    "salesSupportUser": {},
                    "serviceStartDate": {},
                    "startDate": {},
                    "status": {},
                    "totalPrice": {},
                    "type": {},
                    "user": {}
                  },
                  "example": {
                    "_embedded": {},
                    "company": {},
                    "currency": "...",
                    "endDate": 12345,
                    "endOfDiscountDate": 12345,
                    "frequency": "...",
                    "id": 12345,
                    "links": [],
                    "nextBillingDate": 12345,
                    "parentSubscriptionId": 12345,
                    "referenceCode": "...",
                    "salesSupportCompany": {},
                    "salesSupportUser": {},
                    "serviceStartDate": 12345,
                    "startDate": 12345,
                    "status": "...",
                    "totalPrice": 12345,
                    "type": "...",
                    "user": {}
                  },
                  "nullable": true
                },
                {
                  "type": "object",
                  "title": "Order",
                  "properties": {
                    "activated": {},
                    "contract": {},
                    "customAttributes": {},
                    "discount": {},
                    "discountId": {},
                    "nextOrder": {},
                    "oneTimeOrders": {},
                    "orderLines": {},
                    "parameters": {},
                    "paymentPlan": {},
                    "paymentPlanId": {},
                    "previousOrder": {}
                  },
                  "example": {
                    "_embedded": {},
                    "activated": true,
                    "company": {},
                    "contract": {},
                    "currency": "...",
                    "customAttributes": [],
                    "discount": {},
                    "discountId": 12345,
                    "endDate": 12345,
                    "endOfDiscountDate": 12345,
                    "frequency": "...",
                    "id": 12345,
                    "links": [],
                    "nextBillingDate": 12345,
                    "nextOrder": {},
                    "oneTimeOrders": [],
                    "orderLines": [],
                    "parameters": [],
                    "paymentPlan": {},
                    "paymentPlanId": 12345,
                    "previousOrder": {},
                    "referenceCode": "...",
                    "salesSupportUser": {},
                    "startDate": 12345,
                    "status": "...",
                    "totalPrice": 12345,
                    "type": "...",
                    "user": {}
                  },
                  "nullable": true
                }
              ]
            },
            {
              "description": "Current order"
            }
          ]
        },
        "product": {
          "allOf": [
            {
              "type": "object",
              "title": "LinkWS",
              "properties": {
                "href": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                }
              },
              "example": {
                "href": "...",
                "id": "..."
              },
              "nullable": true
            },
            {
              "description": "Link to product information"
            }
          ]
        },
        "redirectUrl": {
          "description": "Interactive endpoint URL",
          "type": "string",
          "nullable": true
        },
        "status": {
          "description": "Subscription status (Valid values are INITIALIZED, FAILED, FREE_TRIAL, FREE_TRIAL_EXPIRED, ACTIVE, SUSPENDED, or CANCELLED.)",
          "type": "string",
          "nullable": true
        },
        "upcomingOrder": {
          "allOf": [
            {
              "allOf": [
                {
                  "description": "Resource links",
                  "type": "object",
                  "title": "BaseOrder",
                  "properties": {
                    "_embedded": {},
                    "company": {},
                    "currency": {},
                    "endDate": {},
                    "endOfDiscountDate": {},
                    "frequency": {},
                    "id": {},
                    "links": {},
                    "nextBillingDate": {},
                    "parentSubscriptionId": {},
                    "referenceCode": {},
                    "salesSupportCompany": {},
                    "salesSupportUser": {},
                    "serviceStartDate": {},
                    "startDate": {},
                    "status": {},
                    "totalPrice": {},
                    "type": {},
                    "user": {}
                  },
                  "example": {
                    "_embedded": {},
                    "company": {},
                    "currency": "...",
                    "endDate": 12345,
                    "endOfDiscountDate": 12345,
                    "frequency": "...",
                    "id": 12345,
                    "links": [],
                    "nextBillingDate": 12345,
                    "parentSubscriptionId": 12345,
                    "referenceCode": "...",
                    "salesSupportCompany": {},
                    "salesSupportUser": {},
                    "serviceStartDate": 12345,
                    "startDate": 12345,
                    "status": "...",
                    "totalPrice": 12345,
                    "type": "...",
                    "user": {}
                  },
                  "nullable": true
                },
                {
                  "type": "object",
                  "title": "Order",
                  "properties": {
                    "activated": {},
                    "contract": {},
                    "customAttributes": {},
                    "discount": {},
                    "discountId": {},
                    "nextOrder": {},
                    "oneTimeOrders": {},
                    "orderLines": {},
                    "parameters": {},
                    "paymentPlan": {},
                    "paymentPlanId": {},
                    "previousOrder": {}
                  },
                  "example": {
                    "_embedded": {},
                    "activated": true,
                    "company": {},
                    "contract": {},
                    "currency": "...",
                    "customAttributes": [],
                    "discount": {},
                    "discountId": 12345,
                    "endDate": 12345,
                    "endOfDiscountDate": 12345,
                    "frequency": "...",
                    "id": 12345,
                    "links": [],
                    "nextBillingDate": 12345,
                    "nextOrder": {},
                    "oneTimeOrders": [],
                    "orderLines": [],
                    "parameters": [],
                    "paymentPlan": {},
                    "paymentPlanId": 12345,
                    "previousOrder": {},
                    "referenceCode": "...",
                    "salesSupportUser": {},
                    "startDate": 12345,
                    "status": "...",
                    "totalPrice": 12345,
                    "type": "...",
                    "user": {}
                  },
                  "nullable": true
                }
              ]
            },
            {
              "description": "Upcoming order"
            }
          ]
        },
        "user": {
          "allOf": [
            {
              "type": "object",
              "title": "LinkWS",
              "properties": {
                "href": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                }
              },
              "example": {
                "href": "...",
                "id": "..."
              },
              "nullable": true
            },
            {
              "description": "Link to user information"
            }
          ]
        }
      },
      "example": {
        "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": {
            "cancellationPeriodLimit": null,
            "endOfContractDate": 123451232,
            "endOfContractGracePeriod": null,
            "gracePeriodEndDate": null,
            "minimumServiceLength": 24,
            "renewal": null,
            "terminationFee": {
              "description": "Fee",
              "estimatedCost": 324.56,
              "percentage": 100,
              "price": null,
              "type": "PERCENTAGE"
            }
          },
          "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": "...",
              "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": "..."
          }
        },
        "user": {
          "href": "...",
          "id": "..."
        }
      },
      "nullable": true
    },
    {
      "description": "Subscription data object"
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions/{subscriptionId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions/{subscriptionId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions/{subscriptionId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions/{subscriptionId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "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": {
      "cancellationPeriodLimit": null,
      "endOfContractDate": 123451232,
      "endOfContractGracePeriod": null,
      "gracePeriodEndDate": null,
      "minimumServiceLength": 24,
      "renewal": null,
      "terminationFee": {
        "description": "Fee",
        "estimatedCost": 324.56,
        "percentage": 100,
        "price": null,
        "type": "PERCENTAGE"
      }
    },
    "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": "...",
        "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": "..."
    }
  },
  "user": {
    "href": "...",
    "id": "..."
  }
}

Example response

{
  "assignedUsers": 1,
  "company": {
    "href": "http://appdirect/api/account/v1/companies/e83cd3d6-7865-4fc2-9d7c-603ad17dd639",
    "id": "e83cd3d6-7865-4fc2-9d7c-603ad17dd639"
  },
  "creationDate": 1481002406580,
  "edition": {
    "href": "http://appdirect/api/marketplace/v1/products/2/editions/2",
    "id": "2"
  },
  "endDate": null,
  "externalAccountId": "fdad1b12-c13f-416e-97a2-6330451da1b9",
  "id": "1b577640-9b77-47bc-beb8-ed59accb4836",
  "maxUsers": 10,
  "order": {
    "activated": false,
    "company": {
      "href": "http://appdirect/api/account/v1/companies/e83cd3d6-7865-4fc2-9d7c-603ad17dd639",
      "id": "e83cd3d6-7865-4fc2-9d7c-603ad17dd639"
    },
    "contract": null,
    "currency": "USD",
    "discount": null,
    "discountId": null,
    "endDate": null,
    "endOfDiscountDate": null,
    "frequency": "MONTHLY",
    "id": 3,
    "links": [
      {
        "href": "http://appdirect/api/billing/v1/subscriptions/1b577640-9b77-47bc-beb8-ed59accb4836",
        "rel": "subscription"
      }
    ],
    "nextBillingDate": 1483599600000,
    "nextOrder": null,
    "oneTimeOrders": [
      {
        "company": null,
        "currency": "USD",
        "endDate": 1483599600000,
        "endOfDiscountDate": null,
        "frequency": "MONTHLY",
        "id": 2,
        "links": [],
        "nextBillingDate": 1483599600000,
        "paymentPlan": {
          "href": "http://appdirect/api/marketplace/v1/products/2/editions/2/paymentPlans/2",
          "id": "2"
        },
        "referenceCode": null,
        "salesSupportUser": null,
        "startDate": 1480921200000,
        "status": "ONE_TIME",
        "totalPrice": 0,
        "type": "CREDIT",
        "user": null
      }
    ],
    "orderLines": [
      {
        "description": "Test App 1 - null - Per User Fee",
        "id": 3,
        "listingPrice": 10,
        "price": 10,
        "quantity": 10,
        "totalPrice": 100,
        "type": "ITEM",
        "unit": "USER"
      }
    ],
    "parameters": [],
    "paymentPlan": {
      "allowCustomUsage": false,
      "contract": {
        "alignWithParentCycleStartDate": false,
        "autoExtensionPricingId": null,
        "blockContractDowngrades": false,
        "blockContractUpgrades": false,
        "blockSwitchToShorterContract": false,
        "cancellationPeriodLimit": null,
        "endOfContractGracePeriod": null,
        "gracePeriod": null,
        "minimumServiceLength": null,
        "terminationFee": null
      },
      "costs": [
        {
          "amount": {
            "USD": 10
          },
          "blockContractDecrease": false,
          "blockContractIncrease": false,
          "blockOriginalContractDecrease": false,
          "id": 2,
          "increment": 1,
          "maxUnits": null,
          "meteredUsage": false,
          "minUnits": 0,
          "pricePerIncrement": false,
          "pricingStrategy": "UNIT",
          "unit": "USER",
          "unitDependency": null
        }
      ],
      "discount": null,
      "frequency": "MONTHLY",
      "href": "http://appdirect/api/marketplace/v1/products/2/editions/2/paymentPlans/2",
      "id": 2,
      "isPrimaryPrice": false,
      "keepBillDateOnUsageChange": false,
      "primaryPrice": false,
      "separatePrepaid": false,
      "uuid": "eaca1aa5-4c4f-44cb-8cf4-eb0aa9267273"
    },
    "paymentPlanId": 2,
    "previousOrder": {
      "href": "http://appdirect/api/billing/v1/orders/1",
      "id": "1"
    },
    "referenceCode": null,
    "salesSupportUser": null,
    "startDate": 1480921200000,
    "status": "ACTIVE",
    "totalPrice": 0,
    "type": "MIGRATION",
    "user": {
      "href": "http://appdirect/api/account/v1/users/c47d0fd7-b67a-4e07-84f8-f93dfafbeecc",
      "id": "c47d0fd7-b67a-4e07-84f8-f93dfafbeecc"
    }
  },
  "product": {
    "href": "http://appdirect/api/marketplace/v1/products/2",
    "id": "2"
  },
  "redirectUrl": null,
  "status": "ACTIVE",
  "upcomingOrder": null,
  "user": {
    "href": "http://appdirect/api/account/v1/users/c47d0fd7-b67a-4e07-84f8-f93dfafbeecc",
    "id": "c47d0fd7-b67a-4e07-84f8-f93dfafbeecc"
  }
}

PUT/billing/v1/companies/{companyId}/users/{userId}/subscriptions/{subscriptionId}

Change the specified subscription for the specified user and company with the provided data.
You cannot perform assisted sales, in which the buyer purchases a product for or on behalf of someone else, through the API.
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.

Parameters

Parameter Type Data Type Default Description
*companyId path string User's company ID
sendNotification query boolean true Send notification of the subscription's creation. Default value is true.
*subscriptionId path string Subscription ID
*userId path string User ID

Body Parameters

Subscription data object

Subscription object:

Property Type Description
assignedUsers number

Number of users assigned to subscription

bundleApplicationId number

Bundle ID. Specify during subscription creation if you want the subscription to be part of a bundle. Retrieve a list of bundle IDs with the List all bundles request, and then specify the desired ID here. Only supported for the Create a subscription endpoint and not supported for any other endpoints.

company LinkWS

Link to company information

creationDate number

Subscription creation date

edition LinkWS

Link to edition information

endDate number

Subscription end date

externalAccountId string

External account identifier (from vendor)

externalId string

External ID for a subscription. Not used to change or create a subscription. If a subscription has an external ID, the ID is included in the responses to the list subscription or read subscription APIs. To set an external ID of a subscription, use the Update subscriptions API.

id string

ID

internalId string

The UUID for a subscription

label string

Label for a subscription

maxUsers number

Maximum number of users allowed to be assigned to subscription

order Order

Current order

product LinkWS

Link to product information

redirectUrl string

Interactive endpoint URL

status string

Subscription status (Valid values are INITIALIZED, FAILED, FREE_TRIAL, FREE_TRIAL_EXPIRED, ACTIVE, SUSPENDED, or CANCELLED.)

upcomingOrder Order

Upcoming order

user LinkWS

Link to user information

Responses

Status Meaning Description Definition
200 OK OK Subscription
400 Bad Request Bad Request
404 Not Found Not Found
409 Conflict Conflict

Create a subscription

Example request

curl -X POST https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "type": "object",
      "title": "Subscription",
      "properties": {
        "assignedUsers": {
          "description": "Number of users assigned to subscription",
          "type": "number",
          "nullable": true
        },
        "bundleApplicationId": {
          "description": "Bundle ID. Specify during subscription creation if you want the subscription to be part of a bundle. Retrieve a list of bundle IDs with the [List all bundles](#list-all-bundles) request, and then specify the desired ID here. Only supported for the [Create a subscription](#create-a-subscription) endpoint and not supported for any other endpoints.",
          "type": "number",
          "nullable": true
        },
        "company": {
          "allOf": [
            {
              "type": "object",
              "title": "LinkWS",
              "properties": {
                "href": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                }
              },
              "example": {
                "href": "...",
                "id": "..."
              },
              "nullable": true
            },
            {
              "description": "Link to company information"
            }
          ]
        },
        "creationDate": {
          "description": "Subscription creation date",
          "type": "number",
          "nullable": true
        },
        "edition": {
          "allOf": [
            {
              "type": "object",
              "title": "LinkWS",
              "properties": {
                "href": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                }
              },
              "example": {
                "href": "...",
                "id": "..."
              },
              "nullable": true
            },
            {
              "description": "Link to edition information"
            }
          ]
        },
        "endDate": {
          "description": "Subscription end date",
          "type": "number",
          "nullable": true
        },
        "externalAccountId": {
          "description": "External account identifier (from vendor)",
          "type": "string",
          "nullable": true
        },
        "externalId": {
          "description": "External ID for a subscription. Not used to change or create a subscription. If a subscription has an external ID, the ID is included in the responses to the [list subscription](#list-subscriptions) or [read subscription](#retrieve-a-subscription) APIs. To set an external ID of a subscription, use the [Update subscriptions](#update-subscriptions) API.",
          "type": "string",
          "nullable": true
        },
        "id": {
          "description": "ID",
          "type": "string",
          "nullable": true
        },
        "internalId": {
          "description": "The UUID for a subscription",
          "type": "string",
          "nullable": true
        },
        "label": {
          "description": "Label for a subscription",
          "type": "string",
          "nullable": true
        },
        "maxUsers": {
          "description": "Maximum number of users allowed to be assigned to subscription",
          "type": "number",
          "nullable": true
        },
        "order": {
          "allOf": [
            {
              "description": "Resource links",
              "type": "object",
              "title": "Order",
              "properties": {
                "_embedded": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "object",
                    "nullable": true
                  },
                  "nullable": true
                },
                "activated": {
                  "description": "True if the subscription has been activated",
                  "type": "boolean"
                },
                "company": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to company information."
                },
                "contract": {
                  "type": "object",
                  "title": "OrderContract",
                  "properties": {
                    "alignWithParentCycleStartDate": {},
                    "autoExtensionPricingUuid": {},
                    "blockContractDowngrades": {},
                    "blockContractUpgrades": {},
                    "blockSwitchToShorterContract": {},
                    "cancellationPeriodLimit": {},
                    "continueWithoutContract": {},
                    "endOfContractDate": {},
                    "endOfContractGracePeriod": {},
                    "gracePeriodEndDate": {},
                    "keepContractDateOnPlanChange": {},
                    "minimumServiceLength": {},
                    "renewal": {},
                    "terminationFee": {},
                    "unitTerms": {}
                  },
                  "example": {
                    "alignWithParentCycleStartDate": true,
                    "autoExtensionPricingUuid": "0a12c84d-984f-4f64-943b-8e6f47a28d55",
                    "blockContractDowngrades": true,
                    "blockContractUpgrades": false,
                    "blockSwitchToShorterContract": true,
                    "cancellationPeriodLimit": null,
                    "continueWithoutContract": true,
                    "endOfContractDate": 1588789800000,
                    "endOfContractGracePeriod": null,
                    "gracePeriodEndDate": null,
                    "keepContractDateOnPlanChange": false,
                    "minimumServiceLength": 24,
                    "renewal": null,
                    "terminationFee": {},
                    "unitTerms": []
                  },
                  "nullable": true,
                  "description": "The contract terms of the order, if applicable. If the order does not have contract terms, this field is null."
                },
                "currency": {
                  "description": "Currency.",
                  "type": "string",
                  "nullable": true
                },
                "customAttributes": {
                  "description": "List of custom attributes associated with this order",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "title": "CustomAttribute",
                    "properties": {},
                    "example": {}
                  }
                },
                "discount": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to the discount applied to this order (optional)"
                },
                "discountId": {
                  "description": "The unique identifier for the discount applied to this order",
                  "type": "number",
                  "nullable": true
                },
                "endDate": {
                  "description": "Order end date.",
                  "type": "number",
                  "nullable": true
                },
                "endOfDiscountDate": {
                  "description": "Discount end date.",
                  "type": "number",
                  "nullable": true
                },
                "frequency": {
                  "description": "Frequency.",
                  "type": "string",
                  "nullable": true
                },
                "id": {
                  "description": "ID.",
                  "type": "number",
                  "nullable": true
                },
                "links": {
                  "description": "Resource links",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "title": "Link",
                    "properties": {},
                    "example": {},
                    "nullable": true
                  }
                },
                "nextBillingDate": {
                  "description": "Next billing date for the order",
                  "type": "number",
                  "nullable": true
                },
                "nextOrder": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to the next order for this subscription"
                },
                "oneTimeOrders": {
                  "description": "List of one time orders associated with this subscription order",
                  "type": "array",
                  "items": {
                    "description": "Resource links",
                    "type": "object",
                    "title": "OrderListing",
                    "properties": {},
                    "example": {},
                    "nullable": true
                  }
                },
                "orderLines": {
                  "description": "List of order lines for this subscription order",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "title": "OrderLine",
                    "properties": {},
                    "example": {}
                  }
                },
                "parameters": {
                  "description": "List of custom parameters associated with this order",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "title": "Parameter",
                    "properties": {},
                    "example": {}
                  }
                },
                "parentSubscriptionId": {
                  "description": "Parent subscription ID of an add-on subscription",
                  "type": "number",
                  "nullable": true
                },
                "paymentPlan": {
                  "description": "Payment plan for this order",
                  "type": "object",
                  "title": "PaymentPlan",
                  "properties": {
                    "allowCustomUsage": {
                      "description": "Custom usage allowed",
                      "type": "boolean"
                    },
                    "contract": {},
                    "cost": {
                      "description": "List of plan costs",
                      "type": "array",
                      "items": {}
                    },
                    "discount": {},
                    "frequency": {
                      "description": "Billing frequency: MONTHLY, QUARTERLY, SIX_MONTHS, YEARLY, TWO_YEARS, THREE_YEARS, DAILY",
                      "type": "string"
                    },
                    "href": {
                      "description": "URL to payment plan details",
                      "type": "string"
                    },
                    "id": {
                      "description": "ID",
                      "type": "number"
                    },
                    "isPrimaryPrice": {
                      "description": "Is primary price",
                      "type": "boolean"
                    },
                    "keepBillDateOnUsageChange": {
                      "description": "Keep bill date on usage change",
                      "type": "boolean"
                    },
                    "separatePrepaid": {
                      "description": "Separate prepaid",
                      "type": "boolean"
                    },
                    "tld": {
                      "description": "If plan is part of a domain reseller product, this is the tld this plan offers",
                      "type": "string"
                    },
                    "uuid": {
                      "description": "Unique identifier",
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "example": {
                    "allowCustomUsage": true,
                    "contract": {},
                    "cost": [],
                    "discount": {},
                    "frequency": "...",
                    "href": "...",
                    "id": 12345,
                    "isPrimaryPrice": true,
                    "keepBillDateOnUsageChange": true,
                    "separatePrepaid": true,
                    "tld": "...",
                    "uuid": "..."
                  }
                },
                "paymentPlanId": {
                  "description": "The unique identifier for the payment plan for this order",
                  "type": "number",
                  "nullable": true
                },
                "previousOrder": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to the previous order for this subscription"
                },
                "referenceCode": {
                  "description": "Reference code",
                  "type": "string",
                  "nullable": true
                },
                "salesSupportCompany": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to sales support company information"
                },
                "salesSupportUser": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to sales support user information"
                },
                "serviceStartDate": {
                  "description": "Service start date for the order",
                  "type": "number",
                  "nullable": true
                },
                "startDate": {
                  "description": "Order start date",
                  "type": "number",
                  "nullable": true
                },
                "status": {
                  "description": "Order status",
                  "type": "string",
                  "nullable": true
                },
                "totalPrice": {
                  "description": "Total price for the order",
                  "type": "number",
                  "nullable": true
                },
                "type": {
                  "description": "Type.",
                  "type": "string",
                  "nullable": true
                },
                "user": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to user information"
                }
              },
              "example": {
                "_embedded": {
                  "property1": {},
                  "property2": {}
                },
                "activated": true,
                "company": {
                  "href": "...",
                  "id": "..."
                },
                "contract": {},
                "currency": "...",
                "customAttributes": [
                  {
                    "attributeType": "TEXT",
                    "name": "...",
                    "value": "...",
                    "valueKeys": []
                  },
                  {
                    "attributeType": "MULTISELECT",
                    "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": {},
                    "company": {},
                    "currency": "...",
                    "endDate": 12345,
                    "endOfDiscountDate": 12345,
                    "frequency": "...",
                    "id": 12345,
                    "links": [],
                    "nextBillingDate": 12345,
                    "paymentPlan": {},
                    "referenceCode": "...",
                    "salesSupportUser": {},
                    "startDate": 12345,
                    "status": "...",
                    "totalPrice": 12345,
                    "type": "...",
                    "user": {}
                  },
                  {
                    "_embedded": {},
                    "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": {
                    "alignWithParentCycleStartDate": true,
                    "autoExtensionPricingId": 12345,
                    "blockContractDowngrades": true,
                    "blockContractUpgrades": true,
                    "blockSwitchToShorterContract": true,
                    "cancellationPeriodLimit": 12345,
                    "endOfContractGracePeriod": 12345,
                    "gracePeriod": {},
                    "minimumServiceLength": 12345,
                    "terminationFee": {}
                  },
                  "cost": [
                    {},
                    {}
                  ],
                  "discount": {
                    "amount": {},
                    "availableRedemptions": 12345,
                    "description": "...",
                    "expirationDate": 12345,
                    "numOfBillingCycles": 12345,
                    "percentage": 12345,
                    "pricingUnit": "CALLING_FEATURE",
                    "startDate": 12345
                  },
                  "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": "..."
                }
              },
              "nullable": true
            },
            {
              "description": "Current order"
            }
          ]
        },
        "product": {
          "allOf": [
            {
              "type": "object",
              "title": "LinkWS",
              "properties": {
                "href": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                }
              },
              "example": {
                "href": "...",
                "id": "..."
              },
              "nullable": true
            },
            {
              "description": "Link to product information"
            }
          ]
        },
        "redirectUrl": {
          "description": "Interactive endpoint URL",
          "type": "string",
          "nullable": true
        },
        "status": {
          "description": "Subscription status (Valid values are INITIALIZED, FAILED, FREE_TRIAL, FREE_TRIAL_EXPIRED, ACTIVE, SUSPENDED, or CANCELLED.)",
          "type": "string",
          "nullable": true
        },
        "upcomingOrder": {
          "allOf": [
            {
              "description": "Resource links",
              "type": "object",
              "title": "Order",
              "properties": {
                "_embedded": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "object",
                    "nullable": true
                  },
                  "nullable": true
                },
                "activated": {
                  "description": "True if the subscription has been activated",
                  "type": "boolean"
                },
                "company": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to company information."
                },
                "contract": {
                  "type": "object",
                  "title": "OrderContract",
                  "properties": {
                    "alignWithParentCycleStartDate": {
                      "description": "For add-on products, determines whether to align the contract start date with the parent subscription start date. This is an internal setting.",
                      "type": "boolean"
                    },
                    "autoExtensionPricingUuid": {
                      "description": "The edition pricing ID to which to bind the contract when it is automatically renewed. To retrieve the value, use the \"uuid\" value from the \"Read payment plan\" https://help.appdirect.com/api/appdirect.html#read-payment-plan request.",
                      "type": "string",
                      "nullable": true
                    },
                    "blockContractDowngrades": {
                      "description": "Determines whether to block downgrades to the contract terms",
                      "type": "boolean"
                    },
                    "blockContractUpgrades": {
                      "description": "Determines whether to block upgrades to the contract terms",
                      "type": "boolean"
                    },
                    "blockSwitchToShorterContract": {
                      "description": "Determines whether to block the ability to switch to a shorter contract",
                      "type": "boolean"
                    },
                    "cancellationPeriodLimit": {
                      "description": "Cancellation period limit",
                      "type": "number",
                      "nullable": true
                    },
                    "continueWithoutContract": {
                      "description": "Determines whether to continue the subscription without a contract",
                      "type": "boolean"
                    },
                    "endOfContractDate": {
                      "description": "End date for contract",
                      "type": "number"
                    },
                    "endOfContractGracePeriod": {
                      "description": "Grace period for end of contract",
                      "type": "number",
                      "nullable": true
                    },
                    "gracePeriodEndDate": {
                      "description": "End date for grace period",
                      "type": "number",
                      "nullable": true
                    },
                    "keepContractDateOnPlanChange": {
                      "description": "Determines whether to keep the contract date if the plan changes",
                      "type": "boolean"
                    },
                    "minimumServiceLength": {
                      "description": "Minimum service length of contract",
                      "type": "number"
                    },
                    "renewal": {},
                    "terminationFee": {},
                    "unitTerms": {
                      "description": "List of contract unit terms",
                      "type": "array",
                      "items": {}
                    }
                  },
                  "example": {
                    "alignWithParentCycleStartDate": true,
                    "autoExtensionPricingUuid": "0a12c84d-984f-4f64-943b-8e6f47a28d55",
                    "blockContractDowngrades": true,
                    "blockContractUpgrades": false,
                    "blockSwitchToShorterContract": true,
                    "cancellationPeriodLimit": null,
                    "continueWithoutContract": true,
                    "endOfContractDate": 1588789800000,
                    "endOfContractGracePeriod": null,
                    "gracePeriodEndDate": null,
                    "keepContractDateOnPlanChange": false,
                    "minimumServiceLength": 24,
                    "renewal": null,
                    "terminationFee": {},
                    "unitTerms": []
                  },
                  "nullable": true,
                  "description": "The contract terms of the order, if applicable. If the order does not have contract terms, this field is null."
                },
                "currency": {
                  "description": "Currency.",
                  "type": "string",
                  "nullable": true
                },
                "customAttributes": {
                  "description": "List of custom attributes associated with this order",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "title": "CustomAttribute",
                    "properties": {},
                    "example": {}
                  }
                },
                "discount": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to the discount applied to this order (optional)"
                },
                "discountId": {
                  "description": "The unique identifier for the discount applied to this order",
                  "type": "number",
                  "nullable": true
                },
                "endDate": {
                  "description": "Order end date.",
                  "type": "number",
                  "nullable": true
                },
                "endOfDiscountDate": {
                  "description": "Discount end date.",
                  "type": "number",
                  "nullable": true
                },
                "frequency": {
                  "description": "Frequency.",
                  "type": "string",
                  "nullable": true
                },
                "id": {
                  "description": "ID.",
                  "type": "number",
                  "nullable": true
                },
                "links": {
                  "description": "Resource links",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "title": "Link",
                    "properties": {},
                    "example": {},
                    "nullable": true
                  }
                },
                "nextBillingDate": {
                  "description": "Next billing date for the order",
                  "type": "number",
                  "nullable": true
                },
                "nextOrder": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to the next order for this subscription"
                },
                "oneTimeOrders": {
                  "description": "List of one time orders associated with this subscription order",
                  "type": "array",
                  "items": {
                    "description": "Resource links",
                    "type": "object",
                    "title": "OrderListing",
                    "properties": {},
                    "example": {},
                    "nullable": true
                  }
                },
                "orderLines": {
                  "description": "List of order lines for this subscription order",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "title": "OrderLine",
                    "properties": {},
                    "example": {}
                  }
                },
                "parameters": {
                  "description": "List of custom parameters associated with this order",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "title": "Parameter",
                    "properties": {},
                    "example": {}
                  }
                },
                "parentSubscriptionId": {
                  "description": "Parent subscription ID of an add-on subscription",
                  "type": "number",
                  "nullable": true
                },
                "paymentPlan": {
                  "description": "Payment plan for this order",
                  "type": "object",
                  "title": "PaymentPlan",
                  "properties": {
                    "allowCustomUsage": {
                      "description": "Custom usage allowed",
                      "type": "boolean"
                    },
                    "contract": {},
                    "cost": {
                      "description": "List of plan costs",
                      "type": "array",
                      "items": {}
                    },
                    "discount": {},
                    "frequency": {
                      "description": "Billing frequency: MONTHLY, QUARTERLY, SIX_MONTHS, YEARLY, TWO_YEARS, THREE_YEARS, DAILY",
                      "type": "string"
                    },
                    "href": {
                      "description": "URL to payment plan details",
                      "type": "string"
                    },
                    "id": {
                      "description": "ID",
                      "type": "number"
                    },
                    "isPrimaryPrice": {
                      "description": "Is primary price",
                      "type": "boolean"
                    },
                    "keepBillDateOnUsageChange": {
                      "description": "Keep bill date on usage change",
                      "type": "boolean"
                    },
                    "separatePrepaid": {
                      "description": "Separate prepaid",
                      "type": "boolean"
                    },
                    "tld": {
                      "description": "If plan is part of a domain reseller product, this is the tld this plan offers",
                      "type": "string"
                    },
                    "uuid": {
                      "description": "Unique identifier",
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "example": {
                    "allowCustomUsage": true,
                    "contract": {},
                    "cost": [],
                    "discount": {},
                    "frequency": "...",
                    "href": "...",
                    "id": 12345,
                    "isPrimaryPrice": true,
                    "keepBillDateOnUsageChange": true,
                    "separatePrepaid": true,
                    "tld": "...",
                    "uuid": "..."
                  }
                },
                "paymentPlanId": {
                  "description": "The unique identifier for the payment plan for this order",
                  "type": "number",
                  "nullable": true
                },
                "previousOrder": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to the previous order for this subscription"
                },
                "referenceCode": {
                  "description": "Reference code",
                  "type": "string",
                  "nullable": true
                },
                "salesSupportCompany": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to sales support company information"
                },
                "salesSupportUser": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to sales support user information"
                },
                "serviceStartDate": {
                  "description": "Service start date for the order",
                  "type": "number",
                  "nullable": true
                },
                "startDate": {
                  "description": "Order start date",
                  "type": "number",
                  "nullable": true
                },
                "status": {
                  "description": "Order status",
                  "type": "string",
                  "nullable": true
                },
                "totalPrice": {
                  "description": "Total price for the order",
                  "type": "number",
                  "nullable": true
                },
                "type": {
                  "description": "Type.",
                  "type": "string",
                  "nullable": true
                },
                "user": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to user information"
                }
              },
              "example": {
                "_embedded": {
                  "property1": {},
                  "property2": {}
                },
                "activated": true,
                "company": {
                  "href": "...",
                  "id": "..."
                },
                "contract": {},
                "currency": "...",
                "customAttributes": [
                  {
                    "attributeType": "TEXT",
                    "name": "...",
                    "value": "...",
                    "valueKeys": []
                  },
                  {
                    "attributeType": "MULTISELECT",
                    "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": {},
                    "company": {},
                    "currency": "...",
                    "endDate": 12345,
                    "endOfDiscountDate": 12345,
                    "frequency": "...",
                    "id": 12345,
                    "links": [],
                    "nextBillingDate": 12345,
                    "paymentPlan": {},
                    "referenceCode": "...",
                    "salesSupportUser": {},
                    "startDate": 12345,
                    "status": "...",
                    "totalPrice": 12345,
                    "type": "...",
                    "user": {}
                  },
                  {
                    "_embedded": {},
                    "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": {
                    "alignWithParentCycleStartDate": true,
                    "autoExtensionPricingId": 12345,
                    "blockContractDowngrades": true,
                    "blockContractUpgrades": true,
                    "blockSwitchToShorterContract": true,
                    "cancellationPeriodLimit": 12345,
                    "endOfContractGracePeriod": 12345,
                    "gracePeriod": {},
                    "minimumServiceLength": 12345,
                    "terminationFee": {}
                  },
                  "cost": [
                    {},
                    {}
                  ],
                  "discount": {
                    "amount": {},
                    "availableRedemptions": 12345,
                    "description": "...",
                    "expirationDate": 12345,
                    "numOfBillingCycles": 12345,
                    "percentage": 12345,
                    "pricingUnit": "CALLING_FEATURE",
                    "startDate": 12345
                  },
                  "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": "..."
                }
              },
              "nullable": true
            },
            {
              "description": "Upcoming order"
            }
          ]
        },
        "user": {
          "allOf": [
            {
              "type": "object",
              "title": "LinkWS",
              "properties": {
                "href": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                }
              },
              "example": {
                "href": "...",
                "id": "..."
              },
              "nullable": true
            },
            {
              "description": "Link to user information"
            }
          ]
        }
      },
      "example": {
        "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": {
            "cancellationPeriodLimit": null,
            "endOfContractDate": 123451232,
            "endOfContractGracePeriod": null,
            "gracePeriodEndDate": null,
            "minimumServiceLength": 24,
            "renewal": null,
            "terminationFee": {
              "description": "Fee",
              "estimatedCost": 324.56,
              "percentage": 100,
              "price": null,
              "type": "PERCENTAGE"
            }
          },
          "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": "...",
              "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": "..."
          }
        },
        "user": {
          "href": "...",
          "id": "..."
        }
      },
      "nullable": true
    },
    {
      "description": "Subscription data object"
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "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": {
      "cancellationPeriodLimit": null,
      "endOfContractDate": 123451232,
      "endOfContractGracePeriod": null,
      "gracePeriodEndDate": null,
      "minimumServiceLength": 24,
      "renewal": null,
      "terminationFee": {
        "description": "Fee",
        "estimatedCost": 324.56,
        "percentage": 100,
        "price": null,
        "type": "PERCENTAGE"
      }
    },
    "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": "...",
        "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": "..."
    }
  },
  "user": {
    "href": "...",
    "id": "..."
  }
}

Example response

{
  "assignedUsers": 1,
  "company": {
    "href": "http://appdirect/api/account/v1/companies/e83cd3d6-7865-4fc2-9d7c-603ad17dd639",
    "id": "e83cd3d6-7865-4fc2-9d7c-603ad17dd639"
  },
  "creationDate": 1481002406580,
  "edition": {
    "href": "http://appdirect/api/marketplace/v1/products/2/editions/2",
    "id": "2"
  },
  "endDate": null,
  "externalAccountId": "d2f4acf1-fb5a-4c4a-921f-75c4b6bfff08",
  "id": "1b577640-9b77-47bc-beb8-ed59accb4836",
  "maxUsers": 1,
  "order": {
    "activated": false,
    "company": {
      "href": "http://appdirect/api/account/v1/companies/e83cd3d6-7865-4fc2-9d7c-603ad17dd639",
      "id": "e83cd3d6-7865-4fc2-9d7c-603ad17dd639"
    },
    "contract": null,
    "currency": "USD",
    "discount": null,
    "discountId": null,
    "endDate": null,
    "endOfDiscountDate": null,
    "frequency": "MONTHLY",
    "id": 1,
    "links": [
      {
        "href": "http://appdirect/api/billing/v1/subscriptions/1b577640-9b77-47bc-beb8-ed59accb4836",
        "rel": "subscription"
      }
    ],
    "nextBillingDate": 1483599600000,
    "nextOrder": null,
    "oneTimeOrders": [],
    "orderLines": [
      {
        "description": "Test App 1 - null - Per User Fee",
        "id": 1,
        "listingPrice": 10,
        "price": 10,
        "quantity": 1,
        "totalPrice": 10,
        "type": "ITEM",
        "unit": "USER"
      }
    ],
    "parameters": [],
    "paymentPlan": {
      "allowCustomUsage": false,
      "contract": {
        "alignWithParentCycleStartDate": false,
        "autoExtensionPricingId": null,
        "blockContractDowngrades": false,
        "blockContractUpgrades": false,
        "blockSwitchToShorterContract": false,
        "cancellationPeriodLimit": null,
        "endOfContractGracePeriod": null,
        "gracePeriod": null,
        "minimumServiceLength": null,
        "terminationFee": null
      },
      "costs": [
        {
          "amount": {
            "USD": 10
          },
          "blockContractDecrease": false,
          "blockContractIncrease": false,
          "blockOriginalContractDecrease": false,
          "id": 2,
          "increment": 1,
          "maxUnits": null,
          "meteredUsage": false,
          "minUnits": 0,
          "pricePerIncrement": false,
          "pricingStrategy": "UNIT",
          "unit": "USER",
          "unitDependency": null
        }
      ],
      "discount": null,
      "frequency": "MONTHLY",
      "href": "http://appdirect/api/marketplace/v1/products/2/editions/2/paymentPlans/2",
      "id": 2,
      "isPrimaryPrice": false,
      "keepBillDateOnUsageChange": false,
      "primaryPrice": false,
      "separatePrepaid": false,
      "uuid": "eaca1aa5-4c4f-44cb-8cf4-eb0aa9267273"
    },
    "paymentPlanId": 2,
    "previousOrder": null,
    "referenceCode": null,
    "salesSupportUser": null,
    "startDate": 1480921200000,
    "status": "ACTIVE",
    "totalPrice": 0,
    "type": "NEW",
    "user": {
      "href": "http://appdirect/api/account/v1/users/c47d0fd7-b67a-4e07-84f8-f93dfafbeecc",
      "id": "c47d0fd7-b67a-4e07-84f8-f93dfafbeecc"
    }
  },
  "product": {
    "href": "http://appdirect/api/marketplace/v1/products/2",
    "id": "2"
  },
  "redirectUrl": null,
  "status": "ACTIVE",
  "upcomingOrder": null,
  "user": {
    "href": "http://appdirect/api/account/v1/users/c47d0fd7-b67a-4e07-84f8-f93dfafbeecc",
    "id": "c47d0fd7-b67a-4e07-84f8-f93dfafbeecc"
  }
}

POST/billing/v1/companies/{companyId}/users/{userId}/subscriptions

Create a subscription for the given user and company using the provided data

Parameters

Parameter Type Data Type Default Description
*companyId path string User's company ID
sendNotification query boolean true Send notification of the subscription's creation. Default value is true.
*userId path string User ID

Body Parameters

Subscription data object

Subscription object:

Property Type Description
assignedUsers number

Number of users assigned to subscription

bundleApplicationId number

Bundle ID. Specify during subscription creation if you want the subscription to be part of a bundle. Retrieve a list of bundle IDs with the List all bundles request, and then specify the desired ID here. Only supported for the Create a subscription endpoint and not supported for any other endpoints.

company LinkWS

Link to company information

creationDate number

Subscription creation date

edition LinkWS

Link to edition information

endDate number

Subscription end date

externalAccountId string

External account identifier (from vendor)

externalId string

External ID for a subscription. Not used to change or create a subscription. If a subscription has an external ID, the ID is included in the responses to the list subscription or read subscription APIs. To set an external ID of a subscription, use the Update subscriptions API.

id string

ID

internalId string

The UUID for a subscription

label string

Label for a subscription

maxUsers number

Maximum number of users allowed to be assigned to subscription

order Order

Current order

product LinkWS

Link to product information

redirectUrl string

Interactive endpoint URL

status string

Subscription status (Valid values are INITIALIZED, FAILED, FREE_TRIAL, FREE_TRIAL_EXPIRED, ACTIVE, SUSPENDED, or CANCELLED.)

upcomingOrder Order

Upcoming order

user LinkWS

Link to user information

Responses

Status Meaning Description Definition
201 Created Created Subscription
400 Bad Request Bad Request
404 Not Found Not Found
409 Conflict Conflict

Preview changed subscription details

Example request

curl -X PUT https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions/{subscriptionId}/preview \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions/{subscriptionId}/preview HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions/{subscriptionId}/preview',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "type": "object",
      "title": "Subscription",
      "properties": {
        "assignedUsers": {
          "description": "Number of users assigned to subscription",
          "type": "number",
          "nullable": true
        },
        "bundleApplicationId": {
          "description": "Bundle ID. Specify during subscription creation if you want the subscription to be part of a bundle. Retrieve a list of bundle IDs with the [List all bundles](#list-all-bundles) request, and then specify the desired ID here. Only supported for the [Create a subscription](#create-a-subscription) endpoint and not supported for any other endpoints.",
          "type": "number",
          "nullable": true
        },
        "company": {
          "allOf": [
            {
              "type": "object",
              "title": "LinkWS",
              "properties": {
                "href": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                }
              },
              "example": {
                "href": "...",
                "id": "..."
              },
              "nullable": true
            },
            {
              "description": "Link to company information"
            }
          ]
        },
        "creationDate": {
          "description": "Subscription creation date",
          "type": "number",
          "nullable": true
        },
        "edition": {
          "allOf": [
            {
              "type": "object",
              "title": "LinkWS",
              "properties": {
                "href": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                }
              },
              "example": {
                "href": "...",
                "id": "..."
              },
              "nullable": true
            },
            {
              "description": "Link to edition information"
            }
          ]
        },
        "endDate": {
          "description": "Subscription end date",
          "type": "number",
          "nullable": true
        },
        "externalAccountId": {
          "description": "External account identifier (from vendor)",
          "type": "string",
          "nullable": true
        },
        "externalId": {
          "description": "External ID for a subscription. Not used to change or create a subscription. If a subscription has an external ID, the ID is included in the responses to the [list subscription](#list-subscriptions) or [read subscription](#retrieve-a-subscription) APIs. To set an external ID of a subscription, use the [Update subscriptions](#update-subscriptions) API.",
          "type": "string",
          "nullable": true
        },
        "id": {
          "description": "ID",
          "type": "string",
          "nullable": true
        },
        "internalId": {
          "description": "The UUID for a subscription",
          "type": "string",
          "nullable": true
        },
        "label": {
          "description": "Label for a subscription",
          "type": "string",
          "nullable": true
        },
        "maxUsers": {
          "description": "Maximum number of users allowed to be assigned to subscription",
          "type": "number",
          "nullable": true
        },
        "order": {
          "allOf": [
            {
              "description": "Resource links",
              "type": "object",
              "title": "Order",
              "properties": {
                "_embedded": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "object",
                    "nullable": true
                  },
                  "nullable": true
                },
                "activated": {
                  "description": "True if the subscription has been activated",
                  "type": "boolean"
                },
                "company": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to company information."
                },
                "contract": {
                  "type": "object",
                  "title": "OrderContract",
                  "properties": {
                    "alignWithParentCycleStartDate": {},
                    "autoExtensionPricingUuid": {},
                    "blockContractDowngrades": {},
                    "blockContractUpgrades": {},
                    "blockSwitchToShorterContract": {},
                    "cancellationPeriodLimit": {},
                    "continueWithoutContract": {},
                    "endOfContractDate": {},
                    "endOfContractGracePeriod": {},
                    "gracePeriodEndDate": {},
                    "keepContractDateOnPlanChange": {},
                    "minimumServiceLength": {},
                    "renewal": {},
                    "terminationFee": {},
                    "unitTerms": {}
                  },
                  "example": {
                    "alignWithParentCycleStartDate": true,
                    "autoExtensionPricingUuid": "0a12c84d-984f-4f64-943b-8e6f47a28d55",
                    "blockContractDowngrades": true,
                    "blockContractUpgrades": false,
                    "blockSwitchToShorterContract": true,
                    "cancellationPeriodLimit": null,
                    "continueWithoutContract": true,
                    "endOfContractDate": 1588789800000,
                    "endOfContractGracePeriod": null,
                    "gracePeriodEndDate": null,
                    "keepContractDateOnPlanChange": false,
                    "minimumServiceLength": 24,
                    "renewal": null,
                    "terminationFee": {},
                    "unitTerms": []
                  },
                  "nullable": true,
                  "description": "The contract terms of the order, if applicable. If the order does not have contract terms, this field is null."
                },
                "currency": {
                  "description": "Currency.",
                  "type": "string",
                  "nullable": true
                },
                "customAttributes": {
                  "description": "List of custom attributes associated with this order",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "title": "CustomAttribute",
                    "properties": {},
                    "example": {}
                  }
                },
                "discount": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to the discount applied to this order (optional)"
                },
                "discountId": {
                  "description": "The unique identifier for the discount applied to this order",
                  "type": "number",
                  "nullable": true
                },
                "endDate": {
                  "description": "Order end date.",
                  "type": "number",
                  "nullable": true
                },
                "endOfDiscountDate": {
                  "description": "Discount end date.",
                  "type": "number",
                  "nullable": true
                },
                "frequency": {
                  "description": "Frequency.",
                  "type": "string",
                  "nullable": true
                },
                "id": {
                  "description": "ID.",
                  "type": "number",
                  "nullable": true
                },
                "links": {
                  "description": "Resource links",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "title": "Link",
                    "properties": {},
                    "example": {},
                    "nullable": true
                  }
                },
                "nextBillingDate": {
                  "description": "Next billing date for the order",
                  "type": "number",
                  "nullable": true
                },
                "nextOrder": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to the next order for this subscription"
                },
                "oneTimeOrders": {
                  "description": "List of one time orders associated with this subscription order",
                  "type": "array",
                  "items": {
                    "description": "Resource links",
                    "type": "object",
                    "title": "OrderListing",
                    "properties": {},
                    "example": {},
                    "nullable": true
                  }
                },
                "orderLines": {
                  "description": "List of order lines for this subscription order",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "title": "OrderLine",
                    "properties": {},
                    "example": {}
                  }
                },
                "parameters": {
                  "description": "List of custom parameters associated with this order",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "title": "Parameter",
                    "properties": {},
                    "example": {}
                  }
                },
                "parentSubscriptionId": {
                  "description": "Parent subscription ID of an add-on subscription",
                  "type": "number",
                  "nullable": true
                },
                "paymentPlan": {
                  "description": "Payment plan for this order",
                  "type": "object",
                  "title": "PaymentPlan",
                  "properties": {
                    "allowCustomUsage": {
                      "description": "Custom usage allowed",
                      "type": "boolean"
                    },
                    "contract": {},
                    "cost": {
                      "description": "List of plan costs",
                      "type": "array",
                      "items": {}
                    },
                    "discount": {},
                    "frequency": {
                      "description": "Billing frequency: MONTHLY, QUARTERLY, SIX_MONTHS, YEARLY, TWO_YEARS, THREE_YEARS, DAILY",
                      "type": "string"
                    },
                    "href": {
                      "description": "URL to payment plan details",
                      "type": "string"
                    },
                    "id": {
                      "description": "ID",
                      "type": "number"
                    },
                    "isPrimaryPrice": {
                      "description": "Is primary price",
                      "type": "boolean"
                    },
                    "keepBillDateOnUsageChange": {
                      "description": "Keep bill date on usage change",
                      "type": "boolean"
                    },
                    "separatePrepaid": {
                      "description": "Separate prepaid",
                      "type": "boolean"
                    },
                    "tld": {
                      "description": "If plan is part of a domain reseller product, this is the tld this plan offers",
                      "type": "string"
                    },
                    "uuid": {
                      "description": "Unique identifier",
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "example": {
                    "allowCustomUsage": true,
                    "contract": {},
                    "cost": [],
                    "discount": {},
                    "frequency": "...",
                    "href": "...",
                    "id": 12345,
                    "isPrimaryPrice": true,
                    "keepBillDateOnUsageChange": true,
                    "separatePrepaid": true,
                    "tld": "...",
                    "uuid": "..."
                  }
                },
                "paymentPlanId": {
                  "description": "The unique identifier for the payment plan for this order",
                  "type": "number",
                  "nullable": true
                },
                "previousOrder": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to the previous order for this subscription"
                },
                "referenceCode": {
                  "description": "Reference code",
                  "type": "string",
                  "nullable": true
                },
                "salesSupportCompany": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to sales support company information"
                },
                "salesSupportUser": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to sales support user information"
                },
                "serviceStartDate": {
                  "description": "Service start date for the order",
                  "type": "number",
                  "nullable": true
                },
                "startDate": {
                  "description": "Order start date",
                  "type": "number",
                  "nullable": true
                },
                "status": {
                  "description": "Order status",
                  "type": "string",
                  "nullable": true
                },
                "totalPrice": {
                  "description": "Total price for the order",
                  "type": "number",
                  "nullable": true
                },
                "type": {
                  "description": "Type.",
                  "type": "string",
                  "nullable": true
                },
                "user": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to user information"
                }
              },
              "example": {
                "_embedded": {
                  "property1": {},
                  "property2": {}
                },
                "activated": true,
                "company": {
                  "href": "...",
                  "id": "..."
                },
                "contract": {},
                "currency": "...",
                "customAttributes": [
                  {
                    "attributeType": "TEXT",
                    "name": "...",
                    "value": "...",
                    "valueKeys": []
                  },
                  {
                    "attributeType": "MULTISELECT",
                    "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": {},
                    "company": {},
                    "currency": "...",
                    "endDate": 12345,
                    "endOfDiscountDate": 12345,
                    "frequency": "...",
                    "id": 12345,
                    "links": [],
                    "nextBillingDate": 12345,
                    "paymentPlan": {},
                    "referenceCode": "...",
                    "salesSupportUser": {},
                    "startDate": 12345,
                    "status": "...",
                    "totalPrice": 12345,
                    "type": "...",
                    "user": {}
                  },
                  {
                    "_embedded": {},
                    "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": {
                    "alignWithParentCycleStartDate": true,
                    "autoExtensionPricingId": 12345,
                    "blockContractDowngrades": true,
                    "blockContractUpgrades": true,
                    "blockSwitchToShorterContract": true,
                    "cancellationPeriodLimit": 12345,
                    "endOfContractGracePeriod": 12345,
                    "gracePeriod": {},
                    "minimumServiceLength": 12345,
                    "terminationFee": {}
                  },
                  "cost": [
                    {},
                    {}
                  ],
                  "discount": {
                    "amount": {},
                    "availableRedemptions": 12345,
                    "description": "...",
                    "expirationDate": 12345,
                    "numOfBillingCycles": 12345,
                    "percentage": 12345,
                    "pricingUnit": "CALLING_FEATURE",
                    "startDate": 12345
                  },
                  "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": "..."
                }
              },
              "nullable": true
            },
            {
              "description": "Current order"
            }
          ]
        },
        "product": {
          "allOf": [
            {
              "type": "object",
              "title": "LinkWS",
              "properties": {
                "href": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                }
              },
              "example": {
                "href": "...",
                "id": "..."
              },
              "nullable": true
            },
            {
              "description": "Link to product information"
            }
          ]
        },
        "redirectUrl": {
          "description": "Interactive endpoint URL",
          "type": "string",
          "nullable": true
        },
        "status": {
          "description": "Subscription status (Valid values are INITIALIZED, FAILED, FREE_TRIAL, FREE_TRIAL_EXPIRED, ACTIVE, SUSPENDED, or CANCELLED.)",
          "type": "string",
          "nullable": true
        },
        "upcomingOrder": {
          "allOf": [
            {
              "description": "Resource links",
              "type": "object",
              "title": "Order",
              "properties": {
                "_embedded": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "object",
                    "nullable": true
                  },
                  "nullable": true
                },
                "activated": {
                  "description": "True if the subscription has been activated",
                  "type": "boolean"
                },
                "company": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to company information."
                },
                "contract": {
                  "type": "object",
                  "title": "OrderContract",
                  "properties": {
                    "alignWithParentCycleStartDate": {
                      "description": "For add-on products, determines whether to align the contract start date with the parent subscription start date. This is an internal setting.",
                      "type": "boolean"
                    },
                    "autoExtensionPricingUuid": {
                      "description": "The edition pricing ID to which to bind the contract when it is automatically renewed. To retrieve the value, use the \"uuid\" value from the \"Read payment plan\" https://help.appdirect.com/api/appdirect.html#read-payment-plan request.",
                      "type": "string",
                      "nullable": true
                    },
                    "blockContractDowngrades": {
                      "description": "Determines whether to block downgrades to the contract terms",
                      "type": "boolean"
                    },
                    "blockContractUpgrades": {
                      "description": "Determines whether to block upgrades to the contract terms",
                      "type": "boolean"
                    },
                    "blockSwitchToShorterContract": {
                      "description": "Determines whether to block the ability to switch to a shorter contract",
                      "type": "boolean"
                    },
                    "cancellationPeriodLimit": {
                      "description": "Cancellation period limit",
                      "type": "number",
                      "nullable": true
                    },
                    "continueWithoutContract": {
                      "description": "Determines whether to continue the subscription without a contract",
                      "type": "boolean"
                    },
                    "endOfContractDate": {
                      "description": "End date for contract",
                      "type": "number"
                    },
                    "endOfContractGracePeriod": {
                      "description": "Grace period for end of contract",
                      "type": "number",
                      "nullable": true
                    },
                    "gracePeriodEndDate": {
                      "description": "End date for grace period",
                      "type": "number",
                      "nullable": true
                    },
                    "keepContractDateOnPlanChange": {
                      "description": "Determines whether to keep the contract date if the plan changes",
                      "type": "boolean"
                    },
                    "minimumServiceLength": {
                      "description": "Minimum service length of contract",
                      "type": "number"
                    },
                    "renewal": {},
                    "terminationFee": {},
                    "unitTerms": {
                      "description": "List of contract unit terms",
                      "type": "array",
                      "items": {}
                    }
                  },
                  "example": {
                    "alignWithParentCycleStartDate": true,
                    "autoExtensionPricingUuid": "0a12c84d-984f-4f64-943b-8e6f47a28d55",
                    "blockContractDowngrades": true,
                    "blockContractUpgrades": false,
                    "blockSwitchToShorterContract": true,
                    "cancellationPeriodLimit": null,
                    "continueWithoutContract": true,
                    "endOfContractDate": 1588789800000,
                    "endOfContractGracePeriod": null,
                    "gracePeriodEndDate": null,
                    "keepContractDateOnPlanChange": false,
                    "minimumServiceLength": 24,
                    "renewal": null,
                    "terminationFee": {},
                    "unitTerms": []
                  },
                  "nullable": true,
                  "description": "The contract terms of the order, if applicable. If the order does not have contract terms, this field is null."
                },
                "currency": {
                  "description": "Currency.",
                  "type": "string",
                  "nullable": true
                },
                "customAttributes": {
                  "description": "List of custom attributes associated with this order",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "title": "CustomAttribute",
                    "properties": {},
                    "example": {}
                  }
                },
                "discount": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to the discount applied to this order (optional)"
                },
                "discountId": {
                  "description": "The unique identifier for the discount applied to this order",
                  "type": "number",
                  "nullable": true
                },
                "endDate": {
                  "description": "Order end date.",
                  "type": "number",
                  "nullable": true
                },
                "endOfDiscountDate": {
                  "description": "Discount end date.",
                  "type": "number",
                  "nullable": true
                },
                "frequency": {
                  "description": "Frequency.",
                  "type": "string",
                  "nullable": true
                },
                "id": {
                  "description": "ID.",
                  "type": "number",
                  "nullable": true
                },
                "links": {
                  "description": "Resource links",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "title": "Link",
                    "properties": {},
                    "example": {},
                    "nullable": true
                  }
                },
                "nextBillingDate": {
                  "description": "Next billing date for the order",
                  "type": "number",
                  "nullable": true
                },
                "nextOrder": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to the next order for this subscription"
                },
                "oneTimeOrders": {
                  "description": "List of one time orders associated with this subscription order",
                  "type": "array",
                  "items": {
                    "description": "Resource links",
                    "type": "object",
                    "title": "OrderListing",
                    "properties": {},
                    "example": {},
                    "nullable": true
                  }
                },
                "orderLines": {
                  "description": "List of order lines for this subscription order",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "title": "OrderLine",
                    "properties": {},
                    "example": {}
                  }
                },
                "parameters": {
                  "description": "List of custom parameters associated with this order",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "title": "Parameter",
                    "properties": {},
                    "example": {}
                  }
                },
                "parentSubscriptionId": {
                  "description": "Parent subscription ID of an add-on subscription",
                  "type": "number",
                  "nullable": true
                },
                "paymentPlan": {
                  "description": "Payment plan for this order",
                  "type": "object",
                  "title": "PaymentPlan",
                  "properties": {
                    "allowCustomUsage": {
                      "description": "Custom usage allowed",
                      "type": "boolean"
                    },
                    "contract": {},
                    "cost": {
                      "description": "List of plan costs",
                      "type": "array",
                      "items": {}
                    },
                    "discount": {},
                    "frequency": {
                      "description": "Billing frequency: MONTHLY, QUARTERLY, SIX_MONTHS, YEARLY, TWO_YEARS, THREE_YEARS, DAILY",
                      "type": "string"
                    },
                    "href": {
                      "description": "URL to payment plan details",
                      "type": "string"
                    },
                    "id": {
                      "description": "ID",
                      "type": "number"
                    },
                    "isPrimaryPrice": {
                      "description": "Is primary price",
                      "type": "boolean"
                    },
                    "keepBillDateOnUsageChange": {
                      "description": "Keep bill date on usage change",
                      "type": "boolean"
                    },
                    "separatePrepaid": {
                      "description": "Separate prepaid",
                      "type": "boolean"
                    },
                    "tld": {
                      "description": "If plan is part of a domain reseller product, this is the tld this plan offers",
                      "type": "string"
                    },
                    "uuid": {
                      "description": "Unique identifier",
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "example": {
                    "allowCustomUsage": true,
                    "contract": {},
                    "cost": [],
                    "discount": {},
                    "frequency": "...",
                    "href": "...",
                    "id": 12345,
                    "isPrimaryPrice": true,
                    "keepBillDateOnUsageChange": true,
                    "separatePrepaid": true,
                    "tld": "...",
                    "uuid": "..."
                  }
                },
                "paymentPlanId": {
                  "description": "The unique identifier for the payment plan for this order",
                  "type": "number",
                  "nullable": true
                },
                "previousOrder": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to the previous order for this subscription"
                },
                "referenceCode": {
                  "description": "Reference code",
                  "type": "string",
                  "nullable": true
                },
                "salesSupportCompany": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to sales support company information"
                },
                "salesSupportUser": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to sales support user information"
                },
                "serviceStartDate": {
                  "description": "Service start date for the order",
                  "type": "number",
                  "nullable": true
                },
                "startDate": {
                  "description": "Order start date",
                  "type": "number",
                  "nullable": true
                },
                "status": {
                  "description": "Order status",
                  "type": "string",
                  "nullable": true
                },
                "totalPrice": {
                  "description": "Total price for the order",
                  "type": "number",
                  "nullable": true
                },
                "type": {
                  "description": "Type.",
                  "type": "string",
                  "nullable": true
                },
                "user": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to user information"
                }
              },
              "example": {
                "_embedded": {
                  "property1": {},
                  "property2": {}
                },
                "activated": true,
                "company": {
                  "href": "...",
                  "id": "..."
                },
                "contract": {},
                "currency": "...",
                "customAttributes": [
                  {
                    "attributeType": "TEXT",
                    "name": "...",
                    "value": "...",
                    "valueKeys": []
                  },
                  {
                    "attributeType": "MULTISELECT",
                    "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": {},
                    "company": {},
                    "currency": "...",
                    "endDate": 12345,
                    "endOfDiscountDate": 12345,
                    "frequency": "...",
                    "id": 12345,
                    "links": [],
                    "nextBillingDate": 12345,
                    "paymentPlan": {},
                    "referenceCode": "...",
                    "salesSupportUser": {},
                    "startDate": 12345,
                    "status": "...",
                    "totalPrice": 12345,
                    "type": "...",
                    "user": {}
                  },
                  {
                    "_embedded": {},
                    "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": {
                    "alignWithParentCycleStartDate": true,
                    "autoExtensionPricingId": 12345,
                    "blockContractDowngrades": true,
                    "blockContractUpgrades": true,
                    "blockSwitchToShorterContract": true,
                    "cancellationPeriodLimit": 12345,
                    "endOfContractGracePeriod": 12345,
                    "gracePeriod": {},
                    "minimumServiceLength": 12345,
                    "terminationFee": {}
                  },
                  "cost": [
                    {},
                    {}
                  ],
                  "discount": {
                    "amount": {},
                    "availableRedemptions": 12345,
                    "description": "...",
                    "expirationDate": 12345,
                    "numOfBillingCycles": 12345,
                    "percentage": 12345,
                    "pricingUnit": "CALLING_FEATURE",
                    "startDate": 12345
                  },
                  "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": "..."
                }
              },
              "nullable": true
            },
            {
              "description": "Upcoming order"
            }
          ]
        },
        "user": {
          "allOf": [
            {
              "type": "object",
              "title": "LinkWS",
              "properties": {
                "href": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                }
              },
              "example": {
                "href": "...",
                "id": "..."
              },
              "nullable": true
            },
            {
              "description": "Link to user information"
            }
          ]
        }
      },
      "example": {
        "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": {
            "cancellationPeriodLimit": null,
            "endOfContractDate": 123451232,
            "endOfContractGracePeriod": null,
            "gracePeriodEndDate": null,
            "minimumServiceLength": 24,
            "renewal": null,
            "terminationFee": {
              "description": "Fee",
              "estimatedCost": 324.56,
              "percentage": 100,
              "price": null,
              "type": "PERCENTAGE"
            }
          },
          "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": "...",
              "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": "..."
          }
        },
        "user": {
          "href": "...",
          "id": "..."
        }
      },
      "nullable": true
    },
    {
      "description": "Subscription data object"
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions/{subscriptionId}/preview',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions/{subscriptionId}/preview', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions/{subscriptionId}/preview',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions/{subscriptionId}/preview");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "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": {
      "cancellationPeriodLimit": null,
      "endOfContractDate": 123451232,
      "endOfContractGracePeriod": null,
      "gracePeriodEndDate": null,
      "minimumServiceLength": 24,
      "renewal": null,
      "terminationFee": {
        "description": "Fee",
        "estimatedCost": 324.56,
        "percentage": 100,
        "price": null,
        "type": "PERCENTAGE"
      }
    },
    "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": "...",
        "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": "..."
    }
  },
  "user": {
    "href": "...",
    "id": "..."
  }
}

Example response

{
  "assignedUsers": 1,
  "company": null,
  "creationDate": 1481002406580,
  "edition": null,
  "endDate": null,
  "externalAccountId": "d2f4acf1-fb5a-4c4a-921f-75c4b6bfff08",
  "id": "1b577640-9b77-47bc-beb8-ed59accb4836",
  "maxUsers": 1,
  "order": {
    "activated": false,
    "company": null,
    "contract": null,
    "currency": "USD",
    "discount": null,
    "discountId": null,
    "endDate": null,
    "endOfDiscountDate": null,
    "frequency": "MONTHLY",
    "id": null,
    "links": [
      {
        "href": "http://appdirect/api/billing/v1/subscriptions/1b577640-9b77-47bc-beb8-ed59accb4836",
        "rel": "subscription"
      }
    ],
    "nextBillingDate": 1483599600000,
    "nextOrder": null,
    "oneTimeOrders": [
      {
        "company": null,
        "currency": "USD",
        "endDate": 1483599600000,
        "endOfDiscountDate": null,
        "frequency": "MONTHLY",
        "id": null,
        "links": [],
        "nextBillingDate": 1483599600000,
        "paymentPlan": {
          "href": "http://appdirect/api/marketplace/v1/products/2/editions/2/paymentPlans/2",
          "id": "2"
        },
        "referenceCode": null,
        "salesSupportUser": null,
        "startDate": 1480921200000,
        "status": "INITIALIZED",
        "totalPrice": -10,
        "type": "CREDIT",
        "user": null
      }
    ],
    "orderLines": [
      {
        "description": "Test App 1 - null - Per User Fee",
        "listingPrice": 10,
        "price": 10,
        "quantity": 10,
        "totalPrice": 100,
        "type": "ITEM",
        "unit": "USER"
      }
    ],
    "parameters": [],
    "paymentPlan": {
      "allowCustomUsage": false,
      "contract": {
        "alignWithParentCycleStartDate": false,
        "autoExtensionPricingId": null,
        "blockContractDowngrades": false,
        "blockContractUpgrades": false,
        "blockSwitchToShorterContract": false,
        "cancellationPeriodLimit": null,
        "endOfContractGracePeriod": null,
        "gracePeriod": null,
        "minimumServiceLength": null,
        "terminationFee": null
      },
      "costs": [
        {
          "amount": {
            "USD": 10
          },
          "blockContractDecrease": false,
          "blockContractIncrease": false,
          "blockOriginalContractDecrease": false,
          "id": 2,
          "increment": 1,
          "maxUnits": null,
          "meteredUsage": false,
          "minUnits": 0,
          "pricePerIncrement": false,
          "pricingStrategy": "UNIT",
          "unit": "USER",
          "unitDependency": null
        }
      ],
      "discount": null,
      "frequency": "MONTHLY",
      "href": "http://appdirect/api/marketplace/v1/products/2/editions/2/paymentPlans/2",
      "id": 2,
      "isPrimaryPrice": false,
      "keepBillDateOnUsageChange": false,
      "primaryPrice": false,
      "separatePrepaid": false,
      "uuid": "eaca1aa5-4c4f-44cb-8cf4-eb0aa9267273"
    },
    "paymentPlanId": 2,
    "previousOrder": null,
    "referenceCode": null,
    "salesSupportUser": null,
    "startDate": 1480921200000,
    "status": "PENDING_REMOTE_CREATION",
    "totalPrice": 100,
    "type": "MIGRATION",
    "user": null
  },
  "product": null,
  "redirectUrl": null,
  "status": "ACTIVE",
  "upcomingOrder": null,
  "user": null
}

PUT/billing/v1/companies/{companyId}/users/{userId}/subscriptions/{subscriptionId}/preview

Preview the changes for the given subscription using the provided data

Parameters

Parameter Type Data Type Default Description
*companyId path string User's company ID
*subscriptionId path string Subscription ID
*userId path string User ID

Body Parameters

Subscription data object

Subscription object:

Property Type Description
assignedUsers number

Number of users assigned to subscription

bundleApplicationId number

Bundle ID. Specify during subscription creation if you want the subscription to be part of a bundle. Retrieve a list of bundle IDs with the List all bundles request, and then specify the desired ID here. Only supported for the Create a subscription endpoint and not supported for any other endpoints.

company LinkWS

Link to company information

creationDate number

Subscription creation date

edition LinkWS

Link to edition information

endDate number

Subscription end date

externalAccountId string

External account identifier (from vendor)

externalId string

External ID for a subscription. Not used to change or create a subscription. If a subscription has an external ID, the ID is included in the responses to the list subscription or read subscription APIs. To set an external ID of a subscription, use the Update subscriptions API.

id string

ID

internalId string

The UUID for a subscription

label string

Label for a subscription

maxUsers number

Maximum number of users allowed to be assigned to subscription

order Order

Current order

product LinkWS

Link to product information

redirectUrl string

Interactive endpoint URL

status string

Subscription status (Valid values are INITIALIZED, FAILED, FREE_TRIAL, FREE_TRIAL_EXPIRED, ACTIVE, SUSPENDED, or CANCELLED.)

upcomingOrder Order

Upcoming order

user LinkWS

Link to user information

Responses

Status Meaning Description Definition
200 OK OK Subscription
400 Bad Request Bad Request
404 Not Found Not Found

Preview create a subscription

Example request

curl -X POST https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions/preview \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions/preview HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions/preview',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "type": "object",
      "title": "Subscription",
      "properties": {
        "assignedUsers": {
          "description": "Number of users assigned to subscription",
          "type": "number",
          "nullable": true
        },
        "bundleApplicationId": {
          "description": "Bundle ID. Specify during subscription creation if you want the subscription to be part of a bundle. Retrieve a list of bundle IDs with the [List all bundles](#list-all-bundles) request, and then specify the desired ID here. Only supported for the [Create a subscription](#create-a-subscription) endpoint and not supported for any other endpoints.",
          "type": "number",
          "nullable": true
        },
        "company": {
          "allOf": [
            {
              "type": "object",
              "title": "LinkWS",
              "properties": {
                "href": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                }
              },
              "example": {
                "href": "...",
                "id": "..."
              },
              "nullable": true
            },
            {
              "description": "Link to company information"
            }
          ]
        },
        "creationDate": {
          "description": "Subscription creation date",
          "type": "number",
          "nullable": true
        },
        "edition": {
          "allOf": [
            {
              "type": "object",
              "title": "LinkWS",
              "properties": {
                "href": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                }
              },
              "example": {
                "href": "...",
                "id": "..."
              },
              "nullable": true
            },
            {
              "description": "Link to edition information"
            }
          ]
        },
        "endDate": {
          "description": "Subscription end date",
          "type": "number",
          "nullable": true
        },
        "externalAccountId": {
          "description": "External account identifier (from vendor)",
          "type": "string",
          "nullable": true
        },
        "externalId": {
          "description": "External ID for a subscription. Not used to change or create a subscription. If a subscription has an external ID, the ID is included in the responses to the [list subscription](#list-subscriptions) or [read subscription](#retrieve-a-subscription) APIs. To set an external ID of a subscription, use the [Update subscriptions](#update-subscriptions) API.",
          "type": "string",
          "nullable": true
        },
        "id": {
          "description": "ID",
          "type": "string",
          "nullable": true
        },
        "internalId": {
          "description": "The UUID for a subscription",
          "type": "string",
          "nullable": true
        },
        "label": {
          "description": "Label for a subscription",
          "type": "string",
          "nullable": true
        },
        "maxUsers": {
          "description": "Maximum number of users allowed to be assigned to subscription",
          "type": "number",
          "nullable": true
        },
        "order": {
          "allOf": [
            {
              "description": "Resource links",
              "type": "object",
              "title": "Order",
              "properties": {
                "_embedded": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "object",
                    "nullable": true
                  },
                  "nullable": true
                },
                "activated": {
                  "description": "True if the subscription has been activated",
                  "type": "boolean"
                },
                "company": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to company information."
                },
                "contract": {
                  "type": "object",
                  "title": "OrderContract",
                  "properties": {
                    "alignWithParentCycleStartDate": {},
                    "autoExtensionPricingUuid": {},
                    "blockContractDowngrades": {},
                    "blockContractUpgrades": {},
                    "blockSwitchToShorterContract": {},
                    "cancellationPeriodLimit": {},
                    "continueWithoutContract": {},
                    "endOfContractDate": {},
                    "endOfContractGracePeriod": {},
                    "gracePeriodEndDate": {},
                    "keepContractDateOnPlanChange": {},
                    "minimumServiceLength": {},
                    "renewal": {},
                    "terminationFee": {},
                    "unitTerms": {}
                  },
                  "example": {
                    "alignWithParentCycleStartDate": true,
                    "autoExtensionPricingUuid": "0a12c84d-984f-4f64-943b-8e6f47a28d55",
                    "blockContractDowngrades": true,
                    "blockContractUpgrades": false,
                    "blockSwitchToShorterContract": true,
                    "cancellationPeriodLimit": null,
                    "continueWithoutContract": true,
                    "endOfContractDate": 1588789800000,
                    "endOfContractGracePeriod": null,
                    "gracePeriodEndDate": null,
                    "keepContractDateOnPlanChange": false,
                    "minimumServiceLength": 24,
                    "renewal": null,
                    "terminationFee": {},
                    "unitTerms": []
                  },
                  "nullable": true,
                  "description": "The contract terms of the order, if applicable. If the order does not have contract terms, this field is null."
                },
                "currency": {
                  "description": "Currency.",
                  "type": "string",
                  "nullable": true
                },
                "customAttributes": {
                  "description": "List of custom attributes associated with this order",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "title": "CustomAttribute",
                    "properties": {},
                    "example": {}
                  }
                },
                "discount": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to the discount applied to this order (optional)"
                },
                "discountId": {
                  "description": "The unique identifier for the discount applied to this order",
                  "type": "number",
                  "nullable": true
                },
                "endDate": {
                  "description": "Order end date.",
                  "type": "number",
                  "nullable": true
                },
                "endOfDiscountDate": {
                  "description": "Discount end date.",
                  "type": "number",
                  "nullable": true
                },
                "frequency": {
                  "description": "Frequency.",
                  "type": "string",
                  "nullable": true
                },
                "id": {
                  "description": "ID.",
                  "type": "number",
                  "nullable": true
                },
                "links": {
                  "description": "Resource links",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "title": "Link",
                    "properties": {},
                    "example": {},
                    "nullable": true
                  }
                },
                "nextBillingDate": {
                  "description": "Next billing date for the order",
                  "type": "number",
                  "nullable": true
                },
                "nextOrder": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to the next order for this subscription"
                },
                "oneTimeOrders": {
                  "description": "List of one time orders associated with this subscription order",
                  "type": "array",
                  "items": {
                    "description": "Resource links",
                    "type": "object",
                    "title": "OrderListing",
                    "properties": {},
                    "example": {},
                    "nullable": true
                  }
                },
                "orderLines": {
                  "description": "List of order lines for this subscription order",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "title": "OrderLine",
                    "properties": {},
                    "example": {}
                  }
                },
                "parameters": {
                  "description": "List of custom parameters associated with this order",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "title": "Parameter",
                    "properties": {},
                    "example": {}
                  }
                },
                "parentSubscriptionId": {
                  "description": "Parent subscription ID of an add-on subscription",
                  "type": "number",
                  "nullable": true
                },
                "paymentPlan": {
                  "description": "Payment plan for this order",
                  "type": "object",
                  "title": "PaymentPlan",
                  "properties": {
                    "allowCustomUsage": {
                      "description": "Custom usage allowed",
                      "type": "boolean"
                    },
                    "contract": {},
                    "cost": {
                      "description": "List of plan costs",
                      "type": "array",
                      "items": {}
                    },
                    "discount": {},
                    "frequency": {
                      "description": "Billing frequency: MONTHLY, QUARTERLY, SIX_MONTHS, YEARLY, TWO_YEARS, THREE_YEARS, DAILY",
                      "type": "string"
                    },
                    "href": {
                      "description": "URL to payment plan details",
                      "type": "string"
                    },
                    "id": {
                      "description": "ID",
                      "type": "number"
                    },
                    "isPrimaryPrice": {
                      "description": "Is primary price",
                      "type": "boolean"
                    },
                    "keepBillDateOnUsageChange": {
                      "description": "Keep bill date on usage change",
                      "type": "boolean"
                    },
                    "separatePrepaid": {
                      "description": "Separate prepaid",
                      "type": "boolean"
                    },
                    "tld": {
                      "description": "If plan is part of a domain reseller product, this is the tld this plan offers",
                      "type": "string"
                    },
                    "uuid": {
                      "description": "Unique identifier",
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "example": {
                    "allowCustomUsage": true,
                    "contract": {},
                    "cost": [],
                    "discount": {},
                    "frequency": "...",
                    "href": "...",
                    "id": 12345,
                    "isPrimaryPrice": true,
                    "keepBillDateOnUsageChange": true,
                    "separatePrepaid": true,
                    "tld": "...",
                    "uuid": "..."
                  }
                },
                "paymentPlanId": {
                  "description": "The unique identifier for the payment plan for this order",
                  "type": "number",
                  "nullable": true
                },
                "previousOrder": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to the previous order for this subscription"
                },
                "referenceCode": {
                  "description": "Reference code",
                  "type": "string",
                  "nullable": true
                },
                "salesSupportCompany": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to sales support company information"
                },
                "salesSupportUser": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to sales support user information"
                },
                "serviceStartDate": {
                  "description": "Service start date for the order",
                  "type": "number",
                  "nullable": true
                },
                "startDate": {
                  "description": "Order start date",
                  "type": "number",
                  "nullable": true
                },
                "status": {
                  "description": "Order status",
                  "type": "string",
                  "nullable": true
                },
                "totalPrice": {
                  "description": "Total price for the order",
                  "type": "number",
                  "nullable": true
                },
                "type": {
                  "description": "Type.",
                  "type": "string",
                  "nullable": true
                },
                "user": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to user information"
                }
              },
              "example": {
                "_embedded": {
                  "property1": {},
                  "property2": {}
                },
                "activated": true,
                "company": {
                  "href": "...",
                  "id": "..."
                },
                "contract": {},
                "currency": "...",
                "customAttributes": [
                  {
                    "attributeType": "TEXT",
                    "name": "...",
                    "value": "...",
                    "valueKeys": []
                  },
                  {
                    "attributeType": "MULTISELECT",
                    "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": {},
                    "company": {},
                    "currency": "...",
                    "endDate": 12345,
                    "endOfDiscountDate": 12345,
                    "frequency": "...",
                    "id": 12345,
                    "links": [],
                    "nextBillingDate": 12345,
                    "paymentPlan": {},
                    "referenceCode": "...",
                    "salesSupportUser": {},
                    "startDate": 12345,
                    "status": "...",
                    "totalPrice": 12345,
                    "type": "...",
                    "user": {}
                  },
                  {
                    "_embedded": {},
                    "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": {
                    "alignWithParentCycleStartDate": true,
                    "autoExtensionPricingId": 12345,
                    "blockContractDowngrades": true,
                    "blockContractUpgrades": true,
                    "blockSwitchToShorterContract": true,
                    "cancellationPeriodLimit": 12345,
                    "endOfContractGracePeriod": 12345,
                    "gracePeriod": {},
                    "minimumServiceLength": 12345,
                    "terminationFee": {}
                  },
                  "cost": [
                    {},
                    {}
                  ],
                  "discount": {
                    "amount": {},
                    "availableRedemptions": 12345,
                    "description": "...",
                    "expirationDate": 12345,
                    "numOfBillingCycles": 12345,
                    "percentage": 12345,
                    "pricingUnit": "CALLING_FEATURE",
                    "startDate": 12345
                  },
                  "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": "..."
                }
              },
              "nullable": true
            },
            {
              "description": "Current order"
            }
          ]
        },
        "product": {
          "allOf": [
            {
              "type": "object",
              "title": "LinkWS",
              "properties": {
                "href": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                }
              },
              "example": {
                "href": "...",
                "id": "..."
              },
              "nullable": true
            },
            {
              "description": "Link to product information"
            }
          ]
        },
        "redirectUrl": {
          "description": "Interactive endpoint URL",
          "type": "string",
          "nullable": true
        },
        "status": {
          "description": "Subscription status (Valid values are INITIALIZED, FAILED, FREE_TRIAL, FREE_TRIAL_EXPIRED, ACTIVE, SUSPENDED, or CANCELLED.)",
          "type": "string",
          "nullable": true
        },
        "upcomingOrder": {
          "allOf": [
            {
              "description": "Resource links",
              "type": "object",
              "title": "Order",
              "properties": {
                "_embedded": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "object",
                    "nullable": true
                  },
                  "nullable": true
                },
                "activated": {
                  "description": "True if the subscription has been activated",
                  "type": "boolean"
                },
                "company": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to company information."
                },
                "contract": {
                  "type": "object",
                  "title": "OrderContract",
                  "properties": {
                    "alignWithParentCycleStartDate": {
                      "description": "For add-on products, determines whether to align the contract start date with the parent subscription start date. This is an internal setting.",
                      "type": "boolean"
                    },
                    "autoExtensionPricingUuid": {
                      "description": "The edition pricing ID to which to bind the contract when it is automatically renewed. To retrieve the value, use the \"uuid\" value from the \"Read payment plan\" https://help.appdirect.com/api/appdirect.html#read-payment-plan request.",
                      "type": "string",
                      "nullable": true
                    },
                    "blockContractDowngrades": {
                      "description": "Determines whether to block downgrades to the contract terms",
                      "type": "boolean"
                    },
                    "blockContractUpgrades": {
                      "description": "Determines whether to block upgrades to the contract terms",
                      "type": "boolean"
                    },
                    "blockSwitchToShorterContract": {
                      "description": "Determines whether to block the ability to switch to a shorter contract",
                      "type": "boolean"
                    },
                    "cancellationPeriodLimit": {
                      "description": "Cancellation period limit",
                      "type": "number",
                      "nullable": true
                    },
                    "continueWithoutContract": {
                      "description": "Determines whether to continue the subscription without a contract",
                      "type": "boolean"
                    },
                    "endOfContractDate": {
                      "description": "End date for contract",
                      "type": "number"
                    },
                    "endOfContractGracePeriod": {
                      "description": "Grace period for end of contract",
                      "type": "number",
                      "nullable": true
                    },
                    "gracePeriodEndDate": {
                      "description": "End date for grace period",
                      "type": "number",
                      "nullable": true
                    },
                    "keepContractDateOnPlanChange": {
                      "description": "Determines whether to keep the contract date if the plan changes",
                      "type": "boolean"
                    },
                    "minimumServiceLength": {
                      "description": "Minimum service length of contract",
                      "type": "number"
                    },
                    "renewal": {},
                    "terminationFee": {},
                    "unitTerms": {
                      "description": "List of contract unit terms",
                      "type": "array",
                      "items": {}
                    }
                  },
                  "example": {
                    "alignWithParentCycleStartDate": true,
                    "autoExtensionPricingUuid": "0a12c84d-984f-4f64-943b-8e6f47a28d55",
                    "blockContractDowngrades": true,
                    "blockContractUpgrades": false,
                    "blockSwitchToShorterContract": true,
                    "cancellationPeriodLimit": null,
                    "continueWithoutContract": true,
                    "endOfContractDate": 1588789800000,
                    "endOfContractGracePeriod": null,
                    "gracePeriodEndDate": null,
                    "keepContractDateOnPlanChange": false,
                    "minimumServiceLength": 24,
                    "renewal": null,
                    "terminationFee": {},
                    "unitTerms": []
                  },
                  "nullable": true,
                  "description": "The contract terms of the order, if applicable. If the order does not have contract terms, this field is null."
                },
                "currency": {
                  "description": "Currency.",
                  "type": "string",
                  "nullable": true
                },
                "customAttributes": {
                  "description": "List of custom attributes associated with this order",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "title": "CustomAttribute",
                    "properties": {},
                    "example": {}
                  }
                },
                "discount": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to the discount applied to this order (optional)"
                },
                "discountId": {
                  "description": "The unique identifier for the discount applied to this order",
                  "type": "number",
                  "nullable": true
                },
                "endDate": {
                  "description": "Order end date.",
                  "type": "number",
                  "nullable": true
                },
                "endOfDiscountDate": {
                  "description": "Discount end date.",
                  "type": "number",
                  "nullable": true
                },
                "frequency": {
                  "description": "Frequency.",
                  "type": "string",
                  "nullable": true
                },
                "id": {
                  "description": "ID.",
                  "type": "number",
                  "nullable": true
                },
                "links": {
                  "description": "Resource links",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "title": "Link",
                    "properties": {},
                    "example": {},
                    "nullable": true
                  }
                },
                "nextBillingDate": {
                  "description": "Next billing date for the order",
                  "type": "number",
                  "nullable": true
                },
                "nextOrder": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to the next order for this subscription"
                },
                "oneTimeOrders": {
                  "description": "List of one time orders associated with this subscription order",
                  "type": "array",
                  "items": {
                    "description": "Resource links",
                    "type": "object",
                    "title": "OrderListing",
                    "properties": {},
                    "example": {},
                    "nullable": true
                  }
                },
                "orderLines": {
                  "description": "List of order lines for this subscription order",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "title": "OrderLine",
                    "properties": {},
                    "example": {}
                  }
                },
                "parameters": {
                  "description": "List of custom parameters associated with this order",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "title": "Parameter",
                    "properties": {},
                    "example": {}
                  }
                },
                "parentSubscriptionId": {
                  "description": "Parent subscription ID of an add-on subscription",
                  "type": "number",
                  "nullable": true
                },
                "paymentPlan": {
                  "description": "Payment plan for this order",
                  "type": "object",
                  "title": "PaymentPlan",
                  "properties": {
                    "allowCustomUsage": {
                      "description": "Custom usage allowed",
                      "type": "boolean"
                    },
                    "contract": {},
                    "cost": {
                      "description": "List of plan costs",
                      "type": "array",
                      "items": {}
                    },
                    "discount": {},
                    "frequency": {
                      "description": "Billing frequency: MONTHLY, QUARTERLY, SIX_MONTHS, YEARLY, TWO_YEARS, THREE_YEARS, DAILY",
                      "type": "string"
                    },
                    "href": {
                      "description": "URL to payment plan details",
                      "type": "string"
                    },
                    "id": {
                      "description": "ID",
                      "type": "number"
                    },
                    "isPrimaryPrice": {
                      "description": "Is primary price",
                      "type": "boolean"
                    },
                    "keepBillDateOnUsageChange": {
                      "description": "Keep bill date on usage change",
                      "type": "boolean"
                    },
                    "separatePrepaid": {
                      "description": "Separate prepaid",
                      "type": "boolean"
                    },
                    "tld": {
                      "description": "If plan is part of a domain reseller product, this is the tld this plan offers",
                      "type": "string"
                    },
                    "uuid": {
                      "description": "Unique identifier",
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "example": {
                    "allowCustomUsage": true,
                    "contract": {},
                    "cost": [],
                    "discount": {},
                    "frequency": "...",
                    "href": "...",
                    "id": 12345,
                    "isPrimaryPrice": true,
                    "keepBillDateOnUsageChange": true,
                    "separatePrepaid": true,
                    "tld": "...",
                    "uuid": "..."
                  }
                },
                "paymentPlanId": {
                  "description": "The unique identifier for the payment plan for this order",
                  "type": "number",
                  "nullable": true
                },
                "previousOrder": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to the previous order for this subscription"
                },
                "referenceCode": {
                  "description": "Reference code",
                  "type": "string",
                  "nullable": true
                },
                "salesSupportCompany": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to sales support company information"
                },
                "salesSupportUser": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to sales support user information"
                },
                "serviceStartDate": {
                  "description": "Service start date for the order",
                  "type": "number",
                  "nullable": true
                },
                "startDate": {
                  "description": "Order start date",
                  "type": "number",
                  "nullable": true
                },
                "status": {
                  "description": "Order status",
                  "type": "string",
                  "nullable": true
                },
                "totalPrice": {
                  "description": "Total price for the order",
                  "type": "number",
                  "nullable": true
                },
                "type": {
                  "description": "Type.",
                  "type": "string",
                  "nullable": true
                },
                "user": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to user information"
                }
              },
              "example": {
                "_embedded": {
                  "property1": {},
                  "property2": {}
                },
                "activated": true,
                "company": {
                  "href": "...",
                  "id": "..."
                },
                "contract": {},
                "currency": "...",
                "customAttributes": [
                  {
                    "attributeType": "TEXT",
                    "name": "...",
                    "value": "...",
                    "valueKeys": []
                  },
                  {
                    "attributeType": "MULTISELECT",
                    "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": {},
                    "company": {},
                    "currency": "...",
                    "endDate": 12345,
                    "endOfDiscountDate": 12345,
                    "frequency": "...",
                    "id": 12345,
                    "links": [],
                    "nextBillingDate": 12345,
                    "paymentPlan": {},
                    "referenceCode": "...",
                    "salesSupportUser": {},
                    "startDate": 12345,
                    "status": "...",
                    "totalPrice": 12345,
                    "type": "...",
                    "user": {}
                  },
                  {
                    "_embedded": {},
                    "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": {
                    "alignWithParentCycleStartDate": true,
                    "autoExtensionPricingId": 12345,
                    "blockContractDowngrades": true,
                    "blockContractUpgrades": true,
                    "blockSwitchToShorterContract": true,
                    "cancellationPeriodLimit": 12345,
                    "endOfContractGracePeriod": 12345,
                    "gracePeriod": {},
                    "minimumServiceLength": 12345,
                    "terminationFee": {}
                  },
                  "cost": [
                    {},
                    {}
                  ],
                  "discount": {
                    "amount": {},
                    "availableRedemptions": 12345,
                    "description": "...",
                    "expirationDate": 12345,
                    "numOfBillingCycles": 12345,
                    "percentage": 12345,
                    "pricingUnit": "CALLING_FEATURE",
                    "startDate": 12345
                  },
                  "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": "..."
                }
              },
              "nullable": true
            },
            {
              "description": "Upcoming order"
            }
          ]
        },
        "user": {
          "allOf": [
            {
              "type": "object",
              "title": "LinkWS",
              "properties": {
                "href": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                }
              },
              "example": {
                "href": "...",
                "id": "..."
              },
              "nullable": true
            },
            {
              "description": "Link to user information"
            }
          ]
        }
      },
      "example": {
        "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": {
            "cancellationPeriodLimit": null,
            "endOfContractDate": 123451232,
            "endOfContractGracePeriod": null,
            "gracePeriodEndDate": null,
            "minimumServiceLength": 24,
            "renewal": null,
            "terminationFee": {
              "description": "Fee",
              "estimatedCost": 324.56,
              "percentage": 100,
              "price": null,
              "type": "PERCENTAGE"
            }
          },
          "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": "...",
              "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": "..."
          }
        },
        "user": {
          "href": "...",
          "id": "..."
        }
      },
      "nullable": true
    },
    {
      "description": "Subscription data object"
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions/preview',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions/preview', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions/preview',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions/preview");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "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": {
      "cancellationPeriodLimit": null,
      "endOfContractDate": 123451232,
      "endOfContractGracePeriod": null,
      "gracePeriodEndDate": null,
      "minimumServiceLength": 24,
      "renewal": null,
      "terminationFee": {
        "description": "Fee",
        "estimatedCost": 324.56,
        "percentage": 100,
        "price": null,
        "type": "PERCENTAGE"
      }
    },
    "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": "...",
        "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": "..."
    }
  },
  "user": {
    "href": "...",
    "id": "..."
  }
}

Example response

{
  "assignedUsers": null,
  "company": null,
  "creationDate": null,
  "edition": null,
  "endDate": null,
  "externalAccountId": null,
  "id": null,
  "maxUsers": null,
  "order": {
    "activated": false,
    "company": null,
    "contract": null,
    "currency": "USD",
    "discount": null,
    "discountId": null,
    "endDate": null,
    "endOfDiscountDate": null,
    "frequency": "MONTHLY",
    "id": null,
    "links": [],
    "nextBillingDate": 1483599600000,
    "nextOrder": null,
    "oneTimeOrders": [],
    "orderLines": [
      {
        "description": "Test App 1 - null - Per User Fee",
        "listingPrice": 10,
        "price": 10,
        "quantity": 1,
        "totalPrice": 10,
        "type": "ITEM",
        "unit": "USER"
      }
    ],
    "parameters": [],
    "paymentPlan": {
      "allowCustomUsage": false,
      "contract": {
        "alignWithParentCycleStartDate": false,
        "autoExtensionPricingId": null,
        "blockContractDowngrades": false,
        "blockContractUpgrades": false,
        "blockSwitchToShorterContract": false,
        "cancellationPeriodLimit": null,
        "endOfContractGracePeriod": null,
        "gracePeriod": null,
        "minimumServiceLength": null,
        "terminationFee": null
      },
      "costs": [
        {
          "amount": {
            "USD": 10
          },
          "blockContractDecrease": false,
          "blockContractIncrease": false,
          "blockOriginalContractDecrease": false,
          "id": 2,
          "increment": 1,
          "maxUnits": null,
          "meteredUsage": false,
          "minUnits": 0,
          "pricePerIncrement": false,
          "pricingStrategy": "UNIT",
          "unit": "USER",
          "unitDependency": null
        }
      ],
      "discount": null,
      "frequency": "MONTHLY",
      "href": "http://appdirect/api/marketplace/v1/products/2/editions/2/paymentPlans/2",
      "id": 2,
      "isPrimaryPrice": false,
      "keepBillDateOnUsageChange": false,
      "primaryPrice": false,
      "separatePrepaid": false,
      "uuid": "eaca1aa5-4c4f-44cb-8cf4-eb0aa9267273"
    },
    "paymentPlanId": 2,
    "previousOrder": null,
    "referenceCode": null,
    "salesSupportUser": null,
    "startDate": 1480921200000,
    "status": "PENDING_REMOTE_CREATION",
    "totalPrice": 10,
    "type": "NEW",
    "user": null
  },
  "product": null,
  "redirectUrl": null,
  "status": null,
  "upcomingOrder": null,
  "user": null
}

POST/billing/v1/companies/{companyId}/users/{userId}/subscriptions/preview

Preview creating a subscription for the given user and company using the provided data

Parameters

Parameter Type Data Type Default Description
*companyId path string User's company ID
*userId path string User ID

Body Parameters

Subscription data object

Subscription object:

Property Type Description
assignedUsers number

Number of users assigned to subscription

bundleApplicationId number

Bundle ID. Specify during subscription creation if you want the subscription to be part of a bundle. Retrieve a list of bundle IDs with the List all bundles request, and then specify the desired ID here. Only supported for the Create a subscription endpoint and not supported for any other endpoints.

company LinkWS

Link to company information

creationDate number

Subscription creation date

edition LinkWS

Link to edition information

endDate number

Subscription end date

externalAccountId string

External account identifier (from vendor)

externalId string

External ID for a subscription. Not used to change or create a subscription. If a subscription has an external ID, the ID is included in the responses to the list subscription or read subscription APIs. To set an external ID of a subscription, use the Update subscriptions API.

id string

ID

internalId string

The UUID for a subscription

label string

Label for a subscription

maxUsers number

Maximum number of users allowed to be assigned to subscription

order Order

Current order

product LinkWS

Link to product information

redirectUrl string

Interactive endpoint URL

status string

Subscription status (Valid values are INITIALIZED, FAILED, FREE_TRIAL, FREE_TRIAL_EXPIRED, ACTIVE, SUSPENDED, or CANCELLED.)

upcomingOrder Order

Upcoming order

user LinkWS

Link to user information

Responses

Status Meaning Description Definition
201 Created Created Subscription
400 Bad Request Bad Request
404 Not Found Not Found

List all subscriptions for a company

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/companies/{companyId}/subscriptions \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/companies/{companyId}/subscriptions HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/subscriptions',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/subscriptions',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/subscriptions', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/subscriptions',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/companies/{companyId}/subscriptions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "assignmentCount": 1,
    "company": {
      "href": "http://appdirect/api/account/v1/companies/e83cd3d6-7865-4fc2-9d7c-603ad17dd639",
      "id": "e83cd3d6-7865-4fc2-9d7c-603ad17dd639"
    },
    "creationDate": 1481002406580,
    "edition": {
      "href": "http://appdirect/api/marketplace/v1/products/2/editions/2",
      "id": "2"
    },
    "endDate": null,
    "externalAccountId": "d2f4acf1-fb5a-4c4a-921f-75c4b6bfff08",
    "id": "1b577640-9b77-47bc-beb8-ed59accb4836",
    "links": [],
    "maxUsers": 1,
    "order": {
      "href": "http://appdirect/api/billing/v1/orders/1",
      "id": "1"
    },
    "parentSubscriptionId": null,
    "product": {
      "href": "http://appdirect/api/marketplace/v1/products/2",
      "id": "2"
    },
    "status": "ACTIVE",
    "suspensionReason": "API",
    "user": {
      "href": "http://appdirect/api/account/v1/users/c47d0fd7-b67a-4e07-84f8-f93dfafbeecc",
      "id": "c47d0fd7-b67a-4e07-84f8-f93dfafbeecc"
    }
  }
]

GET/billing/v1/companies/{companyId}/subscriptions

List all of the subscriptions for the given company

Parameters

Parameter Type Data Type Default Description
applicationIds query number Filters subscriptions by internal application ID
bundleApplicationId query number Filters subscriptions by internal bundle ID
*companyId path string Company ID
count query integer 250 Number of results to fetch. Used for paging.
discountId query number Filters subscriptions by internal discount ID
editionId query number Filters subscriptions by internal edition ID
expand query string Expands filtered subscription results to include details about the specified query parameters, one or more of "order", "product", or "edition".
fromDate query string Filters results to only include subscriptions that were created on or after the specified date in yyyy/MM/DD HH:mm:ss format
lastModified query number Filters subscriptions by last modified date
orderReferenceCode query string Filters subscriptions by order reference code
paymentPlanId query number Filters subscriptions by internal payment plan ID
sortField query string of enum:
APPLICATION
COMPANY
DATE
OWNER
STATUS
SUBSCRIPTION_ID
DATE Sort field
sortOrder query string of enum:
ASC
DESC
ASC Sort order
start query integer 0 First result index. Used for paging.
status query string Filters subscriptions by status
toDate query string Filters results to only include subscriptions that were created on or before the specified date in yyyy/MM/DD HH:mm:ss format

Responses

Status Meaning Description Definition
200 OK OK array of SubscriptionListing
404 Not Found Not Found

List all purchase orders for a subscription

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/orders \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/orders HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/orders',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/orders',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/orders', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/orders',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/orders");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "orders": [
    {
      "activated": false,
      "company": {
        "href": "http://appdirect/api/account/v1/companies/a470269b-f5d1-4e33-b739-9835f50c0683",
        "id": "a470269b-f5d1-4e33-b739-9835f50c0683"
      },
      "contract": null,
      "currency": "USD",
      "discount": null,
      "discountId": null,
      "endDate": null,
      "endOfDiscountDate": null,
      "frequency": "MONTHLY",
      "id": 15,
      "links": [
        {
          "href": "http://appdirect/api/billing/v1/subscriptions/5096ed99-675b-449a-926e-0ee2c0aa4128",
          "rel": "subscription"
        }
      ],
      "nextBillingDate": 1483677843538,
      "nextOrder": null,
      "oneTimeOrders": [],
      "orderLines": [],
      "parameters": [],
      "paymentPlan": {
        "allowCustomUsage": false,
        "contract": {
          "alignWithParentCycleStartDate": false,
          "autoExtensionPricingId": 24,
          "blockContractDowngrades": false,
          "blockContractUpgrades": false,
          "blockSwitchToShorterContract": false,
          "cancellationPeriodLimit": null,
          "endOfContractGracePeriod": null,
          "gracePeriod": null,
          "minimumServiceLength": 3,
          "terminationFee": null
        },
        "costs": [
          {
            "amount": {
              "USD": 10
            },
            "blockContractDecrease": false,
            "blockContractIncrease": false,
            "blockOriginalContractDecrease": false,
            "id": 24,
            "increment": 1,
            "maxUnits": null,
            "meteredUsage": false,
            "minUnits": 0,
            "pricePerIncrement": false,
            "pricingStrategy": "UNIT",
            "unit": "USER",
            "unitDependency": null
          }
        ],
        "discount": null,
        "frequency": "MONTHLY",
        "href": "http://appdirect/api/marketplace/v1/products/11/editions/14/paymentPlans/24",
        "id": 24,
        "isPrimaryPrice": false,
        "keepBillDateOnUsageChange": false,
        "primaryPrice": false,
        "separatePrepaid": false,
        "uuid": "865c805d-5efd-459d-b605-3b6587376727"
      },
      "paymentPlanId": 24,
      "previousOrder": null,
      "referenceCode": null,
      "salesSupportUser": null,
      "startDate": 1480999443538,
      "status": "ACTIVE",
      "totalPrice": 0,
      "type": "NEW",
      "user": {
        "href": "http://appdirect/api/account/v1/users/ef508ef9-5814-4788-aba4-488d98947c4c",
        "id": "ef508ef9-5814-4788-aba4-488d98947c4c"
      }
    }
  ],
  "total": 1
}

GET/billing/v1/subscriptions/{subscriptionId}/orders

List all the purchase orders for the given subscription

Parameters

Parameter Type Data Type Default Description
applicationIds query number Filters subscriptions by internal application ID
count query integer 250 Number of results to fetch. Used for paging.
currency query string of enum:
USD
CAD
EUR
JPY
GBP
KRW
CHF
SEK
SGD
MYR
AUD
MXN
INR
BRL
DKK
NZD
NOK
ZAR
PHP
CNY
SAR
GTQ
IDR
ARS
COP
PEN
Filters subscriptions by currency
frequency query string of enum:
ONE_TIME
MONTHLY
QUARTERLY
SIX_MONTHS
YEARLY
TWO_YEARS
THREE_YEARS
DAILY
Filters subscriptions by pricing frequency
fromCreationDate query number Filters results to only include subscriptions that were created on or after the specified date
orderReferenceCode query string Filters subscriptions by order reference code
sortField query string of enum:
DATE
ORDER_ID
TOTAL
DATE Sort field.
sortOrder query string of enum:
ASC
DESC
ASC Sort order.
start query integer 0 First result index. Used for paging.
startDateFrom query string Filters results to only include subscriptions where billing starts on or after the specified date (format: Mon March 01 00:00:00 EDT 2015)
startDateTo query string Filters results to only include subscriptions where billing starts on or before the specified date (format: Mon March 01 00:00:00 EDT 2015)
status query string of enum:
INITIALIZED
PENDING_USER_APPROVAL
PENDING_REMOTE_CREATION
PENDING_MANUAL_RECOVERY
PENDING_ASYNCHRONOUS_CREATION
FREE_TRIAL
ACTIVE
FINISHED
ONE_TIME
CANCELLED
SUSPENDED
FREE_TRIAL_EXPIRED
FREE_TRIAL_CANCELLED
DELETED
FAILED
UPCOMING
PENDING_MIGRATION_ACTIVATION
PENDING_DELAYED_PROVISIONING
Filters subscriptions by order status
*subscriptionId path string Subscription ID.
toCreationDate query number Filters results to only include subscriptions that were created on or before the specified date
type query string of enum:
NEW
MIGRATION
ADOPTION
FREE_TRIAL_ACTIVATION
TERMINATION_FEE
END_OF_CONTRACT_MIGRATION
REFUND
CREDIT
ONE_TIME_FEE
ADDITIONAL_FEE
END_OF_DISCOUNT_MIGRATION
METERED_USAGE
Filters subscriptions by order type.
NEW: The first order of a subscription. The order contains flat fees (one time or recurring) for this subscription. It is active until the subscription is updated or canceled.
MIGRATION: The order created after a subscription change. The order includes flat fees for both one-time and recurring editions.
ADOPTION: The order created by an administrator who has taken ownership of an application from another user within the same company.
FREE_TRIAL_ACTIVATION: Created when a free trial is manually upgraded to a paid subscription. Any subscription that is updated from free trial to paid automatically keeps its NEW status purchase order.
TERMINATION_FEE: A subscription is canceled that had a termination fee. This purchase order represents the fees incurred as a result of the cancellation.
END_OF_CONTRACT_MIGRATION: Created when a subscription update takes place as a result of a contract extension. If the contract autorenewal is set to either continue without a contract or renew the contract with the same pricing plan, then no migration occurs and the original purchase order is updated to include the new end date for the contract.
REFUND: Created when a refund is performed. The refund purchase order is created for only on-platform refunds. Off-platform refunds do not generate this type of purchase order.
CREDIT: Created during subscription update events. Any subscription update calculates a paid period and a credit period. The credit is then provided to the user to prorate the subscription.
ONE_TIME_FEE: Created if an edition includes one-time setup fees.
ADDITIONAL_FEE: Used for off-order charges. A developer change creates an off-order charge and charges their customer a custom amount outside of the normal subscription cycle.
END_OF_DISCOUNT_MIGRATION: Created after a discount of limited duration expires. This purchase order is created to represent the updated costs without the discount.
METERED_USAGE: A purchase order created to accumulate usage fees during a billing period. The order is only valid for the billing period but it is updated with usage lines over the course of the billing period. A metered purchase order is invoiced in arrears at the end of the billing cycle.

Responses

Status Meaning Description Definition
200 OK OK OrderDetailedListing

List all subscriptions for a user

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/companies/{companyId}/users/{userId}/subscriptions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "assignmentCount": 1,
    "company": {
      "href": "http://appdirect/api/account/v1/companies/e83cd3d6-7865-4fc2-9d7c-603ad17dd639",
      "id": "e83cd3d6-7865-4fc2-9d7c-603ad17dd639"
    },
    "creationDate": 1481002406580,
    "edition": {
      "href": "http://appdirect/api/marketplace/v1/products/2/editions/2",
      "id": "2"
    },
    "endDate": null,
    "externalAccountId": "d2f4acf1-fb5a-4c4a-921f-75c4b6bfff08",
    "id": "1b577640-9b77-47bc-beb8-ed59accb4836",
    "links": [],
    "maxUsers": 1,
    "order": {
      "href": "http://appdirect/api/billing/v1/orders/1",
      "id": "1"
    },
    "parentSubscriptionId": null,
    "product": {
      "href": "http://appdirect/api/marketplace/v1/products/2",
      "id": "2"
    },
    "status": "ACTIVE",
    "suspensionReason": "API",
    "user": {
      "href": "http://appdirect/api/account/v1/users/c47d0fd7-b67a-4e07-84f8-f93dfafbeecc",
      "id": "c47d0fd7-b67a-4e07-84f8-f93dfafbeecc"
    }
  }
]

GET/billing/v1/companies/{companyId}/users/{userId}/subscriptions

List all of the subscriptions for the given user

Parameters

Parameter Type Data Type Default Description
applicationIds query number Filters subscriptions by internal application ID
bundleApplicationId query number Filters subscriptions by internal bundle ID
*companyId path string User's company ID
count query integer 250 Number of results to fetch. Used for paging.
discountId query number Filters subscriptions by internal discount ID
editionId query number Filters subscriptions by internal edition ID
expand query string Expands filtered subscription results to include details about the specified query parameters, one or more of "order", "product", or "edition".
fromDate query string Filters results to only include subscriptions that were created on or after the specified date in yyyy/MM/DD HH:mm:ss format
lastModified query number Filters subscriptions by last modified date
orderReferenceCode query string Filters subscriptions by order reference code
paymentPlanId query number Filters subscriptions by internal payment plan ID
sortField query string of enum:
APPLICATION
COMPANY
DATE
OWNER
STATUS
SUBSCRIPTION_ID
DATE Sort field
sortOrder query string of enum:
ASC
DESC
ASC Sort order
start query integer 0 First result index. Used for paging.
status query string Filters subscriptions by order status
toDate query string Filters results to only include subscriptions that were created on or before the specified date in yyyy/MM/DD HH:mm:ss format
*userId path string User ID

Responses

Status Meaning Description Definition
200 OK OK array of SubscriptionListing
404 Not Found Not Found

Update subscriptions

Example request

curl -X PATCH https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PATCH https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}',
  method: 'patch',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "type": "object",
      "title": "SubscriptionUpdate",
      "required": [
        "status"
      ],
      "properties": {
        "customAttributes": {
          "description": "An array of subscription custom attributes. If specified in a PATCH request, the values will be updated or added to the subscription. The custom attributes must already be defined in the marketplace (at Manage > Marketplace > Settings > Custom Attributes > Subscription Custom Attributes).",
          "type": "array",
          "items": {
            "description": "A subscription custom attribute, as defined in the marketplace at Manage > Marketplace > Settings > Custom Attributes > Subscription Custom Attributes",
            "type": "object",
            "title": "SubscriptionCustomAttribute",
            "properties": {
              "name": {
                "description": "The key name of an existing subscription custom attribute",
                "type": "string"
              },
              "values": {
                "description": "Values of the custom attributes. If the attribute definition is MULTISELECT, all values must be a subset of the value options defined in the marketplace. If the attribute definition is TEXT, only one value is allowed.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "example": {
              "name": "test1",
              "values": [
                "value1",
                "value2"
              ]
            }
          }
        },
        "externalId": {
          "description": "The external ID to add or update in the subscription. Only set an external ID if required.",
          "type": "string"
        },
        "status": {
          "description": "The desired subscription lifecycle status. Set to SUSPENDED to suspend an active subscription, or ACTIVE to reactivate a suspended subscription.",
          "type": "string",
          "enum": [
            "ACTIVE",
            "SUSPENDED"
          ]
        },
        "suspensionReasonMessage": {
          "description": "Reason for subscription suspension. Only used, and required, when setting the status to SUSPENDED.",
          "type": "string"
        }
      },
      "example": {
        "customAttributes": [
          {
            "name": "test1",
            "values": [
              "value1"
            ]
          },
          {
            "name": "test2",
            "values": [
              "value2",
              "value3"
            ]
          }
        ],
        "status": "SUSPENDED",
        "suspensionReasonMessage": "The customer is undergoing an internal investigation. All subscriptions are suspended."
      },
      "nullable": true
    },
    {
      "description": "Subscription data object"
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.patch('https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.patch 'https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "customAttributes": [
    {
      "name": "test1",
      "values": [
        "value1"
      ]
    },
    {
      "name": "test2",
      "values": [
        "value2",
        "value3"
      ]
    }
  ],
  "status": "SUSPENDED",
  "suspensionReasonMessage": "The customer is undergoing an internal investigation. All subscriptions are suspended."
}

Example response

{
  "assignedUsers": 1,
  "company": {
    "href": "https://appdirect/api/account/v1/companies/c37aa8fa-1585-4737-b04a-94e177198897",
    "id": "c37aa8fa-1585-4737-b04a-94e177198897"
  },
  "creationDate": 1481002406580,
  "customAttributes": [
    {
      "name": "test1",
      "values": [
        "value1"
      ]
    },
    {
      "name": "test2",
      "values": [
        "value2",
        "value3"
      ]
    }
  ],
  "edition": {
    "href": "https://appdirect/api/marketplace/v1/products/640/editions/1110",
    "id": "1110"
  },
  "endDate": null,
  "externalAccountId": "d2f4acf1-fb5a-4c4a-921f-75c4b6bfff08",
  "id": "1b577640-9b77-47bc-beb8-ed59accb4836",
  "maxUsers": 1,
  "order": {
    "activated": false,
    "company": null,
    "contract": null,
    "currency": "USD",
    "discount": null,
    "discountId": null,
    "endDate": null,
    "endOfDiscountDate": null,
    "frequency": "MONTHLY",
    "id": null,
    "links": [
      {
        "href": "http://appdirect/api/billing/v1/subscriptions/1b577640-9b77-47bc-beb8-ed59accb4836",
        "rel": "subscription"
      }
    ],
    "nextBillingDate": 1483599600000,
    "nextOrder": null,
    "oneTimeOrders": [
      {
        "company": null,
        "currency": "USD",
        "endDate": 1483599600000,
        "endOfDiscountDate": null,
        "frequency": "MONTHLY",
        "id": null,
        "links": [],
        "nextBillingDate": 1483599600000,
        "paymentPlan": {
          "href": "http://appdirect/api/marketplace/v1/products/2/editions/2/paymentPlans/2",
          "id": "2"
        },
        "referenceCode": null,
        "salesSupportUser": null,
        "startDate": 1480921200000,
        "status": "INITIALIZED",
        "totalPrice": -10,
        "type": "CREDIT",
        "user": null
      }
    ],
    "orderLines": [
      {
        "description": "Test App 1 - null - Per User Fee",
        "listingPrice": 10,
        "price": 10,
        "quantity": 10,
        "totalPrice": 100,
        "type": "ITEM",
        "unit": "USER"
      }
    ],
    "parameters": [],
    "paymentPlan": {
      "allowCustomUsage": false,
      "contract": {
        "alignWithParentCycleStartDate": false,
        "autoExtensionPricingId": null,
        "blockContractDowngrades": false,
        "blockContractUpgrades": false,
        "blockSwitchToShorterContract": false,
        "cancellationPeriodLimit": null,
        "endOfContractGracePeriod": null,
        "gracePeriod": null,
        "minimumServiceLength": null,
        "terminationFee": null
      },
      "costs": [
        {
          "amount": {
            "USD": 10
          },
          "blockContractDecrease": false,
          "blockContractIncrease": false,
          "blockOriginalContractDecrease": false,
          "id": 2,
          "increment": 1,
          "maxUnits": null,
          "meteredUsage": false,
          "minUnits": 0,
          "pricePerIncrement": false,
          "pricingStrategy": "UNIT",
          "unit": "USER",
          "unitDependency": null
        }
      ],
      "discount": null,
      "frequency": "MONTHLY",
      "href": "http://appdirect/api/marketplace/v1/products/2/editions/2/paymentPlans/2",
      "id": 2,
      "isPrimaryPrice": false,
      "keepBillDateOnUsageChange": false,
      "primaryPrice": false,
      "separatePrepaid": false,
      "uuid": "eaca1aa5-4c4f-44cb-8cf4-eb0aa9267273"
    },
    "paymentPlanId": 2,
    "previousOrder": null,
    "referenceCode": null,
    "salesSupportUser": null,
    "startDate": 1480921200000,
    "status": "PENDING_REMOTE_CREATION",
    "totalPrice": 100,
    "type": "MIGRATION",
    "user": null
  },
  "product": {
    "href": "https://appdirect/api/marketplace/v1/products/640",
    "id": "640"
  },
  "redirectUrl": null,
  "status": "ACTIVE",
  "upcomingOrder": null,
  "user": {
    "href": "https://appdirect/api/account/v1/users/ce9ece33-3ea4-4e80-bbcf-4af251fcb37e",
    "id": "ce9ece33-3ea4-4e80-bbcf-4af251fcb37e"
  }
}

PATCH/billing/v1/subscriptions/{subscriptionId}

Use this request to manage subscription lifecycles (suspend and activate subscriptions), update external IDs, and add or change subscription custom attribute values.

Parameters

Parameter Type Data Type Default Description
*subscriptionId path string Subscription ID

Body Parameters

Subscription data object

SubscriptionUpdate object:

Property Type Description
customAttributes array of SubscriptionCustomAttribute

An array of subscription custom attributes. If specified in a PATCH request, the values will be updated or added to the subscription. The custom attributes must already be defined in the marketplace (at Manage > Marketplace > Settings > Custom Attributes > Subscription Custom Attributes).

externalId string

The external ID to add or update in the subscription. Only set an external ID if required.

status string

The desired subscription lifecycle status. Set to SUSPENDED to suspend an active subscription, or ACTIVE to reactivate a suspended subscription.

suspensionReasonMessage string

Reason for subscription suspension. Only used, and required, when setting the status to SUSPENDED.

Responses

Status Meaning Description Definition
200 OK OK Subscription
400 Bad Request Bad Request
404 Not Found Subscription not found
412 Precondition Failed The subscription cannot be updated

Delete an add-on instance

Example request

curl -X DELETE https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/addons/{addonInstanceUuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/addons/{addonInstanceUuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/addons/{addonInstanceUuid}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/addons/{addonInstanceUuid}',
{
  method: 'DELETE'

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/addons/{addonInstanceUuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/addons/{addonInstanceUuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/addons/{addonInstanceUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE/billing/v1/subscriptions/{subscriptionId}/addons/{addonInstanceUuid}

Delete the given add-on instance on the given subscription

Parameters

Parameter Type Data Type Default Description
*addonInstanceUuid path string
*subscriptionId path string Subscription ID

Responses

Status Meaning Description Definition
204 No Content No Content
404 Not Found Not Found

Request cancellation

Example request

curl -X DELETE https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}',
{
  method: 'DELETE'

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE/billing/v1/subscriptions/{subscriptionId}

Requests cancellation of the given subscription

Parameters

Parameter Type Data Type Default Description
sendNotification query boolean true Sends email notification if true
*subscriptionId path string Subscription ID

Responses

Status Meaning Description Definition
202 Accepted Subscription cancellation was requested successfully
204 No Content Subscription cancellation was requested and executed successfully
404 Not Found Not Found

Update an add-on instance

Example request

curl -X PUT https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/addons/{addonInstanceUuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/addons/{addonInstanceUuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/addons/{addonInstanceUuid}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "type": "object",
      "title": "AddonInstance",
      "properties": {
        "creationDate": {
          "description": "Creation date of the addon instance",
          "type": "number",
          "nullable": true
        },
        "offeringUuid": {
          "description": "Unique identifier for add-on offering",
          "type": "string",
          "nullable": true
        },
        "order": {
          "allOf": [
            {
              "allOf": [
                {
                  "description": "Resource links",
                  "type": "object",
                  "title": "BaseOrder",
                  "properties": {
                    "_embedded": {},
                    "company": {},
                    "currency": {},
                    "endDate": {},
                    "endOfDiscountDate": {},
                    "frequency": {},
                    "id": {},
                    "links": {},
                    "nextBillingDate": {},
                    "parentSubscriptionId": {},
                    "referenceCode": {},
                    "salesSupportCompany": {},
                    "salesSupportUser": {},
                    "serviceStartDate": {},
                    "startDate": {},
                    "status": {},
                    "totalPrice": {},
                    "type": {},
                    "user": {}
                  },
                  "example": {
                    "_embedded": {},
                    "company": {},
                    "currency": "...",
                    "endDate": 12345,
                    "endOfDiscountDate": 12345,
                    "frequency": "...",
                    "id": 12345,
                    "links": [],
                    "nextBillingDate": 12345,
                    "parentSubscriptionId": 12345,
                    "referenceCode": "...",
                    "salesSupportCompany": {},
                    "salesSupportUser": {},
                    "serviceStartDate": 12345,
                    "startDate": 12345,
                    "status": "...",
                    "totalPrice": 12345,
                    "type": "...",
                    "user": {}
                  },
                  "nullable": true
                },
                {
                  "type": "object",
                  "title": "Order",
                  "properties": {
                    "activated": {},
                    "contract": {},
                    "customAttributes": {},
                    "discount": {},
                    "discountId": {},
                    "nextOrder": {},
                    "oneTimeOrders": {},
                    "orderLines": {},
                    "parameters": {},
                    "paymentPlan": {},
                    "paymentPlanId": {},
                    "previousOrder": {}
                  },
                  "example": {
                    "_embedded": {},
                    "activated": true,
                    "company": {},
                    "contract": {},
                    "currency": "...",
                    "customAttributes": [],
                    "discount": {},
                    "discountId": 12345,
                    "endDate": 12345,
                    "endOfDiscountDate": 12345,
                    "frequency": "...",
                    "id": 12345,
                    "links": [],
                    "nextBillingDate": 12345,
                    "nextOrder": {},
                    "oneTimeOrders": [],
                    "orderLines": [],
                    "parameters": [],
                    "paymentPlan": {},
                    "paymentPlanId": 12345,
                    "previousOrder": {},
                    "referenceCode": "...",
                    "salesSupportUser": {},
                    "startDate": 12345,
                    "status": "...",
                    "totalPrice": 12345,
                    "type": "...",
                    "user": {}
                  },
                  "nullable": true
                }
              ]
            },
            {
              "description": "Current order for the addon instance"
            }
          ]
        },
        "status": {
          "description": "Addon instance status. May be ACTIVE, CANCELLED or FAILED.",
          "type": "string",
          "nullable": true
        },
        "units": {
          "description": "Units for add-on instance",
          "type": "number",
          "nullable": true
        },
        "uuid": {
          "description": "Unique identifier for add-on instance",
          "type": "string",
          "nullable": true
        }
      },
      "example": {
        "creationDate": 12345,
        "offeringUuid": "...",
        "order": {
          "_embedded": {
            "property1": {},
            "property2": {}
          },
          "activated": true,
          "company": {
            "href": "...",
            "id": "..."
          },
          "contract": {},
          "currency": "...",
          "customAttribute": [
            {
              "attributeType": "MULTISELECT",
              "name": "...",
              "value": "...",
              "valueKeys": [
                "...",
                "..."
              ]
            },
            {
              "attributeType": "MULTISELECT",
              "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": "..."
          },
          "oneTimeOrder": [
            {
              "_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": {}
            }
          ],
          "orderLine": [
            {},
            {}
          ],
          "parameter": [
            {
              "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": "..."
          }
        },
        "status": "...",
        "units": 12345,
        "uuid": "..."
      },
      "nullable": true
    },
    {
      "description": "Add-on instance object"
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/addons/{addonInstanceUuid}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/addons/{addonInstanceUuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/addons/{addonInstanceUuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/addons/{addonInstanceUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "creationDate": 12345,
  "offeringUuid": "...",
  "order": {
    "_embedded": {
      "property1": {},
      "property2": {}
    },
    "activated": true,
    "company": {
      "href": "...",
      "id": "..."
    },
    "contract": {},
    "currency": "...",
    "customAttribute": [
      {
        "attributeType": "MULTISELECT",
        "name": "...",
        "value": "...",
        "valueKeys": [
          "...",
          "..."
        ]
      },
      {
        "attributeType": "MULTISELECT",
        "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": "..."
    },
    "oneTimeOrder": [
      {
        "_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": {}
      }
    ],
    "orderLine": [
      {},
      {}
    ],
    "parameter": [
      {
        "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": "..."
    }
  },
  "status": "...",
  "units": 12345,
  "uuid": "..."
}

Example response

{
  "offeringUuid": "edfd3e97-642b-4a39-b7e2-41ae36b35b73",
  "units": 10,
  "uuid": "14b0888d-400b-468a-a14e-a7d65cc900df"
}

PUT/billing/v1/subscriptions/{subscriptionId}/addons/{addonInstanceUuid}

Update the given add-on instance on the given subscription using the provided data

Parameters

Parameter Type Data Type Default Description
*addonInstanceUuid path string
*subscriptionId path string Subscription ID

Body Parameters

Add-on instance object

AddonInstance object:

Property Type Description
creationDate number

Creation date of the addon instance

offeringUuid string

Unique identifier for add-on offering

order Order

Current order for the addon instance

status string

Addon instance status. May be ACTIVE, CANCELLED or FAILED.

units number

Units for add-on instance

uuid string

Unique identifier for add-on instance

Responses

Status Meaning Description Definition
200 OK OK AddonInstance
404 Not Found Not Found

Create an add-on instance

Example request

curl -X POST https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/addons \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/addons HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/addons',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "type": "object",
      "title": "AddonInstance",
      "properties": {
        "creationDate": {
          "description": "Creation date of the addon instance",
          "type": "number",
          "nullable": true
        },
        "offeringUuid": {
          "description": "Unique identifier for add-on offering",
          "type": "string",
          "nullable": true
        },
        "order": {
          "allOf": [
            {
              "description": "Resource links",
              "type": "object",
              "title": "Order",
              "properties": {
                "_embedded": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "object",
                    "nullable": true
                  },
                  "nullable": true
                },
                "activated": {
                  "description": "True if the subscription has been activated",
                  "type": "boolean"
                },
                "company": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {},
                    "id": {}
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to company information."
                },
                "contract": {
                  "type": "object",
                  "title": "OrderContract",
                  "properties": {
                    "alignWithParentCycleStartDate": {},
                    "autoExtensionPricingUuid": {},
                    "blockContractDowngrades": {},
                    "blockContractUpgrades": {},
                    "blockSwitchToShorterContract": {},
                    "cancellationPeriodLimit": {},
                    "continueWithoutContract": {},
                    "endOfContractDate": {},
                    "endOfContractGracePeriod": {},
                    "gracePeriodEndDate": {},
                    "keepContractDateOnPlanChange": {},
                    "minimumServiceLength": {},
                    "renewal": {},
                    "terminationFee": {},
                    "unitTerms": {}
                  },
                  "example": {
                    "alignWithParentCycleStartDate": true,
                    "autoExtensionPricingUuid": "0a12c84d-984f-4f64-943b-8e6f47a28d55",
                    "blockContractDowngrades": true,
                    "blockContractUpgrades": false,
                    "blockSwitchToShorterContract": true,
                    "cancellationPeriodLimit": null,
                    "continueWithoutContract": true,
                    "endOfContractDate": 1588789800000,
                    "endOfContractGracePeriod": null,
                    "gracePeriodEndDate": null,
                    "keepContractDateOnPlanChange": false,
                    "minimumServiceLength": 24,
                    "renewal": null,
                    "terminationFee": {},
                    "unitTerms": []
                  },
                  "nullable": true,
                  "description": "The contract terms of the order, if applicable. If the order does not have contract terms, this field is null."
                },
                "currency": {
                  "description": "Currency.",
                  "type": "string",
                  "nullable": true
                },
                "customAttributes": {
                  "description": "List of custom attributes associated with this order",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "title": "CustomAttribute",
                    "properties": {},
                    "example": {}
                  }
                },
                "discount": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to the discount applied to this order (optional)"
                },
                "discountId": {
                  "description": "The unique identifier for the discount applied to this order",
                  "type": "number",
                  "nullable": true
                },
                "endDate": {
                  "description": "Order end date.",
                  "type": "number",
                  "nullable": true
                },
                "endOfDiscountDate": {
                  "description": "Discount end date.",
                  "type": "number",
                  "nullable": true
                },
                "frequency": {
                  "description": "Frequency.",
                  "type": "string",
                  "nullable": true
                },
                "id": {
                  "description": "ID.",
                  "type": "number",
                  "nullable": true
                },
                "links": {
                  "description": "Resource links",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "title": "Link",
                    "properties": {},
                    "example": {},
                    "nullable": true
                  }
                },
                "nextBillingDate": {
                  "description": "Next billing date for the order",
                  "type": "number",
                  "nullable": true
                },
                "nextOrder": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to the next order for this subscription"
                },
                "oneTimeOrders": {
                  "description": "List of one time orders associated with this subscription order",
                  "type": "array",
                  "items": {
                    "description": "Resource links",
                    "type": "object",
                    "title": "OrderListing",
                    "properties": {},
                    "example": {},
                    "nullable": true
                  }
                },
                "orderLines": {
                  "description": "List of order lines for this subscription order",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "title": "OrderLine",
                    "properties": {},
                    "example": {}
                  }
                },
                "parameters": {
                  "description": "List of custom parameters associated with this order",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "title": "Parameter",
                    "properties": {},
                    "example": {}
                  }
                },
                "parentSubscriptionId": {
                  "description": "Parent subscription ID of an add-on subscription",
                  "type": "number",
                  "nullable": true
                },
                "paymentPlan": {
                  "description": "Payment plan for this order",
                  "type": "object",
                  "title": "PaymentPlan",
                  "properties": {
                    "allowCustomUsage": {
                      "description": "Custom usage allowed",
                      "type": "boolean"
                    },
                    "contract": {},
                    "cost": {
                      "description": "List of plan costs",
                      "type": "array",
                      "items": {}
                    },
                    "discount": {},
                    "frequency": {
                      "description": "Billing frequency: MONTHLY, QUARTERLY, SIX_MONTHS, YEARLY, TWO_YEARS, THREE_YEARS, DAILY",
                      "type": "string"
                    },
                    "href": {
                      "description": "URL to payment plan details",
                      "type": "string"
                    },
                    "id": {
                      "description": "ID",
                      "type": "number"
                    },
                    "isPrimaryPrice": {
                      "description": "Is primary price",
                      "type": "boolean"
                    },
                    "keepBillDateOnUsageChange": {
                      "description": "Keep bill date on usage change",
                      "type": "boolean"
                    },
                    "separatePrepaid": {
                      "description": "Separate prepaid",
                      "type": "boolean"
                    },
                    "tld": {
                      "description": "If plan is part of a domain reseller product, this is the tld this plan offers",
                      "type": "string"
                    },
                    "uuid": {
                      "description": "Unique identifier",
                      "type": "string",
                      "nullable": true
                    }
                  },
                  "example": {
                    "allowCustomUsage": true,
                    "contract": {},
                    "cost": [],
                    "discount": {},
                    "frequency": "...",
                    "href": "...",
                    "id": 12345,
                    "isPrimaryPrice": true,
                    "keepBillDateOnUsageChange": true,
                    "separatePrepaid": true,
                    "tld": "...",
                    "uuid": "..."
                  }
                },
                "paymentPlanId": {
                  "description": "The unique identifier for the payment plan for this order",
                  "type": "number",
                  "nullable": true
                },
                "previousOrder": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to the previous order for this subscription"
                },
                "referenceCode": {
                  "description": "Reference code",
                  "type": "string",
                  "nullable": true
                },
                "salesSupportCompany": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to sales support company information"
                },
                "salesSupportUser": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to sales support user information"
                },
                "serviceStartDate": {
                  "description": "Service start date for the order",
                  "type": "number",
                  "nullable": true
                },
                "startDate": {
                  "description": "Order start date",
                  "type": "number",
                  "nullable": true
                },
                "status": {
                  "description": "Order status",
                  "type": "string",
                  "nullable": true
                },
                "totalPrice": {
                  "description": "Total price for the order",
                  "type": "number",
                  "nullable": true
                },
                "type": {
                  "description": "Type.",
                  "type": "string",
                  "nullable": true
                },
                "user": {
                  "type": "object",
                  "title": "LinkWS",
                  "properties": {
                    "href": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "href": "...",
                    "id": "..."
                  },
                  "nullable": true,
                  "description": "Link to user information"
                }
              },
              "example": {
                "_embedded": {
                  "property1": {},
                  "property2": {}
                },
                "activated": true,
                "company": {
                  "href": "...",
                  "id": "..."
                },
                "contract": {},
                "currency": "...",
                "customAttributes": [
                  {
                    "attributeType": "TEXT",
                    "name": "...",
                    "value": "...",
                    "valueKeys": []
                  },
                  {
                    "attributeType": "MULTISELECT",
                    "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": {},
                    "company": {},
                    "currency": "...",
                    "endDate": 12345,
                    "endOfDiscountDate": 12345,
                    "frequency": "...",
                    "id": 12345,
                    "links": [],
                    "nextBillingDate": 12345,
                    "paymentPlan": {},
                    "referenceCode": "...",
                    "salesSupportUser": {},
                    "startDate": 12345,
                    "status": "...",
                    "totalPrice": 12345,
                    "type": "...",
                    "user": {}
                  },
                  {
                    "_embedded": {},
                    "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": {
                    "alignWithParentCycleStartDate": true,
                    "autoExtensionPricingId": 12345,
                    "blockContractDowngrades": true,
                    "blockContractUpgrades": true,
                    "blockSwitchToShorterContract": true,
                    "cancellationPeriodLimit": 12345,
                    "endOfContractGracePeriod": 12345,
                    "gracePeriod": {},
                    "minimumServiceLength": 12345,
                    "terminationFee": {}
                  },
                  "cost": [
                    {},
                    {}
                  ],
                  "discount": {
                    "amount": {},
                    "availableRedemptions": 12345,
                    "description": "...",
                    "expirationDate": 12345,
                    "numOfBillingCycles": 12345,
                    "percentage": 12345,
                    "pricingUnit": "CALLING_FEATURE",
                    "startDate": 12345
                  },
                  "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": "..."
                }
              },
              "nullable": true
            },
            {
              "description": "Current order for the addon instance"
            }
          ]
        },
        "status": {
          "description": "Addon instance status. May be ACTIVE, CANCELLED or FAILED.",
          "type": "string",
          "nullable": true
        },
        "units": {
          "description": "Units for add-on instance",
          "type": "number",
          "nullable": true
        },
        "uuid": {
          "description": "Unique identifier for add-on instance",
          "type": "string",
          "nullable": true
        }
      },
      "example": {
        "creationDate": 12345,
        "offeringUuid": "...",
        "order": {
          "_embedded": {
            "property1": {},
            "property2": {}
          },
          "activated": true,
          "company": {
            "href": "...",
            "id": "..."
          },
          "contract": {},
          "currency": "...",
          "customAttribute": [
            {
              "attributeType": "MULTISELECT",
              "name": "...",
              "value": "...",
              "valueKeys": [
                "...",
                "..."
              ]
            },
            {
              "attributeType": "MULTISELECT",
              "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": "..."
          },
          "oneTimeOrder": [
            {
              "_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": {}
            }
          ],
          "orderLine": [
            {},
            {}
          ],
          "parameter": [
            {
              "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": "..."
          }
        },
        "status": "...",
        "units": 12345,
        "uuid": "..."
      },
      "nullable": true
    },
    {
      "description": "Add-on instance object"
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/addons',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/addons', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/addons',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/addons");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "creationDate": 12345,
  "offeringUuid": "...",
  "order": {
    "_embedded": {
      "property1": {},
      "property2": {}
    },
    "activated": true,
    "company": {
      "href": "...",
      "id": "..."
    },
    "contract": {},
    "currency": "...",
    "customAttribute": [
      {
        "attributeType": "MULTISELECT",
        "name": "...",
        "value": "...",
        "valueKeys": [
          "...",
          "..."
        ]
      },
      {
        "attributeType": "MULTISELECT",
        "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": "..."
    },
    "oneTimeOrder": [
      {
        "_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": {}
      }
    ],
    "orderLine": [
      {},
      {}
    ],
    "parameter": [
      {
        "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": "..."
    }
  },
  "status": "...",
  "units": 12345,
  "uuid": "..."
}

Example response

{
  "offeringUuid": "39caa424-df16-48d8-8215-61fbb3aac327",
  "units": 1,
  "uuid": "e472c043-9ef1-40c3-a751-261d82016228"
}

POST/billing/v1/subscriptions/{subscriptionId}/addons

Create an add-on instance on the given subscription using the given data

Parameters

Parameter Type Data Type Default Description
*subscriptionId path string Subscription ID

Body Parameters

Add-on instance object

AddonInstance object:

Property Type Description
creationDate number

Creation date of the addon instance

offeringUuid string

Unique identifier for add-on offering

order Order

Current order for the addon instance

status string

Addon instance status. May be ACTIVE, CANCELLED or FAILED.

units number

Units for add-on instance

uuid string

Unique identifier for add-on instance

Responses

Status Meaning Description Definition
201 Created Created AddonInstance
400 Bad Request Bad Request
404 Not Found Not Found
409 Conflict Conflict

Preview subscription cancellation

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/previewCancel \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/previewCancel HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/previewCancel',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/previewCancel',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/previewCancel', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/previewCancel',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/previewCancel");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "assignedUsers": 1,
  "company": {
    "href": "http://appdirect/api/account/v1/companies/1a32fa08-839f-4594-9003-aa4081c84fff",
    "id": "1a32fa08-839f-4594-9003-aa4081c84fff"
  },
  "creationDate": 1480999441698,
  "edition": {
    "href": "http://appdirect/api/marketplace/v1/products/8/editions/11",
    "id": "11"
  },
  "endDate": null,
  "externalAccountId": "12-account-identifier",
  "id": "08e230e5-2895-478f-aaeb-3879f5fe5c33",
  "maxUsers": 0,
  "order": {
    "activated": false,
    "company": {
      "href": "http://appdirect/api/account/v1/companies/1a32fa08-839f-4594-9003-aa4081c84fff",
      "id": "1a32fa08-839f-4594-9003-aa4081c84fff"
    },
    "contract": {
      "cancellationPeriodLimit": null,
      "endOfContractDate": 1588789800000,
      "endOfContractGracePeriod": null,
      "gracePeriodEndDate": null,
      "minimumServiceLength": 24,
      "renewal": null,
      "terminationFee": {
        "description": "Fee",
        "estimatedCost": 254.6628,
        "percentage": 100,
        "price": null,
        "type": "PERCENTAGE"
      }
    },
    "currency": "USD",
    "discount": null,
    "discountId": null,
    "endDate": null,
    "endOfDiscountDate": null,
    "frequency": "MONTHLY",
    "id": 12,
    "links": [
      {
        "href": "http://appdirect/api/billing/v1/subscriptions/08e230e5-2895-478f-aaeb-3879f5fe5c33",
        "rel": "subscription"
      }
    ],
    "nextBillingDate": 1483677841682,
    "nextOrder": null,
    "oneTimeOrders": [],
    "orderLines": [],
    "parameters": [],
    "paymentPlan": {
      "allowCustomUsage": false,
      "contract": {
        "alignWithParentCycleStartDate": false,
        "autoExtensionPricingId": 18,
        "blockContractDowngrades": false,
        "blockContractUpgrades": false,
        "blockSwitchToShorterContract": false,
        "cancellationPeriodLimit": null,
        "endOfContractGracePeriod": null,
        "gracePeriod": null,
        "minimumServiceLength": 3,
        "terminationFee": null
      },
      "costs": [
        {
          "amount": {
            "USD": 10
          },
          "blockContractDecrease": false,
          "blockContractIncrease": false,
          "blockOriginalContractDecrease": false,
          "id": 18,
          "increment": 1,
          "maxUnits": null,
          "meteredUsage": false,
          "minUnits": 0,
          "pricePerIncrement": false,
          "pricingStrategy": "UNIT",
          "unit": "USER",
          "unitDependency": null
        }
      ],
      "discount": null,
      "frequency": "MONTHLY",
      "href": "http://appdirect/api/marketplace/v1/products/8/editions/11/paymentPlans/18",
      "id": 18,
      "isPrimaryPrice": false,
      "keepBillDateOnUsageChange": false,
      "primaryPrice": false,
      "separatePrepaid": false,
      "uuid": "feed23e0-de8c-4e6f-b70a-13b0f610b0f7"
    },
    "paymentPlanId": 18,
    "previousOrder": null,
    "referenceCode": null,
    "salesSupportUser": null,
    "startDate": 1480999441682,
    "status": "ACTIVE",
    "totalPrice": 0,
    "type": "NEW",
    "user": {
      "href": "http://appdirect/api/account/v1/users/69474681-db96-4486-8954-34d12c23e415",
      "id": "69474681-db96-4486-8954-34d12c23e415"
    }
  },
  "product": {
    "href": "http://appdirect/api/marketplace/v1/products/8",
    "id": "8"
  },
  "redirectUrl": null,
  "status": "ACTIVE",
  "upcomingOrder": null,
  "user": {
    "href": "http://appdirect/api/account/v1/users/69474681-db96-4486-8954-34d12c23e415",
    "id": "69474681-db96-4486-8954-34d12c23e415"
  }
}

GET/billing/v1/subscriptions/{subscriptionId}/previewCancel

Preview a subscription cancellation for the given subscription ID

Parameters

Parameter Type Data Type Default Description
*subscriptionId path string The subscription ID

Responses

Status Meaning Description Definition
200 OK OK Subscription
404 Not Found Not Found

Read addon instances for a subscription

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/addons \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/addons HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/addons',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/addons',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/addons', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/addons',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/addons");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

GET/billing/v1/subscriptions/{subscriptionId}/addons

Read addon instances for a subscription

Parameters

Parameter Type Data Type Default Description
filter query string Search filter
sortField query string of enum:
DATE
STATUS
UUID
DATE Sort field (UUID, DATE or STATUS)
sortOrder query string of enum:
ASC
DESC
ASC Sort order (ASC or DESC)
*subscriptionId path string Subscription ID

Responses

Status Meaning Description Definition
200 OK OK array of AddonInstance
404 Not Found Not Found

Read subscription SAML Certificate

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/saml/certificate \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/saml/certificate HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/saml/certificate',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/saml/certificate',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/saml/certificate', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/saml/certificate',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/saml/certificate");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

"-----BEGIN CERTIFICATE-----\nMIICyDCCAbCgAwIBAgIGAWF7mAIjMA0GCSqGSIb3DQEBBQUAMCUxIzAhBgNVBAoM\nGkNPTVBBTllfRU5USVRMRU1FTlQtNzQ1NzI5MB4XDTE4MDIwODE3MjMzNVoXDTIz\nMDIwOTE3MjMzNVowJTEjMCEGA1UECgwaQ09NUEFOWV9FTlRJVExFTUVOVC03NDU3\nMjkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCQvnSC76Jwsrjw0FDO\nMzutqNLyrlww86LiEcDiaGn/Ms6cASbpQFJiA7f5BVbTHCAS4fPQnLcBoZs25OwP\n69ibm5hrJlfmZwPVU0Odqd9M/kGmV4U4EDgieH6BcF0cXwpJ8OeXLhf8N+9tr9sN\n7MvkvMgGqpjwXAwYDFZWxBf0+k6O+rO/XuCuIKtc4eD0jPIS6NfxD5DvXNGc83ro\nffgjM0HNq41jieDAhmAAnj12LoRE4V3qQwqbE3p5JBHsmjOJ2/kGoZdkorf3oSuT\njlsLooDi/NTKlWxnlIvnlNSBnlfzpZl6yQIW4j8FDe/4p02G6VMYIozTB37OM98j\n4USHAgMBAAEwDQYJKoZIhvcNAQEFBQADggEBAHrlJjQs05EykfyuvUFZUOjAiqwN\nM/1WHW8xtCA/qa7H1PJQ6B7xyJcmw/ad23ui74sycfkmCLMACP1tb0M8CJ6/rsZH\nltUy8sXSGg3fyTA9Ff8sJiMs0nCw0Wzkk+P5JGig7kPBi1W7gSFTP4tfrktp65sU\nxefLNh/axCHE2C5lxrYtwsE8ocSqNZwPDIWihcaapvdxDyr8l62F2dL3NXulLVRW\nOV4G+KGVwCCEswjTN3idyGjknBCgaiFmKMPFeZm5feUE6f2D40Z/CLrcaB1HV5/q\nMBljuA6qKsDLaABwtxvviQ18p2GYmfpXv5mLJlSNSRnzH9zQzjGsqV09x7U=\n-----END CERTIFICATE-----\n"

GET/account/v2/subscriptions/{subscriptionUuid}/saml/certificate

Retrieve a subscriptions's public SAML verification certificate.

Required Scope and Authorization Rules

Scope Rule
ROLE_APPLICATION Allows access as the Developer that owns the Product.
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_CHANNEL_PRODUCT_SUPPORT Allows access as a Product Support agent 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_USER Allows access as the user that owns the subscription.

Parameters

Parameter Type Data Type Default Description
*subscriptionUuid path string Unique identifier of company subscription in the API request

Responses

Status Meaning Description Definition
200 OK Success
401 Unauthorized Unauthorized
500 Internal Server Error Subscription not found

Read SAML metadata for subscription

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/saml \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/saml HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/saml',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/saml',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/saml', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/saml',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/saml");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "assertionConsumerServiceUrl": "https://www.example.com/saml/acs",
  "attributes": {
    "Email": {
      "name": "Email",
      "type": "{http://www.w3.org/2001/XMLSchema}string",
      "value": "{user.emailAddress}"
    },
    "FirstName": {
      "name": "FirstName",
      "type": "{http://www.w3.org/2001/XMLSchema}string",
      "value": "{user.firstName}"
    },
    "LastName": {
      "name": "LastName",
      "type": "{http://www.w3.org/2001/XMLSchema}string",
      "value": "{user.lastName}"
    }
  },
  "audienceUrl": "https://www.example.com",
  "certificate": {
    "defaultCertificate": true,
    "expirationDate": 1676872384000,
    "fingerprint": "6D:44:10:BF:DD:D6:B9:46:ED:CB:05:B6:96:C4:07:5E:02:C0:27:E6",
    "keySize": 2048,
    "label": "AD Cert",
    "needsRenewal": false,
    "partner": "APPDIRECT",
    "publicCertificate": "-----BEGIN CERTIFICATE-----\nMIICyDCCAbCgAwIBAgIGAWF7mAIjMA0GCSqGSIb3DQEBBQUAMCUxIzAhBgNVBAoM\nGkNPTVBBTllfRU5USVRMRU1FTlQtNzQ1NzI5MB4XDTE4MDIwODE3MjMzNVoXDTIz\nMDIwOTE3MjMzNVowJTEjMCEGA1UECgwaQ09NUEFOWV9FTlRJVExFTUVOVC03NDU3\nMjkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCQvnSC76Jwsrjw0FDO\nMzutqNLyrlww86LiEcDiaGn/Ms6cASbpQFJiA7f5BVbTHCAS4fPQnLcBoZs25OwP\n69ibm5hrJlfmZwPVU0Odqd9M/kGmV4U4EDgieH6BcF0cXwpJ8OeXLhf8N+9tr9sN\n7MvkvMgGqpjwXAwYDFZWxBf0+k6O+rO/XuCuIKtc4eD0jPIS6NfxD5DvXNGc83ro\nffgjM0HNq41jieDAhmAAnj12LoRE4V3qQwqbE3p5JBHsmjOJ2/kGoZdkorf3oSuT\njlsLooDi/NTKlWxnlIvnlNSBnlfzpZl6yQIW4j8FDe/4p02G6VMYIozTB37OM98j\n4USHAgMBAAEwDQYJKoZIhvcNAQEFBQADggEBAHrlJjQs05EykfyuvUFZUOjAiqwN\nM/1WHW8xtCA/qa7H1PJQ6B7xyJcmw/ad23ui74sycfkmCLMACP1tb0M8CJ6/rsZH\nltUy8sXSGg3fyTA9Ff8sJiMs0nCw0Wzkk+P5JGig7kPBi1W7gSFTP4tfrktp65sU\nxefLNh/axCHE2C5lxrYtwsE8ocSqNZwPDIWihcaapvdxDyr8l62F2dL3NXulLVRW\nOV4G+KGVwCCEswjTN3idyGjknBCgaiFmKMPFeZm5feUE6f2D40Z/CLrcaB1HV5/q\nMBljuA6qKsDLaABwtxvviQ18p2GYmfpXv5mLJlSNSRnzH9zQzjGsqV09x7U=\n-----END CERTIFICATE-----\n",
    "publicKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkL50gu+icLK48NBQzjM7\nrajS8q5cMPOi4hHA4mhp/zLOnAEm6UBSYgO3+QVW0xwgEuHz0Jy3AaGbNuTsD+vY\nm5uYayZX5mcD1VNDnanfTP5BpleFOBA4Inh+gXBdHF8KSfDnly4X/Dfvba/bDezL\n5LzIBqqY8FwMGAxWVsQX9PpOjvqzv17griCrXOHg9IzyEujX8Q+Q71zRnPN66H34\nIzNBzauNY4ngwIZgAJ49di6EROFd6kMKmxN6eSQR7Jozidv5BqGXZKK396Erk45b\nC6KA4vzUypVsZ5SL55TUgZ5X86WZeskCFuI/BQ3v+KdNhulTGCKM0wd+zjPfI+FE\nhwIDAQAB\n-----END PUBLIC KEY-----\n",
    "subjectDN": "O=COMPANY_ENTITLEMENT-1893",
    "uuid": "6bd1d10c-ddb8-4908-a5a7-0e918f28a2ae"
  },
  "certificateUsage": "PER_RELYING_PARTY",
  "encodeResponse": true,
  "idpIdentifier": "https://test.marketplace.com/saml/8ae5c488-9d5b-4867-a944-78b6afbb9c82",
  "loginUrl": "https://test.marketplace.com/saml/idp/login/8ae5c488-9d5b-4867-a944-78b6afbb9c82",
  "nameId": "{user.uuid}",
  "nameIdType": "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent",
  "notAfterMinutes": 5,
  "notBeforeMinutes": 5,
  "relayState": null,
  "responseParameterName": "SAMLResponse",
  "signingAlgorithm": "SHA256",
  "signingSource": "RESPONSE",
  "spLaunchUrl": "https://www.example.com/saml/login",
  "uuid": "8ae5c488-9d5b-4867-a944-78b6afbb9c82",
  "version": "2.0"
}

GET/account/v2/subscriptions/{subscriptionUuid}/saml

Retrieve a subscription's SAML metadata.

Required Scope and Authorization Rules

Scope Rule
ROLE_APPLICATION Allows access as the Developer that owns the Product.
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_CHANNEL_PRODUCT_SUPPORT Allows access as a Product Support agent 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_USER Allows access as the user that owns the subscription.

Parameters

Parameter Type Data Type Default Description
*subscriptionUuid path string Unique identifier of company subscription in the API request

Responses

Status Meaning Description Definition
200 OK Success SamlRelyingParty
401 Unauthorized Unauthorized
404 Not Found Subscription not found

List all invoices for a subscription

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/invoices \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/invoices HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/invoices',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/invoices',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/invoices', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/invoices',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/invoices");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "company": {
      "href": "http://appdirect/api/account/v1/companies/d6190d63-3cae-4baa-a4ed-6e102c509178",
      "id": "d6190d63-3cae-4baa-a4ed-6e102c509178"
    },
    "creationDate": 1480999442314,
    "currency": "USD",
    "dueDate": 1481353200000,
    "invoiceId": 24,
    "links": [
      {
        "href": "http://appdirect/api/account/v2/users/f295b2f1-178f-46b4-a360-092011ad2946",
        "rel": "user"
      },
      {
        "href": "http://appdirect/api/account/v2/companies/d6190d63-3cae-4baa-a4ed-6e102c509178",
        "rel": "company"
      },
      {
        "href": "http://appdirect/api/billing/v1/invoices/24",
        "rel": "self"
      }
    ],
    "orderIds": [
      "2030"
    ],
    "referenceNumber": null,
    "status": "PAID",
    "total": 10,
    "user": {
      "href": "http://appdirect/api/account/v1/users/f295b2f1-178f-46b4-a360-092011ad2946",
      "id": "f295b2f1-178f-46b4-a360-092011ad2946"
    }
  }
]

GET/billing/v1/subscriptions/{subscriptionId}/invoices

List all of the invoices for the given subscription

Parameters

Parameter Type Data Type Default Description
count query integer 250 Number of results to fetch. Used for paging.
excludeFree query boolean Exclude invoices with no charges (free)
fromDate query number From date
sortField query string of enum:
DATE
INVOICE_ID
TOTAL
INVOICE_ID Sort field
sortOrder query string of enum:
ASC
DESC
ASC Sort order
start query integer 0 First result index. Used for paging.
status query string of enum:
CARRIED
PAID
UNPAID
VOIDED
Invoice status
*subscriptionId path string Subscription ID
toDate query number To date

Responses

Status Meaning Description Definition
200 OK OK array of InvoiceListing
404 Not Found Not Found

List all payments for a subscription

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/payments \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/payments HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/payments',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/payments',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/payments', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/payments',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}/payments");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "amount": 10,
    "company": {
      "href": "http://appdirect/api/account/v1/companies/95b5f752-5ba7-487e-b555-7ebfd8ec3079",
      "id": "95b5f752-5ba7-487e-b555-7ebfd8ec3079"
    },
    "currency": "USD",
    "date": 1480999442914,
    "gatewayResponse": {
      "avs": true,
      "code": null,
      "cvv": true,
      "message": null
    },
    "links": [
      {
        "href": "http://appdirect/api/billing/v1/payments/3",
        "rel": "self"
      }
    ],
    "method": "CREDIT_CARD",
    "paymentNumber": 3,
    "result": "SUCCESSFUL",
    "transactionId": "123456abcdef",
    "user": {
      "href": "http://appdirect/api/account/v1/users/f5dbf30d-233d-4b85-9737-e4711b509fb7",
      "id": "f5dbf30d-233d-4b85-9737-e4711b509fb7"
    }
  }
]

GET/billing/v1/subscriptions/{subscriptionId}/payments

List all the payments for the given subscription

Parameters

Parameter Type Data Type Default Description
count query integer 250 Number of results to fetch. Used for paging.
fromDate query number From date
method query string of enum:
ADP_INVOICE
ARIBAPAY
BT_BILL
CLICKANDBUY
CLOUDFOUNDRY
CREDIT_CARD
CUMULA_BILL
DTAG
EXTERNAL_INVOICE
KREDITKARTE
LASTSCHRIFT_MRNEXNET
MANO_TEO_BILL
MANUAL
MARKETPLACE_CREDITS
NETS_ARVATO_INVOICE
NEXTEL
PAYPAL
ROGERS_CC_DTMF
ROGERS_CC_POS
SNAP
TBILL
THISTLE
TOICLEARING
Payment method
result query string of enum:
FAILED
GATEWAY_NOT_AVAILABLE
MANUAL
SUCCESSFUL
Payment result
sortField query string of enum:
AMOUNT
DATE
PAYMENT_ID
PAYMENT_ID Sort field
sortOrder query string of enum:
ASC
DESC
ASC Sort order
start query integer 0 First result index. Used for paging.
*subscriptionId path string Subscription ID
toDate query number To date

Responses

Status Meaning Description Definition
200 OK OK array of Payment
404 Not Found Not Found

Retrieve a subscription

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/subscriptions/{subscriptionId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "assignedUsers": 1,
  "company": {
    "href": "http://appdirect/api/account/v1/companies/1a32fa08-839f-4594-9003-aa4081c84fff",
    "id": "1a32fa08-839f-4594-9003-aa4081c84fff"
  },
  "creationDate": 1480999441698,
  "customAttributes": [
    {
      "name": "test1",
      "values": [
        "value1"
      ]
    },
    {
      "name": "test2",
      "values": [
        "value2",
        "value3"
      ]
    }
  ],
  "edition": {
    "href": "http://appdirect/api/marketplace/v1/products/8/editions/11",
    "id": "11"
  },
  "endDate": null,
  "externalAccountId": "12-account-identifier",
  "id": "08e230e5-2895-478f-aaeb-3879f5fe5c33",
  "label": "Example Label",
  "maxUsers": 0,
  "order": {
    "activated": false,
    "company": {
      "href": "http://appdirect/api/account/v1/companies/1a32fa08-839f-4594-9003-aa4081c84fff",
      "id": "1a32fa08-839f-4594-9003-aa4081c84fff"
    },
    "contract": null,
    "currency": "USD",
    "discount": null,
    "discountId": null,
    "endDate": null,
    "endOfDiscountDate": null,
    "frequency": "MONTHLY",
    "id": 12,
    "links": [
      {
        "href": "http://appdirect/api/billing/v1/subscriptions/08e230e5-2895-478f-aaeb-3879f5fe5c33",
        "rel": "subscription"
      }
    ],
    "nextBillingDate": 1483677841682,
    "nextOrder": null,
    "oneTimeOrders": [],
    "orderLines": [],
    "parameters": [],
    "paymentPlan": {
      "allowCustomUsage": false,
      "contract": {
        "alignWithParentCycleStartDate": false,
        "autoExtensionPricingId": 18,
        "blockContractDowngrades": false,
        "blockContractUpgrades": false,
        "blockSwitchToShorterContract": false,
        "cancellationPeriodLimit": null,
        "endOfContractGracePeriod": null,
        "gracePeriod": null,
        "minimumServiceLength": 3,
        "terminationFee": null
      },
      "costs": [
        {
          "amount": {
            "USD": 10
          },
          "blockContractDecrease": false,
          "blockContractIncrease": false,
          "blockOriginalContractDecrease": false,
          "id": 18,
          "increment": 1,
          "maxUnits": null,
          "meteredUsage": false,
          "minUnits": 0,
          "pricePerIncrement": false,
          "pricingStrategy": "UNIT",
          "unit": "USER",
          "unitDependency": null
        }
      ],
      "discount": null,
      "frequency": "MONTHLY",
      "href": "http://appdirect/api/marketplace/v1/products/8/editions/11/paymentPlans/18",
      "id": 18,
      "isPrimaryPrice": false,
      "keepBillDateOnUsageChange": false,
      "primaryPrice": false,
      "separatePrepaid": false,
      "uuid": "feed23e0-de8c-4e6f-b70a-13b0f610b0f7"
    },
    "paymentPlanId": 18,
    "previousOrder": null,
    "referenceCode": null,
    "salesSupportUser": null,
    "startDate": 1480999441682,
    "status": "ACTIVE",
    "totalPrice": 0,
    "type": "NEW",
    "user": {
      "href": "http://appdirect/api/account/v1/users/69474681-db96-4486-8954-34d12c23e415",
      "id": "69474681-db96-4486-8954-34d12c23e415"
    }
  },
  "product": {
    "href": "http://appdirect/api/marketplace/v1/products/8",
    "id": "8"
  },
  "redirectUrl": null,
  "status": "ACTIVE",
  "upcomingOrder": null,
  "user": {
    "href": "http://appdirect/api/account/v1/users/69474681-db96-4486-8954-34d12c23e415",
    "id": "69474681-db96-4486-8954-34d12c23e415"
  }
}

GET/billing/v1/subscriptions/{subscriptionId}

Retrieve the subscription for the given subscription ID

Parameters

Parameter Type Data Type Default Description
*subscriptionId path string The unique identifier for the subscription

Responses

Status Meaning Description Definition
200 OK OK Subscription
404 Not Found Not Found

List all subscriptions

Example request

curl -X GET https://{marketplaceURL}/api/billing/v1/subscriptions \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/billing/v1/subscriptions HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/billing/v1/subscriptions',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/billing/v1/subscriptions',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/billing/v1/subscriptions', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/billing/v1/subscriptions',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/billing/v1/subscriptions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "_embedded": {
      "order": {
        "activated": false,
        "company": {
          "href": "http://appdirect/api/account/v1/companies/ff732167-9b1b-4dba-bc2e-dece04f8fb41",
          "id": "ff732167-9b1b-4dba-bc2e-dece04f8fb41"
        },
        "contract": null,
        "currency": "USD",
        "discount": null,
        "discountId": null,
        "endDate": null,
        "endOfDiscountDate": null,
        "frequency": "MONTHLY",
        "id": 16,
        "links": [
          {
            "href": "http://appdirect/api/billing/v1/subscriptions/3bdda3a2-4af6-48fd-be7c-39cbf2ded56f",
            "rel": "subscription"
          }
        ],
        "nextBillingDate": 1483677844367,
        "nextOrder": null,
        "oneTimeOrders": [],
        "orderLines": [],
        "parameters": [],
        "paymentPlan": {
          "allowCustomUsage": false,
          "contract": {
            "alignWithParentCycleStartDate": false,
            "autoExtensionPricingId": 26,
            "blockContractDowngrades": false,
            "blockContractUpgrades": false,
            "blockSwitchToShorterContract": false,
            "cancellationPeriodLimit": null,
            "endOfContractGracePeriod": null,
            "gracePeriod": null,
            "minimumServiceLength": 3,
            "terminationFee": null
          },
          "costs": [
            {
              "amount": {
                "USD": 10
              },
              "blockContractDecrease": false,
              "blockContractIncrease": false,
              "blockOriginalContractDecrease": false,
              "id": 26,
              "increment": 1,
              "maxUnits": null,
              "meteredUsage": false,
              "minUnits": 0,
              "pricePerIncrement": false,
              "pricingStrategy": "UNIT",
              "unit": "USER",
              "unitDependency": null
            }
          ],
          "discount": null,
          "frequency": "MONTHLY",
          "href": "http://appdirect/api/marketplace/v1/products/12/editions/15/paymentPlans/26",
          "id": 26,
          "isPrimaryPrice": false,
          "keepBillDateOnUsageChange": false,
          "primaryPrice": false,
          "separatePrepaid": false,
          "uuid": "292e4509-3a7b-41e3-87be-e47dcb51adf2"
        },
        "paymentPlanId": 26,
        "previousOrder": null,
        "referenceCode": null,
        "salesSupportUser": null,
        "startDate": 1480999444367,
        "status": "ACTIVE",
        "totalPrice": 0,
        "type": "NEW",
        "user": {
          "href": "http://appdirect/api/account/v1/users/5ab780a4-1767-4799-9b83-5b898ac76763",
          "id": "5ab780a4-1767-4799-9b83-5b898ac76763"
        }
      }
    },
    "assignmentCount": 1,
    "company": {
      "href": "http://appdirect/api/account/v1/companies/ff732167-9b1b-4dba-bc2e-dece04f8fb41",
      "id": "ff732167-9b1b-4dba-bc2e-dece04f8fb41"
    },
    "creationDate": 1480999444377,
    "edition": {
      "href": "http://appdirect/api/marketplace/v1/products/12/editions/15",
      "id": "15"
    },
    "endDate": null,
    "externalAccountId": "16-account-identifier",
    "id": "3bdda3a2-4af6-48fd-be7c-39cbf2ded56f",
    "label": "Example Label",
    "links": [],
    "maxUsers": 0,
    "order": {
      "href": "http://appdirect/api/billing/v1/orders/16",
      "id": 16
    },
    "parentSubscriptionId": null,
    "product": {
      "href": "http://appdirect/api/marketplace/v1/products/12",
      "id": "12"
    },
    "status": "ACTIVE",
    "suspensionReason": null,
    "user": {
      "href": "http://appdirect/api/account/v1/users/5ab780a4-1767-4799-9b83-5b898ac76763",
      "id": "5ab780a4-1767-4799-9b83-5b898ac76763"
    }
  }
]

GET/billing/v1/subscriptions

The list may be filtered using the optional filter parameters

Parameters

Parameter Type Data Type Default Description
applicationIds query number Filters subscriptions by internal Application ID
bundleApplicationId query number Filters subscriptions by internal bundle ID
count query integer 250 Number of results to fetch. Used for paging.
discountId query number Filters subscriptions by internal discount ID
editionId query number Filters subscriptions by internal edition ID
expand query string Expands filtered subscription results to include details about the specified query parameters, one or more of "order", "product", or "edition".
fromDate query string Filters results to only include subscriptions that were created on or after the specified date in yyyy/MM/DD HH:mm:ss format
lastModified query number Filters results to only include subscriptions that were modified on or after the specified date in UNIX Epoch milliseconds
orderReferenceCode query string Filters subscriptions by order reference code
paymentPlanId query number Filters subscriptions by internal payment plan ID
sortField query string of enum:
APPLICATION
COMPANY
DATE
OWNER
STATUS
SUBSCRIPTION_ID
DATE Sort field
sortOrder query string of enum:
ASC
DESC
ASC Sort order
start query integer 0 First result index. Used for paging.
status query string Filters subscriptions by order status
toDate query string Filters results to only include subscriptions that were created on or before the specified date in yyyy/MM/DD HH:mm:ss format

Responses

Status Meaning Description Definition
200 OK OK array of Subscription
404 Not Found Not Found

Subscription reactivation request

Example request

curl -X POST https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/reactivationRequest \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/reactivationRequest HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/reactivationRequest',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/reactivationRequest',
{
  method: 'POST'

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/reactivationRequest', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/reactivationRequest',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/subscriptions/{subscriptionUuid}/reactivationRequest");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST/account/v2/subscriptions/{subscriptionUuid}/reactivationRequest

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).

Required Scope and Authorization Rules

Scope Rule
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_USER Allows access as a member of the company that owns the subscription.

Parameters

Parameter Type Data Type Default Description
*subscriptionUuid path string Unique identifier of company subscription in the API request

Responses

Status Meaning Description Definition
200 OK Success
401 Unauthorized Unauthorized or subscription not found

Subscriptions (Reseller)

Cancel subscription

Example request

curl -X DELETE https://{marketplaceURL}/api/appReseller/v1/subscriptions/{subscriptionId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/appReseller/v1/subscriptions/{subscriptionId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appReseller/v1/subscriptions/{subscriptionId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appReseller/v1/subscriptions/{subscriptionId}',
{
  method: 'DELETE'

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/appReseller/v1/subscriptions/{subscriptionId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/appReseller/v1/subscriptions/{subscriptionId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appReseller/v1/subscriptions/{subscriptionId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE/appReseller/v1/subscriptions/{subscriptionId}

Note: This endpoint is being deprecated. // Cancel a subscription on behalf of a user who is a member of a company linked to the current reseller

Required Scope and Authorization Rules

Scope Rule
ROLE_RESELLER Allows access as a Reseller for the company

Parameters

Parameter Type Data Type Default Description
*subscriptionId path string Subscription ID

Responses

Status Meaning Description Definition
204 No Content Subscription not found
409 Conflict Subscription has a pending event and can't be deleted

List subscriptions

Example request

curl -X GET https://{marketplaceURL}/api/appReseller/v1/subscriptions?context=type,string,enum,RESELLER%2C%20RESELLER_MANAGER&resellerCompanyId=type,string&customerCompanyId=type,string \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/appReseller/v1/subscriptions?context=type,string,enum,RESELLER%2C%20RESELLER_MANAGER&resellerCompanyId=type,string&customerCompanyId=type,string HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appReseller/v1/subscriptions',
  method: 'get',
  data: '?context=type,string,enum,RESELLER%2C%20RESELLER_MANAGER&resellerCompanyId=type,string&customerCompanyId=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appReseller/v1/subscriptions?context=type,string,enum,RESELLER%2C%20RESELLER_MANAGER&resellerCompanyId=type,string&customerCompanyId=type,string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/appReseller/v1/subscriptions', params={
  'context': {
  "type": "string",
  "enum": [
    "RESELLER, RESELLER_MANAGER"
  ]
},  'resellerCompanyId': {
  "type": "string"
},  'customerCompanyId': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/appReseller/v1/subscriptions',
  params: {
  'context' => 'string',
'resellerCompanyId' => 'string',
'customerCompanyId' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appReseller/v1/subscriptions?context=type,string,enum,RESELLER%2C%20RESELLER_MANAGER&resellerCompanyId=type,string&customerCompanyId=type,string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "activeOrder": {
        "createdOn": 1529083173000,
        "editionName": "Edition",
        "frequency": "One Time",
        "id": "1553",
        "status": "PENDING MANUAL RECOVERY",
        "totalFee": "USD350.00"
      },
      "applicationName": "AUTO_DISCOUNTS_APP",
      "company": {
        "id": "698555fc-bc65-4163-9fee-16308edec41b",
        "name": "Company A"
      },
      "id": "386626c0-53e2-4515-8450-4a720bb5d029",
      "pendingEvent": "SUBSCRIPTION_CHANGE",
      "status": "ACTIVE",
      "user": {
        "firstName": "Michael",
        "id": "386626c0-53e2-4515-8450-4a720bb5d029",
        "lastName": "Jordan"
      }
    },
    {
      "activeOrder": {
        "createdOn": 1529083173000,
        "editionName": "Recurring Edition",
        "frequency": "One Time",
        "id": "3345",
        "status": "PENDING MANUAL RECOVERY",
        "totalFee": "USD350.00"
      },
      "applicationName": "AUTO_DISCOUNTS_APP",
      "company": {
        "id": "386626c0-53e2-4515-8450-4a720bb5d029",
        "name": "Company B"
      },
      "id": "38e8bb4a-d737-4564-afee-e68edb00fd38",
      "pendingEvent": "SUBSCRIPTION_CHANGE",
      "status": "ACTIVE",
      "user": {
        "firstName": "Michael",
        "id": "386626c0-53e2-4515-8450-4a720bb5d029",
        "lastName": "Jordan"
      }
    }
  ],
  "page": {
    "number": 1,
    "size": 10,
    "totalElements": 2,
    "totalPages": 1
  }
}

GET/appReseller/v1/subscriptions

Note: This endpoint is being deprecated. // Retrieves a list of all user subscriptions of a linked company. You can filter the list using optional query parameters.

Required Scope and Authorization Rules

Scope Rule
ROLE_RESELLER Allows access as a Reseller for the company
ROLE_RESELLER_MANAGER Allows access as a Reseller Manager for the company

Parameters

Parameter Type Data Type Default Description
*context query string of enum:
RESELLER, RESELLER_MANAGER
Supported billing contexts
createdOn query string Date filter, defined by upper or lower inclusive or exclusive limits, in Unix timestamp format. Acceptable values are: gte([timestamp]) - 'greater than or equal to'; gt([timestamp]) - 'greater than'; lte([timestamp]) - 'less than or equal to'; or lt([timestamp]) - 'less than.'
*customerCompanyId query string User's company ID. Required only for RESELLER context
number query integer Page number
paidStatus query string of enum:
PAID, FREE
Status of the subscription related to the payment
pending query boolean Indicates whether subscription has pending events
*resellerCompanyId query string Reseller's company ID
searchText query string Search text
size query integer Number of results per page
sort query string Sort field and order. For ascending sort order, use the '+[FieldName]' format. For descending order, use the '-[FieldName]' format.
status query string of enum:
INITIALIZED
FAILED
FREE_TRIAL
FREE_TRIAL_EXPIRED
ACTIVE
SUSPENDED
CANCELLED
Subscription status. Acceptable values are: [status] - 'equal to'; or in([status1],[status2]) - 'status in the list'. For example, status=FAILED or status=in(FAILED,ACTIVE)
userId query string For RESELLER, the customer's user ID; for RESELLER_MANAGER, the Reseller's user ID

Responses

Status Meaning Description Definition
200 OK Success SubscriptionList
401 Unauthorized Unauthorized

Subscription details

Example request

curl -X GET https://{marketplaceURL}/api/appReseller/v1/subscriptions/{subscriptionId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/appReseller/v1/subscriptions/{subscriptionId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appReseller/v1/subscriptions/{subscriptionId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appReseller/v1/subscriptions/{subscriptionId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/appReseller/v1/subscriptions/{subscriptionId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/appReseller/v1/subscriptions/{subscriptionId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appReseller/v1/subscriptions/{subscriptionId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "activeOrder": {
    "createdOn": 1529083173000,
    "editionName": "Edition",
    "frequency": "One Time",
    "id": "1553",
    "orderLines": [
      {
        "quantity": "1",
        "unit": "USER"
      }
    ],
    "paymentPlanId": "30ccf1e7-1937-40cb-8e73-851a226fd4ea",
    "status": "PENDING MANUAL RECOVERY",
    "totalFee": "USD350.00"
  },
  "applicationName": "AUTO_DISCOUNTS_APP",
  "company": {
    "id": "698555fc-bc65-4163-9fee-16308edec41b",
    "name": "Company A"
  },
  "createdOn": 1529083173000,
  "id": "386626c0-53e2-4515-8450-4a720bb5d029",
  "pendingEvent": "SUBSCRIPTION_CHANGE",
  "referenceCode": "bundle09",
  "status": "ACTIVE",
  "user": {
    "firstName": "Michael",
    "id": "2c061df6-4313-45e0-8709-a0ca19b0aaa3",
    "lastName": "Jordan"
  }
}

GET/appReseller/v1/subscriptions/{subscriptionId}

Note: This endpoint is being deprecated. // Read a subscription by ID

Required Scope and Authorization Rules

Scope Rule
ROLE_RESELLER Allows access as a Reseller

Parameters

Parameter Type Data Type Default Description
*subscriptionId path string Subscription ID

Responses

Status Meaning Description Definition
200 OK Success AppResellerSubscriptionWS
401 Unauthorized Unauthorized
404 Not Found Not found

Create subscription

Example request

curl -X POST https://{marketplaceURL}/api/appReseller/v1/subscriptions \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/appReseller/v1/subscriptions HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appReseller/v1/subscriptions',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "orderLines": [
    {
      "quantity": "1",
      "unit": "USER"
    }
  ],
  "parentSubscriptionId": "386626c0-53e2-4515-8450-4a720bb5d029",
  "paymentPlanId": "30ccf1e7-1937-40cb-8e73-851a226fd4ea",
  "targetCompanyId": "698555fc-bc65-4163-9fee-16308edec41b",
  "targetUserId": "2c061df6-4313-45e0-8709-a0ca19b0aaa3"
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appReseller/v1/subscriptions',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/appReseller/v1/subscriptions', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/appReseller/v1/subscriptions',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appReseller/v1/subscriptions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "orderLines": [
    {
      "quantity": "1",
      "unit": "USER"
    }
  ],
  "parentSubscriptionId": "386626c0-53e2-4515-8450-4a720bb5d029",
  "paymentPlanId": "30ccf1e7-1937-40cb-8e73-851a226fd4ea",
  "targetCompanyId": "698555fc-bc65-4163-9fee-16308edec41b",
  "targetUserId": "2c061df6-4313-45e0-8709-a0ca19b0aaa3"
}

Example response

{
  "activeOrder": {
    "createdOn": 1529083173000,
    "editionName": "Edition",
    "frequency": "One Time",
    "id": "1553",
    "orderLines": [
      {
        "quantity": "1",
        "unit": "USER"
      }
    ],
    "paymentPlanId": "30ccf1e7-1937-40cb-8e73-851a226fd4ea",
    "status": "PENDING MANUAL RECOVERY",
    "totalFee": "USD350.00"
  },
  "applicationName": "AUTO_DISCOUNTS_APP",
  "company": {
    "id": "698555fc-bc65-4163-9fee-16308edec41b",
    "name": "Company A"
  },
  "createdOn": 1529083173000,
  "id": "386626c0-53e2-4515-8450-4a720bb5d029",
  "pendingEvent": "SUBSCRIPTION_CHANGE",
  "referenceCode": "bundle09",
  "status": "ACTIVE",
  "user": {
    "firstName": "Michael",
    "id": "2c061df6-4313-45e0-8709-a0ca19b0aaa3",
    "lastName": "Jordan"
  }
}

POST/appReseller/v1/subscriptions

Note: This endpoint is being deprecated. // Create a new subscription on behalf of a user who is a member of a marketplace company linked to the current reseller company

Required Scope and Authorization Rules

Scope Rule
ROLE_RESELLER Allows access as a Reseller for the company

Body Parameters

Information about the new subscription that will be created

AppResellerSubscriptionCreationRequest object:

Property Type Description
orderLines string

Unit type and quantity

parentSubscriptionId string

ID of an add-on product's parent subscription

paymentPlanId string

(Required) Edition Payment Plan ID

targetCompanyId string

(Required) ID of the company in which the Reseller will create the new subscription

targetUserId string

(Required) ID of the user for whom the Reseller will create the new subscription

Responses

Status Meaning Description Definition
200 OK Success AppResellerSubscriptionWS
401 Unauthorized Unauthorized
409 Conflict Subscription already created

Update subscription

Example request

curl -X PUT https://{marketplaceURL}/api/appReseller/v1/subscriptions/{subscriptionId} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/appReseller/v1/subscriptions/{subscriptionId} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appReseller/v1/subscriptions/{subscriptionId}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "orderLines": [
    {
      "quantity": "15",
      "unit": "USER"
    }
  ],
  "paymentPlanId": "30ccf1e7-1937-40cb-8e73-851a226fd4ea"
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appReseller/v1/subscriptions/{subscriptionId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/appReseller/v1/subscriptions/{subscriptionId}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/appReseller/v1/subscriptions/{subscriptionId}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appReseller/v1/subscriptions/{subscriptionId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "orderLines": [
    {
      "quantity": "15",
      "unit": "USER"
    }
  ],
  "paymentPlanId": "30ccf1e7-1937-40cb-8e73-851a226fd4ea"
}

Example response

{
  "activeOrder": {
    "createdOn": 1529083173000,
    "editionName": "Edition",
    "frequency": "One Time",
    "id": "1553",
    "orderLines": [
      {
        "quantity": "15",
        "unit": "USER"
      }
    ],
    "paymentPlanId": "30ccf1e7-1937-40cb-8e73-851a226fd4ea",
    "status": "PENDING MANUAL RECOVERY",
    "totalFee": "USD350.00"
  },
  "applicationName": "AUTO_DISCOUNTS_APP",
  "company": {
    "id": "698555fc-bc65-4163-9fee-16308edec41b",
    "name": "Company A"
  },
  "createdOn": 1529083173000,
  "id": "386626c0-53e2-4515-8450-4a720bb5d029",
  "pendingEvent": "SUBSCRIPTION_CHANGE",
  "referenceCode": "bundle09",
  "status": "ACTIVE",
  "user": {
    "firstName": "Michael",
    "id": "2c061df6-4313-45e0-8709-a0ca19b0aaa3",
    "lastName": "Jordan"
  }
}

PUT/appReseller/v1/subscriptions/{subscriptionId}

Note: This endpoint is being deprecated. // Upgrade or downgrade a subscription on behalf of a user who is a member of a marketplace company linked to the current reseller company.
When you upgrade or downgrade subscriptions, you must provide both the paymentPlanId and the orderLines objects in the request even if the units are not changing.

Required Scope and Authorization Rules

Scope Rule
ROLE_RESELLER Allows access as a Reseller for the company

Parameters

Parameter Type Data Type Default Description
*subscriptionId path string Subscription ID

Body Parameters

Information about the new values to set to the subscription

AppResellerSubscriptionUpdateRequest object:

Property Type Description
orderLines array of OrderLineDetailsWS

Unit type and quantity

paymentPlanId string

Edition Payment Plan ID

Responses

Status Meaning Description Definition
200 OK Success AppResellerSubscriptionWS
401 Unauthorized Unauthorized
404 Not Found Not found
409 Conflict Subscription has a pending event and can't be updated

Sync

Create developer account

This call creates a developer account. Maximum of global requests of 20 per 2 seconds.

Example request

curl -X POST https://{marketplaceURL}/api/sync/v1/tasks#create \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/sync/v1/tasks#create HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/sync/v1/tasks#create',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "type": "object",
      "title": "DeveloperAccountSyncWS",
      "required": [
        "type",
        "operation"
      ],
      "properties": {
        "developerAccounts": {
          "type": "array",
          "items": {
            "type": "object",
            "title": "DeveloperAccount",
            "required": [
              "developerIdentifier",
              "developerAccountIdentifier"
            ],
            "properties": {
              "additionalDomains": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "addressLine": {
                "type": "string"
              },
              "addressLine2": {
                "type": "string"
              },
              "addressLine3": {
                "type": "string"
              },
              "city": {
                "type": "string"
              },
              "contactFirstName": {
                "type": "string"
              },
              "contactLastName": {
                "type": "string"
              },
              "country": {
                "type": "string"
              },
              "customAttributes": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "developerAccountIdentifier": {
                "description": "Required. The identifier of the developer's account from the developer's system.",
                "type": "string"
              },
              "developerIdentifier": {
                "description": "Required. The UUID identifier of the developer's company on the marketplace.",
                "type": "string",
                "format": "uuid"
              },
              "email": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "origin": {
                "type": "string"
              },
              "partner": {
                "type": "string"
              },
              "phoneNumber": {
                "type": "string"
              },
              "postalCode": {
                "type": "string"
              },
              "primaryDomain": {
                "type": "string"
              },
              "state": {
                "type": "string"
              }
            },
            "example": {
              "additionalDomains": [
                "abc1.com",
                "abc2.com"
              ],
              "addressLine": "50 Grove St.",
              "addressLine2": "address line 2",
              "addressLine3": "address line 3",
              "city": "Somerville",
              "contactFirstName": "Alex",
              "contactLastName": "Ferguson",
              "country": "postalCode",
              "customAttributes": {
                "customAtrribute1": "1234567890"
              },
              "developerDeveloperIdentifier": "bcde7116-5d20-4628-83a6-59b032a7cd2e",
              "developerIdentifier": "f0b5c422-0400-459f-879c-ac369d924bb9",
              "email": "abcinc@abc.com",
              "name": "ABC Company",
              "phoneNumber": "415-555-5555",
              "postalCode": "12340",
              "primaryDomain": "abc.com",
              "state": "MA"
            }
          }
        },
        "operation": {
          "description": "Required. The operation. Options: 'CREATE' and 'EXPIRE'",
          "type": "string"
        },
        "type": {
          "description": "Required. It must have the value 'DEVELOPER_ACCOUNT'",
          "type": "string"
        }
      },
      "example": {
        "developerAccounts": [
          {
            "additionalDomains": [
              "abc1.com",
              "abc2.com"
            ],
            "addressLine": "50 Grove St.",
            "addressLine2": "address line 2",
            "addressLine3": "address line 3",
            "city": "Somerville",
            "contactFirstName": "Alex",
            "contactLastName": "Ferguson",
            "country": "postalCode",
            "customAttributes": {
              "customAtrribute1": "1234567890"
            },
            "developerDeveloperIdentifier": "bcde7116-5d20-4628-83a6-59b032a7cd2e",
            "developerIdentifier": "f0b5c422-0400-459f-879c-ac369d924bb9",
            "email": "abcinc@abc.com",
            "name": "ABC Company",
            "phoneNumber": "415-555-5555",
            "postalCode": "12340",
            "primaryDomain": "abc.com",
            "state": "MA"
          }
        ],
        "operation": "CREATE",
        "type": "DEVELOPER_ACCOUNT"
      }
    },
    {
      "example": {
        "developerAccounts": [
          {
            "additionalDomains": [
              "abc1.com",
              "abc2.com"
            ],
            "addressLine": "50 Grove St.",
            "addressLine2": "address line 2",
            "addressLine3": "address line 3",
            "city": "Somerville",
            "contactFirstName": "Alex",
            "contactLastName": "Ferguson",
            "country": "postalCode",
            "customAttributes": {
              "customAtrribute1": "1234567890"
            },
            "developerDeveloperIdentifier": "bcde7116-5d20-4628-83a6-59b032a7cd2e",
            "developerIdentifier": "f0b5c422-0400-459f-879c-ac369d924bb9",
            "email": "abcinc@abc.com",
            "name": "ABC Company",
            "phoneNumber": "415-555-5555",
            "postalCode": "12340",
            "primaryDomain": "abc.com",
            "state": "MA"
          }
        ],
        "operation": "CREATE",
        "type": "DEVELOPER_ACCOUNT"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/sync/v1/tasks#create',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/sync/v1/tasks#create', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/sync/v1/tasks#create',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/sync/v1/tasks#create");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "developerAccounts": [
    {
      "additionalDomains": [
        "abc1.com",
        "abc2.com"
      ],
      "addressLine": "50 Grove St.",
      "addressLine2": "address line 2",
      "addressLine3": "address line 3",
      "city": "Somerville",
      "contactFirstName": "Alex",
      "contactLastName": "Ferguson",
      "country": "postalCode",
      "customAttributes": {
        "customAtrribute1": "1234567890"
      },
      "developerDeveloperIdentifier": "bcde7116-5d20-4628-83a6-59b032a7cd2e",
      "developerIdentifier": "f0b5c422-0400-459f-879c-ac369d924bb9",
      "email": "abcinc@abc.com",
      "name": "ABC Company",
      "phoneNumber": "415-555-5555",
      "postalCode": "12340",
      "primaryDomain": "abc.com",
      "state": "MA"
    }
  ],
  "operation": "CREATE",
  "type": "DEVELOPER_ACCOUNT"
}

POST/sync/v1/tasks#create

Required Scope and Authorization Rules

Scope Rule
ROLE_APPLICATION User must provide consumer key and secret from the applications profile.

Body Parameters

Used when type='DEVELOPER_ACCOUNT' and operation='CREATE'

DeveloperAccountSyncWS object:

Property Type Description
developerAccounts array of DeveloperAccount

operation string

Required. The operation. Options: 'CREATE' and 'EXPIRE'

type string

Required. It must have the value 'DEVELOPER_ACCOUNT'

Responses

Status Meaning Description Definition
202 Accepted Accepted
400 Bad Request Bad Request
401 Unauthorized Unauthorized
403 Forbidden Sync is disabled or Forbidden
429 Too Many Requests Too many requests

Expire developer account

This call expires a developer account. Maximum of global requests of 20 per 2 seconds.

Example request

curl -X POST https://{marketplaceURL}/api/sync/v1/tasks#expire \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/sync/v1/tasks#expire HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/sync/v1/tasks#expire',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "type": "object",
      "title": "DeveloperAccountSyncWS",
      "required": [
        "type",
        "operation"
      ],
      "properties": {
        "developerAccounts": {
          "type": "array",
          "items": {
            "type": "object",
            "title": "DeveloperAccount",
            "required": [
              "developerIdentifier",
              "developerAccountIdentifier"
            ],
            "properties": {
              "additionalDomains": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "addressLine": {
                "type": "string"
              },
              "addressLine2": {
                "type": "string"
              },
              "addressLine3": {
                "type": "string"
              },
              "city": {
                "type": "string"
              },
              "contactFirstName": {
                "type": "string"
              },
              "contactLastName": {
                "type": "string"
              },
              "country": {
                "type": "string"
              },
              "customAttributes": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "developerAccountIdentifier": {
                "description": "Required. The identifier of the developer's account from the developer's system.",
                "type": "string"
              },
              "developerIdentifier": {
                "description": "Required. The UUID identifier of the developer's company on the marketplace.",
                "type": "string",
                "format": "uuid"
              },
              "email": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "origin": {
                "type": "string"
              },
              "partner": {
                "type": "string"
              },
              "phoneNumber": {
                "type": "string"
              },
              "postalCode": {
                "type": "string"
              },
              "primaryDomain": {
                "type": "string"
              },
              "state": {
                "type": "string"
              }
            },
            "example": {
              "additionalDomains": [
                "abc1.com",
                "abc2.com"
              ],
              "addressLine": "50 Grove St.",
              "addressLine2": "address line 2",
              "addressLine3": "address line 3",
              "city": "Somerville",
              "contactFirstName": "Alex",
              "contactLastName": "Ferguson",
              "country": "postalCode",
              "customAttributes": {
                "customAtrribute1": "1234567890"
              },
              "developerDeveloperIdentifier": "bcde7116-5d20-4628-83a6-59b032a7cd2e",
              "developerIdentifier": "f0b5c422-0400-459f-879c-ac369d924bb9",
              "email": "abcinc@abc.com",
              "name": "ABC Company",
              "phoneNumber": "415-555-5555",
              "postalCode": "12340",
              "primaryDomain": "abc.com",
              "state": "MA"
            }
          }
        },
        "operation": {
          "description": "Required. The operation. Options: 'CREATE' and 'EXPIRE'",
          "type": "string"
        },
        "type": {
          "description": "Required. It must have the value 'DEVELOPER_ACCOUNT'",
          "type": "string"
        }
      },
      "example": {
        "developerAccounts": [
          {
            "additionalDomains": [
              "abc1.com",
              "abc2.com"
            ],
            "addressLine": "50 Grove St.",
            "addressLine2": "address line 2",
            "addressLine3": "address line 3",
            "city": "Somerville",
            "contactFirstName": "Alex",
            "contactLastName": "Ferguson",
            "country": "postalCode",
            "customAttributes": {
              "customAtrribute1": "1234567890"
            },
            "developerDeveloperIdentifier": "bcde7116-5d20-4628-83a6-59b032a7cd2e",
            "developerIdentifier": "f0b5c422-0400-459f-879c-ac369d924bb9",
            "email": "abcinc@abc.com",
            "name": "ABC Company",
            "phoneNumber": "415-555-5555",
            "postalCode": "12340",
            "primaryDomain": "abc.com",
            "state": "MA"
          }
        ],
        "operation": "CREATE",
        "type": "DEVELOPER_ACCOUNT"
      }
    },
    {
      "example": {
        "developerAccounts": [
          {
            "developerDevelopertIdentifier": "bcde7116-5d20-4628-83a6-59b032a7cd2e",
            "developerIdentifier": "f0b5c422-0400-459f-879c-ac369d924bb9"
          }
        ],
        "operation": "EXPIRE",
        "type": "DEVELOPER_ACCOUNT"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/sync/v1/tasks#expire',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/sync/v1/tasks#expire', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/sync/v1/tasks#expire',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/sync/v1/tasks#expire");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "developerAccounts": [
    {
      "developerDevelopertIdentifier": "bcde7116-5d20-4628-83a6-59b032a7cd2e",
      "developerIdentifier": "f0b5c422-0400-459f-879c-ac369d924bb9"
    }
  ],
  "operation": "EXPIRE",
  "type": "DEVELOPER_ACCOUNT"
}

POST/sync/v1/tasks#expire

Required Scope and Authorization Rules

Scope Rule
ROLE_APPLICATION User must provide consumer key and secret from the applications profile.

Body Parameters

Used when type='DEVELOPER_ACCOUNT' and operation='EXPIRE'

DeveloperAccountSyncWS object:

Property Type Description
developerAccounts array of DeveloperAccount

operation string

Required. The operation. Options: 'CREATE' and 'EXPIRE'

type string

Required. It must have the value 'DEVELOPER_ACCOUNT'

Responses

Status Meaning Description Definition
202 Accepted Accepted
400 Bad Request Bad Request
401 Unauthorized Unauthorized
403 Forbidden Sync is disabled or Forbidden
429 Too Many Requests Too many requests

Assign user

This call assigns a user. Maximum of global requests of 20 per 2 seconds.

Example request

curl -X POST https://{marketplaceURL}/api/sync/v1/tasks#assign \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/sync/v1/tasks#assign HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/sync/v1/tasks#assign',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "type": "object",
      "title": "UserSyncWS",
      "required": [
        "accountIdentifier",
        "developerIdentifier",
        "userIdentifier",
        "type",
        "operation"
      ],
      "properties": {
        "accountIdentifier": {
          "description": "Required. The Account Identifier provided when the subscription was created",
          "type": "string"
        },
        "developerIdentifier": {
          "description": "Required. The company UUID of the Developer's company",
          "type": "string",
          "format": "uuid"
        },
        "email": {
          "type": "string"
        },
        "firstName": {
          "type": "string"
        },
        "lastName": {
          "type": "string"
        },
        "operation": {
          "description": "Required. The operation. Options: 'ASSIGN' and 'UNASSIGN'",
          "type": "string"
        },
        "type": {
          "description": "Required. It must have the value 'ASSIGNMENT'",
          "type": "string"
        },
        "userIdentifier": {
          "description": "Required. The user identifier in the Developer's system",
          "type": "string"
        },
        "userName": {
          "type": "string"
        }
      },
      "example": {
        "accountIdentifier": "200ae1d9-c5b9-4c0b-843c-45d8e74d741a",
        "developerIdentifier": "f0b5c422-0400-459f-879c-ac369d924bb9",
        "email": "test_email@yopmail.com",
        "firstName": "Test_FirstName",
        "lastName": "Test_LastName",
        "operation": "ASSIGN",
        "type": "ASSIGNMENT",
        "userIdentifier": "45bbf36e-5902-4eb3-9072-87d267d302d4",
        "userName": "Test_UserName"
      }
    },
    {
      "example": {
        "accountIdentifier": "200ae1d9-c5b9-4c0b-843c-45d8e74d741a",
        "developerIdentifier": "f0b5c422-0400-459f-879c-ac369d924bb9",
        "email": "test_email@yopmail.com",
        "firstName": "Test_FirstName",
        "lastName": "Test_LastName",
        "operation": "ASSIGN",
        "type": "ASSIGNMENT",
        "userIdentifier": "45bbf36e-5902-4eb3-9072-87d267d302d4",
        "userName": "Test_UserName"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/sync/v1/tasks#assign',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/sync/v1/tasks#assign', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/sync/v1/tasks#assign',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/sync/v1/tasks#assign");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "accountIdentifier": "200ae1d9-c5b9-4c0b-843c-45d8e74d741a",
  "developerIdentifier": "f0b5c422-0400-459f-879c-ac369d924bb9",
  "email": "test_email@yopmail.com",
  "firstName": "Test_FirstName",
  "lastName": "Test_LastName",
  "operation": "ASSIGN",
  "type": "ASSIGNMENT",
  "userIdentifier": "45bbf36e-5902-4eb3-9072-87d267d302d4",
  "userName": "Test_UserName"
}

POST/sync/v1/tasks#assign

Required Scope and Authorization Rules

Scope Rule
ROLE_APPLICATION User must provide consumer key and secret from the applications profile.

Body Parameters

Used when type='ASSIGNMENT' and operation='ASSIGN'

UserSyncWS object:

Property Type Description
accountIdentifier string

Required. The Account Identifier provided when the subscription was created

developerIdentifier string

Required. The company UUID of the Developer's company

email string

firstName string

lastName string

operation string

Required. The operation. Options: 'ASSIGN' and 'UNASSIGN'

type string

Required. It must have the value 'ASSIGNMENT'

userIdentifier string

Required. The user identifier in the Developer's system

userName string

Responses

Status Meaning Description Definition
202 Accepted Accepted
400 Bad Request Bad Request
401 Unauthorized Unauthorized
403 Forbidden Sync is disabled or Forbidden
429 Too Many Requests Too many requests

Unassign user.

This call unassigns a user. Maximum of global requests of 20 per 2 seconds.

Example request

curl -X POST https://{marketplaceURL}/api/sync/v1/tasks#unassign \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/sync/v1/tasks#unassign HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/sync/v1/tasks#unassign',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "type": "object",
      "title": "UserSyncWS",
      "required": [
        "accountIdentifier",
        "developerIdentifier",
        "userIdentifier",
        "type",
        "operation"
      ],
      "properties": {
        "accountIdentifier": {
          "description": "Required. The Account Identifier provided when the subscription was created",
          "type": "string"
        },
        "developerIdentifier": {
          "description": "Required. The company UUID of the Developer's company",
          "type": "string",
          "format": "uuid"
        },
        "email": {
          "type": "string"
        },
        "firstName": {
          "type": "string"
        },
        "lastName": {
          "type": "string"
        },
        "operation": {
          "description": "Required. The operation. Options: 'ASSIGN' and 'UNASSIGN'",
          "type": "string"
        },
        "type": {
          "description": "Required. It must have the value 'ASSIGNMENT'",
          "type": "string"
        },
        "userIdentifier": {
          "description": "Required. The user identifier in the Developer's system",
          "type": "string"
        },
        "userName": {
          "type": "string"
        }
      },
      "example": {
        "accountIdentifier": "200ae1d9-c5b9-4c0b-843c-45d8e74d741a",
        "developerIdentifier": "f0b5c422-0400-459f-879c-ac369d924bb9",
        "email": "test_email@yopmail.com",
        "firstName": "Test_FirstName",
        "lastName": "Test_LastName",
        "operation": "ASSIGN",
        "type": "ASSIGNMENT",
        "userIdentifier": "45bbf36e-5902-4eb3-9072-87d267d302d4",
        "userName": "Test_UserName"
      }
    },
    {
      "example": {
        "accountIdentifier": "200ae1d9-c5b9-4c0b-843c-45d8e74d741a",
        "developerIdentifier": "f0b5c422-0400-459f-879c-ac369d924bb9",
        "operation": "UNASSIGN",
        "type": "ASSIGNMENT",
        "userIdentifier": "45bbf36e-5902-4eb3-9072-87d267d302d4"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/sync/v1/tasks#unassign',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/sync/v1/tasks#unassign', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/sync/v1/tasks#unassign',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/sync/v1/tasks#unassign");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "accountIdentifier": "200ae1d9-c5b9-4c0b-843c-45d8e74d741a",
  "developerIdentifier": "f0b5c422-0400-459f-879c-ac369d924bb9",
  "operation": "UNASSIGN",
  "type": "ASSIGNMENT",
  "userIdentifier": "45bbf36e-5902-4eb3-9072-87d267d302d4"
}

POST/sync/v1/tasks#unassign

Body Parameters

Used when type='ASSIGNMENT' and operation='UNASSIGN'

UserSyncWS object:

Property Type Description
accountIdentifier string

Required. The Account Identifier provided when the subscription was created

developerIdentifier string

Required. The company UUID of the Developer's company

email string

firstName string

lastName string

operation string

Required. The operation. Options: 'ASSIGN' and 'UNASSIGN'

type string

Required. It must have the value 'ASSIGNMENT'

userIdentifier string

Required. The user identifier in the Developer's system

userName string

Responses

Status Meaning Description Definition
202 Accepted Accepted
400 Bad Request Bad Request
401 Unauthorized Unauthorized
403 Forbidden Sync is disabled or Forbidden
429 Too Many Requests Too many requests

Get user assignment

This call retrieves a user assignment. Maximum of global requests of 20 per 2 seconds.

Example request

curl -X GET https://{marketplaceURL}/api/sync/v1/assignments?developerIdentifier=type,string&accountIdentifier=type,string&userIdentifier=type,string \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/sync/v1/assignments?developerIdentifier=type,string&accountIdentifier=type,string&userIdentifier=type,string HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/sync/v1/assignments',
  method: 'get',
  data: '?developerIdentifier=type,string&accountIdentifier=type,string&userIdentifier=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/sync/v1/assignments?developerIdentifier=type,string&accountIdentifier=type,string&userIdentifier=type,string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/sync/v1/assignments', params={
  'developerIdentifier': {
  "type": "string"
},  'accountIdentifier': {
  "type": "string"
},  'userIdentifier': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/sync/v1/assignments',
  params: {
  'developerIdentifier' => 'string',
'accountIdentifier' => 'string',
'userIdentifier' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/sync/v1/assignments?developerIdentifier=type,string&accountIdentifier=type,string&userIdentifier=type,string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "accountIdentifier": "200ae1d9-c5b9-4c0b-843c-45d8e74d741a",
  "assigned": true,
  "email": "test_email@yopmail.com",
  "firstName": "Test_FirstName",
  "lastName": "Test_LastName",
  "userIdentifier": "45bbf36e-5902-4eb3-9072-87d267d302d4",
  "userName": "Test_UserName"
}

GET/sync/v1/assignments

Required Scope and Authorization Rules

Scope Rule
ROLE_APPLICATION User must provide consumer key and secret from the applications profile.

Parameters

Parameter Type Data Type Default Description
*accountIdentifier query string
*developerIdentifier query string
*userIdentifier query string

Responses

Status Meaning Description Definition
200 OK Ok UserAssignmentWS
400 Bad Request Bad Request
401 Unauthorized Unauthorized
403 Forbidden Sync is disabled or Forbidden
404 Not Found User is not found or Subscription is not found for the Developer
429 Too Many Requests Too many requests

User Accounts

Disconnect user accounts

Example request

curl -X DELETE https://{marketplaceURL}/api/appwise/v2/accounts?appId=type,string&accountName=type,string \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/appwise/v2/accounts?appId=type,string&accountName=type,string HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appwise/v2/accounts',
  method: 'delete',
  data: '?appId=type,string&accountName=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appwise/v2/accounts?appId=type,string&accountName=type,string',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/appwise/v2/accounts', params={
  'appId': {
  "type": "string"
},  'accountName': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/appwise/v2/accounts',
  params: {
  'appId' => 'string',
'accountName' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appwise/v2/accounts?appId=type,string&accountName=type,string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "app": {
    "id": "b2fc6737-3d3f-4da2-afda-f80f25b89af9"
  },
  "connection": {
    "accountName": "bob@a13a9998-e025-4751-8fee-72afdc0fe6d5@2cc88871-e942-4910-96e3-0521d7ae52f4",
    "status": "PENDING"
  },
  "user": {
    "companyId": "2cc88871-e942-4910-96e3-0521d7ae52f4",
    "userId": "a13a9998-e025-4751-8fee-72afdc0fe6d5"
  }
}

DELETE/appwise/v2/accounts

Disconnects an existing user account from Search. To access this API, you must configure product-scoped OAuth2 authentication for the application.

Parameters

Parameter Type Data Type Default Description
*accountName query string The user application account connection (accountName) to disconnect
*appId query string Note: Application UUID = Product UUID
callbackUrl query string Callback URL to which to publish status updates about the disconnection

Responses

Status Meaning Description Definition
200 OK Success UserAccountDisonnectionResponse
400 Bad Request Input is invalid or malformed UserConnectionError
401 Unauthorized Request cannot be authenticated UserConnectionError
403 Forbidden Request is authenticated but does not have permission to access the resource(s) UserConnectionError
502 Bad Gateway Internal services are unavailable UserConnectionError

Create user connections

Example request

curl -X POST https://{marketplaceURL}/api/appwise/v2/accounts \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/appwise/v2/accounts HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/appwise/v2/accounts',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "app": {
    "id": "b2fc6737-3d3f-4da2-afda-f80f25b89af9"
  },
  "user": {
    "companyId": "2cc88871-e942-4910-96e3-0521d7ae52f4",
    "handle": "bob",
    "userId": "a13a9998-e025-4751-8fee-72afdc0fe6d5"
  }
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/appwise/v2/accounts',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/appwise/v2/accounts', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/appwise/v2/accounts',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/appwise/v2/accounts");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "app": {
    "id": "b2fc6737-3d3f-4da2-afda-f80f25b89af9"
  },
  "user": {
    "companyId": "2cc88871-e942-4910-96e3-0521d7ae52f4",
    "handle": "bob",
    "userId": "a13a9998-e025-4751-8fee-72afdc0fe6d5"
  }
}

Example response

{
  "connection": {
    "accountName": "bob@a1130ec9-3044-4cc6-b9a8-5a71fd2581a5@ce91a616-77f6-48b5-b6f3-d22bdeb362d9"
  }
}

POST/appwise/v2/accounts

Creates a new user connection for Search. A connection (accountName) associates the app (application UUID) and user information (userId, companyId, and handle). The connection is used to, for example, identify events related to the user's app account. accountName Format: {user_handle}@{user_uuid}@{company_uuid} Note: Application UUID = Product UUID

Body Parameters

UserConnection object:

Property Type Description
app ApplicationToConnect

The app for which Search and Notification is provisioned for the user

user UserToConnect

User to provision (connect to AppDirect)

Responses

Status Meaning Description Definition
201 Created Success UserConnectionResponse
400 Bad Request Input is invalid or malformed UserConnectionError
401 Unauthorized Request cannot be authenticated UserConnectionError
403 Forbidden Request is authenticated but does not have permission to access the resource(s) UserConnectionError
404 Not Found The application and/or user were not found UserConnectionError
409 Conflict Inputs are valid, but this user and handle are already connected to the service UserConnectionError
502 Bad Gateway Internal services are unavailable UserConnectionError

Users

Patch user profile

Example request

curl -X PATCH https://{marketplaceURL}/api/account/v2/users/{userUuid}/profile \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PATCH https://{marketplaceURL}/api/account/v2/users/{userUuid}/profile HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/users/{userUuid}/profile',
  method: 'patch',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "allOf": [
        {
          "description": "Resource links",
          "type": "object",
          "title": "ResourceSupport",
          "properties": {
            "links": {
              "description": "Resource links",
              "type": "array",
              "items": {
                "type": "object",
                "title": "Link",
                "properties": {
                  "href": {
                    "type": "string"
                  },
                  "rel": {
                    "type": "string"
                  }
                },
                "example": {
                  "href": "...",
                  "rel": "..."
                },
                "nullable": true
              }
            }
          },
          "example": {
            "links": [
              {
                "href": "...",
                "rel": "..."
              },
              {
                "href": "...",
                "rel": "..."
              }
            ]
          },
          "nullable": true
        },
        {
          "description": "Represents a User profile (User)",
          "type": "object",
          "title": "UserProfileAccountV2",
          "properties": {
            "birthday": {
              "description": "Birthday date",
              "type": "string"
            },
            "currentCity": {
              "description": "Current city",
              "type": "string"
            },
            "customAttributes": {
              "description": "Custom attributes",
              "type": "array",
              "items": {
                "description": "Custom attributes",
                "type": "object",
                "title": "CustomAttributeAccountV2",
                "properties": {
                  "attributeType": {
                    "allOf": []
                  },
                  "hint": {
                    "description": "Localized hint",
                    "type": "string"
                  },
                  "label": {
                    "description": "Localized label",
                    "type": "string"
                  },
                  "name": {
                    "description": "Name",
                    "type": "string"
                  },
                  "value": {
                    "description": "Value",
                    "type": "string"
                  },
                  "valueKeys": {
                    "description": "Value keys",
                    "type": "array",
                    "items": {}
                  }
                },
                "example": {
                  "attributeType": "MULTISELECT",
                  "hint": "",
                  "label": "Label Names",
                  "name": "Company Details",
                  "valueKeys": [
                    "great option"
                  ]
                }
              }
            },
            "educations": {
              "description": "List of user's educational credentials",
              "type": "array",
              "items": {
                "description": "User profile's education information",
                "type": "object",
                "title": "EducationAccountV2",
                "properties": {
                  "current": {
                    "description": "If currently still at this school",
                    "type": "boolean"
                  },
                  "degree": {
                    "description": "Degree",
                    "type": "string"
                  },
                  "endYear": {
                    "description": "End year",
                    "type": "number"
                  },
                  "field": {
                    "description": "Field of studies",
                    "type": "string"
                  },
                  "school": {
                    "description": "School",
                    "type": "string"
                  },
                  "startYear": {
                    "description": "Start year",
                    "type": "number"
                  }
                },
                "example": {
                  "current": false,
                  "degree": "bachelor's",
                  "endYear": 2010,
                  "field": "Computer Science",
                  "school": "MIT",
                  "startYear": 2007
                }
              }
            },
            "emailAddresses": {
              "description": "Email addresses",
              "type": "array",
              "items": {
                "description": "Email address information",
                "type": "object",
                "title": "EmailAddressAccountV2",
                "properties": {
                  "address": {
                    "description": "Email address",
                    "type": "string"
                  },
                  "type": {
                    "allOf": []
                  },
                  "verified": {
                    "description": "Indicates whether the email address is verified",
                    "type": "boolean"
                  }
                },
                "example": {
                  "address": "alternate@company.com",
                  "type": "WORK",
                  "verified": false
                }
              }
            },
            "homePhone": {
              "description": "Home phone number",
              "type": "string"
            },
            "hometown": {
              "description": "Hometown",
              "type": "string"
            },
            "ims": {
              "description": "List of instant messaging accounts",
              "type": "array",
              "items": {
                "description": "Instant messenger",
                "type": "object",
                "title": "IM",
                "properties": {
                  "account": {
                    "description": "Account identifier",
                    "type": "string"
                  },
                  "type": {
                    "allOf": []
                  }
                },
                "example": {
                  "account": "da853378-2e9a-4944-ad53-6257bf773ace",
                  "type": "GOOGLE_TALK"
                }
              }
            },
            "mobilePhone": {
              "description": "Mobile phone number",
              "type": "string"
            },
            "twitter": {
              "description": "Twitter account",
              "type": "string"
            },
            "twoFactorAuthenticationMethod": {
              "description": "Two factor authentication method",
              "type": "string"
            },
            "workExperiences": {
              "description": "List of work experiences",
              "type": "array",
              "items": {
                "description": "Represents a work experience",
                "type": "object",
                "title": "WorkExperienceAccountV2",
                "properties": {
                  "current": {
                    "description": "Currently working",
                    "type": "boolean"
                  },
                  "description": {
                    "description": "Description",
                    "type": "string"
                  },
                  "employer": {
                    "description": "Employer",
                    "type": "string"
                  },
                  "endYear": {
                    "description": "Year ended",
                    "type": "number"
                  },
                  "position": {
                    "description": "Position",
                    "type": "string"
                  },
                  "startYear": {
                    "description": "Year started",
                    "type": "number"
                  }
                },
                "example": {
                  "current": true,
                  "description": "Developer @ Appdirect",
                  "employer": "Appdirect",
                  "endYear": 2017,
                  "position": "Manager",
                  "startYear": 2011
                }
              }
            },
            "workPhone": {
              "description": "Work phone number",
              "type": "string"
            }
          },
          "example": {
            "birthday": "1999/9/9",
            "currentCity": "Current City",
            "customAttributes": [],
            "educations": [
              {
                "current": false,
                "degree": "bachelor's",
                "endYear": 2010,
                "field": "Computer Science",
                "school": "MIT",
                "startYear": 2007
              }
            ],
            "emailAddresses": [
              {
                "address": "alternate@company.com",
                "type": "WORK",
                "verified": false
              }
            ],
            "homePhone": "+1 123 123 1234",
            "hometown": "Home Town",
            "ims": [
              {
                "account": "someAccount",
                "type": "OTHER"
              },
              {
                "account": "someAccount",
                "type": "OTHER"
              },
              {
                "account": "someAccount",
                "type": "OTHER"
              }
            ],
            "links": [
              {
                "href": "http://appdirect/api/account/v2/users/48dc0e2b-995b-4013-bd3f-2946309ca0fd",
                "rel": "user"
              }
            ],
            "mobilePhone": "+1 123 ",
            "twitter": "twitter_account",
            "twoFactorAuthenticationMethod": "twoFactorAuthenticationIsGreat",
            "workExperiences": [
              {
                "current": true,
                "description": "Developer @ Appdirect",
                "employer": "Appdirect",
                "endYear": 2017,
                "position": "Manager",
                "startYear": 2011
              }
            ],
            "workPhone": "+1 123 123 1234"
          }
        }
      ]
    },
    {
      "example": {
        "birthday": "1999/9/9",
        "currentCity": "Current City",
        "customAttributes": [],
        "educations": [
          {
            "current": false,
            "degree": "bachelor",
            "endYear": 2010,
            "field": "Computer Science",
            "school": "MIT",
            "startYear": 2007
          }
        ],
        "emailAddresses": [
          {
            "address": "alternate@company.com",
            "type": "WORK",
            "verified": true
          }
        ],
        "homePhone": "+14155552671",
        "hometown": "Home Town",
        "mobilePhone": "+442071833545",
        "workPhone": "+442071838750"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/users/{userUuid}/profile',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.patch('https://{marketplaceURL}/api/account/v2/users/{userUuid}/profile', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.patch 'https://{marketplaceURL}/api/account/v2/users/{userUuid}/profile',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/users/{userUuid}/profile");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "birthday": "1999/9/9",
  "currentCity": "Current City",
  "customAttributes": [],
  "educations": [
    {
      "current": false,
      "degree": "bachelor",
      "endYear": 2010,
      "field": "Computer Science",
      "school": "MIT",
      "startYear": 2007
    }
  ],
  "emailAddresses": [
    {
      "address": "alternate@company.com",
      "type": "WORK",
      "verified": true
    }
  ],
  "homePhone": "+14155552671",
  "hometown": "Home Town",
  "mobilePhone": "+442071833545",
  "workPhone": "+442071838750"
}

Example response

{
  "birthday": "1999/9/9",
  "currentCity": "Current City",
  "customAttributes": [],
  "educations": [
    {
      "current": false,
      "degree": "bachelor",
      "endYear": 2010,
      "field": "Computer Science",
      "school": "MIT",
      "startYear": 2007
    }
  ],
  "emailAddresses": [
    {
      "address": "alternate@company.com",
      "type": "WORK",
      "verified": false
    }
  ],
  "homePhone": "+14155552671",
  "hometown": "Home Town",
  "ims": [
    {
      "account": "account1",
      "type": "OTHER"
    },
    {
      "account": "account2",
      "type": "OTHER"
    },
    {
      "account": "account3",
      "type": "OTHER"
    }
  ],
  "links": [
    {
      "href": "http://appdirect/api/account/v2/users/48dc0e2b-995b-4013-bd3f-2946309ca0fd",
      "rel": "user"
    }
  ],
  "mobilePhone": "+442071833545",
  "twitter": "twitter_account",
  "twoFactorAuthenticationMethod": "twoFactorAuthenticationSavesMoney",
  "workExperiences": [
    {
      "current": true,
      "description": "Developer @ Appdirect",
      "employer": "Appdirect",
      "endYear": 2017,
      "position": "Manager",
      "startYear": 2011
    }
  ],
  "workPhone": "+442071838750"
}

PATCH/account/v2/users/{userUuid}/profile

Update a marketplace user's profile. Also marks user's checklist with profile as completed.

Required Scope and Authorization Rules

Scope Rule
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 Allows access to read and write all marketplace data.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.
ROLE_USER Allows updating own or other company user profiles.

Parameters

Parameter Type Data Type Default Description
removeUnspecifiedCustomAttributes query boolean false When true, custom attributes not included in the body will be removed from the user's profile. When false, custom attributes
*userUuid path string Unique identifier of user in the API request

Body Parameters

User profile resource containing requested updates

UserProfileAccountV2 object:

Property Type Description
birthday string

Birthday date

currentCity string

Current city

customAttributes array of CustomAttributeAccountV2

Custom attributes

educations array of EducationAccountV2

List of user's educational credentials

emailAddresses array of EmailAddressAccountV2

Email addresses

homePhone string

Home phone number

hometown string

Hometown

ims array of IM

List of instant messaging accounts

links array of Link

Resource links

mobilePhone string

Mobile phone number

twitter string

Twitter account

twoFactorAuthenticationMethod string

Two factor authentication method

workExperiences array of WorkExperienceAccountV2

List of work experiences

workPhone string

Work phone number

Responses

Status Meaning Description Definition
200 OK Success UserProfileAccountV2
401 Unauthorized Unauthorized
404 Not Found User not found array of Error

List all users

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/users \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/users HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/users',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/users',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/users', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/users',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/users");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "activated": true,
      "allowLogin": true,
      "boostUser": null,
      "creationDate": 1398896238000,
      "currency": "USD",
      "customAttributes": [
        {
          "attributeType": "TEXT",
          "hint": "commission_hint",
          "label": "Commission_Payout_ID",
          "name": "C5125859",
          "value": "t1"
        },
        {
          "attributeType": "MULTISELECT",
          "hint": "Allows credit card payments and enables credit card fields",
          "label": "Allow Credit Card",
          "name": "allow_credit_card",
          "valueKeys": []
        },
        {
          "attributeType": "TEXT",
          "hint": "",
          "label": "C5457097",
          "name": "C5457097",
          "value": "abcd"
        }
      ],
      "email": "john.lee@company0093957321.com",
      "externalId": "b34974b2-f5d6-4326-9859-5247dc42ee60",
      "firstName": "John",
      "idpUuid": "1d37bace-f4cf-11e6-af80-22000a9513f7",
      "lastName": "Lee",
      "lastSuccessfulLogin": 1543268078000,
      "ldapId": "1",
      "links": [
        {
          "href": "http://appdirect/api/account/v2/users/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/users/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1/memberships",
          "rel": "memberships"
        }
      ],
      "locale": "en_US",
      "metadata": {
        "apsUid": null
      },
      "openId": "http://appdirect/openid/id/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1",
      "picture": "http://appdirect/profilePics/img6839249962619189663.png?32339267f9f00643fd18373adf580743",
      "roles": [
        "ROLE_USER"
      ],
      "userName": "john.lee",
      "uuid": "2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1"
    },
    {
      "activated": true,
      "allowLogin": true,
      "boostUser": null,
      "creationDate": 1498080462000,
      "currency": "USD",
      "customAttributes": [],
      "email": "jane.lee@company1151609035.com",
      "externalId": "47ac42db-162e-11e7-af80-22000a9513f7",
      "firstName": "Jane",
      "lastName": "Lee",
      "lastSuccessfulLogin": 1542820131000,
      "ldapId": null,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/users/8db1c051-73a6-4ff8-a0ce-bc1d80d0f156",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/users/8db1c051-73a6-4ff8-a0ce-bc1d80d0f156/memberships",
          "rel": "memberships"
        }
      ],
      "locale": "en_US",
      "metadata": {
        "apsUid": null
      },
      "openId": "http://appdirect/openid/id/8db1c051-73a6-4ff8-a0ce-bc1d80d0f156",
      "picture": null,
      "roles": [
        "ROLE_USER"
      ],
      "userName": "jane.lee",
      "uuid": "8db1c051-73a6-4ff8-a0ce-bc1d80d0f156"
    }
  ],
  "links": [],
  "page": {
    "number": 0,
    "size": 50,
    "totalElements": 2,
    "totalPages": 1
  }
}

GET/account/v2/users

Retrieves all marketplace users

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER_READ Allows access to read all marketplace data.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.

Parameters

Parameter Type Data Type Default Description
companyMembershipRole query string If specified, returns only users with the specified role, one of the following values: ROLE_CHANNEL_ADMIN (Marketplace Manager), ROLE_CHANNEL_PRODUCT_SUPPORT (Product Support), ROLE_SALES_SUPPORT (Sales Support), ROLE_RESELLER_MANAGER (Reseller Manager), ROLE_RESELLER (Reseller), ROLE_CHANNEL_SUPPORT (Customer Support), ROLE_SYS_ADMIN (Company Admin), ROLE_BILLING_ADMIN (Billing Admin), ROLE_DEVELOPER (Developer)
custom.customAttributeName query string Accepts a notIn filter in the form of ?custom.customAttributeName=notIn(customAttributeValue1, customAttributeValue2, customAttributeValueN...) that excludes users with matching values. Before you can use the filter, you must first create "Text" type user custom attributes in the user interface. You can then specify the custom attribute name and values as customAttributeName and customAttributeValueN. See https://help.appdirect.com/appmarket/Default.htm#MarketplaceManager/MM-Setgscustui-create-attribs.html.
email query string Email address of user
externalId query string External ID of user
includeCustomAttributes query boolean Optional. Default is true. When set to true, user custom attributes are included in the API response. When set to false, user custom attributes are not included.
lastModified query number The date on which the user was last modified, in UNIX Epoch milliseconds
name query string First or last name of user
page query integer 0 Zero-based page index
size query integer 50 Number of results per page to return
sortField query string of enum:
DATE
FIRST_NAME
LAST_NAME
DATE The property to sort by
sortOrder query string of enum:
ASC
DESC
ASC Ordering type
username query string User name of user

Responses

Status Meaning Description Definition
200 OK Success PagedUserAccountV2
401 Unauthorized Unauthorized

Read reseller user company associations

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/users/{userUuid}/rssrCompanyAssociations \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/users/{userUuid}/rssrCompanyAssociations HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/users/{userUuid}/rssrCompanyAssociations',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/users/{userUuid}/rssrCompanyAssociations',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/users/{userUuid}/rssrCompanyAssociations', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/users/{userUuid}/rssrCompanyAssociations',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/users/{userUuid}/rssrCompanyAssociations");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "address": {
        "city": "Calgary",
        "country": "Canada",
        "state": "AB",
        "street1": "Harris Place NW",
        "street2": "907",
        "zip": "T3B2V4"
      },
      "channelAdmin": true,
      "companySize": "SMALL",
      "countryCode": "US",
      "creationDate": 1457416568000,
      "customAttributes": [],
      "defaultRole": "USER",
      "emailAddress": "jane.lee@company.com",
      "enabled": true,
      "externalId": "37ac4899-0847-41ac-8e6b-adfde0363b37",
      "industry": "Finance",
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/a3f385be-e10b-444e-99d1-95cd7d4c1f5a",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/a3f385be-e10b-444e-99d1-95cd7d4c1f5a/memberships",
          "rel": "memberships"
        }
      ],
      "name": "Matt & Co",
      "phoneNumber": "888-888-8888",
      "picture": null,
      "reseller": false,
      "salesAgent": {
        "href": "http://appdirect/api/account/v2/users/a3f385be-e10b-444e-99d1-95cd7d4c1f5a",
        "rel": "salesRepLink"
      },
      "salesSupport": false,
      "uuid": "a3f385be-e10b-444e-99d1-95cd7d4c1f5a",
      "vendor": true,
      "website": "company.com"
    },
    {
      "address": {
        "city": "Montreal",
        "country": "Canada",
        "state": "AB",
        "street1": "Harris Place NW",
        "street2": "907",
        "zip": "H3H2N3"
      },
      "channelAdmin": true,
      "companySize": "SMALL",
      "countryCode": "US",
      "creationDate": 1521573411000,
      "customAttributes": [
        {
          "attributeType": "TEXT",
          "hint": "",
          "label": "C1593404",
          "name": "C1593404",
          "value": "t1"
        }
      ],
      "defaultRole": "USER",
      "emailAddress": "Jane@company.com",
      "enabled": false,
      "externalId": "b34974b2-f5d6-4326-9859-5247dc42ee60",
      "industry": "Finance",
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/42f4e0cd-0614-4695-87ba-fcaee49fb995",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/42f4e0cd-0614-4695-87ba-fcaee49fb995/memberships",
          "rel": "memberships"
        }
      ],
      "name": "NewCompany & Co",
      "phoneNumber": "888-888-8888",
      "picture": null,
      "reseller": false,
      "salesAgent": {
        "href": "http://appdirect/api/account/v2/users/a3f385be-e10b-444e-99d1-95cd7d4c1f5a",
        "rel": "salesRepLink"
      },
      "salesSupport": false,
      "uuid": "42f4e0cd-0614-4695-87ba-fcaee49fb995",
      "vendor": true,
      "website": "company.com"
    }
  ],
  "links": [],
  "page": {
    "number": 0,
    "size": 50,
    "totalElements": 2,
    "totalPages": 1
  }
}

GET/account/v2/users/{userUuid}/rssrCompanyAssociations

Reads a reseller user's company associations

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER_READ Allows access to read all marketplace data.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_USER Allows access to read any company user.

Parameters

Parameter Type Data Type Default Description
page query integer 0 Zero-based page index
size query integer 50 Number of results per page to return
sortField query string of enum:
DATE
DATE The property to sort by
sortOrder query string of enum:
ASC
DESC
ASC Ordering type
*userUuid path string Unique identifier of the user

Responses

Status Meaning Description Definition
200 OK Success PagedCompanyAccountV2
401 Unauthorized Unauthorized
404 Not Found User not found array of Error

Read user memberships

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/users/{userUuid}/memberships \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/users/{userUuid}/memberships HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/users/{userUuid}/memberships',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/users/{userUuid}/memberships',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/users/{userUuid}/memberships', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/users/{userUuid}/memberships',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/users/{userUuid}/memberships");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "company": {
        "defaultRole": "USER",
        "enabled": true,
        "links": [
          {
            "href": "http://appdirect/api/account/v2/companies/97e573e2-1d11-4df4-8071-da1006509493",
            "rel": "self"
          },
          {
            "href": "http://appdirect/api/account/v2/companies/97e573e2-1d11-4df4-8071-da1006509493/memberships",
            "rel": "memberships"
          }
        ],
        "name": "Company 1040203757",
        "phoneNumber": null,
        "picture": "http://localhost:8080/profilePics/http://cdn/company.png",
        "uuid": "97e573e2-1d11-4df4-8071-da1006509493",
        "vendor": false
      },
      "enabled": true,
      "lastUsed": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/97e573e2-1d11-4df4-8071-da1006509493/memberships/dcf7b936-c01f-4c98-b349-dae4769ff754",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/users/dcf7b936-c01f-4c98-b349-dae4769ff754",
          "rel": "user"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/97e573e2-1d11-4df4-8071-da1006509493",
          "rel": "company"
        }
      ],
      "metadata": {
        "mosi_username": null
      },
      "mosiUser": null,
      "position": null,
      "roles": [
        "ROLE_BILLING_ADMIN",
        "ROLE_SYS_ADMIN"
      ],
      "user": {
        "activated": true,
        "allowLogin": true,
        "boostUser": null,
        "email": "jane.lee@company1151609035.com",
        "firstName": "Jane",
        "lastName": "Lee",
        "ldapId": null,
        "links": [
          {
            "href": "http://appdirect/api/account/v2/users/dcf7b936-c01f-4c98-b349-dae4769ff754",
            "rel": "self"
          },
          {
            "href": "http://appdirect/api/account/v2/users/dcf7b936-c01f-4c98-b349-dae4769ff754/memberships",
            "rel": "memberships"
          }
        ],
        "metadata": {
          "apsUid": null
        },
        "picture": null,
        "roles": [
          "ROLE_USER"
        ],
        "userName": "jane.lee",
        "uuid": "dcf7b936-c01f-4c98-b349-dae4769ff754"
      }
    }
  ],
  "links": []
}

GET/account/v2/users/{userUuid}/memberships

Retrieve a user's company memberships.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER_READ Allows access to read all marketplace data.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_USER Allows access to retrieve own membership.

Parameters

Parameter Type Data Type Default Description
includeCompanyCustomAttributes query boolean Optional. Default is true. When set to true, company custom attributes will be included in the API response. When set to false, company custom attributes will not be included.
includeUserCustomAttributes query boolean Optional. Default is true. When set to true, user custom attributes will be included in the API response. When set to false, user custom attributes will not be included.
status query string Status of membership to be requested
*userUuid path string Unique identifier of user in the API request

Responses

Status Meaning Description Definition
200 OK Success UserCompanyMembershipAccountV2
401 Unauthorized Unauthorized
404 Not Found User not found array of Error

Read user profile

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/users/{userUuid}/profile \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/users/{userUuid}/profile HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/users/{userUuid}/profile',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/users/{userUuid}/profile',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/users/{userUuid}/profile', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/users/{userUuid}/profile',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/users/{userUuid}/profile");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "birthday": "1999/9/9",
  "currentCity": "Current City",
  "customAttributes": [],
  "educations": [
    {
      "current": false,
      "degree": "bachelor",
      "endYear": 2010,
      "field": "Computer Science",
      "school": "MIT",
      "startYear": 2007
    }
  ],
  "emailAddresses": [
    {
      "address": "alternate@company.com",
      "type": "WORK",
      "verified": false
    }
  ],
  "homePhone": "+1 123 123 1234",
  "hometown": "Home Town",
  "ims": [
    {
      "account": "someAccount",
      "type": "OTHER"
    },
    {
      "account": "someAccount",
      "type": "OTHER"
    },
    {
      "account": "someAccount",
      "type": "OTHER"
    }
  ],
  "links": [
    {
      "href": "http://appdirect/api/account/v2/users/48dc0e2b-995b-4013-bd3f-2946309ca0fd",
      "rel": "user"
    }
  ],
  "mobilePhone": "+1 123 ",
  "twitter": "twitter_account",
  "twoFactorAuthenticationMethod": "twoFactorAuthenticationIsGreat",
  "workExperiences": [
    {
      "current": true,
      "description": "Developer @ Appdirect",
      "employer": "Appdirect",
      "endYear": 2017,
      "position": "Manager",
      "startYear": 2011
    }
  ],
  "workPhone": "+1 123 123 1234"
}

GET/account/v2/users/{userUuid}/profile

Retrieve profile information for a marketplace user.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER_READ Allows access to read all marketplace data.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.
ROLE_USER Allows access to retrieve self or other company user profiles.

Parameters

Parameter Type Data Type Default Description
*userUuid path string Unique identifier of user in the API request

Responses

Status Meaning Description Definition
200 OK Success UserProfileAccountV2
401 Unauthorized Unauthorized
404 Not Found User not found array of Error

Read a user

Example request

curl -X GET https://{marketplaceURL}/api/account/v2/users/{userUuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/account/v2/users/{userUuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/users/{userUuid}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/users/{userUuid}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/account/v2/users/{userUuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/account/v2/users/{userUuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/users/{userUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "activated": true,
  "allowLogin": true,
  "boostUser": null,
  "creationDate": 1398896238000,
  "currency": "USD",
  "customAttributes": [
    {
      "attributeType": "TEXT",
      "hint": "commission_hint",
      "label": "Commission_Payout_ID",
      "name": "C5125859",
      "value": "t1"
    },
    {
      "attributeType": "MULTISELECT",
      "hint": "Allows credit card payments and enables credit card fields",
      "label": "Allow Credit Card",
      "name": "allow_credit_card",
      "valueKeys": []
    },
    {
      "attributeType": "TEXT",
      "hint": "",
      "label": "C5457097",
      "name": "C5457097",
      "value": "abcd"
    }
  ],
  "email": "jane.lee@company1151609035.com",
  "externalId": "0e149998-6c1a-4c82-90ed-57468a394447",
  "firstName": "Jane",
  "idpUuid": "1d37bace-f4cf-11e6-af80-22000a9513f7",
  "lastName": "Lee",
  "lastSuccessfulLogin": 1543528191000,
  "ldapId": "1",
  "links": [
    {
      "href": "http://appdirect/api/account/v2/users/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1",
      "rel": "self"
    },
    {
      "href": "http://appdirect/api/account/v2/users/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1/memberships",
      "rel": "memberships"
    }
  ],
  "locale": "en_US",
  "metadata": {
    "apsUid": null
  },
  "openId": "http://appdirect/openid/id/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1",
  "picture": "http://appdirect/profilePics/img6839249962619189663.png?32339267f9f00643fd18373adf580743",
  "roles": [
    "ROLE_USER"
  ],
  "userName": "jane.lee",
  "uuid": "2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1"
}

GET/account/v2/users/{userUuid}

Retrieves a marketplace user by ID or external ID. If you use the ID, you can omit a prefix or use 'id:' as the prefix. If you use the external ID, you must always specify the 'externalId:' prefix.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER_READ Allows access to read all marketplace data.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.
ROLE_USER Allows access to read any company user.

Parameters

Parameter Type Data Type Default Description
includeCustomAttributes query boolean Optional. Default is true. When set to true, user custom attributes are included in the API response. When set to false, user custom attributes are not included.
*userUuid path string Unique identifier (ID or external ID) of the user

Responses

Status Meaning Description Definition
200 OK Success UserAccountV2
401 Unauthorized Unauthorized
404 Not Found User not found array of Error

Update last used company membership

Example request

curl -X PUT https://{marketplaceURL}/api/account/v2/users/{userUuid}/memberships/{companyUuid}/current \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/account/v2/users/{userUuid}/memberships/{companyUuid}/current HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/users/{userUuid}/memberships/{companyUuid}/current',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/users/{userUuid}/memberships/{companyUuid}/current',
{
  method: 'PUT',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/account/v2/users/{userUuid}/memberships/{companyUuid}/current', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/account/v2/users/{userUuid}/memberships/{companyUuid}/current',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/users/{userUuid}/memberships/{companyUuid}/current");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

[
  {
    "code": "Not Found",
    "message": "User with UUID=4c8aad2f-288f-41eb-8467-fa7e52bc4fac not found."
  }
]

PUT/account/v2/users/{userUuid}/memberships/{companyUuid}/current

Update a marketplace user's last used company.

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER Allows access to read and write all marketplace data.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_USER Allows updating company as company member.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company to set as last used
*userUuid path string Unique identifier of user in the API request

Responses

Status Meaning Description Definition
204 No Content Success, no content
401 Unauthorized Unauthorized
404 Not Found User/Company not found array of Error

Activate a user

Example request

curl -X PATCH https://{marketplaceURL}/api/account/v2/inactiveUsers/{activationToken} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PATCH https://{marketplaceURL}/api/account/v2/inactiveUsers/{activationToken} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/inactiveUsers/{activationToken}',
  method: 'patch',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "User activation information",
      "type": "object",
      "title": "InactiveUserAccountV2",
      "properties": {
        "activated": {
          "description": "Is user activated",
          "type": "boolean"
        },
        "email": {
          "description": "User email",
          "type": "string"
        },
        "password": {
          "description": "User password",
          "type": "string"
        },
        "privacyPolicy": {
          "description": "Indicates whether the user has agreed to the privacy policy",
          "type": "boolean"
        },
        "termsOfService": {
          "description": "Indicates whether the user has accepted the terms of service",
          "type": "boolean"
        }
      },
      "example": {
        "activated": true,
        "email": "alex.gonsalez@company2438285395.com",
        "password": "some-password",
        "privacyPolicy": true,
        "termsOfService": true
      }
    },
    {
      "example": {
        "activated": true,
        "email": "alex.gonsalez@company2438285395.com",
        "password": "testpassword1",
        "privacyPolicy": true,
        "termsOfService": true
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/inactiveUsers/{activationToken}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.patch('https://{marketplaceURL}/api/account/v2/inactiveUsers/{activationToken}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.patch 'https://{marketplaceURL}/api/account/v2/inactiveUsers/{activationToken}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/inactiveUsers/{activationToken}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "activated": true,
  "email": "alex.gonsalez@company2438285395.com",
  "password": "testpassword1",
  "privacyPolicy": true,
  "termsOfService": true
}

Example response

{
  "activated": true,
  "email": "alex.gonsalez@company2438285395.com",
  "password": "",
  "privacyPolicy": true,
  "termsOfService": true
}

PATCH/account/v2/inactiveUsers/{activationToken}

Activate a marketplace user using its associated activation token.

Required Scope and Authorization Rules

Scope Rule
ROLE_USER Allows access to an user who possesses an activation token.

Parameters

Parameter Type Data Type Default Description
*activationToken path string User's activation token, typically received via invitation emails

Body Parameters

User activation information

InactiveUserAccountV2 object:

Property Type Description
activated boolean

Is user activated

email string

User email

password string

User password

privacyPolicy boolean

Indicates whether the user has agreed to the privacy policy

termsOfService boolean

Indicates whether the user has accepted the terms of service

Responses

Status Meaning Description Definition
200 OK Success InactiveUserAccountV2
401 Unauthorized Unauthorized
404 Not Found Token not found Error

Update user picture

Example request

curl -X PUT https://{marketplaceURL}/api/account/v2/users/{userUuid}/picture \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/account/v2/users/{userUuid}/picture HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/users/{userUuid}/picture',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "type": "object"
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/users/{userUuid}/picture',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/account/v2/users/{userUuid}/picture', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/account/v2/users/{userUuid}/picture',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/users/{userUuid}/picture");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "activated": true,
  "allowLogin": true,
  "boostUser": {
    "appuid": 1234
  },
  "email": "john.smith@company.com",
  "firstName": "John",
  "lastName": "Smith",
  "ldapId": "john.smith",
  "links": [
    {
      "href": "http://appdirect/api/account/v2/users/0f24e0d4-f64d-45d1-8ddd-14f28aa5c074",
      "rel": "self"
    },
    {
      "href": "http://appdirect/api/account/v2/users/0f24e0d4-f64d-45d1-8ddd-14f28aa5c074/memberships",
      "rel": "memberships"
    }
  ],
  "metadata": {
    "apsUid": "apsUid"
  },
  "picture": "http://cdn/picture.png",
  "roles": [
    "ROLE_USER"
  ],
  "userName": "john.smith@company.com",
  "uuid": "42d71f0c-50b2-4c3d-913d-4b24be19df8f"
}

PUT/account/v2/users/{userUuid}/picture

Update a marketplace user’s profile picture. This method expects a Content-Type request header with a value of “multipart/form-data”. The updated user resource is returned.

Required Scope and Authorization Rules

Scope Rule
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 Allows access to read and write all marketplace data.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.
ROLE_USER Allows access to retrieve self or other company users.

Parameters

Parameter Type Data Type Default Description
*userUuid path string Unique identifier of user in the API request

Body Parameters

Image file that will be used as the profile picture.

Responses

Status Meaning Description Definition
200 OK Success UserAccountV2
401 Unauthorized Unauthorized
404 Not Found User not found array of Error

Update user profile

Example request

curl -X PUT https://{marketplaceURL}/api/account/v2/users/{userUuid}/profile \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/account/v2/users/{userUuid}/profile HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/users/{userUuid}/profile',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "allOf": [
        {
          "description": "Resource links",
          "type": "object",
          "title": "ResourceSupport",
          "properties": {
            "links": {
              "description": "Resource links",
              "type": "array",
              "items": {
                "type": "object",
                "title": "Link",
                "properties": {
                  "href": {
                    "type": "string"
                  },
                  "rel": {
                    "type": "string"
                  }
                },
                "example": {
                  "href": "...",
                  "rel": "..."
                },
                "nullable": true
              }
            }
          },
          "example": {
            "links": [
              {
                "href": "...",
                "rel": "..."
              },
              {
                "href": "...",
                "rel": "..."
              }
            ]
          },
          "nullable": true
        },
        {
          "description": "Represents a User profile (User)",
          "type": "object",
          "title": "UserProfileAccountV2",
          "properties": {
            "birthday": {
              "description": "Birthday date",
              "type": "string"
            },
            "currentCity": {
              "description": "Current city",
              "type": "string"
            },
            "customAttributes": {
              "description": "Custom attributes",
              "type": "array",
              "items": {
                "description": "Custom attributes",
                "type": "object",
                "title": "CustomAttributeAccountV2",
                "properties": {
                  "attributeType": {
                    "allOf": []
                  },
                  "hint": {
                    "description": "Localized hint",
                    "type": "string"
                  },
                  "label": {
                    "description": "Localized label",
                    "type": "string"
                  },
                  "name": {
                    "description": "Name",
                    "type": "string"
                  },
                  "value": {
                    "description": "Value",
                    "type": "string"
                  },
                  "valueKeys": {
                    "description": "Value keys",
                    "type": "array",
                    "items": {}
                  }
                },
                "example": {
                  "attributeType": "MULTISELECT",
                  "hint": "",
                  "label": "Label Names",
                  "name": "Company Details",
                  "valueKeys": [
                    "great option"
                  ]
                }
              }
            },
            "educations": {
              "description": "List of user's educational credentials",
              "type": "array",
              "items": {
                "description": "User profile's education information",
                "type": "object",
                "title": "EducationAccountV2",
                "properties": {
                  "current": {
                    "description": "If currently still at this school",
                    "type": "boolean"
                  },
                  "degree": {
                    "description": "Degree",
                    "type": "string"
                  },
                  "endYear": {
                    "description": "End year",
                    "type": "number"
                  },
                  "field": {
                    "description": "Field of studies",
                    "type": "string"
                  },
                  "school": {
                    "description": "School",
                    "type": "string"
                  },
                  "startYear": {
                    "description": "Start year",
                    "type": "number"
                  }
                },
                "example": {
                  "current": false,
                  "degree": "bachelor's",
                  "endYear": 2010,
                  "field": "Computer Science",
                  "school": "MIT",
                  "startYear": 2007
                }
              }
            },
            "emailAddresses": {
              "description": "Email addresses",
              "type": "array",
              "items": {
                "description": "Email address information",
                "type": "object",
                "title": "EmailAddressAccountV2",
                "properties": {
                  "address": {
                    "description": "Email address",
                    "type": "string"
                  },
                  "type": {
                    "allOf": []
                  },
                  "verified": {
                    "description": "Indicates whether the email address is verified",
                    "type": "boolean"
                  }
                },
                "example": {
                  "address": "alternate@company.com",
                  "type": "WORK",
                  "verified": false
                }
              }
            },
            "homePhone": {
              "description": "Home phone number",
              "type": "string"
            },
            "hometown": {
              "description": "Hometown",
              "type": "string"
            },
            "ims": {
              "description": "List of instant messaging accounts",
              "type": "array",
              "items": {
                "description": "Instant messenger",
                "type": "object",
                "title": "IM",
                "properties": {
                  "account": {
                    "description": "Account identifier",
                    "type": "string"
                  },
                  "type": {
                    "allOf": []
                  }
                },
                "example": {
                  "account": "da853378-2e9a-4944-ad53-6257bf773ace",
                  "type": "GOOGLE_TALK"
                }
              }
            },
            "mobilePhone": {
              "description": "Mobile phone number",
              "type": "string"
            },
            "twitter": {
              "description": "Twitter account",
              "type": "string"
            },
            "twoFactorAuthenticationMethod": {
              "description": "Two factor authentication method",
              "type": "string"
            },
            "workExperiences": {
              "description": "List of work experiences",
              "type": "array",
              "items": {
                "description": "Represents a work experience",
                "type": "object",
                "title": "WorkExperienceAccountV2",
                "properties": {
                  "current": {
                    "description": "Currently working",
                    "type": "boolean"
                  },
                  "description": {
                    "description": "Description",
                    "type": "string"
                  },
                  "employer": {
                    "description": "Employer",
                    "type": "string"
                  },
                  "endYear": {
                    "description": "Year ended",
                    "type": "number"
                  },
                  "position": {
                    "description": "Position",
                    "type": "string"
                  },
                  "startYear": {
                    "description": "Year started",
                    "type": "number"
                  }
                },
                "example": {
                  "current": true,
                  "description": "Developer @ Appdirect",
                  "employer": "Appdirect",
                  "endYear": 2017,
                  "position": "Manager",
                  "startYear": 2011
                }
              }
            },
            "workPhone": {
              "description": "Work phone number",
              "type": "string"
            }
          },
          "example": {
            "birthday": "1999/9/9",
            "currentCity": "Current City",
            "customAttributes": [],
            "educations": [
              {
                "current": false,
                "degree": "bachelor's",
                "endYear": 2010,
                "field": "Computer Science",
                "school": "MIT",
                "startYear": 2007
              }
            ],
            "emailAddresses": [
              {
                "address": "alternate@company.com",
                "type": "WORK",
                "verified": false
              }
            ],
            "homePhone": "+1 123 123 1234",
            "hometown": "Home Town",
            "ims": [
              {
                "account": "someAccount",
                "type": "OTHER"
              },
              {
                "account": "someAccount",
                "type": "OTHER"
              },
              {
                "account": "someAccount",
                "type": "OTHER"
              }
            ],
            "links": [
              {
                "href": "http://appdirect/api/account/v2/users/48dc0e2b-995b-4013-bd3f-2946309ca0fd",
                "rel": "user"
              }
            ],
            "mobilePhone": "+1 123 ",
            "twitter": "twitter_account",
            "twoFactorAuthenticationMethod": "twoFactorAuthenticationIsGreat",
            "workExperiences": [
              {
                "current": true,
                "description": "Developer @ Appdirect",
                "employer": "Appdirect",
                "endYear": 2017,
                "position": "Manager",
                "startYear": 2011
              }
            ],
            "workPhone": "+1 123 123 1234"
          }
        }
      ]
    },
    {
      "example": {
        "birthday": "1999/9/9",
        "currentCity": "Current City",
        "customAttributes": [],
        "educations": [
          {
            "current": false,
            "degree": "bachelor",
            "endYear": 2010,
            "field": "Computer Science",
            "school": "MIT",
            "startYear": 2007
          }
        ],
        "emailAddresses": [
          {
            "address": "alternate@company.com",
            "type": "WORK",
            "verified": true
          }
        ],
        "homePhone": "+1 123 123 1234",
        "hometown": "Home Town",
        "ims": [],
        "links": [],
        "mobilePhone": "+1 123 ",
        "twitter": "twitter_account",
        "twoFactorAuthenticationMethod": "twofactormethod",
        "workExperiences": [
          {
            "current": true,
            "description": "Developer @ Appdirect",
            "employer": "Appdirect",
            "endYear": 2017,
            "position": "Manager",
            "startYear": 2011
          }
        ],
        "workPhone": "+1 123 123 1234"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/users/{userUuid}/profile',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/account/v2/users/{userUuid}/profile', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/account/v2/users/{userUuid}/profile',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/users/{userUuid}/profile");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "birthday": "1999/9/9",
  "currentCity": "Current City",
  "customAttributes": [],
  "educations": [
    {
      "current": false,
      "degree": "bachelor",
      "endYear": 2010,
      "field": "Computer Science",
      "school": "MIT",
      "startYear": 2007
    }
  ],
  "emailAddresses": [
    {
      "address": "alternate@company.com",
      "type": "WORK",
      "verified": true
    }
  ],
  "homePhone": "+1 123 123 1234",
  "hometown": "Home Town",
  "ims": [],
  "links": [],
  "mobilePhone": "+1 123 ",
  "twitter": "twitter_account",
  "twoFactorAuthenticationMethod": "twofactormethod",
  "workExperiences": [
    {
      "current": true,
      "description": "Developer @ Appdirect",
      "employer": "Appdirect",
      "endYear": 2017,
      "position": "Manager",
      "startYear": 2011
    }
  ],
  "workPhone": "+1 123 123 1234"
}

Example response

{
  "birthday": "1999/9/9",
  "currentCity": "Current City",
  "customAttributes": [],
  "educations": [
    {
      "current": false,
      "degree": "bachelor",
      "endYear": 2010,
      "field": "Computer Science",
      "school": "MIT",
      "startYear": 2007
    }
  ],
  "emailAddresses": [
    {
      "address": "alternate@company.com",
      "type": "WORK",
      "verified": false
    }
  ],
  "homePhone": "+1 123 123 1234",
  "hometown": "Home Town",
  "ims": [
    {
      "account": "account1",
      "type": "OTHER"
    },
    {
      "account": "account2",
      "type": "OTHER"
    },
    {
      "account": "account3",
      "type": "OTHER"
    }
  ],
  "links": [
    {
      "href": "http://appdirect/api/account/v2/users/48dc0e2b-995b-4013-bd3f-2946309ca0fd",
      "rel": "user"
    }
  ],
  "mobilePhone": "+1 123 ",
  "twitter": "twitter_account",
  "twoFactorAuthenticationMethod": "twoFactorAuthenticationSavesMoney",
  "workExperiences": [
    {
      "current": true,
      "description": "Developer @ Appdirect",
      "employer": "Appdirect",
      "endYear": 2017,
      "position": "Manager",
      "startYear": 2011
    }
  ],
  "workPhone": "+1 123 123 1234"
}

PUT/account/v2/users/{userUuid}/profile

Update a marketplace user's profile. Also marks user's checklist with profile as completed.

Required Scope and Authorization Rules

Scope Rule
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 Allows access to read and write all marketplace data.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.
ROLE_USER Allows updating own or other company user profiles.

Parameters

Parameter Type Data Type Default Description
removeUnspecifiedCustomAttributes query boolean false When true, custom attributes not included in the body will be removed from the user's profile. When false, custom attributes
*userUuid path string Unique identifier of user in the API request

Body Parameters

User profile resource containing requested updates

UserProfileAccountV2 object:

Property Type Description
birthday string

Birthday date

currentCity string

Current city

customAttributes array of CustomAttributeAccountV2

Custom attributes

educations array of EducationAccountV2

List of user's educational credentials

emailAddresses array of EmailAddressAccountV2

Email addresses

homePhone string

Home phone number

hometown string

Hometown

ims array of IM

List of instant messaging accounts

links array of Link

Resource links

mobilePhone string

Mobile phone number

twitter string

Twitter account

twoFactorAuthenticationMethod string

Two factor authentication method

workExperiences array of WorkExperienceAccountV2

List of work experiences

workPhone string

Work phone number

Responses

Status Meaning Description Definition
200 OK Success UserProfileAccountV2
401 Unauthorized Unauthorized
404 Not Found User not found array of Error

Patch a user

Example request

curl -X PATCH https://{marketplaceURL}/api/account/v2/users/{userUuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PATCH https://{marketplaceURL}/api/account/v2/users/{userUuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/users/{userUuid}',
  method: 'patch',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "boostUser": {
    "apsUid": "murnu8w"
  },
  "currency": "USD",
  "externalId": "b34974b2-f5d6-4326-9859-5247dc42ee60",
  "firstName": "Jane",
  "idpUuid": "c412543-1233-6547-9809-0647dc42ee51",
  "lastName": "Lee",
  "ldapId": "1",
  "locale": "en_US",
  "roles": [
    "ROLE_CORPORATE_ADMIN"
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/users/{userUuid}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.patch('https://{marketplaceURL}/api/account/v2/users/{userUuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.patch 'https://{marketplaceURL}/api/account/v2/users/{userUuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/users/{userUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "boostUser": {
    "apsUid": "murnu8w"
  },
  "currency": "USD",
  "externalId": "b34974b2-f5d6-4326-9859-5247dc42ee60",
  "firstName": "Jane",
  "idpUuid": "c412543-1233-6547-9809-0647dc42ee51",
  "lastName": "Lee",
  "ldapId": "1",
  "locale": "en_US",
  "roles": [
    "ROLE_CORPORATE_ADMIN"
  ]
}

Example response

{
  "activated": true,
  "allowLogin": true,
  "boostUser": {
    "apsUid": "murnu8w"
  },
  "creationDate": 1398896238000,
  "currency": "USD",
  "customAttributes": [
    {
      "attributeType": "TEXT",
      "hint": "commission_hint",
      "label": "Commission_Payout_ID",
      "name": "C5125859",
      "value": "t1"
    },
    {
      "attributeType": "MULTISELECT",
      "hint": "Allows credit card payments and enables credit card fields",
      "label": "Allow Credit Card",
      "name": "allow_credit_card",
      "valueKeys": []
    },
    {
      "attributeType": "TEXT",
      "hint": "",
      "label": "C5457097",
      "name": "C5457097",
      "value": "abcd"
    }
  ],
  "email": "jane.lee@company1151609035.com",
  "externalId": "b34974b2-f5d6-4326-9859-5247dc42ee60",
  "firstName": "Jane",
  "idpUuid": "1d37bace-f4cf-11e6-af80-22000a9513f7",
  "lastName": "Lee",
  "lastSuccessfulLogin": 1543528191000,
  "ldapId": "1",
  "links": [
    {
      "href": "http://appdirect/api/account/v2/users/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1",
      "rel": "self"
    },
    {
      "href": "http://appdirect/api/account/v2/users/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1/memberships",
      "rel": "memberships"
    }
  ],
  "locale": "en_US",
  "metadata": {
    "apsUid": "murnu8w"
  },
  "openId": "http://appdirect/openid/id/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1",
  "picture": "http://appdirect/profilePics/img6839249962619189663.png?32339267f9f00643fd18373adf580743",
  "roles": [
    "ROLE_CORPORATE_ADMIN",
    "ROLE_USER"
  ],
  "userName": "jane.lee",
  "uuid": "2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1"
}

PATCH/account/v2/users/{userUuid}

Update ('patch') one or more fields in the user details. This only adds or updates the values for the properties that you include in the call; all other properties, and data already saved for them, are ignored

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER Allows access to read and write all marketplace data.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.
ROLE_USER Allows access as a User for the marketplace.This permission allows a user to modify the following fields for their own user account: firstName, lastName, locale, and currency

Parameters

Parameter Type Data Type Default Description
*userUuid path string Unique identifier of the user assigned by the AppDirect platform

Body Parameters

Specified updates to user information

PatchUserAccountV2 object:

Property Type Description
boostUser BoostUser

Boost integration user data

currency string

Currency

externalId string

External identifier of user

firstName string

First name of user

idpUuid string

The external identity provider's ID for the user

lastName string

Last name of user

ldapId string

LDAP identifier of user

locale string

User locale in the standard ISO 639-1 language code + ISO 3166-1 country code format. For example: 'en_US'

roles array of string

All users have ROLE_USER (end-user access). To assign the Network Manager, role use ROLE_CORPORATE_ADMIN. For company membership roles, see UserCompanyMembershipAccountV2.

username string

User name.

If not provided, use the user's email address

Responses

Status Meaning Description Definition
200 OK Success UserAccountV2
400 Bad Request Bad request
401 Unauthorized Unauthorized
404 Not Found User not found array of Error

Update a user

Example request

curl -X PUT https://{marketplaceURL}/api/account/v2/users/{userUuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/account/v2/users/{userUuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/users/{userUuid}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "boostUser": {
    "apsUid": "murnu8w"
  },
  "currency": "USD",
  "externalId": "b34974b2-f5d6-4326-9859-5247dc42ee60",
  "firstName": "Jane",
  "lastName": "Lee",
  "ldapId": "1",
  "locale": "en_US",
  "roles": [
    "ROLE_CORPORATE_ADMIN"
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/account/v2/users/{userUuid}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/account/v2/users/{userUuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/account/v2/users/{userUuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/account/v2/users/{userUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "boostUser": {
    "apsUid": "murnu8w"
  },
  "currency": "USD",
  "externalId": "b34974b2-f5d6-4326-9859-5247dc42ee60",
  "firstName": "Jane",
  "lastName": "Lee",
  "ldapId": "1",
  "locale": "en_US",
  "roles": [
    "ROLE_CORPORATE_ADMIN"
  ]
}

Example response

{
  "activated": true,
  "allowLogin": true,
  "boostUser": {
    "apsUid": "murnu8w"
  },
  "creationDate": 1398896238000,
  "currency": "USD",
  "customAttributes": [
    {
      "attributeType": "TEXT",
      "hint": "commission_hint",
      "label": "Commission_Payout_ID",
      "name": "C5125859",
      "value": "t1"
    },
    {
      "attributeType": "MULTISELECT",
      "hint": "Allows credit card payments and enables credit card fields",
      "label": "Allow Credit Card",
      "name": "allow_credit_card",
      "valueKeys": []
    },
    {
      "attributeType": "TEXT",
      "hint": "",
      "label": "C5457097",
      "name": "C5457097",
      "value": "abcd"
    }
  ],
  "email": "jane.lee@company1151609035.com",
  "externalId": "b34974b2-f5d6-4326-9859-5247dc42ee60",
  "firstName": "Jane",
  "idpUuid": "1d37bace-f4cf-11e6-af80-22000a9513f7",
  "lastName": "Lee",
  "lastSuccessfulLogin": 1543528191000,
  "ldapId": "1",
  "links": [
    {
      "href": "http://appdirect/api/account/v2/users/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1",
      "rel": "self"
    },
    {
      "href": "http://appdirect/api/account/v2/users/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1/memberships",
      "rel": "memberships"
    }
  ],
  "locale": "en_US",
  "metadata": {
    "apsUid": "murnu8w"
  },
  "openId": "http://appdirect/openid/id/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1",
  "picture": "http://appdirect/profilePics/img6839249962619189663.png?32339267f9f00643fd18373adf580743",
  "roles": [
    "ROLE_CORPORATE_ADMIN",
    "ROLE_USER"
  ],
  "userName": "jane.lee",
  "uuid": "2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1"
}

PUT/account/v2/users/{userUuid}

Updates a marketplace user

Required Scope and Authorization Rules

Scope Rule
ROLE_CHANNEL_ADMIN Allows access as a Marketplace Manager for the marketplace.
ROLE_CHANNEL_SUPPORT Allows access as a Customer Support agent for the marketplace.
ROLE_CORPORATE_ADMIN Allows access as a Network Manager for the marketplace.
ROLE_PARTNER Allows access to read and write all marketplace data.
ROLE_SALES_SUPPORT Allows access as a Sales Support agent for the marketplace.
ROLE_SYS_ADMIN Allows access as a Company Admin for the company.

Parameters

Parameter Type Data Type Default Description
*userUuid path string Unique identifier of the user assigned by the AppDirect platform

Body Parameters

Specified updates to user information

UpdateUserAccountV2 object:

Property Type Description
boostUser BoostUser

Boost integration user data

currency string

Currency

externalId string

External identifier of user

firstName string

First name of user

idpUuid string

The external identity provider's ID for the user

lastName string

Last name of user

ldapId string

LDAP identifier of user

locale string

User locale in the standard ISO 639-1 language code + ISO 3166-1 country code format. For example: 'en_US'

roles array of string

All users have ROLE_USER (end-user access). To assign the Network Manager, role use ROLE_CORPORATE_ADMIN. For company membership roles, see UserCompanyMembershipAccountV2.

Responses

Status Meaning Description Definition
200 OK Success UserAccountV2
400 Bad Request Bad request
401 Unauthorized Unauthorized
404 Not Found User not found array of Error

Webhooks

Create a webhook

This call creates a new webhook on your marketplace.

Example request

curl -X POST https://{marketplaceURL}/api/channel/v1/webhooks \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/channel/v1/webhooks HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/webhooks',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Represents a Web hook object configuration to push event notifications to registered URLs\nwhen specific actions are done on a resource.\n\nAuthentication on the endpoint can be configured to:\n- None\n- Authentication token passed in the HTTP header\n- OAuth2",
      "type": "object",
      "title": "Webhook",
      "required": [
        "resourceType",
        "url"
      ],
      "properties": {
        "authenticationToken": {
          "description": "Authentication token to be passed in the HTTP header",
          "type": "string"
        },
        "createdOn": {
          "description": "Creation date",
          "type": "number"
        },
        "lastModified": {
          "description": "Last modified date",
          "type": "number"
        },
        "oauth2Config": {
          "allOf": [
            {
              "type": "object",
              "title": "WebhookOAuth2Config",
              "properties": {
                "accessTokenUri": {
                  "type": "string"
                },
                "clientId": {
                  "type": "string"
                },
                "clientSecret": {
                  "type": "string"
                },
                "password": {
                  "type": "string"
                },
                "username": {
                  "type": "string"
                }
              },
              "example": {
                "accessTokenUri": "...",
                "clientId": "...",
                "clientSecret": "...",
                "password": "...",
                "username": "..."
              }
            },
            {
              "description": "OAuth2 config"
            }
          ]
        },
        "partner": {
          "description": "Channel of the webhook",
          "type": "string"
        },
        "resourceActions": {
          "description": "Actions done on the resource that triggers the Webhook",
          "type": "array",
          "items": {
            "type": "string",
            "title": "WebhookResourceAction",
            "enum": [
              "ADDED",
              "REMOVED",
              "CHANGED"
            ]
          }
        },
        "resourceType": {
          "allOf": [
            {
              "type": "string",
              "title": "WebhookResourceType",
              "enum": [
                "RESELLER_REGISTRANT",
                "SALES_LEAD",
                "SALES_OPPORTUNITY",
                "QUOTE",
                "COMPANY",
                "SUBSCRIPTION",
                "PAYMENT_INSTRUMENT",
                "USER",
                "MEMBERSHIP",
                "DISCOUNT",
                "ORDER",
                "CATALOG_PRODUCT",
                "PLATFORM",
                "APP_ASSIGNMENT",
                "INVOICE",
                "STAGING_PRODUCT",
                "LEAD"
              ]
            },
            {
              "description": "The type of resource the Webhook is for"
            }
          ]
        },
        "scope": {
          "type": "string",
          "title": "WebhookScope",
          "enum": [
            "PARTNER",
            "COMPANY"
          ]
        },
        "scopeId": {
          "type": "string"
        },
        "url": {
          "description": "Endpoint to call when an action is done on a resource",
          "type": "string"
        },
        "uuid": {
          "description": "Unique identifier",
          "type": "string"
        }
      },
      "example": {
        "authenticationToken": "...",
        "createdOn": 12345,
        "lastModified": 12345,
        "oauth2Config": {
          "accessTokenUri": "...",
          "clientId": "...",
          "clientSecret": "...",
          "password": "...",
          "username": "..."
        },
        "partner": "...",
        "resourceActions": [
          "CHANGED",
          "CHANGED"
        ],
        "resourceType": "STAGING_PRODUCT",
        "scope": "COMPANY",
        "scopeId": "...",
        "url": "...",
        "uuid": "..."
      }
    },
    {
      "description": "webhook information",
      "example": {
        "authenticationToken": "abc",
        "oauth2Config": {
          "accessTokenUri": "http://example.com/endpoint",
          "clientId": "clientId",
          "clientSecret": "clientSecret",
          "password": "password",
          "username": "username"
        },
        "resourceActions": [
          "ADDED"
        ],
        "resourceType": "SALES_OPPORTUNITY",
        "url": "https://example.com/endpoint"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/webhooks',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/channel/v1/webhooks', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/channel/v1/webhooks',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/webhooks");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "authenticationToken": "abc",
  "oauth2Config": {
    "accessTokenUri": "http://example.com/endpoint",
    "clientId": "clientId",
    "clientSecret": "clientSecret",
    "password": "password",
    "username": "username"
  },
  "resourceActions": [
    "ADDED"
  ],
  "resourceType": "SALES_OPPORTUNITY",
  "url": "https://example.com/endpoint"
}

Example response

{
  "authenticationToken": "abc",
  "createdOn": 1480311486245,
  "lastModified": 1480311486245,
  "links": [
    {
      "href": "http://appdirect/api/channel/v1/webhooks/3b5e41ef-2f4c-4e42-854f-b4f245b0a022",
      "rel": "self"
    }
  ],
  "oauth2Config": {
    "accessTokenUri": "http://example.com/endpoint",
    "clientId": "clientId",
    "clientSecret": "clientSecret",
    "password": "password",
    "username": "username"
  },
  "partner": "APPDIRECT",
  "resourceActions": [
    "ADDED"
  ],
  "resourceType": "SALES_OPPORTUNITY",
  "url": "https://example.com/endpoint",
  "uuid": "3b5e41ef-2f4c-4e42-854f-b4f245b0a022"
}

POST/channel/v1/webhooks

Create a webhook This call creates a new webhook on your marketplace.

Body Parameters

webhook information

Webhook object:

Property Type Description
authenticationToken string

Authentication token to be passed in the HTTP header

createdOn number

Creation date

lastModified number

Last modified date

oauth2Config WebhookOAuth2Config

OAuth2 config

partner string

Channel of the webhook

resourceActions array of WebhookResourceAction

Actions done on the resource that triggers the Webhook

resourceType WebhookResourceType

The type of resource the Webhook is for

scope WebhookScope

scopeId string

url string

Endpoint to call when an action is done on a resource

uuid string

Unique identifier

Responses

Status Meaning Description Definition
201 Created Webhook created.

Delete a webhook

This call deletes a webhook from your marketplace.

Example request

curl -X DELETE https://{marketplaceURL}/api/channel/v1/webhooks/{webhookUuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/channel/v1/webhooks/{webhookUuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/webhooks/{webhookUuid}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/webhooks/{webhookUuid}',
{
  method: 'DELETE'

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/channel/v1/webhooks/{webhookUuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/channel/v1/webhooks/{webhookUuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/webhooks/{webhookUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE/channel/v1/webhooks/{webhookUuid}

Delete a webhook This call deletes a webhook from your marketplace.

Parameters

Parameter Type Data Type Default Description
*webhookUuid path string

Responses

Status Meaning Description Definition
204 No Content Webhook deleted successfully.

Retrieve a webhook

This call returns all details for a specific webhook.

Example request

curl -X GET https://{marketplaceURL}/api/channel/v1/webhooks/{webhookUuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/channel/v1/webhooks/{webhookUuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/webhooks/{webhookUuid}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/webhooks/{webhookUuid}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/channel/v1/webhooks/{webhookUuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/channel/v1/webhooks/{webhookUuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/webhooks/{webhookUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "authenticationToken": "abc",
  "createdOn": 1480311490360,
  "lastModified": 1480311490360,
  "links": [
    {
      "href": "http://appdirect/api/channel/v1/webhooks/ecdb1bc2-20e2-4b2c-9b0c-9678a8907ce2",
      "rel": "self"
    }
  ],
  "oauth2Config": {
    "accessTokenUri": "http://example.com/endpoint",
    "clientId": "clientId",
    "clientSecret": "clientSecret",
    "password": "password",
    "username": "username"
  },
  "partner": "APPDIRECT",
  "resourceActions": [
    "ADDED"
  ],
  "resourceType": "SALES_OPPORTUNITY",
  "url": "https://example.com/endpoint",
  "uuid": "ecdb1bc2-20e2-4b2c-9b0c-9678a8907ce2"
}

GET/channel/v1/webhooks/{webhookUuid}

Retrieve a webhook This call returns all details for a specific webhook.

Parameters

Parameter Type Data Type Default Description
*webhookUuid path string

Responses

Status Meaning Description Definition
200 OK Webhook fetched successfully. Webhook

List all webhooks

This call lists all webhooks on your marketplace.

Example request

curl -X GET https://{marketplaceURL}/api/channel/v1/webhooks \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

GET https://{marketplaceURL}/api/channel/v1/webhooks HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/webhooks',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/webhooks',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/channel/v1/webhooks', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get 'https://{marketplaceURL}/api/channel/v1/webhooks',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/webhooks");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Example response

{
  "content": [
    {
      "authenticationToken": "abc",
      "createdOn": 1480311491334,
      "lastModified": 1480311491334,
      "links": [
        {
          "href": "http://appdirect/api/channel/v1/webhooks?page=0&size=10&sortField=DATE&sortOrder=DESC",
          "rel": "self"
        }
      ],
      "oauth2Config": {
        "accessTokenUri": "http://example.com/endpoint",
        "clientId": "clientId",
        "clientSecret": "clientSecret",
        "password": "password",
        "username": "username"
      },
      "partner": "APPDIRECT",
      "resourceActions": [
        "ADDED"
      ],
      "resourceType": "SALES_OPPORTUNITY",
      "url": "https://example.com/endpoint",
      "uuid": "bc528c0f-12ae-44ca-bf05-270e90f8e5a6"
    },
    {
      "authenticationToken": "abc",
      "createdOn": 1480311491325,
      "lastModified": 1480311491325,
      "links": [
        {
          "href": "http://appdirect/api/channel/v1/webhooks?page=0&size=10&sortField=DATE&sortOrder=DESC",
          "rel": "self"
        }
      ],
      "oauth2Config": {
        "accessTokenUri": "http://example.com/endpoint",
        "clientId": "clientId",
        "clientSecret": "clientSecret",
        "password": "password",
        "username": "username"
      },
      "partner": "APPDIRECT",
      "resourceActions": [
        "ADDED"
      ],
      "resourceType": "SALES_OPPORTUNITY",
      "url": "https://example.com/endpoint",
      "uuid": "7b55aec2-6b90-4f25-ad96-4e5e3d830b56"
    }
  ],
  "links": [],
  "page": {
    "number": 0,
    "size": 10,
    "totalElements": 2,
    "totalPages": 1
  }
}

GET/channel/v1/webhooks

List all webhooks This call lists all webhooks on your marketplace.

Parameters

Parameter Type Data Type Default Description
page query string 0 Number of pages requested
size query string 10 Number of record per page
sortField query string of enum:
DATE
DATE Field used to sort the response
sortOrder query string of enum:
ASC
DESC
DESC The order to sort the response(ASC, DESC)

Responses

Status Meaning Description Definition
200 OK Webhooks fetched successfully. PagedWebhooks

Update a webhook

This call updates a webhook on your marketplace.

Example request

curl -X PUT https://{marketplaceURL}/api/channel/v1/webhooks/{webhookUuid} \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

PUT https://{marketplaceURL}/api/channel/v1/webhooks/{webhookUuid} HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/webhooks/{webhookUuid}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "allOf": [
    {
      "description": "Represents a Web hook object configuration to push event notifications to registered URLs\nwhen specific actions are done on a resource.\n\nAuthentication on the endpoint can be configured to:\n- None\n- Authentication token passed in the HTTP header\n- OAuth2",
      "type": "object",
      "title": "Webhook",
      "required": [
        "resourceType",
        "url"
      ],
      "properties": {
        "authenticationToken": {
          "description": "Authentication token to be passed in the HTTP header",
          "type": "string"
        },
        "createdOn": {
          "description": "Creation date",
          "type": "number"
        },
        "lastModified": {
          "description": "Last modified date",
          "type": "number"
        },
        "oauth2Config": {
          "allOf": [
            {
              "type": "object",
              "title": "WebhookOAuth2Config",
              "properties": {
                "accessTokenUri": {
                  "type": "string"
                },
                "clientId": {
                  "type": "string"
                },
                "clientSecret": {
                  "type": "string"
                },
                "password": {
                  "type": "string"
                },
                "username": {
                  "type": "string"
                }
              },
              "example": {
                "accessTokenUri": "...",
                "clientId": "...",
                "clientSecret": "...",
                "password": "...",
                "username": "..."
              }
            },
            {
              "description": "OAuth2 config"
            }
          ]
        },
        "partner": {
          "description": "Channel of the webhook",
          "type": "string"
        },
        "resourceActions": {
          "description": "Actions done on the resource that triggers the Webhook",
          "type": "array",
          "items": {
            "type": "string",
            "title": "WebhookResourceAction",
            "enum": [
              "ADDED",
              "REMOVED",
              "CHANGED"
            ]
          }
        },
        "resourceType": {
          "allOf": [
            {
              "type": "string",
              "title": "WebhookResourceType",
              "enum": [
                "RESELLER_REGISTRANT",
                "SALES_LEAD",
                "SALES_OPPORTUNITY",
                "QUOTE",
                "COMPANY",
                "SUBSCRIPTION",
                "PAYMENT_INSTRUMENT",
                "USER",
                "MEMBERSHIP",
                "DISCOUNT",
                "ORDER",
                "CATALOG_PRODUCT",
                "PLATFORM",
                "APP_ASSIGNMENT",
                "INVOICE",
                "STAGING_PRODUCT",
                "LEAD"
              ]
            },
            {
              "description": "The type of resource the Webhook is for"
            }
          ]
        },
        "scope": {
          "type": "string",
          "title": "WebhookScope",
          "enum": [
            "PARTNER",
            "COMPANY"
          ]
        },
        "scopeId": {
          "type": "string"
        },
        "url": {
          "description": "Endpoint to call when an action is done on a resource",
          "type": "string"
        },
        "uuid": {
          "description": "Unique identifier",
          "type": "string"
        }
      },
      "example": {
        "authenticationToken": "...",
        "createdOn": 12345,
        "lastModified": 12345,
        "oauth2Config": {
          "accessTokenUri": "...",
          "clientId": "...",
          "clientSecret": "...",
          "password": "...",
          "username": "..."
        },
        "partner": "...",
        "resourceActions": [
          "CHANGED",
          "CHANGED"
        ],
        "resourceType": "STAGING_PRODUCT",
        "scope": "COMPANY",
        "scopeId": "...",
        "url": "...",
        "uuid": "..."
      }
    },
    {
      "example": {
        "authenticationToken": "abc",
        "oauth2Config": {
          "accessTokenUri": "http://example.com/endpoint",
          "clientId": "clientId",
          "clientSecret": "clientSecret",
          "password": "password",
          "username": "username"
        },
        "resourceActions": [
          "ADDED"
        ],
        "resourceType": "SALES_OPPORTUNITY",
        "url": "https://example.com/endpoint"
      }
    }
  ]
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/channel/v1/webhooks/{webhookUuid}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/channel/v1/webhooks/{webhookUuid}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.put 'https://{marketplaceURL}/api/channel/v1/webhooks/{webhookUuid}',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/channel/v1/webhooks/{webhookUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

Request body

{
  "authenticationToken": "abc",
  "oauth2Config": {
    "accessTokenUri": "http://example.com/endpoint",
    "clientId": "clientId",
    "clientSecret": "clientSecret",
    "password": "password",
    "username": "username"
  },
  "resourceActions": [
    "ADDED"
  ],
  "resourceType": "SALES_OPPORTUNITY",
  "url": "https://example.com/endpoint"
}

Example response

{
  "authenticationToken": "abc",
  "createdOn": 1480311491644,
  "lastModified": 1480311491644,
  "links": [
    {
      "href": "http://appdirect/api/channel/v1/webhooks/40e762c3-9a05-4a9a-b5fa-a07b11c70c80",
      "rel": "self"
    }
  ],
  "oauth2Config": {
    "accessTokenUri": "http://example.com/endpoint",
    "clientId": "clientId",
    "clientSecret": "clientSecret",
    "password": "password",
    "username": "username"
  },
  "partner": "APPDIRECT",
  "resourceActions": [
    "ADDED"
  ],
  "resourceType": "SALES_OPPORTUNITY",
  "url": "https://example.com/endpoint",
  "uuid": "40e762c3-9a05-4a9a-b5fa-a07b11c70c80"
}

PUT/channel/v1/webhooks/{webhookUuid}

Update a webhook This call updates a webhook on your marketplace.

Parameters

Parameter Type Data Type Default Description
*webhookUuid path string

Body Parameters

Webhook object:

Property Type Description
authenticationToken string

Authentication token to be passed in the HTTP header

createdOn number

Creation date

lastModified number

Last modified date

oauth2Config WebhookOAuth2Config

OAuth2 config

partner string

Channel of the webhook

resourceActions array of WebhookResourceAction

Actions done on the resource that triggers the Webhook

resourceType WebhookResourceType

The type of resource the Webhook is for

scope WebhookScope

scopeId string

url string

Endpoint to call when an action is done on a resource

uuid string

Unique identifier

Responses

Status Meaning Description Definition
200 OK Webhook updated successfully. Webhook

Definitions

AbstractLead

{
  "additionalComment": "...",
  "anticipatedCloseDate": "...",
  "anticipatedNumberOfSeats": "...",
  "attrbutes": "...",
  "comment": "...",
  "creationDate": "...",
  "customer": "...",
  "externalIdentifier": "...",
  "lastModificationDate": "...",
  "reseller": "...",
  "useCaseDescription": "...",
  "uuid": "..."
}

Parameters for this object are also contained in the SalesLead object. These parameters are shared by sales leads and sales opportunities. The parameters refer to either the lead or the opportunity. For example, within the lead, the UUID is the unique identifier of the lead, and within the opportunity, the UUID is the unique identifier of the opportunity.

Name Type Description
additionalComment string Any note that you want to add about the lead
anticipatedCloseDate number The anticipated date that the lead will be closed in UNIX Epoch milliseconds
anticipatedNumberOfSeats number The number of licenses required for the subcription
attributes object Custom attributes for the lead
comment string Any note that you want to add about the lead
creationDate number The date the lead was created in UNIX Epoch milliseconds
customer CompanyContact Customer contact information
externalIdentifier string An optional identifier provided by the markeplace owner
lastModificationDate number The date that the lead was last modified in UNIX Epoch milliseconds
reseller CompanyContact Reseller contact information
useCaseDescription string Description of what the lead customer needs
uuid string The unique identifier of either the lead or the opportunity

AccountCompany

{
  "type": "object",
  "title": "AccountCompany",
  "properties": {
    "createdOn": {
      "description": "Company's creation date, in UNIX Epoch milliseconds",
      "type": "number"
    },
    "externalId": {
      "description": "External ID used to identify the company (must be unique)",
      "type": "string"
    },
    "id": {
      "description": "Company's identifier",
      "type": "string"
    },
    "name": {
      "description": "Company's name",
      "type": "string"
    }
  }
}
Name Type Description
createdOn number Company's creation date, in UNIX Epoch milliseconds
externalId string External ID used to identify the company (must be unique)
id string Company's identifier
name string Company's name

AccountInfo

{
  "accountIdentifier": "...",
  "parentAccountIdentifier": "...",
  "status": "INITIALIZED"
}
Name Type Description
accountIdentifier string Account identifier
parentAccountIdentifier string Parent account identifier. Applies to add-on products.
status CompanyEntitlementStatus Company entitlement status. May be INITIALIZED, FAILED, FREE_TRIAL, FREE_TRIAL_EXPIRED,
ACTIVE, SUSPENDED, or CANCELLED.

Action

{
  "text": "a task",
  "verb": "assigned"
}

An action statement that can be used to describe changes that appear in feeds. The statement is constructed of a verb suffixed by text. For example: Verb (assigned) + text (a task) = action description (assigned a task). If delete boolean is true, the resource is deleted from Customer Search.

Required parameters: Only Text and Verb are required in requests to create action statements. Only delete is required to delete a resource.

Name Type Description
delete boolean If true, the resource is deleted from Search
text string The text that appears after the verb in the (verb+text) action statement
verb string The verb that appears in the (verb+text) action statement

ActionRestriction

{
  "actionRestrictions": {
    "FINALIZE": [
      "CANNOT_FINALIZE_WITH_INACTIVE_CUSTOMER"
    ],
    "SUBMIT_FOR_REVIEW": [
      "CANNOT_SUBMIT_WITH_INACTIVE_CUSTOMER"
    ]
  }
}

Only appear in opportunity call responses. Action restrictions occur when an opportunity does not meet a requirement for an available action to occur. After the requirement is met, the restriction is removed, the action appears in the Available actions list, and the action can occur. For example: An API client has permission to finalize opportunities when customers are active. When customers are inactive, an action restriction prevents them from finalizing the opportunity. After the customer becomes active, the restriction is removed, it appears in the Available actions list, and the API client can finalize the opportunity.

Name Type Description
entry array of Restriction Opportunity action restrictions

ActiveUserAccountV2

{
  "email": "jude.doe@company8578572384.com",
  "firstName": "Jude",
  "lastName": "Doe",
  "roles": [
    "ROLE_USER"
  ]
}

User information (company)

Name Type Description
email string Email address
firstName string First name
lastName string Last name
roles array of string Roles for this membership. One or more of the following: ROLE_CHANNEL_ADMIN (Marketplace Manager), ROLE_CHANNEL_PRODUCT_SUPPORT (Product Support), ROLE_SALES_SUPPORT (Sales Support), ROLE_RESELLER_MANAGER (Reseller Manager), ROLE_RESELLER (Reseller), ROLE_CHANNEL_SUPPORT (Customer Support), ROLE_SYS_ADMIN (Company Admin), ROLE_BILLING_ADMIN (Billing Admin), ROLE_DEVELOPER (Developer). For user roles (not associated with membership), see UserAccountV2.

ActiveUserCreationAccountV2

{
  "recipientEmails": [
    "manager@company9411805586.com",
    "itteam@company9411805586.com"
  ],
  "temporaryPassword": "Temporary Password",
  "user": {
    "email": "guy.smith@company9411805586.com",
    "firstName": "Guy",
    "lastName": "Smith",
    "roles": [
      "ROLE_DEVELOPER"
    ]
  }
}

Minimal data required to create a active user membership

Name Type Description
recipientEmails array of string List of emails where the temporary password is sent
temporaryPassword string Temporary password
user ActiveUserAccountV2 User data

ActivityAccountV2

{
  "actor": {
    "activated": false,
    "deleted": false,
    "email": "c2801919@appdirect.com",
    "externalId": null,
    "id": 1344,
    "name": "C2801919_first last",
    "personalInfoMasked": false,
    "profileLinkMasked": false,
    "roleChanges": null,
    "type": "USER",
    "userRemovedFromCompanyObject": false,
    "userRemovedFromCompanyTarget": false,
    "uuid": "966216bb-bb4e-4766-8849-fd72eead20ce"
  },
  "context": {
    "description": "Documentation Center 283",
    "header": "Documentation Center 283",
    "imageUrl": "https://d33na3ni6eqf5j.cloudfront.net/importable_app_resources/81858cea-627f-45ee-8906-67d5a23dd3bf/list.png?b5960593b97c0fdd95bc9b81c08e70bb"
  },
  "links": [],
  "object": {
    "companyLinkMasked": false,
    "externalId": null,
    "id": 26,
    "name": "Company 6032459369",
    "type": "COMPANY",
    "uuid": "222cf5ff-7795-4ece-b612-83ef6b72bb30"
  },
  "origin": "MARKETPLACE",
  "subject": {
    "activated": true,
    "deleted": false,
    "email": "susan.doe@company5087848592.com",
    "externalId": null,
    "id": 30,
    "name": "Susan Doe",
    "personalInfoMasked": false,
    "profileLinkMasked": false,
    "type": "USER",
    "userRemovedFromCompanyObject": false,
    "userRemovedFromCompanyTarget": false,
    "uuid": "8487f55b-05be-4c0e-97d8-021e5ca4008b"
  },
  "target": {
    "companyLinkMasked": false,
    "externalId": null,
    "id": 194379,
    "name": "Matts Company",
    "type": "COMPANY",
    "uuid": "a0504b87-f21f-40fe-9de1-e8479776a26f"
  },
  "timestamp": [
    2016,
    12,
    2,
    17,
    25,
    56,
    414
  ],
  "verb": "COMPANY_ACTIVATED"
}

Activity entry as displayed in various Logs/Activity sections of the UI

Name Type Description
actor object The user who performed an action on behalf of the subject. For example on Sales Agent "buy on behalf of".
context ActivityContextAccountV2 Context data related to the action that was performed
links array of Link Resource links
object object Activity's object
Typically what has been modified
origin string Loosely identify from where the action has been performed on the system
(Web application, LDAP, API calls, etc.)
subject object Activity's subject
Typically who made the action
target object Activity target
Company or entitlement to which belongs the object
timestamp array of number The timestamp of the activity
verb string Identifier for the action that was performed

ActivityContextAccountV2

{
  "description": "Provides richer information for cases where associated activity's object or target is either an application or an\nentitlement.",
  "type": "object",
  "title": "ActivityContextAccountV2",
  "properties": {
    "description": {
      "description": "Localized description (based on current user's session locale).\nFor applications, this is the application overview.",
      "type": "string"
    },
    "header": {
      "description": "Localized header (based on current user's session locale).\nFor applications, this is the application name.",
      "type": "string"
    },
    "imageUrl": {
      "description": "Image URL",
      "type": "string"
    }
  },
  "nullable": true
}

Provides richer information for cases where associated activity's object or target is either an application or an entitlement.

Name Type Description
description string Localized description (based on current user's session locale).
For applications, this is the application overview.
header string Localized header (based on current user's session locale).
For applications, this is the application name.
imageUrl string Image URL

AdditionalSettings

{
  "validations": [
    {
      "field": "externalIdentifier",
      "maxLength": 36
    },
    {
      "field": "productStockNumber",
      "maxLength": 36
    }
  ]
}

Information about additional settings for a product.

Name Type Description
customSettings array of CustomSetting Details of the custom settings for the product.
validations array of SettingValidation Information about the validation applied to a setting.

AddonInstanceInfo

{
  "id": "..."
}
Name Type Description
id string ID

AddonInstance

{
  "creationDate": 12345,
  "offeringUuid": "...",
  "order": {
    "_embedded": {
      "property1": {},
      "property2": {}
    },
    "activated": true,
    "company": {
      "href": "...",
      "id": "..."
    },
    "contract": {},
    "currency": "...",
    "customAttribute": [
      {
        "attributeType": "MULTISELECT",
        "name": "...",
        "value": "...",
        "valueKeys": [
          "...",
          "..."
        ]
      },
      {
        "attributeType": "MULTISELECT",
        "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": "..."
    },
    "oneTimeOrder": [
      {
        "_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": {}
      }
    ],
    "orderLine": [
      {},
      {}
    ],
    "parameter": [
      {
        "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": "..."
    }
  },
  "status": "...",
  "units": 12345,
  "uuid": "..."
}
Name Type Description
creationDate number Creation date of the addon instance
offeringUuid string Unique identifier for add-on offering
order Order Current order for the addon instance
status string Addon instance status. May be ACTIVE, CANCELLED or FAILED.
units number Units for add-on instance
uuid string Unique identifier for add-on instance

AddonOffering

{
  "bullet": [
    {
      "content": "...",
      "tooltip": "..."
    },
    {
      "content": "...",
      "tooltip": "..."
    }
  ],
  "code": "...",
  "description": "...",
  "descriptionHtml": "...",
  "exclusive": true,
  "id": 12345,
  "name": "...",
  "paymentPlan": [
    {
      "allowCustomUsage": true,
      "contract": {
        "alignWithParentCycleStartDate": true,
        "autoExtensionPricingId": 12345,
        "blockContractDowngrades": true,
        "blockContractUpgrades": true,
        "blockSwitchToShorterContract": true,
        "cancellationPeriodLimit": 12345,
        "endOfContractGracePeriod": 12345,
        "gracePeriod": {},
        "minimumServiceLength": 12345,
        "terminationFee": {}
      },
      "cost": [
        {
          "amount": {},
          "blockContractDecrease": true,
          "blockContractIncrease": true,
          "blockOriginalContractDecrease": true,
          "editionPricingItemId": 12345,
          "id": 12345,
          "increment": 12345,
          "maxUnits": 12345,
          "meteredUsage": true,
          "minUnits": 12345,
          "pricePerIncrement": true,
          "pricingStrategy": "...",
          "unit": "...",
          "unitDependency": "..."
        },
        {
          "amount": {},
          "blockContractDecrease": true,
          "blockContractIncrease": true,
          "blockOriginalContractDecrease": true,
          "editionPricingItemId": 12345,
          "id": 12345,
          "increment": 12345,
          "maxUnits": 12345,
          "meteredUsage": true,
          "minUnits": 12345,
          "pricePerIncrement": true,
          "pricingStrategy": "...",
          "unit": "...",
          "unitDependency": "..."
        }
      ],
      "discount": {
        "amount": {},
        "availableRedemptions": 12345,
        "description": "...",
        "expirationDate": 12345,
        "numOfBillingCycles": 12345,
        "percentage": 12345,
        "pricingUnit": "OVERAGE_AUDIO_MINUTE",
        "startDate": 12345
      },
      "frequency": "...",
      "href": "...",
      "id": 12345,
      "isPrimaryPrice": true,
      "keepBillDateOnUsageChange": true,
      "separatePrepaid": true,
      "tld": "...",
      "uuid": "..."
    },
    {
      "allowCustomUsage": true,
      "contract": {
        "alignWithParentCycleStartDate": true,
        "autoExtensionPricingId": 12345,
        "blockContractDowngrades": true,
        "blockContractUpgrades": true,
        "blockSwitchToShorterContract": true,
        "cancellationPeriodLimit": 12345,
        "endOfContractGracePeriod": 12345,
        "gracePeriod": {},
        "minimumServiceLength": 12345,
        "terminationFee": {}
      },
      "cost": [
        {
          "amount": {},
          "blockContractDecrease": true,
          "blockContractIncrease": true,
          "blockOriginalContractDecrease": true,
          "editionPricingItemId": 12345,
          "id": 12345,
          "increment": 12345,
          "maxUnits": 12345,
          "meteredUsage": true,
          "minUnits": 12345,
          "pricePerIncrement": true,
          "pricingStrategy": "...",
          "unit": "...",
          "unitDependency": "..."
        },
        {
          "amount": {},
          "blockContractDecrease": true,
          "blockContractIncrease": true,
          "blockOriginalContractDecrease": true,
          "editionPricingItemId": 12345,
          "id": 12345,
          "increment": 12345,
          "maxUnits": 12345,
          "meteredUsage": true,
          "minUnits": 12345,
          "pricePerIncrement": true,
          "pricingStrategy": "...",
          "unit": "...",
          "unitDependency": "..."
        }
      ],
      "discount": {
        "amount": {},
        "availableRedemptions": 12345,
        "description": "...",
        "expirationDate": 12345,
        "numOfBillingCycles": 12345,
        "percentage": 12345,
        "pricingUnit": "REACTIVATION_FEE",
        "startDate": 12345
      },
      "frequency": "...",
      "href": "...",
      "id": 12345,
      "isPrimaryPrice": true,
      "keepBillDateOnUsageChange": true,
      "separatePrepaid": true,
      "tld": "...",
      "uuid": "..."
    }
  ],
  "stacked": true,
  "status": "...",
  "uuid": "..."
}

An optional supplement to a given product Addons are ordered separately and billed separately from the products that they enhance.

Name Type Description
bullet array of Bullet Add-on inclusions
code string Code
description string Description
descriptionHtml string HTML description
exclusive boolean Is an exclusive addon
id number Id
name string Name
paymentPlan array of PaymentPlan List of possible payment plans
stacked boolean Is a stacked addon
A stacked edition supports simultaneous ownership of multiple, separate but identical instances by one consumer, where each instance is also priced identically.
status string Status: NEW, ACTIVE, ACTIVE_DEVELOPMENT, UPDATED, DELETED
uuid string Unique identifier

Address

{
  "city": "...",
  "country": "...",
  "state": "...",
  "street1": "...",
  "street2": "...",
  "zip": "..."
}
Name Type Description
city string The name of the city or town
country string The country code, in ISO-3166 format
firstName string The first name
lastName string The last name
phone string The phone number
state string The state, province, or region
street1 string The first line of a street address
street2 string The second line of a street address, for example, an apartment or office number
zip string The ZIP or postal code of the address

ApiHealthMaintenanceSettings

{
  "assignAndUnassign": {
    "disabled": true,
    "tooltip": "This endpoint has been disabled by the developer.",
    "value": false
  },
  "purchase": {
    "disabled": false,
    "value": true
  },
  "singleSignOn": {
    "disabled": false,
    "value": false
  },
  "updateSubscription": {
    "disabled": true,
    "tooltip": "The product is part of a bundle.",
    "value": true
  }
}

Information about API maintenance that includes assign/unassign users, update subscription, single sign-on product and purchase product.

Name Type Description
assignAndUnassign WorkingEndpoint Prevent users from assigning or unassigning their application. This impacts every marketplace that published the product.
purchase WorkingEndpoint Prevent the application from being available for purchase. If turned off, the Buy button does not appear and the label Under Maintenance appears. This impacts every marketplace that published the product.
singleSignOn WorkingEndpoint Prevent the application from being available for purchase. The Buy button does not appear and a Learn More button is displayed. This impacts every marketplace that published the product.
updateSubscription WorkingEndpoint Prevent users from updating their current subscription. This impacts every marketplace that published the product.

AppEdition

{
  "appId": 12345,
  "appName": "...",
  "editionId": 12345,
  "editionName": "..."
}

Edition associated with a product

Name Type Description
appId number Application ID
appName string Application name
editionId number Edition ID
editionName string Edition name

AppResellerAccountCompanyApiContext

Supported AppReseller contexts

Enumeration of

AppResellerAccountCompanyAccessCode

Type of company access

Enumeration of

AppResellerAccountCompanyAction

Type of company action

Enumeration of

AppResellerAccountCompanyCreationRequest

{
  "companyAccess": "RESELLER",
  "companySize": "SMALL",
  "createdByCompanyId": "386626c0-53e2-4515-8450-4a720bb5d029",
  "externalId": "externalRandom",
  "name": "Test Name",
  "phone": "50505055",
  "website": "www.new_company.com"
}
Name Type Description
companyAccess AppResellerAccountCompanyApiContext Context
companySize AppResellerAccountCompanySize New company's size
createdByCompanyId string Reseller's company UUID
externalId string External ID used to identify the new company (must be unique)
name string New company's name
phone string New company's phone number
website string New company's website

AppResellerAccountCompanySetting

{
  "description": "Company setting",
  "type": "object",
  "title": "AppResellerAccountCompanySetting",
  "properties": {
    "permission": {
      "allOf": [
        {
          "$ref": "#/components/schemas/ReadWritePermission"
        },
        {
          "description": "Company setting read/write permissions"
        }
      ]
    },
    "setting": {
      "allOf": [
        {
          "$ref": "#/components/schemas/AppResellerAccountCompanySettingCode"
        },
        {
          "description": "Company setting code"
        }
      ]
    },
    "value": {
      "description": "Company setting value",
      "type": "string"
    }
  }
}

Company setting

Name Type Description
permission ReadWritePermission Company setting read/write permissions
setting AppResellerAccountCompanySettingCode Company setting code
value string Company setting value

AppResellerAccountCompanySettingCode

Company Setting Code

Enumeration of

AppResellerAccountCompanySize

Size of the new company

Enumeration of

AppResellerAccountCompany

{
  "createdOn": 1522950634000,
  "externalId": "external11",
  "id": "460fad0d-19e2-4eec-a756-59c15dc7a56a",
  "name": "Company3"
}
Name Type Description
createdOn number Company creation date, in timestamp format
externalId string Company's external ID
id string Company ID
name string Company name

AppResellerAccountIdentityProvider

{
  "description": "Configured Identity provider",
  "type": "object",
  "title": "AppResellerAccountIdentityProvider",
  "properties": {
    "id": {
      "description": "Identity provider identifier",
      "type": "string"
    },
    "name": {
      "description": "Identity provider name",
      "type": "string"
    },
    "partner": {
      "description": "Identity provider partner",
      "type": "string"
    }
  }
}

Configured Identity provider

Name Type Description
id string Identity provider identifier
name string Identity provider name
partner string Identity provider partner

AppResellerAccountTaxExemptionCode

Company tax exemption codes

Enumeration of

AppResellerAccountUserCompanyMembership

{
  "type": "object",
  "title": "AppResellerAccountUserCompanyMembership",
  "properties": {
    "company": {
      "allOf": [
        {
          "$ref": "#/components/schemas/AppResellerAccountCompanyWS"
        },
        {
          "description": "User's company"
        }
      ]
    },
    "enabled": {
      "description": "Indicates whether user's company membership is enabled",
      "type": "boolean"
    },
    "mosiUser": {
      "allOf": [
        {
          "$ref": "#/components/schemas/MosiUser"
        },
        {
          "description": "Microsoft user (if set)"
        }
      ]
    },
    "roles": {
      "description": "User roles in the Company",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Role"
      }
    }
  }
}
Name Type Description
company AppResellerAccountCompany User's company
enabled boolean Indicates whether user's company membership is enabled
mosiUser MosiUser Microsoft user (if set)
roles array of Role User roles in the Company

AppResellerAccountUserSettingCode

User role setting code

Enumeration of

AppResellerSubscriptionCreationRequest

{
  "orderLines": [
    {
      "quantity": "1",
      "unit": "USER"
    }
  ],
  "parentSubscriptionId": "386626c0-53e2-4515-8450-4a720bb5d029",
  "paymentPlanId": "30ccf1e7-1937-40cb-8e73-851a226fd4ea",
  "targetCompanyId": "698555fc-bc65-4163-9fee-16308edec41b",
  "targetUserId": "2c061df6-4313-45e0-8709-a0ca19b0aaa3"
}
Name Type Description
orderLines string Unit type and quantity
parentSubscriptionId string ID of an add-on product's parent subscription
paymentPlanId string (Required) Edition Payment Plan ID
targetCompanyId string (Required) ID of the company in which the Reseller will create the new subscription
targetUserId string (Required) ID of the user for whom the Reseller will create the new subscription

AppResellerSubscriptionUpdateRequest

{
  "orderLines": [
    {
      "quantity": "15",
      "unit": "USER"
    }
  ],
  "paymentPlanId": "30ccf1e7-1937-40cb-8e73-851a226fd4ea"
}
Name Type Description
orderLines array of OrderLineDetailsWS Unit type and quantity
paymentPlanId string Edition Payment Plan ID

CatalogEdition

{
  "type": "object",
  "title": "CatalogEdition",
  "properties": {
    "PaymentPlanWS": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/AppResellerCatalogPaymentPlanWS"
      }
    },
    "RevenueModelType": {
      "$ref": "#/components/schemas/RevenueModelType"
    },
    "id": {
      "description": "Edition ID",
      "type": "string"
    },
    "name": {
      "description": "Edition name",
      "type": "string"
    }
  }
}
Name Type Description
PaymentPlanWS array of PaymentPlans
RevenueModelType RevenueModelType Supported revenue model types
id string Edition ID
name string Edition name

MarkupPrices

{
  "type": "object",
  "title": "MarkupPrices",
  "properties": {
    "markupPrices": {
      "description": "Markup Prices",
      "additionalProperties": {
        "type": "string",
        "properties": {
          "currency": {
            "type": "string"
          },
          "value": {
            "type": "number"
          }
        }
      }
    },
    "markupType": {
      "$ref": "#/components/schemas/MarkupPricingType"
    }
  }
}
Name Type Description
markupPrices undefined Markup Prices
markupType MarkupPricingType Markup pricing types

PaymentPlans

{
  "type": "object",
  "title": "PaymentPlans",
  "properties": {
    "cancellationPeriodLimit": {
      "description": "Number of days where you can cancel your contract",
      "type": "integer"
    },
    "costs": {
      "description": "Catalog plan costs",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/AppResellerCatalogPlanCostWS"
      }
    },
    "endOfContractGracePeriod": {
      "description": "Grace period after the end of the contract",
      "type": "integer"
    },
    "frecuency": {
      "allOf": [
        {
          "$ref": "#/components/schemas/PricingDuration"
        },
        {
          "description": "Billing frequency"
        }
      ]
    },
    "id": {
      "description": "Payment Plan ID",
      "type": "string"
    },
    "minimumServiceLength": {
      "description": "Minimum pricing duration of the pricing plan",
      "type": "integer"
    }
  }
}
Name Type Description
cancellationPeriodLimit integer Number of days where you can cancel your contract
costs array of CatalogPlanCosts Catalog plan costs
endOfContractGracePeriod integer Grace period after the end of the contract
frecuency PricingDuration Billing frequency
id string Payment Plan ID
minimumServiceLength integer Minimum pricing duration of the pricing plan

CatalogPlanCosts

{
  "type": "object",
  "title": "CatalogPlanCosts",
  "properties": {
    "id": {
      "description": "Plan Cost ID",
      "type": "string"
    },
    "itemPrices": {
      "description": "Payment Plan prices",
      "additionalProperties": {
        "type": "string",
        "properties": {
          "currency": {
            "type": "string"
          },
          "value": {
            "type": "number"
          }
        }
      }
    },
    "markupPrices": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/AppResellerCatalogMarkupPriceWS"
      }
    },
    "maxUnits": {
      "description": "Maximum number of units",
      "type": "integer"
    },
    "minUnits": {
      "description": "Minimum number of units",
      "type": "integer"
    },
    "pricingStrategy": {
      "allOf": [
        {
          "$ref": "#/components/schemas/PricingStrategy"
        },
        {
          "description": "Pricing strategy"
        }
      ]
    },
    "unit": {
      "allOf": [
        {
          "$ref": "#/components/schemas/PricingUnit"
        },
        {
          "description": "Cost unit"
        }
      ]
    },
    "unitDependency": {
      "allOf": [
        {
          "$ref": "#/components/schemas/PricingUnit"
        },
        {
          "description": "Dependency unit"
        }
      ]
    }
  }
}
Name Type Description
id string Plan Cost ID
itemPrices undefined Payment Plan prices
markupPrices array of MarkupPrices
maxUnits integer Maximum number of units
minUnits integer Minimum number of units
pricingStrategy PricingStrategy Pricing strategy
unit PricingUnit Cost unit
unitDependency PricingUnit Dependency unit

ProductCatalogPage

{
  "type": "object",
  "title": "ProductCatalogPage",
  "properties": {
    "content": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/AppResellerCatalogProductWS"
      }
    },
    "links": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "page": {
      "$ref": "#/components/schemas/PageMetadata"
    }
  }
}
Name Type Description
content array of ProductCatalog
links array of string
page PageMetadata

ProductCatalog

{
  "type": "object",
  "title": "ProductCatalog",
  "properties": {
    "blurb": {
      "description": "Product short description",
      "type": "string"
    },
    "id": {
      "description": "Product ID",
      "type": "string"
    },
    "imageUrl": {
      "description": "Product image URL",
      "type": "string"
    },
    "name": {
      "description": "Product name",
      "type": "string"
    },
    "provider": {
      "description": "Company provider",
      "type": "string"
    },
    "visible": {
      "description": "Determines whether product is visible in catalog (true/false)",
      "type": "boolean"
    }
  }
}
Name Type Description
blurb string Product short description
id string Product ID
imageUrl string Product image URL
name string Product name
provider string Company provider
visible boolean Determines whether product is visible in catalog (true/false)

Company

{
  "type": "object",
  "title": "Company",
  "properties": {
    "activated": {
      "description": "Indicates whether company is activated",
      "type": "boolean"
    },
    "createdOn": {
      "description": "Date when new company was created, in UNIX Epoch milliseconds",
      "type": "number"
    },
    "externalId": {
      "description": "External ID used to identify the company (must be unique)",
      "type": "string"
    },
    "grantedAccesses": {
      "description": "Company granted accesses",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/AppResellerAccountCompanyAccess"
      }
    },
    "id": {
      "description": "Company's ID",
      "type": "string"
    },
    "name": {
      "description": "New company's name",
      "type": "string"
    },
    "numOfUsers": {
      "description": "Number of users in the company",
      "type": "number"
    },
    "phone": {
      "description": "Company's phone number",
      "type": "string"
    }
  }
}
Name Type Description
activated boolean Indicates whether company is activated
createdOn number Date when new company was created, in UNIX Epoch milliseconds
externalId string External ID used to identify the company (must be unique)
grantedAccesses array of AppResellerAccountCompanyApiContext Company granted accesses
id string Company's ID
name string New company's name
numOfUsers number Number of users in the company
phone string Company's phone number

orderLightWS

{
  "createdOn": 1529083173000,
  "editionName": "Edition",
  "frequency": "One Time",
  "id": "1234",
  "orderCartId": "4567",
  "status": "PENDING MANUAL RECOVERY",
  "totalFee": "USD350.00"
}
Name Type Description
createdOn number Creation date of the order, in Unix timestamp format
editionName string Edition name
frequency string Frequency (valid values are MONTHLY, QUARTERLY, SIX_MONTHS, YEARLY, TWO_YEARS, THREE_YEARS, DAILY)
id string Order ID
orderCartId string Order cart ID
status string Order status (valid values are INITIALIZED, PENDING_USER_APPROVAL, PENDING_REMOTE_CREATION, PENDING_MANUAL_RECOVERY, PENDING_ASYNCHRONOUS_CREATION, FREE_TRIAL, ACTIVE, FINISHED, ONE_TIME, CANCELLED, SUSPENDED, FREE_TRIAL_EXPIRED, FREE_TRIAL_CANCELLED, DELETED, FAILED, UPCOMING, PENDING_MIGRATION_ACTIVATION, PENDING_DELAYED_PROVISIONING)
totalFee string Total fee for the order

AppResellerPaymentMethod

{
  "description": "Payment method information",
  "type": "object",
  "title": "AppResellerPaymentMethod",
  "required": [
    "id",
    "default",
    "paymentMethodType",
    "billingAddress",
    "owner"
  ],
  "properties": {
    "accountDisplay": {
      "description": "Account display text, such as the last 4 digits of the credit card number",
      "type": "string"
    },
    "billingAddress": {
      "allOf": [
        {
          "$ref": "#/components/schemas/BillingAddress"
        },
        {
          "description": "Billing address"
        }
      ]
    },
    "default": {
      "description": "Indicates whether this is the user's default payment method",
      "type": "boolean"
    },
    "id": {
      "description": "Payment method ID",
      "type": "string"
    },
    "owner": {
      "allOf": [
        {
          "$ref": "#/components/schemas/UserAssociation"
        },
        {
          "description": "User associated with the billing address"
        }
      ]
    },
    "paymentMethodType": {
      "description": "Payment method types supported by AppReseller",
      "type": "string"
    },
    "properties": {
      "description": "List of payment method properties. Varies by payment method type",
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    }
  }
}

Payment method information

Name Type Description
accountDisplay string Account display text, such as the last 4 digits of the credit card number
billingAddress BillingAddress Billing address
default boolean Indicates whether this is the user's default payment method
id string Payment method ID
owner AppResellerUserAssociation User associated with the billing address
paymentMethodType string Payment method types supported by AppReseller
properties object List of payment method properties. Varies by payment method type

AppResellerPaymentMethodPagedReadResponse

{
  "description": "List of payment methods",
  "type": "object",
  "title": "AppResellerPaymentMethodPagedReadResponse",
  "required": [
    "page",
    "content"
  ],
  "properties": {
    "content": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/AppResellerPaymentMethod"
      }
    },
    "page": {
      "allOf": [
        {
          "$ref": "#/components/schemas/PageMetadata"
        },
        {
          "description": "Page information"
        }
      ]
    }
  }
}

List of payment methods

Name Type Description
content array of AppResellerPaymentMethod
page PageMetadata Page information

AppResellerPaymentMethodRequest

{
  "billingAddress": {
    "city": "Beverly Hills",
    "country": "US",
    "state": "CA",
    "street1": "Alden",
    "zip": "94203"
  },
  "companyId": "6b4bd452-895d-0000-0000-e6046b230000",
  "ownerId": "833d4c99-1939-0000-0000-6fb7ae30000",
  "paymentMethodType": "CARD",
  "properties": {
    "brand": "VISA",
    "cardHolderName": "John Jordan",
    "expirationMonth": "10",
    "expirationYear": "2100",
    "number": "0000-0000-0000-0000",
    "securityCode": "000"
  }
}

Creates a payment method for the specified user

Name Type Description
billingAddress BillingAddress User's billing address
companyId string ID of the user's company
ownerId string ID of the user for whom to create the payment method
paymentMethodType string Payment method types supported by AppReseller
properties object List of payment method properties. Varies by payment method type

AppResellerSubscriptionActiveOrderWS

{
  "createdOn": 1529083173000,
  "editionName": "Edition",
  "frequency": "One Time",
  "id": "1234",
  "orderCartId": "4567",
  "orderLines": [
    {
      "quantity": "1",
      "unit": "USER"
    }
  ],
  "paymentPlanId": "30ccf1e7-1937-40cb-8e73-851a226fd4ea",
  "status": "PENDING MANUAL RECOVERY",
  "totalFee": "USD350.00"
}
Name Type Description
createdOn number Creation date of the order, in Unix timestamp format
editionName string Edition name
frequency string Frequency (valid values are MONTHLY, QUARTERLY, SIX_MONTHS, YEARLY, TWO_YEARS, THREE_YEARS, DAILY)
id string Order ID
orderCartId string Order cart ID
orderLines array of OrderLineDetailsWS Unit type and quantity
paymentPlanId string Edition Payment Plan ID
status string Order status (valid values are INITIALIZED, PENDING_USER_APPROVAL, PENDING_REMOTE_CREATION, PENDING_MANUAL_RECOVERY, PENDING_ASYNCHRONOUS_CREATION, FREE_TRIAL, ACTIVE, FINISHED, ONE_TIME, CANCELLED, SUSPENDED, FREE_TRIAL_EXPIRED, FREE_TRIAL_CANCELLED, DELETED, FAILED, UPCOMING, PENDING_MIGRATION_ACTIVATION, PENDING_DELAYED_PROVISIONING)
totalFee string Total fee for the order

AppResellerSubscriptionAssignmentList

{
  "content": [
    {
      "createdOn": 1529083173000,
      "id": "63bf81c2-8e01-48b7-a8b1-46a0efa0e823",
      "status": "ACTIVE",
      "subscriptionId": "386626c0-53e2-4515-8450-4a720bb5d029",
      "user": {
        "firstName": "Michael",
        "id": "386626c0-53e2-4515-8450-4a720bb5d029",
        "lastName": "Jordan"
      }
    },
    {
      "createdOn": 1527863555000,
      "id": "5cdf116b-0603-4d26-88d8-5e1afd625931",
      "status": "CANCELLED",
      "subscriptionId": "386626c0-53e2-4515-8450-4a720bb5d029",
      "user": {
        "firstName": "Mary",
        "id": "bb14ace3-4490-47e8-84f1-ab6a85da69e5",
        "lastName": "Gonzalez"
      }
    }
  ],
  "page": {
    "number": 1,
    "size": 50,
    "totalElements": 2,
    "totalPages": 1
  }
}

Assignment of a product to a user

Name Type Description
content array of AppResellerSubscriptionAssignment List of subscription assignments
page PageMetadata Page information

AppResellerSubscriptionAssignmentRequestWS

{
  "subscriptionId": "386626c0-53e2-4515-8450-4a720bb5d029",
  "userId": "2c061df6-4313-45e0-8709-a0ca19b0aaa3"
}

Request to assign a product to a user

Name Type Description
subscriptionId string ID of the product subscription to assign to the user
userId string ID of the user to whom the product will be assigned

AppResellerSubscriptionAssignment

{
  "createdOn": 1529083173000,
  "id": "63bf81c2-8e01-48b7-a8b1-46a0efa0e823",
  "status": "ACTIVE",
  "subscriptionId": "386626c0-53e2-4515-8450-4a720bb5d029",
  "user": {
    "firstName": "Michael",
    "id": "386626c0-53e2-4515-8450-4a720bb5d029",
    "lastName": "Jordan"
  }
}

Assignment of a product to a user

Name Type Description
createdOn number Assignment creation date, in timestamp format
id string Assignment ID
status UserEntitlementStatus Assignment status
subscriptionId string ID of the subscription assigned to the user
user AppResellerUserAssociation User to whom the product is assigned

AppResellerSubscriptionLightWS

{
  "activeOrder": {
    "createdOn": 1529083173000,
    "editionName": "Edition",
    "frequency": "One Time",
    "id": "1553",
    "status": "PENDING MANUAL RECOVERY",
    "totalFee": "USD350.00"
  },
  "applicationName": "AUTO_DISCOUNTS_APP",
  "company": {
    "id": "698555fc-bc65-4163-9fee-16308edec41b",
    "name": "Company A"
  },
  "id": "386626c0-53e2-4515-8450-4a720bb5d029",
  "pendingEvent": "SUBSCRIPTION_CHANGE",
  "status": "ACTIVE",
  "user": {
    "firstName": "Michael",
    "id": "386626c0-53e2-4515-8450-4a720bb5d029",
    "lastName": "Jordan"
  }
}
Name Type Description
activeOrder orderLightWS Active order associated with this subscription
applicationName string Name of the application related to the subscription
company AppResellerCompanyAssociation A minimum version of a company: includes only the company ID and name
id string Subscription ID
pendingEventType EventType Pending event related to the subscription
status string Subscription status (valid values are INITIALIZED, FAILED, FREE_TRIAL, FREE_TRIAL_EXPIRED, ACTIVE, SUSPENDED, or CANCELLED)
user AppResellerUserAssociation A minimum version of a user: includes only the user ID, first name, and last name

AppResellerSubscriptionWS

{
  "activeOrder": {
    "createdOn": 1529083173000,
    "editionName": "Edition",
    "frequency": "One Time",
    "id": "1553",
    "orderLines": [
      {
        "quantity": "1",
        "unit": "USER"
      }
    ],
    "paymentPlanId": "30ccf1e7-1937-40cb-8e73-851a226fd4ea",
    "status": "PENDING MANUAL RECOVERY",
    "totalFee": "USD350.00"
  },
  "applicationName": "AUTO_DISCOUNTS_APP",
  "company": {
    "id": "698555fc-bc65-4163-9fee-16308edec41b",
    "name": "Company A"
  },
  "createdOn": 1529083173000,
  "id": "386626c0-53e2-4515-8450-4a720bb5d029",
  "pendingEvent": "SUBSCRIPTION_CHANGE",
  "referenceCode": "bundle09",
  "status": "ACTIVE",
  "user": {
    "firstName": "Michael",
    "id": "2c061df6-4313-45e0-8709-a0ca19b0aaa3",
    "lastName": "Jordan"
  }
}
Name Type Description
activeOrder AppResellerSubscriptionActiveOrderWS Active order associated with this subscription
applicationName string Name of the application related to the subscription
company AppResellerCompanyAssociation A minimum version of a company: includes only the company ID and name
createdOn number Creation date of the subscription, in Unix timestamp format
id string Subscription ID
pendingEventType EventType Pending event related to the subscription
referenceCode string Code provided by Resellers and Sales Agents while purchasing a subscription
status string Subscription status (valid values are INITIALIZED, FAILED, FREE_TRIAL, FREE_TRIAL_EXPIRED, ACTIVE, SUSPENDED, or CANCELLED)
user AppResellerUserAssociation A minimum version of a user: includes only the user ID, first name, and last name

AppResellerUserActions

User actions

Enumeration of

AppResellerUserRoleWS

{
  "type": "object",
  "title": "AppResellerUserRoleWS",
  "properties": {
    "name": {
      "description": "Role name",
      "type": "string"
    },
    "permission": {
      "allOf": [
        {
          "$ref": "#/components/schemas/ReadWritePermission"
        },
        {
          "description": "Write permission"
        }
      ]
    }
  }
}
Name Type Description
name string Role name
permission ReadWritePermission Write permission

AppResellerUserSetting

{
  "description": "User setting",
  "type": "object",
  "title": "AppResellerUserSetting",
  "properties": {
    "permission": {
      "allOf": [
        {
          "$ref": "#/components/schemas/ReadWritePermission"
        },
        {
          "description": "User setting permission"
        }
      ]
    },
    "setting": {
      "allOf": [
        {
          "$ref": "#/components/schemas/AppResellerAccountUserSettingCode"
        },
        {
          "description": "User role setting code"
        }
      ]
    },
    "value": {
      "description": "User setting value",
      "type": "string"
    }
  }
}

User setting

Name Type Description
permission ReadWritePermission User setting permission
setting AppResellerAccountUserSettingCode User role setting code
value string User setting value

ApplicationPlatform

{
  "attribute": [
    {
      "applicationPlatformUuid": "...",
      "createdOn": 12345,
      "lastModified": 12345,
      "platformAttributeDefinitionUuid": "...",
      "platformAttributeOptionUuid": "...",
      "uuid": "...",
      "value": "..."
    },
    {
      "applicationPlatformUuid": "...",
      "createdOn": 12345,
      "lastModified": 12345,
      "platformAttributeDefinitionUuid": "...",
      "platformAttributeOptionUuid": "...",
      "uuid": "...",
      "value": "..."
    }
  ],
  "platformDefinition": {
    "attributeDefinition": [
      {
        "createdOn": 12345,
        "hint": "...",
        "isRequired": true,
        "key": "...",
        "label": "...",
        "lastModified": 12345,
        "option": [
          {},
          {}
        ],
        "order": 12345,
        "type": "...",
        "uuid": "..."
      },
      {
        "createdOn": 12345,
        "hint": "...",
        "isRequired": true,
        "key": "...",
        "label": "...",
        "lastModified": 12345,
        "option": [
          {},
          {}
        ],
        "order": 12345,
        "type": "...",
        "uuid": "..."
      }
    ],
    "createdOn": 12345,
    "description": "...",
    "iconUrl": "...",
    "isVersionSupported": true,
    "lastModified": 12345,
    "name": "...",
    "numTaggedProducts": 12345,
    "uuid": "..."
  },
  "uuid": "..."
}
Name Type Description
attribute array of PlatformAttribute
platformDefinition Platform
uuid string

ApplicationReseller

{
  "id": "...",
  "name": "...",
  "vendor": "..."
}
Name Type Description
id number The unique identifier of the product
name string The name of the product
vendor VendorCompany Vendor information that includes the vendor company UUID and the vendor company name

ApplicationSummaryStat

{
  "description": "Company application summary statistic",
  "type": "object",
  "title": "ApplicationSummaryStat",
  "properties": {
    "children": {
      "description": "Summary statistic value",
      "type": "string"
    },
    "unit": {
      "description": "Summary statistic name",
      "type": "string"
    }
  }
}

Company application summary statistic

Name Type Description
children string Summary statistic value
unit string Summary statistic name

ApplicationToConnect

{
  "id": "b2fc6737-3d3f-4da2-afda-f80f25b89af9"
}

Identify an application that can be connected to users for Search

Name Type Description
id string Application UUID. Note: Application UUID = Product UUID.

ApplicationToDisconnect

{
  "id": "b2fc6737-3d3f-4da2-afda-f80f25b89af9"
}

Identifies the application to be disconnected from Search

Name Type Description
id string Application UUID. Note: Application UUID = Product UUID.

AssociatedAddon

{
  "addonId": 1090,
  "editionId": 1416,
  "links": [
    {
      "href": "...",
      "rel": "..."
    },
    {
      "href": "...",
      "rel": "..."
    }
  ]
}

Associated add-on details

Name Type Description
addonId number Add-on ID
editionId number ID of the edition of the product that the add-on is associated with
links array of Link Resource links

AssociatedEdition

{
  "editionId": 7254,
  "links": [
    {
      "href": "...",
      "rel": "..."
    },
    {
      "href": "...",
      "rel": "..."
    }
  ],
  "productId": 1118
}

Associated Edition details

Name Type Description
editionId number Edition ID
links array of Link Resource links
productId number ID of the product that this edition belongs to

AttributeChoice

{
  "attributeId": 56,
  "name": "English",
  "options": [
    {
      "attributeOptionId": 128,
      "name": "EngOpt1",
      "selected": true
    },
    {
      "attributeOptionId": 129,
      "name": "EngOpt2",
      "selected": false
    },
    {
      "attributeOptionId": 130,
      "name": "EngOpt3",
      "selected": false
    },
    {
      "attributeOptionId": 131,
      "name": "EngOpt4",
      "selected": false
    },
    {
      "attributeOptionId": 132,
      "name": "EngOpt5",
      "selected": false
    },
    {
      "attributeOptionId": 133,
      "name": "EngOpt6",
      "selected": false
    },
    {
      "attributeOptionId": 134,
      "name": "EngOpt7",
      "selected": false
    }
  ],
  "required": false
}

Attributes are inherent characteristics of a product. To find the products that best meet their needs, customers can filter products by the attributes that you assign to them.

Name Type Description
attributeId integer Unique ID of the selected attribute.
name string Name of the selected attribute.
options array of AttributeOptionChoice List of attribute options for the product.
required boolean Indicates whether selected attribute is a required field in the product editor.

AttributeGroup

{
  "attribute": [
    {
      "id": 12345,
      "name": "...",
      "numTaggedProducts": 12345
    },
    {
      "id": 12345,
      "name": "...",
      "numTaggedProducts": 12345
    }
  ],
  "id": 12345,
  "name": "...",
  "showOnNavigation": true,
  "vendorTaggable": true
}

Group of product attributes

Name Type Description
attribute array of Attribute List of product attributes
id number Id
name string Name
showOnNavigation boolean Show the attribute group in the navigation panel
vendorTaggable boolean Attribute group can be used to tag products by vendor

AttributeOptionChoice

{
  "attributeOptionId": 134,
  "name": "EngOpt7",
  "selected": false
}

Details about the attribute option.

Name Type Description
attributeOptionId integer Unique ID of the attribute option.
name string Name of the attribute option.
selected boolean Indicates whether attribute option is selected for the product.

AttributeType

Enumeration of

Attribute

{
  "id": 12345,
  "name": "...",
  "numTaggedProducts": 12345
}

Traits that the products share in common, such as the product type, the supported operating system or how your marketplace promotes them.

Name Type Description
id number Id
name string The name
numTaggedProducts number The number of products that use this attribute

AuthenticationMethod

Authentication method type

Enumeration of

Author

{
  "name": "...",
  "profilePicUrl": "...",
  "uuid": "..."
}

Author of a question, an answer, a review or a review comment

Name Type Description
name string Name
profilePicUrl string Profile pic URL
uuid string Unique identifier

AvailabilitySettings

{
  "collectLeads": {
    "assignLeadsToDevelopers": false,
    "editionLeadGenEnabled": false,
    "enabled": true,
    "options": [
      "inAdditionToPurchase",
      "insteadOfPurchase"
    ],
    "selectedOption": "inAdditionToPurchase"
  },
  "disableSelfServe": true,
  "hideAllPricing": true,
  "sellDomainAsStandalone": true,
  "showAsComingSoon": true,
  "sortingRank": {
    "options": [
      "Very High",
      "High",
      "Medium",
      "Low",
      "Very Low"
    ],
    "selectedOption": "Very Low"
  },
  "termsOfServiceURL": "http://www.google.com",
  "validations": [
    {
      "field": "termsOfServiceURL",
      "maxLength": 1024
    }
  ],
  "visibleOnMarketplace": true,
  "visibleOnNetwork": true
}

Allow specific information to appear on the product profile page and whether customers can purchase the product or submit lead information.

Name Type Description
collectLeads CollectLeads Information about the lead is collected, such as first name, last name, email, and so on.
disableSelfServe boolean Indicates whether a customer can perform purchases, upgrades, and cancellations of the product without sales representative or reseller assistance.
hideAllPricing boolean Indicates whether all pricing information on the marketplace, including the pricing tab on the product profile page, is hidden.
sellDomainAsStandalone boolean Indicates whether domain products can be sold as standalone products, outside of a bundled purchase.
showAsComingSoon boolean Indicates whether this product is supposed to be shown as coming soon on product profile page.
sortingRank SortingRank Sorting rank options, which include Very High, High, Medium, Low, or Very Low.
termsOfServiceURL string Terms of service URL
validations array of SettingValidation Information about the validation applied to a setting.
visibleOnMarketplace boolean Indicates whether this product is visible on the marketplace.
visibleOnNetwork boolean Indicates whether this product is visible on a network marketplace.

AvailableAction

Only appears in responses. Actions that the API client has permission to complete for this opportunity. If an expected action does not appear in this list, check for it in the list of actionRestrictions.

Enumeration of

AvailableCompanySegmentAssociation

{
  "id": "04f8d043-10f1-4b89-8c0e-0780e5a62299",
  "name": "Canada Company",
  "selected": false
}

Information about all marketplace companies and associated companies for a segment

Name Type Description
id string The company ID
name string The company name
selected boolean Indicates whether this company is associated with the segment

BaseOrder

{
  "_embedded": {
    "property1": {},
    "property2": {}
  },
  "company": {
    "href": "...",
    "id": "..."
  },
  "currency": "...",
  "endDate": 12345,
  "endOfDiscountDate": 12345,
  "frequency": "...",
  "id": 12345,
  "links": [
    {
      "href": "...",
      "rel": "..."
    },
    {
      "href": "...",
      "rel": "..."
    }
  ],
  "nextBillingDate": 12345,
  "parentSubscriptionId": 12345,
  "referenceCode": "...",
  "salesSupportCompany": {
    "href": "...",
    "id": "..."
  },
  "salesSupportUser": {
    "href": "...",
    "id": "..."
  },
  "serviceStartDate": 12345,
  "startDate": 12345,
  "status": "...",
  "totalPrice": 12345,
  "type": "...",
  "user": {
    "href": "...",
    "id": "..."
  }
}

Resource links

Name Type Description
_embedded object
company LinkWS Link to company information.
currency string Currency.
endDate number Order end date.
endOfDiscountDate number Discount end date.
frequency string Frequency.
id number ID.
links array of Link Resource links
nextBillingDate number Next billing date for the order
parentSubscriptionId number Parent subscription ID of an add-on subscription
referenceCode string Reference code
salesSupportCompany LinkWS Link to sales support company information
salesSupportUser LinkWS Link to sales support user information
serviceStartDate number Service start date for the order
startDate number Order start date
status string Order status
totalPrice number Total price for the order
type string Type.
user LinkWS Link to user information

Benefit

{
  "description": "...",
  "title": "..."
}

Product benefit

Name Type Description
description string Description
title string Title

BillingAPIResult

{
  "message": "Metered usage report is not allowed on this entitlement.",
  "success": false
}
Name Type Description
message string Billing API response.
success boolean If the Billing API call was successful.

BillingAddress

{
  "city": "Beverly Hills",
  "country": "US",
  "state": "CA",
  "street1": "Alden",
  "zip": "94203"
}

Billing address

Name Type Description
city string City or town
companyName string Company name
country string Country code in ISO-3166 format
fax string Fax number
faxExtension string Fax number extension
phone string Phone number
poBox string Post office box number
salutation string Personal salutation
state string State, province, or region
street1 string First line of a street address
street2 string Second line of a street address, such as apartment or unit number
zip string ZIP or postal code

BillingAddress

{
  "city": "...",
  "companyName": "...",
  "country": "...",
  "fax": "...",
  "faxExtension": "...",
  "firstName": "...",
  "lastName": "...",
  "phone": "...",
  "phoneExtension": "...",
  "poBox": "...",
  "salutation": "...",
  "state": "...",
  "street1": "...",
  "street2": "...",
  "zip": "..."
}
Name Type Description
city string The name of the city or town
companyName string The name of the company
country string The country code, in ISO-3166 format
fax string The fax number
faxExtension string The fax extension number
firstName string The first name
lastName string The last name
phone string The phone number
phoneExtension string The phone extension number
poBox string The post office box number
salutation string The title in a person's name, for example, Mr or Ms
state string The state, province, or region
street1 string The first line of a street address
street2 string The second line of a street address, for example, an apartment or office number
zip string The ZIP or postal code of the address

BillingConfiguration

{
  "date": "1546300800000",
  "strategy": "CUSTOM"
}

Determines when the billing cycle starts. Set UPON_SERVICE_ACTIVATION to start the billing cycle according to the specified provisioning strategy (either immediately after the opportunity is finalized or on a custom provisioning date). Set NEXT_BILLING_CYCLE to start the billing cycle according to the marketplace billing configuration (for example, first of the month). Set CUSTOM to start the billing cycle on a specified date in the future.

Name Type Description
date number Custom billing activation date in UNIX Epoch milliseconds. This date is required when the billing strategy is CUSTOM. Do not set the date when the strategy is UPON_SERVICE_ACTIVATION or NEXT_BILLING_CYCLE.
strategy BillingStrategy

BillingCycle

{
  "dayOfMonth": 17,
  "period": "YEARLY"
}

The billing cycle

Name Type Description
dayOfMonth integer Day of the month on which invoicing should be triggered
period PricingPeriod The pricing period. The billing frequency for the pricing plan.

BillingCycleOptions

{
  "options": [
    "MP_DEFAULT_CYCLE",
    "FIRST_DAY_OF_THE_MONTH",
    "LAST_DAY_OF_THE_MONTH",
    "PURCHASE_DAY",
    "CUSTOM_DAY_OF_THE_MONTH"
  ],
  "selectedOption": "FIRST_DAY_OF_THE_MONTH",
  "startDay": 1
}

Information regarding the billing cycle of the product.

Name Type Description
options array of string List of options for billing cycle.
selectedOption BillingCycleStartDayOption Selected billing cycle start day option.
startDay integer Start day of the month of billing cycle.

BillingCycleStartDayOption

Billing cycle start day options.

Enumeration of

BillingSettings

{
  "billingCycle": {
    "options": [
      "MP_DEFAULT_CYCLE",
      "FIRST_DAY_OF_THE_MONTH",
      "LAST_DAY_OF_THE_MONTH",
      "PURCHASE_DAY",
      "CUSTOM_DAY_OF_THE_MONTH"
    ],
    "selectedOption": "FIRST_DAY_OF_THE_MONTH",
    "startDay": 1
  },
  "setupFeeTaxCode": "DEF456",
  "skipFirstPayment": true,
  "taxCode": "ABC123",
  "validations": [
    {
      "field": "startDay",
      "maxValue": 31,
      "minValue": 1,
      "numeric": true
    },
    {
      "field": "taxCode",
      "maxLength": 255
    },
    {
      "field": "setupFeeTaxCode",
      "maxLength": 25
    }
  ]
}

Information related to billing settings for the product.

Name Type Description
billingCycle BillingCycleOptions Information regarding the billing cycle of the product.
setupFeeTaxCode string Setup fee tax code applied to the product.
skipFirstPayment boolean Indicates whether first payment will be skipped.
taxCode string Tax code applied to the product.
validations array of SettingValidation List of information about the validation applied to a setting.

BillingStrategy

Enumeration of

Billing

{
  "billingSettings": {
    "billingCycle": {
      "options": [
        "MP_DEFAULT_CYCLE",
        "FIRST_DAY_OF_THE_MONTH",
        "LAST_DAY_OF_THE_MONTH",
        "PURCHASE_DAY",
        "CUSTOM_DAY_OF_THE_MONTH"
      ],
      "selectedOption": "FIRST_DAY_OF_THE_MONTH",
      "startDay": 1
    },
    "setupFeeTaxCode": "DEF456",
    "skipFirstPayment": true,
    "taxCode": "ABC123",
    "validations": [
      {
        "field": "startDay",
        "maxValue": 31,
        "minValue": 1,
        "numeric": true
      },
      {
        "field": "taxCode",
        "maxLength": 255
      },
      {
        "field": "setupFeeTaxCode",
        "maxLength": 25
      }
    ]
  },
  "freeTrialBillingOptions": [
    {
      "automaticUpgradeToPaidEnabled": true,
      "editionId": 9890,
      "editionName": "Free Trial",
      "requireBillingInfo": true
    }
  ],
  "skuSettings": {
    "editionPricingItems": [
      {
        "editionName": "Free Trial Edition",
        "paymentPlanId": 123,
        "skus": [
          {
            "fid1": "yyyy-yyyyyy-yyyy",
            "price": "$0.03",
            "pricingItemId": 20423,
            "sku": "A1B2C3"
          },
          {
            "fid1": "yyyy-yyyyyy-yyyy",
            "price": "$0.17",
            "pricingItemId": 20424,
            "sku": "321CBA"
          }
        ]
      }
    ],
    "validations": [
      {
        "alphanumeric": true,
        "field": "sku",
        "maxLength": 6,
        "minLength": 6,
        "required": true
      },
      {
        "field": "fid1",
        "maxLength": 25,
        "minLength": 2,
        "required": false
      }
    ]
  }
}

Information about the billing settings, free trials, billing patterns, or SKU settings of the product.

Name Type Description
billingSettings BillingSettings Information related to billing settings for the product.
freeTrialBillingOptions array of FreeTrialEdition List of billing information related to free editions.
skuSettings SkuSettings Information regarding the SKUs for the product.

BoostUser

{
  "type": "object",
  "title": "BoostUser",
  "properties": {
    "apsUid": {
      "type": "string"
    }
  },
  "nullable": true
}
Name Type Description
apsUid string

BulkInviteResponse

{
  "errors": [
    {
      "email": "test1@email",
      "externalIdentifier": "",
      "index": 0,
      "role": "ROLE_DEVELOPER",
      "type": "PARSE_ERROR"
    },
    {
      "email": "test2@email.com",
      "externalIdentifier": "",
      "index": 1,
      "role": "ROLE_USER",
      "type": "ALREADY_EXISTS"
    },
    {
      "email": "test3@email.com",
      "externalIdentifier": "",
      "index": 2,
      "role": "ROLE_SYS_ADMIN",
      "type": "ALREADY_EXISTS"
    }
  ],
  "invitationsSent": 1
}
Name Type Description
errors array of InvitationError
invitationsSent number

Bullet

{
  "content": "...",
  "tooltip": "..."
}

Describe the defining features and benefits of an product edition or add-on

Name Type Description
content string Bullet point content
tooltip string Information to show on bullet point tooltip

BundleListing

{
  "addon": true,
  "billingFrequency": "...",
  "blurb": "...",
  "bundleUrl": [
    "...",
    "..."
  ],
  "buyable": true,
  "channelStartingPrice": {
    "free": true,
    "freeTrial": true,
    "prices": {
      "property1": {
        "duration": "MONTHLY",
        "price": 12345
      },
      "property2": {
        "duration": "THREE_YEARS",
        "price": 12345
      }
    }
  },
  "collectLeads": true,
  "description": "...",
  "developerName": "...",
  "discountDetails": {
    "discountedStartingPrice": "...",
    "highestFixedDiscount": {
      "AUD": 12345,
      "BRL": 12345,
      "CAD": 12345,
      "CHF": 12345,
      "CNY": 12345,
      "DKK": 12345,
      "EUR": 12345,
      "GBP": 12345,
      "GTQ": 12345,
      "INR": 12345,
      "JPY": 12345,
      "KRW": 12345,
      "MXN": 12345,
      "MYR": 12345,
      "NOK": 12345,
      "NZD": 12345,
      "PHP": 12345,
      "SAR": 12345,
      "SEK": 12345,
      "SGD": 12345,
      "USD": 12345,
      "ZAR": 12345
    },
    "highestPercentageDiscount": 12345,
    "startingPricePercentageDiscount": 12345
  },
  "downloadFileSize": 12345,
  "featured": true,
  "featuredSliderPosition": 12345,
  "free": true,
  "freeTrialOrEditionPresent": true,
  "hasLyncToPhone": true,
  "hidePricings": true,
  "href": "...",
  "iconSrcset": {
    "property1": "...",
    "property2": "..."
  },
  "iconUrl": "...",
  "id": 12345,
  "language": [
    "...",
    "..."
  ],
  "lastModified": 12345,
  "name": "...",
  "numRatings": 12345,
  "overview": "...",
  "overviewImageSrcset": {
    "property1": "...",
    "property2": "..."
  },
  "overviewImageUrl": "...",
  "popular": true,
  "popularity": 12345,
  "product": [
    {
      "blurb": "...",
      "editionName": "...",
      "featured": true,
      "iconUrl": "...",
      "id": 12345,
      "name": "...",
      "overview": "...",
      "rating": 12345
    },
    {
      "blurb": "...",
      "editionName": "...",
      "featured": true,
      "iconUrl": "...",
      "id": 12345,
      "name": "...",
      "overview": "...",
      "rating": 12345
    }
  ],
  "productRibbon": {
    "ribbonColor": "...",
    "text": "...",
    "textColor": "..."
  },
  "productType": "...",
  "profileLogoSrcset": {
    "property1": "...",
    "property2": "..."
  },
  "profileLogoUrl": "...",
  "publishedOn": 12345,
  "rating": 12345,
  "referable": true,
  "showRating": true,
  "sortRank": 12345,
  "staffPick": true,
  "staffPickSliderPosition": 12345,
  "startingPrice": "...",
  "tag": [
    {
      "badge": "...",
      "description": "...",
      "id": 12345,
      "name": "...",
      "showBadge": true,
      "showOnNavigation": true,
      "tag": [
        {},
        {}
      ],
      "type": "..."
    },
    {
      "badge": "...",
      "description": "...",
      "id": 12345,
      "name": "...",
      "showBadge": true,
      "showOnNavigation": true,
      "tag": [
        {},
        {}
      ],
      "type": "..."
    }
  ],
  "url": "...",
  "uuid": "...",
  "vendorName": "..."
}

List of bundled products

Name Type Description
addon boolean Is an add-on product
billingFrequency string Billing frequency
blurb string Short description
bundleUrl array of string List of bundle URLs
buyable boolean Is buyable
channelStartingPrice ChannelStartingPrice Starting prices per currency on channel
collectLeads boolean Collect lead
description string Description
developerName string Developer name
discountDetails DiscountDetail Discount details
downloadFileSize number Download file size for downloadable product
featured boolean Is featured
featuredSliderPosition number Featured slider position
free boolean Is free
freeTrialOrEditionPresent boolean Is free trial or edition present
hasLyncToPhone boolean Has lync to phone add-on
hidePricings boolean Hide pricings
href string URL to get product detail
iconSrcset object Icon Srcset
iconUrl string Icon URL
id number ID
language array of string List of supported languages
lastModified number Last modified date
name string Name
numRatings number Number of ratings
overview string Overview
overviewImageSrcset object Overview image Srcset
overviewImageUrl string Overview image URL
popular boolean Is populare
popularity number Poplarity rank
product array of BundleProduct Bundle products
productRibbon ProductRibbonWS
productType string Product type
profileLogoSrcset object Profile logo Srcset
profileLogoUrl string Profile logo URL
publishedOn number Publication date
rating number User-submitted total rating
referable boolean Is a referable product
showRating boolean Must show the rating
sortRank number Sort rank
staffPick boolean Is staff pick
staffPickSliderPosition number Staff pick slider position
startingPrice string Starting price
tag array of Tag List of tags
url string URL to product profile
uuid string Unique identifier
vendorName string Vendor company name

BundleSettings

{
  "allowPartialCancel": true,
  "allowPartialPurchase": true,
  "bundleApplicationId": 12345,
  "removeDiscountsOnPartialCancel": true,
  "removeMarkupsOnPartialCancel": true
}
Name Type Description
allowPartialCancel boolean
allowPartialPurchase boolean
bundleApplicationId number
removeDiscountsOnPartialCancel boolean
removeMarkupsOnPartialCancel boolean

Bundle

{
  "billingFrequency": "...",
  "blurb": "...",
  "bundleSettings": {
    "allowPartialCancel": true,
    "allowPartialPurchase": true,
    "bundleApplicationId": 12345,
    "removeDiscountsOnPartialCancel": true,
    "removeMarkupsOnPartialCancel": true
  },
  "buyable": true,
  "changeSubscriptionAllowed": true,
  "collectLeads": true,
  "collectLeadsWithPurchaseEnabled": true,
  "description": "...",
  "discountDetails": {
    "discountedStartingPrice": "...",
    "highestFixedDiscount": {
      "AUD": 12345,
      "BRL": 12345,
      "CAD": 12345,
      "CHF": 12345,
      "CNY": 12345,
      "DKK": 12345,
      "EUR": 12345,
      "GBP": 12345,
      "GTQ": 12345,
      "INR": 12345,
      "JPY": 12345,
      "KRW": 12345,
      "MXN": 12345,
      "MYR": 12345,
      "NOK": 12345,
      "NZD": 12345,
      "PHP": 12345,
      "SAR": 12345,
      "SEK": 12345,
      "SGD": 12345,
      "USD": 12345,
      "ZAR": 12345
    },
    "highestPercentageDiscount": 12345,
    "startingPricePercentageDiscount": 12345
  },
  "downloadFileSize": 12345,
  "featured": true,
  "featuredSliderPosition": 12345,
  "free": true,
  "freeTrialOrEditionPresent": true,
  "href": "...",
  "iconUrl": "...",
  "id": 12345,
  "language": [
    "...",
    "..."
  ],
  "lastModified": 12345,
  "name": "...",
  "newSubscriptionEnabled": true,
  "numRatings": 12345,
  "overview": "...",
  "overviewImageUrl": "...",
  "popular": true,
  "popularity": 12345,
  "product": [
    {
      "_embedded": {
        "property1": {},
        "property2": {}
      },
      "addon": true,
      "addonOffering": [
        {
          "bullet": [
            {},
            {}
          ],
          "code": "...",
          "description": "...",
          "descriptionHtml": "...",
          "exclusive": true,
          "id": 12345,
          "name": "...",
          "paymentPlan": [
            {},
            {}
          ],
          "stacked": true,
          "status": "...",
          "uuid": "..."
        },
        {
          "bullet": [
            {},
            {}
          ],
          "code": "...",
          "description": "...",
          "descriptionHtml": "...",
          "exclusive": true,
          "id": 12345,
          "name": "...",
          "paymentPlan": [
            {},
            {}
          ],
          "stacked": true,
          "status": "...",
          "uuid": "..."
        }
      ],
      "autoUpgradeToPaid": true,
      "bundledPlanIds": [
        12345,
        12345
      ],
      "buyable": true,
      "changeSubscriptionAllowed": true,
      "collectLeads": true,
      "collectLeadsWithPurchaseEnabled": true,
      "customAttributes": [
        {
          "attributeKey": "...",
          "attributeType": "MULTISELECT",
          "label": "...",
          "value": "...",
          "valueKeys": [
            "...",
            "..."
          ],
          "valueOptions": [
            {},
            {}
          ]
        },
        {
          "attributeKey": "...",
          "attributeType": "TEXT",
          "label": "...",
          "value": "...",
          "valueKeys": [
            "...",
            "..."
          ],
          "valueOptions": [
            {},
            {}
          ]
        }
      ],
      "customIntegration": "...",
      "displayQuestions": true,
      "displayReviews": true,
      "downloadFileSize": 12345,
      "feature": [
        {
          "bullet": [
            {},
            {}
          ],
          "description": "...",
          "header": "...",
          "hideOnOverview": true,
          "id": 12345,
          "imageUrl": "...",
          "position": 12345,
          "slogan": "..."
        },
        {
          "bullet": [
            {},
            {}
          ],
          "description": "...",
          "header": "...",
          "hideOnOverview": true,
          "id": 12345,
          "imageUrl": "...",
          "position": 12345,
          "slogan": "..."
        }
      ],
      "featuredCustomer": [
        {
          "id": 12345,
          "logoUrl": "...",
          "name": "..."
        },
        {
          "id": 12345,
          "logoUrl": "...",
          "name": "..."
        }
      ],
      "featuredMedium": [
        {
          "id": 12345,
          "link": "...",
          "linkDescription": "...",
          "source": {}
        },
        {
          "id": 12345,
          "link": "...",
          "linkDescription": "...",
          "source": {}
        }
      ],
      "free": true,
      "freeTrialOrEditionPresent": true,
      "hidePricings": true,
      "highestFixedDiscount": {
        "AUD": 12345,
        "BRL": 12345,
        "CAD": 12345,
        "CHF": 12345,
        "CNY": 12345,
        "DKK": 12345,
        "EUR": 12345,
        "GBP": 12345,
        "GTQ": 12345,
        "INR": 12345,
        "JPY": 12345,
        "KRW": 12345,
        "MXN": 12345,
        "MYR": 12345,
        "NOK": 12345,
        "NZD": 12345,
        "PHP": 12345,
        "SAR": 12345,
        "SEK": 12345,
        "SGD": 12345,
        "USD": 12345,
        "ZAR": 12345
      },
      "highestPercentageDiscount": 12345,
      "hostedLocation": "...",
      "href": "...",
      "id": 12345,
      "integrationConfiguration": {
        "productSettings": {}
      },
      "language": [
        "...",
        "..."
      ],
      "lastModified": 12345,
      "linkedImportableApplicationUuid": "...",
      "links": [
        {
          "href": "...",
          "rel": "..."
        },
        {
          "href": "...",
          "rel": "..."
        }
      ],
      "listing": {
        "blurb": "...",
        "imageSrcset": {
          "property1": "...",
          "property2": "..."
        },
        "imageUrl": "...",
        "mobileAppStoreId": "...",
        "mobileBundleId": "...",
        "myAppLogoIconSrcset": {
          "property1": "...",
          "property2": "..."
        },
        "myAppLogoIconUrl": "...",
        "overview": "...",
        "profileImageSrcset": {
          "property1": "...",
          "property2": "..."
        },
        "profileImageUrl": "...",
        "rating": 12345,
        "reviewCount": 12345
      },
      "liveChatAvailable": true,
      "liveChatEnabled": true,
      "mosiConnectorType": "CREST",
      "name": "...",
      "newSubscriptionEnabled": true,
      "numRatings": 12345,
      "oneClickPurchasable": true,
      "overview": {
        "benefit": [
          {},
          {}
        ],
        "demoUrl": "...",
        "documentationUrl": "...",
        "downloadDocumentationUrl": "...",
        "downloadFileSize": 12345,
        "imageSrcset": {
          "property1": "...",
          "property2": "..."
        },
        "imageUrl": "...",
        "splashDescription": "...",
        "splashTitle": "...",
        "systemRequirements": "...",
        "versions": {}
      },
      "platform": [
        {
          "attribute": [
            {},
            {}
          ],
          "platformDefinition": {},
          "uuid": "..."
        },
        {
          "attribute": [
            {},
            {}
          ],
          "platformDefinition": {},
          "uuid": "..."
        }
      ],
      "pricing": {
        "bullet": [
          {},
          {}
        ],
        "edition": [
          {},
          {}
        ],
        "footnote": [
          "...",
          "..."
        ],
        "pricingSummary": "..."
      },
      "privacyUrl": "...",
      "productRibbon": {
        "ribbonColor": "...",
        "text": "...",
        "textColor": "..."
      },
      "provider": {
        "name": "...",
        "url": "...",
        "uuid": "..."
      },
      "publishedApp": {
        "href": "...",
        "id": "..."
      },
      "publishedOn": 12345,
      "rating": 12345,
      "referUrl": "...",
      "referable": true,
      "resource": [
        {
          "description": "...",
          "id": 12345,
          "link": "...",
          "name": "...",
          "resellerAccess": true,
          "resourceType": "...",
          "scribdId": "...",
          "scribdKey": "..."
        },
        {
          "description": "...",
          "id": 12345,
          "link": "...",
          "name": "...",
          "resellerAccess": true,
          "resourceType": "...",
          "scribdId": "...",
          "scribdKey": "..."
        }
      ],
      "screenshot": [
        {
          "id": 12345,
          "imageUrl": "...",
          "imageUrlSrcset": {
            "property1": "...",
            "property2": "..."
          },
          "name": "..."
        },
        {
          "id": 12345,
          "imageUrl": "...",
          "imageUrlSrcset": {
            "property1": "...",
            "property2": "..."
          },
          "name": "..."
        }
      ],
      "showSelfServiceRestriction": true,
      "showThirdPartyLegalDisclosure": true,
      "startingPrice": {
        "amount": {},
        "billingFrequency": "...",
        "discount": {},
        "unit": "..."
      },
      "support": {
        "description": "...",
        "email": "...",
        "knowledgebaseUrl": "...",
        "phone": "..."
      },
      "tag": [
        {
          "badge": "...",
          "description": "...",
          "id": 12345,
          "name": "...",
          "showBadge": true,
          "showOnNavigation": true,
          "tag": [
            {},
            {}
          ],
          "type": "..."
        },
        {
          "badge": "...",
          "description": "...",
          "id": 12345,
          "name": "...",
          "showBadge": true,
          "showOnNavigation": true,
          "tag": [
            {},
            {}
          ],
          "type": "..."
        }
      ],
      "termsUrl": "...",
      "type": "...",
      "usageType": "...",
      "uuid": "...",
      "workingApp": {
        "href": "...",
        "id": "..."
      }
    },
    {
      "_embedded": {
        "property1": {},
        "property2": {}
      },
      "addon": true,
      "addonOffering": [
        {
          "bullet": [
            {},
            {}
          ],
          "code": "...",
          "description": "...",
          "descriptionHtml": "...",
          "exclusive": true,
          "id": 12345,
          "name": "...",
          "paymentPlan": [
            {},
            {}
          ],
          "stacked": true,
          "status": "...",
          "uuid": "..."
        },
        {
          "bullet": [
            {},
            {}
          ],
          "code": "...",
          "description": "...",
          "descriptionHtml": "...",
          "exclusive": true,
          "id": 12345,
          "name": "...",
          "paymentPlan": [
            {},
            {}
          ],
          "stacked": true,
          "status": "...",
          "uuid": "..."
        }
      ],
      "autoUpgradeToPaid": true,
      "bundledPlanIds": [
        12345,
        12345
      ],
      "buyable": true,
      "changeSubscriptionAllowed": true,
      "collectLeads": true,
      "collectLeadsWithPurchaseEnabled": true,
      "customAttributes": [
        {
          "attributeKey": "...",
          "attributeType": "TEXT",
          "label": "...",
          "value": "...",
          "valueKeys": [
            "...",
            "..."
          ],
          "valueOptions": [
            {},
            {}
          ]
        },
        {
          "attributeKey": "...",
          "attributeType": "MULTISELECT",
          "label": "...",
          "value": "...",
          "valueKeys": [
            "...",
            "..."
          ],
          "valueOptions": [
            {},
            {}
          ]
        }
      ],
      "customIntegration": "...",
      "displayQuestions": true,
      "displayReviews": true,
      "downloadFileSize": 12345,
      "feature": [
        {
          "bullet": [
            {},
            {}
          ],
          "description": "...",
          "header": "...",
          "hideOnOverview": true,
          "id": 12345,
          "imageUrl": "...",
          "position": 12345,
          "slogan": "..."
        },
        {
          "bullet": [
            {},
            {}
          ],
          "description": "...",
          "header": "...",
          "hideOnOverview": true,
          "id": 12345,
          "imageUrl": "...",
          "position": 12345,
          "slogan": "..."
        }
      ],
      "featuredCustomer": [
        {
          "id": 12345,
          "logoUrl": "...",
          "name": "..."
        },
        {
          "id": 12345,
          "logoUrl": "...",
          "name": "..."
        }
      ],
      "featuredMedium": [
        {
          "id": 12345,
          "link": "...",
          "linkDescription": "...",
          "source": {}
        },
        {
          "id": 12345,
          "link": "...",
          "linkDescription": "...",
          "source": {}
        }
      ],
      "free": true,
      "freeTrialOrEditionPresent": true,
      "hidePricings": true,
      "highestFixedDiscount": {
        "AUD": 12345,
        "BRL": 12345,
        "CAD": 12345,
        "CHF": 12345,
        "CNY": 12345,
        "DKK": 12345,
        "EUR": 12345,
        "GBP": 12345,
        "GTQ": 12345,
        "INR": 12345,
        "JPY": 12345,
        "KRW": 12345,
        "MXN": 12345,
        "MYR": 12345,
        "NOK": 12345,
        "NZD": 12345,
        "PHP": 12345,
        "SAR": 12345,
        "SEK": 12345,
        "SGD": 12345,
        "USD": 12345,
        "ZAR": 12345
      },
      "highestPercentageDiscount": 12345,
      "hostedLocation": "...",
      "href": "...",
      "id": 12345,
      "integrationConfiguration": {
        "productSettings": {}
      },
      "language": [
        "...",
        "..."
      ],
      "lastModified": 12345,
      "linkedImportableApplicationUuid": "...",
      "links": [
        {
          "href": "...",
          "rel": "..."
        },
        {
          "href": "...",
          "rel": "..."
        }
      ],
      "listing": {
        "blurb": "...",
        "imageSrcset": {
          "property1": "...",
          "property2": "..."
        },
        "imageUrl": "...",
        "mobileAppStoreId": "...",
        "mobileBundleId": "...",
        "myAppLogoIconSrcset": {
          "property1": "...",
          "property2": "..."
        },
        "myAppLogoIconUrl": "...",
        "overview": "...",
        "profileImageSrcset": {
          "property1": "...",
          "property2": "..."
        },
        "profileImageUrl": "...",
        "rating": 12345,
        "reviewCount": 12345
      },
      "liveChatAvailable": true,
      "liveChatEnabled": true,
      "mosiConnectorType": "MOSI",
      "name": "...",
      "newSubscriptionEnabled": true,
      "numRatings": 12345,
      "oneClickPurchasable": true,
      "overview": {
        "benefit": [
          {},
          {}
        ],
        "demoUrl": "...",
        "documentationUrl": "...",
        "downloadDocumentationUrl": "...",
        "downloadFileSize": 12345,
        "imageSrcset": {
          "property1": "...",
          "property2": "..."
        },
        "imageUrl": "...",
        "splashDescription": "...",
        "splashTitle": "...",
        "systemRequirements": "...",
        "versions": {}
      },
      "platform": [
        {
          "attribute": [
            {},
            {}
          ],
          "platformDefinition": {},
          "uuid": "..."
        },
        {
          "attribute": [
            {},
            {}
          ],
          "platformDefinition": {},
          "uuid": "..."
        }
      ],
      "pricing": {
        "bullet": [
          {},
          {}
        ],
        "edition": [
          {},
          {}
        ],
        "footnote": [
          "...",
          "..."
        ],
        "pricingSummary": "..."
      },
      "privacyUrl": "...",
      "productRibbon": {
        "ribbonColor": "...",
        "text": "...",
        "textColor": "..."
      },
      "provider": {
        "name": "...",
        "url": "...",
        "uuid": "..."
      },
      "publishedApp": {
        "href": "...",
        "id": "..."
      },
      "publishedOn": 12345,
      "rating": 12345,
      "referUrl": "...",
      "referable": true,
      "resource": [
        {
          "description": "...",
          "id": 12345,
          "link": "...",
          "name": "...",
          "resellerAccess": true,
          "resourceType": "...",
          "scribdId": "...",
          "scribdKey": "..."
        },
        {
          "description": "...",
          "id": 12345,
          "link": "...",
          "name": "...",
          "resellerAccess": true,
          "resourceType": "...",
          "scribdId": "...",
          "scribdKey": "..."
        }
      ],
      "screenshot": [
        {
          "id": 12345,
          "imageUrl": "...",
          "imageUrlSrcset": {
            "property1": "...",
            "property2": "..."
          },
          "name": "..."
        },
        {
          "id": 12345,
          "imageUrl": "...",
          "imageUrlSrcset": {
            "property1": "...",
            "property2": "..."
          },
          "name": "..."
        }
      ],
      "showSelfServiceRestriction": true,
      "showThirdPartyLegalDisclosure": true,
      "startingPrice": {
        "amount": {},
        "billingFrequency": "...",
        "discount": {},
        "unit": "..."
      },
      "support": {
        "description": "...",
        "email": "...",
        "knowledgebaseUrl": "...",
        "phone": "..."
      },
      "tag": [
        {
          "badge": "...",
          "description": "...",
          "id": 12345,
          "name": "...",
          "showBadge": true,
          "showOnNavigation": true,
          "tag": [
            {},
            {}
          ],
          "type": "..."
        },
        {
          "badge": "...",
          "description": "...",
          "id": 12345,
          "name": "...",
          "showBadge": true,
          "showOnNavigation": true,
          "tag": [
            {},
            {}
          ],
          "type": "..."
        }
      ],
      "termsUrl": "...",
      "type": "...",
      "usageType": "...",
      "uuid": "...",
      "workingApp": {
        "href": "...",
        "id": "..."
      }
    }
  ],
  "productType": "...",
  "profileLogoUrl": "...",
  "provider": {
    "name": "...",
    "url": "...",
    "uuid": "..."
  },
  "publishedOn": 12345,
  "rating": 12345,
  "referable": true,
  "staffPick": true,
  "staffPickSliderPosition": 12345,
  "startingPrice": {
    "amount": {
      "AUD": 12345,
      "BRL": 12345,
      "CAD": 12345,
      "CHF": 12345,
      "CNY": 12345,
      "DKK": 12345,
      "EUR": 12345,
      "GBP": 12345,
      "GTQ": 12345,
      "INR": 12345,
      "JPY": 12345,
      "KRW": 12345,
      "MXN": 12345,
      "MYR": 12345,
      "NOK": 12345,
      "NZD": 12345,
      "PHP": 12345,
      "SAR": 12345,
      "SEK": 12345,
      "SGD": 12345,
      "USD": 12345,
      "ZAR": 12345
    },
    "billingFrequency": "...",
    "discount": {
      "amount": {},
      "availableRedemptions": 12345,
      "description": "...",
      "expirationDate": 12345,
      "numOfBillingCycles": 12345,
      "percentage": 12345,
      "pricingUnit": "SCORECARD",
      "startDate": 12345
    },
    "unit": "..."
  },
  "tag": [
    {
      "badge": "...",
      "description": "...",
      "id": 12345,
      "name": "...",
      "showBadge": true,
      "showOnNavigation": true,
      "tag": [
        {},
        {}
      ],
      "type": "..."
    },
    {
      "badge": "...",
      "description": "...",
      "id": 12345,
      "name": "...",
      "showBadge": true,
      "showOnNavigation": true,
      "tag": [
        {},
        {}
      ],
      "type": "..."
    }
  ],
  "url": "..."
}
Name Type Description
billingFrequency string
blurb string
bundleSettings BundleSettings
buyable boolean
changeSubscriptionAllowed boolean
collectLeads boolean
collectLeadsWithPurchaseEnabled boolean
description string
discountDetails DiscountDetail Discount detail
downloadFileSize number
featured boolean
featuredSliderPosition number
free boolean
freeTrialOrEditionPresent boolean
href string
iconUrl string
id number
language array of string
lastModified number
name string
newSubscriptionEnabled boolean
numRatings number
overview string
overviewImageUrl string
popular boolean
popularity number
product array of Product
productType string
profileLogoUrl string
provider Provider Provider company: entity that operates an AppDirect-powered marketplace
publishedOn number
rating number
referable boolean
staffPick boolean
staffPickSliderPosition number
startingPrice StartingPrice Starting price of a product
tag array of Tag
url string

BundleProduct

{
  "blurb": "...",
  "editionName": "...",
  "featured": true,
  "iconUrl": "...",
  "id": 12345,
  "name": "...",
  "overview": "...",
  "rating": 12345
}
Name Type Description
blurb string
editionName string
featured boolean
iconUrl string
id number
name string
overview string
rating number

CIBranding

{
  "desc": "Sample Application Description",
  "href": "https://marketplace.appdirect.com/api/marketplace/v1/products/1111",
  "iconUrl": "https://appdirect.cloudfront.net/app_resources/1111/thumbs_64/img1111.png",
  "name": "Sample Application",
  "storefrontUrl": "https://marketplace.appdirect.com/apps/1111",
  "vendor": "AppDirect"
}

Branding

Name Type Description
desc string Product description
href string URL of the API to use to retrieve detailed product information
iconUrl string Product icon URL
name string Product name
storefrontUrl string URL of the product profile in the marketplace
vendor string Product vendor

CICheckoutItemDetails

{
  "branding": {
    "desc": "Sample Application Description",
    "href": "https://marketplace.appdirect.com/api/marketplace/v1/products/1111",
    "iconUrl": "https://appdirect.cloudfront.net/app_resources/1111/thumbs_64/img1111.png",
    "name": "Sample Application",
    "storefrontUrl": "https://marketplace.appdirect.com/apps/1111",
    "vendor": "AppDirect"
  },
  "editions": [
    {
      "freeTrialTerms": {
        "freeTrialDuration": 1,
        "freeTrialDurationPeriod": "MONTH",
        "freeTrialGracePeriod": 10
      },
      "id": "45b79e06-1ac6-11e5-90d8-ca7e16f380a7",
      "name": "Sample Edition",
      "pricingPlans": [
        {
          "currency": "USD",
          "id": "b794c2a1-69a7-40bc-9bf7-75a2f945a5fc",
          "pricingPeriod": "MONTHLY",
          "pricingSources": [
            {
              "pricingDefinitions": [
                {
                  "allowsMeteredUsage": true,
                  "costType": "RECURRING_PER_UNIT",
                  "costTypeCategory": "RECURRING",
                  "displaysPricePerIncrement": true,
                  "increment": 5,
                  "priceRanges": [
                    {
                      "max": 5,
                      "min": 0,
                      "salePrice": "4.0000000000",
                      "wholeSalePrice": null
                    }
                  ],
                  "pricingStrategy": "UNIT",
                  "unit": "USER",
                  "unitAllowsDecimals": false
                }
              ],
              "source": "BASE_CATALOG"
            },
            {
              "pricingDefinitions": [
                {
                  "costType": "ONE_TIME_FLAT",
                  "costTypeCategory": "ONE_TIME",
                  "pricingStrategy": "FLAT",
                  "salePrice": "3.0000000000",
                  "wholeSalePrice": null
                }
              ],
              "source": "CHANNEL_CATALOG"
            }
          ]
        }
      ],
      "revenueModel": "RECURRING"
    }
  ],
  "id": "098357e5-7a88-45fe-82d3-843bfd6bcbd1",
  "stacked": false,
  "type": "PRODUCT"
}

Checkout item details

Name Type Description
branding CIBranding Product branding information, including icon, name, vendor, and so on.
editions array of CIEdition List of editions of the product
id string Product ID
stacked boolean Indicates whether the product is stacked. Customers can have multiple subscriptions to stacked products.
type CICheckoutItemType Product type

CICheckoutItemType

Checkout item type

Enumeration of

CICheckoutItemsDetailsRequest

{
  "bundleIds": [
    "300",
    "400"
  ],
  "buyerCompanyId": "6e5a0af2-e6be-4a86-a1b0-ffabcc2c6324",
  "buyerUserId": "55144410-a14a-43a1-9e0a-062c6cf31770",
  "currency": "USD",
  "ownerCompanyId": "b0410709-8333-43e2-84d6-3228f6b9998b",
  "ownerUserId": "19d7343b-b8ab-464a-a893-8b107d77137d",
  "pricingPlanIds": [
    "a12bcf2e-d27e-4808-aae0-6099cc828664",
    "3e0a22d3-dafb-4b3d-a487-7f4e7a94b32a"
  ],
  "productIds": [
    "100",
    "200"
  ],
  "subscriptionIds": [
    "915a6558-5a1b-446a-8ec6-334cc60e3d37",
    "8569269e-4c7f-4238-807c-513c718be135"
  ]
}

Items Details request

Name Type Description
bundleIds array of string List of bundle IDs to retrieve details for. (Currently not supported)
buyerCompanyId string The buyer's company's ID. In assisted sales or reseller scenarios, the buyer's company can be different than the owner's company.
buyerUserId string The buyer user ID. The buyer is the person who is making the purchase. In assisted sales or reseller scenarios, the buyer can be different than the owner.
currency string Three-letter code, such as USD, that determines the currency in which to display item pricing details.
ownerCompanyId string The owner's company's ID.
ownerUserId string The owner user ID. The owner owns the product after the purchase is complete.
pricingPlanIds array of string List of pricing plan IDs to retrieve details for.
productIds array of string List of product IDs to retrieve details for.
subscriptionIds array of string List of subscription IDs to retrieve details for. (Currently not supported)

CIEdition

[
  {
    "freeTrialTerms": {
      "freeTrialDuration": 1,
      "freeTrialDurationPeriod": "MONTH",
      "freeTrialGracePeriod": 10
    },
    "id": "45b79e06-1ac6-11e5-90d8-ca7e16f380a7",
    "name": "Sample Edition",
    "pricingPlans": [
      {
        "currency": "USD",
        "id": 3333,
        "pricingPeriod": "MONTHLY",
        "pricingSources": [
          {
            "pricingDefinitions": [
              {
                "allowsMeteredUsage": true,
                "costType": "RECURRING_PER_UNIT",
                "costTypeCategory": "RECURRING",
                "displaysPricePerIncrement": true,
                "increment": 5,
                "priceRanges": [
                  {
                    "max": 5,
                    "min": 0,
                    "salePrice": "4.0000000000",
                    "wholeSalePrice": null
                  }
                ],
                "pricingStrategy": "UNIT",
                "unit": "USER",
                "unitAllowsDecimals": false
              }
            ],
            "source": "BASE_CATALOG"
          },
          {
            "pricingDefinitions": [
              {
                "costType": "ONE_TIME_FLAT",
                "costTypeCategory": "ONE_TIME",
                "pricingStrategy": "FLAT",
                "salePrice": "3.0000000000",
                "wholeSalePrice": null
              }
            ],
            "source": "CHANNEL_CATALOG"
          }
        ]
      }
    ],
    "revenueModel": "RECURRING"
  }
]

Edition

Name Type Description
freeTrialTerms CIFreeTrialTerms Edition free trial terms, if any
id string Edition ID
name string Edition name
pricingPlans array of CIEditionPricingPlan List of edition pricing plans
revenueModel CIRevenueModel Edition revenue model

CIEditionPricingPlan

{
  "currency": "USD",
  "id": "b794c2a1-69a7-40bc-9bf7-75a2f945a5fc",
  "pricingPeriod": "MONTHLY",
  "pricingSources": {
    "pricingDefinitions": [
      {
        "allowsMeteredUsage": true,
        "costType": "RECURRING_PER_UNIT",
        "costTypeCategory": "RECURRING",
        "displaysPricePerIncrement": true,
        "increment": 5,
        "priceRanges": [
          {
            "max": 5,
            "min": 0,
            "salePrice": "4.0000000000",
            "wholeSalePrice": null
          }
        ],
        "pricingStrategy": "UNIT",
        "unit": "USER",
        "unitAllowsDecimals": false
      }
    ],
    "source": "BASE_CATALOG"
  }
}

Pricing plan

Name Type Description
currency string Pricing plan currency
id string Pricing plan ID
pricingPeriod PricingPeriod Period of the pricing plan, MONTHLY, YEARLY, and so on
pricingSources array of CIPricingSource The source of the pricing plan

CIFreeTrialDurationPeriod

Free trial duration period

Enumeration of

CIFreeTrialTerms

{
  "freeTrialDuration": 1,
  "freeTrialDurationPeriod": "MONTH",
  "freeTrialGracePeriod": 10
}

Free Trial terms

Name Type Description
freeTrialDuration integer Duration of free trial, in days or months depending on the specified period
freeTrialDurationPeriod CIFreeTrialDurationPeriod Time unit of the free trial duration, either DAY or MONTH
freeTrialGracePeriod integer Length of grace period after free trial expiration, in days

CIPricingDefinition

{
  "allowsMeteredUsage": true,
  "costType": "RECURRING_PER_UNIT",
  "costTypeCategory": "RECURRING",
  "displaysPricePerIncrement": true,
  "increment": 5,
  "priceRanges": [
    {
      "max": 5,
      "min": 0,
      "salePrice": "4.0000000000",
      "wholeSalePrice": null
    }
  ],
  "pricingStrategy": "UNIT",
  "unit": "USER",
  "unitAllowsDecimals": false
}

Pricing definition

Name Type Description
allowsMeteredUsage boolean Indicates whether metered usage is allowed
costType CostType Cost type (see definition)
costTypeCategory CostTypeCategory Category of the cost type, either RECURRING or ONE_TIME
displaysPricePerIncrement boolean Indicates whether to display the price per unit increment
increment number The minimum increment in number of units to purchase
priceRanges array of PriceRange Price ranges
pricingStrategy PricingStrategy Pricing strategy (see definition)
unit string The unit type, USER, CARTRIDGE, and so on
unitAllowsDecimals boolean Indicates whether decimals are allowed when purchasing units

CIPricingSource

{
  "pricingDefinitions": [
    {
      "allowsMeteredUsage": true,
      "costType": "RECURRING_PER_UNIT",
      "costTypeCategory": "RECURRING",
      "displaysPricePerIncrement": true,
      "increment": 5,
      "priceRanges": [
        {
          "max": 5,
          "min": 0,
          "salePrice": "4.0000000000",
          "wholeSalePrice": null
        }
      ],
      "pricingStrategy": "UNIT",
      "unit": "USER",
      "unitAllowsDecimals": false
    }
  ],
  "source": "BASE_CATALOG"
}

Pricing source

Name Type Description
pricingDefinitions array of CIPricingDefinition The details of the pricing plan definition
source CIPricingSourceType The type of the pricing source

CIPricingSourceType

Enumeration of

CIRevenueModel

Revenue model

Enumeration of

CancellationPeriodUnit

Cancellation period unit. Time unit by which the contractCancellationPeriodLimit is measured.

Enumeration of

CategoryChoice

{
  "categoryId": 0,
  "subCategoryId": 0
}

Information about categories for the product.

Name Type Description
categoryId integer Unique ID of the selected category for the product.
subCategoryId integer Unique ID of the selected subcategory for the product.

CategoryOption

{
  "categoryId": 0,
  "name": "Select a Category",
  "subCategories": [
    {
      "name": "Select a Sub Category",
      "subCategoryId": 0
    }
  ]
}

Customers can filter products by category.

Name Type Description
categoryId integer Unique ID of the category.
name string Name of the category.
subCategories array of SubCategoryOption List of subcategories.

CategorySelections

{
  "options": [
    {
      "categoryId": 0,
      "name": "Select a Category",
      "subCategories": [
        {
          "name": "Select a Sub Category",
          "subCategoryId": 0
        }
      ]
    },
    {
      "categoryId": 186,
      "name": "Numbers",
      "subCategories": [
        {
          "name": "Select a Sub Category",
          "subCategoryId": 0
        },
        {
          "name": "One",
          "subCategoryId": 113
        },
        {
          "name": "Two",
          "subCategoryId": 114
        }
      ]
    }
  ],
  "required": false,
  "selectedOptions": [
    {
      "categoryId": 0,
      "subCategoryId": 0
    },
    {
      "categoryId": 186,
      "subCategoryId": 0
    },
    {
      "categoryId": 186,
      "subCategoryId": 115
    }
  ],
  "tooltip": "Add categories to your application"
}

Information about the tooltip, attribute, and list of categories associated to the product.

Name Type Description
options array of CategoryOption List of categories available for the product.
required boolean Indicates whether attribute is a required field in the product editor.
selectedOptions array of CategoryChoice List of associated categories for the product.
tooltip string Description of the product category.

CategorySortOrderType

Category sort order types

Enumeration of

Category

{
  "id": 12345,
  "name": "...",
  "numTaggedProducts": 12345,
  "subCategories": [
    {
      "id": 12345,
      "name": "...",
      "numTaggedProducts": 12345
    },
    {
      "id": 12345,
      "name": "...",
      "numTaggedProducts": 12345
    }
  ]
}

Product tag that collect products together according to their general purpose

Name Type Description
id number ID
name string The category name
numTaggedProducts number The number of products that use this category
subCategories array of SubCategory The sub categories

Certificate

{
  "defaultCertificate": true,
  "expirationDate": 1676872384000,
  "fingerprint": "6D:44:10:BF:DD:D6:B9:46:ED:CB:05:B6:96:C4:07:5E:02:C0:27:E6",
  "keySize": 2048,
  "label": "AD Cert",
  "needsRenewal": false,
  "partner": "APPDIRECT",
  "publicCertificate": "-----BEGIN CERTIFICATE-----\nMIICyDCCAbCgAwIBAgIGAWF7mAIjMA0GCSqGSIb3DQEBBQUAMCUxIzAhBgNVBAoM\nGkNPTVBBTllfRU5USVRMRU1FTlQtNzQ1NzI5MB4XDTE4MDIwODE3MjMzNVoXDTIz\nMDIwOTE3MjMzNVowJTEjMCEGA1UECgwaQ09NUEFOWV9FTlRJVExFTUVOVC03NDU3\nMjkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCQvnSC76Jwsrjw0FDO\nMzutqNLyrlww86LiEcDiaGn/Ms6cASbpQFJiA7f5BVbTHCAS4fPQnLcBoZs25OwP\n69ibm5hrJlfmZwPVU0Odqd9M/kGmV4U4EDgieH6BcF0cXwpJ8OeXLhf8N+9tr9sN\n7MvkvMgGqpjwXAwYDFZWxBf0+k6O+rO/XuCuIKtc4eD0jPIS6NfxD5DvXNGc83ro\nffgjM0HNq41jieDAhmAAnj12LoRE4V3qQwqbE3p5JBHsmjOJ2/kGoZdkorf3oSuT\njlsLooDi/NTKlWxnlIvnlNSBnlfzpZl6yQIW4j8FDe/4p02G6VMYIozTB37OM98j\n4USHAgMBAAEwDQYJKoZIhvcNAQEFBQADggEBAHrlJjQs05EykfyuvUFZUOjAiqwN\nM/1WHW8xtCA/qa7H1PJQ6B7xyJcmw/ad23ui74sycfkmCLMACP1tb0M8CJ6/rsZH\nltUy8sXSGg3fyTA9Ff8sJiMs0nCw0Wzkk+P5JGig7kPBi1W7gSFTP4tfrktp65sU\nxefLNh/axCHE2C5lxrYtwsE8ocSqNZwPDIWihcaapvdxDyr8l62F2dL3NXulLVRW\nOV4G+KGVwCCEswjTN3idyGjknBCgaiFmKMPFeZm5feUE6f2D40Z/CLrcaB1HV5/q\nMBljuA6qKsDLaABwtxvviQ18p2GYmfpXv5mLJlSNSRnzH9zQzjGsqV09x7U=\n-----END CERTIFICATE-----\n",
  "publicKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkL50gu+icLK48NBQzjM7\nrajS8q5cMPOi4hHA4mhp/zLOnAEm6UBSYgO3+QVW0xwgEuHz0Jy3AaGbNuTsD+vY\nm5uYayZX5mcD1VNDnanfTP5BpleFOBA4Inh+gXBdHF8KSfDnly4X/Dfvba/bDezL\n5LzIBqqY8FwMGAxWVsQX9PpOjvqzv17griCrXOHg9IzyEujX8Q+Q71zRnPN66H34\nIzNBzauNY4ngwIZgAJ49di6EROFd6kMKmxN6eSQR7Jozidv5BqGXZKK396Erk45b\nC6KA4vzUypVsZ5SL55TUgZ5X86WZeskCFuI/BQ3v+KdNhulTGCKM0wd+zjPfI+FE\nhwIDAQAB\n-----END PUBLIC KEY-----\n",
  "subjectDN": "O=COMPANY_ENTITLEMENT-1893",
  "uuid": "6bd1d10c-ddb8-4908-a5a7-0e918f28a2ae"
}

Certificate content

Name Type Description
defaultCertificate boolean Indicates whether the certificate is the default one
expirationDate number Expiration date of certificate
fingerprint string Certificate fingerprint
keySize number Encryption key size in bits
label string Certificate label
needsRenewal boolean Indicates whether certificate needs renewal
partner string Partner name
publicCertificate string Certificate value
publicKey string Public key value
subjectDN string Certificate subject
uuid string UUID

Changes

{
  "fields": [
    {
      "display": "expanded",
      "label": "Project Status",
      "name": "projectStatus",
      "op": "replace",
      "value": "In progress"
    }
  ],
  "groups": [
    {
      "identifier": "c390a4bf-4f54-418a-87ca-5970c332ba17"
    }
  ],
  "users": [
    {
      "identifier": "bob@a13a9998-e025-4751-8fee-72afdc0fe6d5@2cc88871-e942-4910-96e3-0521d7ae52f4",
      "name": "Bob Roberts"
    }
  ]
}

Changes to a resource connected to Search

Name Type Description
fields array of ContentEventField Field changes
groups array of Group Group access changes
users array of ContentEventUser User access changes

CustomAttribute

{
  "attributeType": "MULTISELECT",
  "name": "...",
  "value": "...",
  "valueKeys": [
    "...",
    "..."
  ]
}
Name Type Description
attributeType AttributeType
name string
value string
valueKeys array of string

ChannelPrice

{
  "duration": "DAILY",
  "price": 12345
}
Name Type Description
duration PricingDuration Pricing duration types
price number

ChannelStartingPrice

{
  "free": true,
  "freeTrial": true,
  "prices": {
    "property1": {
      "duration": "TWO_YEARS",
      "price": 12345
    },
    "property2": {
      "duration": "YEARLY",
      "price": 12345
    }
  }
}
Name Type Description
free boolean
freeTrial boolean
prices object

CharacteristicHighlight

{
  "displayCheck": true,
  "highlight": "...",
  "id": 12345
}

Characteristic highlight of a feature

Name Type Description
displayCheck boolean Display a check on the UI
highlight string Higlight description
id number

CollectLeadsOptions

Lead options include In Addition to Purchase or Instead of Purchase.

Enumeration of

CollectLeads

{
  "assignLeadsToDevelopers": false,
  "editionLeadGenEnabled": false,
  "enabled": true,
  "options": [
    "inAdditionToPurchase",
    "insteadOfPurchase"
  ],
  "selectedOption": "inAdditionToPurchase"
}

Information about the lead is collected, such as first name, last name, email, and so on.

Name Type Description
assignLeadsToDevelopers boolean Indicates whether Marketplace Manager decides that the lead can be assigned to the Developer and the Developer is owner of the product.
enabled boolean Indicates whether leads should be collected for this product.
options array of string Lead options include whether customers can only submit contact information for a product or purchase the product in addition to submiting contact information.
selectedOption CollectLeadsOptions Selected lead option, which includes inAdditionToPurchase or insteadOfPurchase.

Company

{
  "id": "1",
  "name": "Acme Corp."
}
Name Type Description
id string Company ID
name string Company name

CompanyAccountV2

{
  "address": {
    "city": "San Francisco",
    "country": "United Stated of America",
    "state": "California",
    "street1": "5th Ave",
    "street2": "#400",
    "zip": "32455"
  },
  "channelAdmin": false,
  "companySize": "SMALL",
  "countryCode": "US",
  "creationDate": 123455,
  "customAttributes": [
    {
      "attributeType": "TEXT",
      "hint": "US West, US Central, or US East",
      "label": "Geographic Region",
      "name": "Geographic Region",
      "value": "US"
    },
    {
      "attributeType": "MULTISELECT",
      "hint": "",
      "label": "Label Names",
      "name": "Company Details",
      "valueKeys": [
        "great option"
      ]
    }
  ],
  "dailyPurchaseLimit": 0,
  "dailyPurchaseLimitExempt": false,
  "dailyPurchaseLimitOverrideAmt": 10,
  "dailyPurchaseRemainingAmt": null,
  "defaultRole": "USER",
  "emailAddress": "info@company.com",
  "enabled": true,
  "externalId": "d689b970-f3f9-42a6-a974-90e2bdadf860",
  "industry": "IT",
  "links": [
    {
      "href": "http://appdirect/api/account/v2/companies/d689b970-f3f9-42a6-a974-90e2bdadf860",
      "rel": "self"
    },
    {
      "href": "http://appdirect/api/account/v2/companies/d689b970-f3f9-42a6-a974-90e2bdadf860/memberships",
      "rel": "memberships"
    }
  ],
  "name": "Company 7078259907",
  "phoneNumber": "9259221234",
  "picture": "http://localhost:8080/profilePics/http://cdn/company.png",
  "reseller": false,
  "salesAgent": {
    "href": "http://appdirect/api/account/v2/users/d689b970-f3f9-42a6-a974-90e2bdadf860",
    "rel": "sales"
  },
  "status": "INACTIVE",
  "thirtyDaysPurchaseLimit": 0,
  "thirtyDaysPurchaseLimitExempt": false,
  "thirtyDaysPurchaseLimitOverrideAmt": null,
  "thirtyDaysPurchaseRemainingAmt": null,
  "uuid": "d689b970-f3f9-42a6-a974-90e2bdadf860",
  "vendor": false,
  "website": "http://www.company.com"
}

Company information for Account V2 APIs

Name Type Description
address CompanyAddress Company address
allowLogin boolean Indicates whether a company's users are managed users (false) or not (true). Managed users access their products directly, not through the marketplace, therefore they cannot log in. The default is "true"
billingDayOfMonth integer (Optional) Use this property in company creation requests to set the billing cycle start date. The date applies to all purchases made through the specified company, and overrides the marketplace-level billing cycle date.
channelAdmin boolean Indicates whether the company has Channel Admin access
companySize CompanySizeType Company size
countryCode string Company country code defined by ISO ALPHA-2 standard
creationDate number Company creation date
customAttributes array of CustomAttributeAccountV2 Custom attributes
dailyPurchaseLimit number Daily spend limit of marketplace
dailyPurchaseLimitExempt boolean Indicates if company is exempt from the marketplace default daily spend limit
dailyPurchaseLimitOverrideAmt number Company-level override amount of marketplace default daily spend limit
dailyPurchaseRemainingAmt number Daily remaining spending amount
defaultRole string The default role newly created users receive
emailAddress string Company email address
enabled boolean Indicates whether company is enabled
externalId string Company external ID
importAppsEnabled boolean The import apps feature is enabled for this company
industry string Company industry sector
links array of Link Resource links
name string Company name
onlyAdminsCanBuy boolean Indicates if only selected roles in company that can make purchases or all roles in company can make purchases
phoneNumber string Company phone number
picture string Company profile picture URL
referral boolean Indicates whether the company has Referral access
reseller boolean Indicates whether the company has Reseller access
salesAgent Link Sales agent link
status CompanyStatus Company status
thirtyDaysPurchaseLimit number Monthly spend limit of marketplace
thirtyDaysPurchaseLimitExempt boolean Indicates if company is exempt from the marketplace default thirty day spend limit
thirtyDaysPurchaseLimitOverrideAmt number Company-level override amount of marketplace default thirty day spend limit
thirtyDaysPurchaseRemainingAmt number Monthly remaining spending amount
uuid string Company ID
vendor boolean Indicates whether the company has Vendor access
website string Company website URL

CompanyAccountV2Request

{
  "address": {
    "city": "San Francisco",
    "country": "United Stated of America",
    "state": "California",
    "street1": "5th Ave",
    "street2": "#400",
    "zip": "32455"
  },
  "channelAdmin": false,
  "companySize": "SMALL",
  "countryCode": "US",
  "customAttributes": [
    {
      "attributeType": "TEXT",
      "hint": "US West, US Central, or US East",
      "label": "Geographic Region",
      "name": "Geographic Region",
      "value": "US"
    },
    {
      "attributeType": "MULTISELECT",
      "hint": "",
      "label": "Label Names",
      "name": "Company Details",
      "valueKeys": [
        "great option"
      ]
    }
  ],
  "dailyPurchaseLimitExempt": false,
  "dailyPurchaseLimitOverrideAmt": 10,
  "defaultRole": "USER",
  "emailAddress": "info@company.com",
  "enabled": true,
  "externalId": "d689b970-f3f9-42a6-a974-90e2bdadf860",
  "industry": "IT",
  "name": "Company 7078259907",
  "phoneNumber": "9259221234",
  "reseller": false,
  "thirtyDaysPurchaseLimitExempt": false,
  "thirtyDaysPurchaseLimitOverrideAmt": null,
  "vendor": false,
  "website": "http://www.company.com"
}

Payload for "patch company" request

Name Type Description
address CompanyAddress Company address
allowLogin boolean Indicates whether a company's users are managed users (false) or not (true). Do not change the value with this request.
billingDayOfMonth integer (Optional) Use this property in company creation requests to set the billing cycle start date. The date applies to all purchases made through the specified company, and overrides the marketplace-level billing cycle date.
channelAdmin boolean Indicates whether the company has Channel Admin access
companySize CompanySizeType Company size
countryCode string Company country code defined by ISO ALPHA-2 standard
customAttributes array of CustomAttributeAccountV2 Custom attributes
dailyPurchaseLimitExempt boolean Whether company is exempt from the marketplace default daily spend limit
dailyPurchaseLimitOverrideAmt number Daily spend limit for this company (overrides marketplace default for daily company spend limit)
defaultRole string The default role newly created users receive
emailAddress string Company email address
enabled boolean Indicates whether company is enabled
externalId string Company external ID
industry string Company industry sector
name string Company name
phoneNumber string Company phone number
referral boolean Indicates whether the company has Referral access
reseller boolean Indicates whether the company has Reseller access
thirtyDaysPurchaseLimitExempt boolean Whether company is exempt from the marketplace default thirty-day spend limit
thirtyDaysPurchaseLimitOverrideAmt number Thirty-day spend limit for this company (overrides marketplace default for thirty-day company spend limit)
vendor boolean Indicates whether the company has Vendor access
website string Company website URL

CompanyAddress

{
  "city": "...",
  "country": "...",
  "state": "...",
  "street1": "...",
  "street2": "...",
  "zip": "..."
}
Name Type Description
city string
country string
state string
street1 string
street2 string
zip string

AppResellerCompanyAssociation

{
  "id": "698555fc-bc65-4163-9fee-16308edec41b",
  "name": "Company A"
}

A minimum version of a company: includes only the company ID and name

Name Type Description
id string Company ID
name string Company name

CompanyContact

{
  "company": "...",
  "contact": "..."
}
Name Type Description
company CompanyReseller General information about the reseller company or customer company
contact Contact The reseller or customer contact information

CompanyDetails

{
  "type": "object",
  "title": "CompanyDetails",
  "properties": {
    "actions": {
      "description": "Actions available for the current user on this company",
      "type": "array",
      "items": {
        "description": "Type of company action",
        "type": "string",
        "title": "AppResellerAccountCompanyAction",
        "enum": [
          "ENABLE_ON_DEVICES_SALES_AUTOMATION",
          "DISABLE_ON_DEVICES_SALES_AUTOMATION",
          "VERIFY_EMAIL_DOMAIN",
          "UNVERIFY_EMAIL_DOMAIN",
          "ENABLE_COMPANY",
          "DISABLE_COMPANY",
          "LINK_RESELLER_TO_CUSTOMER",
          "LINK_CUSTOMER_TO_RESELLER",
          "INVITE_USERS",
          "MANAGE_PRODUCT_CATALOG",
          "LEAVE_COMPANY",
          "JOIN_COMPANY",
          "MANAGE_CUSTOM_ATTRIBUTES",
          "MOSI_DOMAINS_MANAGEMENT"
        ]
      }
    },
    "active": {
      "description": "Indicates whether company has completed registration",
      "type": "boolean"
    },
    "availableAccesses": {
      "description": "Available accesses that the company can have",
      "type": "array",
      "items": {
        "description": "Type of company access",
        "type": "string",
        "title": "AppResellerAccountCompanyAccessCode",
        "enum": [
          "RESELLER",
          "REFERRAL",
          "CUSTOMER",
          "DEVELOPER",
          "MARKETPLACE",
          "SALES_SUPPORT_REPRESENTATIVE",
          "ENTERPRISE_CUSTOMER"
        ]
      }
    },
    "availableRoles": {
      "description": "Available roles that can be assigned to the company users",
      "type": "array",
      "items": {
        "type": "string",
        "title": "Role",
        "enum": [
          "USER",
          "APPLICATION",
          "PARTNER",
          "PARTNER_READ",
          "COMPANY",
          "CLIENT",
          "CHECKOUT_USER",
          "BILLING_ADMIN",
          "SYS_ADMIN",
          "DEVELOPER",
          "CHANNEL_PRODUCT_SUPPORT",
          "CHANNEL_SUPPORT",
          "CHANNEL_ADMIN",
          "CORPORATE_ADMIN",
          "SUPERUSER",
          "SUPER_SUPPORT",
          "ANALYTICS_ADMIN",
          "LAYOUT_DESIGNER",
          "SALES_SUPPORT",
          "RESTRICTED_SALES_SUPPORT",
          "RESELLER",
          "RESELLER_MANAGER",
          "TESTER",
          "MONITORING",
          "SYSTEM"
        ]
      }
    },
    "availableTaxExemptions": {
      "description": "Tax exemptions that the company can have",
      "type": "array",
      "items": {
        "description": "Company tax exemption codes",
        "type": "string",
        "title": "AppResellerAccountTaxExemptionCode",
        "enum": [
          "FEDERAL_GOVERNMENT_US",
          "STATE_GOVERNMENT_US",
          "TRIBE_INDIAN",
          "FOREIGN_DIPLOMAT",
          "CHARITABLE_ORG",
          "RELIGIOUS_ORG",
          "RESALE",
          "COMMERCIAL_AGRICULTURAL",
          "INDUSTRIAL_PRODUCTION",
          "DIRECT_MAIL_US",
          "DIRECT_PAY_PERMIT_US",
          "OTHER",
          "LOCAL_GOVERNMENT_US",
          "COMMERCIAL_AQUACULTURE",
          "COMMERCIAL_FISHERY",
          "NON_RESIDENT_CAN",
          "MEDICAL_DEVICE_WITH_EXEMPT_SALES_TAX_US",
          "MEDICAL_DEVICE_WITH_TAXABLE_SALES_TAX_US"
        ]
      }
    },
    "channel": {
      "description": "Company's partner",
      "type": "string"
    },
    "createdOn": {
      "description": "Company's creation date, in UNIX Epoch milliseconds",
      "type": "number"
    },
    "defaultRole": {
      "type": "string",
      "title": "Role",
      "enum": [
        "USER",
        "APPLICATION",
        "PARTNER",
        "PARTNER_READ",
        "COMPANY",
        "CLIENT",
        "CHECKOUT_USER",
        "BILLING_ADMIN",
        "SYS_ADMIN",
        "DEVELOPER",
        "CHANNEL_PRODUCT_SUPPORT",
        "CHANNEL_SUPPORT",
        "CHANNEL_ADMIN",
        "CORPORATE_ADMIN",
        "SUPERUSER",
        "SUPER_SUPPORT",
        "ANALYTICS_ADMIN",
        "LAYOUT_DESIGNER",
        "SALES_SUPPORT",
        "RESTRICTED_SALES_SUPPORT",
        "RESELLER",
        "RESELLER_MANAGER",
        "TESTER",
        "MONITORING",
        "SYSTEM"
      ],
      "description": "Default assigned company users role",
      "properties": {}
    },
    "domain": {
      "description": "Company's email domain",
      "type": "string"
    },
    "domainVerified": {
      "description": "The verified domain address",
      "type": "string"
    },
    "enabled": {
      "description": "Indicates whether company can log in to the marketplace",
      "type": "boolean"
    },
    "externalId": {
      "description": "External ID used to identify the company (must be unique)",
      "type": "string"
    },
    "grantedAccesses": {
      "description": "Assigned accesses that the company has",
      "type": "array",
      "items": {
        "description": "Type of company access",
        "type": "string",
        "title": "AppResellerAccountCompanyAccessCode",
        "enum": [
          "RESELLER",
          "REFERRAL",
          "CUSTOMER",
          "DEVELOPER",
          "MARKETPLACE",
          "SALES_SUPPORT_REPRESENTATIVE",
          "ENTERPRISE_CUSTOMER"
        ]
      }
    },
    "id": {
      "description": "Company's identifier",
      "type": "string"
    },
    "idpConfigurations": {
      "description": "Company's configured identity providers",
      "type": "array",
      "items": {
        "description": "Configured Identity provider",
        "type": "object",
        "title": "AppResellerAccountIdentityProvider",
        "properties": {
          "id": {
            "description": "Identity provider identifier",
            "type": "string"
          },
          "name": {
            "description": "Identity provider name",
            "type": "string"
          },
          "partner": {
            "description": "Identity provider partner",
            "type": "string"
          }
        }
      }
    },
    "name": {
      "description": "Company's name",
      "type": "string"
    },
    "phone": {
      "description": "Company's phone number",
      "type": "string"
    },
    "profilePicture": {
      "description": "Company's profile picture URL",
      "type": "string"
    },
    "settings": {
      "description": "Company settings available to Company Reseller Managers",
      "type": "array",
      "items": {
        "description": "Company setting",
        "type": "object",
        "title": "AppResellerAccountCompanySetting",
        "properties": {
          "permission": {
            "allOf": [
              {
                "description": "Type of company write permissions",
                "type": "string",
                "title": "ReadWritePermission",
                "enum": [
                  "READ",
                  "WRITE"
                ]
              },
              {
                "description": "Company setting read/write permissions"
              }
            ]
          },
          "setting": {
            "allOf": [
              {
                "description": "Company Setting Code",
                "type": "string",
                "title": "AppResellerAccountCompanySettingCode",
                "enum": [
                  "ON_DEVICES_SALES_AUTOMATION",
                  "TAX_RATE",
                  "TAX_EXEMPTION_CODE",
                  "CREATE_LEADS",
                  "CREATE_COMPANIES",
                  "CREATE_OPPORTUNITIES",
                  "CLOUD_MANAGEMENT",
                  "TWO_FACTOR_AUTHENTICATION",
                  "IDENTITY_DATA_PROVIDER",
                  "EXTERNAL_ID",
                  "THIRTY_DAYS_PURCHASE_LIMIT_EXEMPT",
                  "DEFAULT_USER_ROLE"
                ]
              },
              {
                "description": "Company setting code"
              }
            ]
          },
          "value": {
            "description": "Company setting value",
            "type": "string"
          }
        }
      }
    },
    "stats": {
      "description": "Company applications summary stats",
      "type": "array",
      "items": {
        "description": "Company application summary statistic",
        "type": "object",
        "title": "ApplicationSummaryStat",
        "properties": {
          "children": {
            "description": "Summary statistic value",
            "type": "string"
          },
          "unit": {
            "description": "Summary statistic name",
            "type": "string"
          }
        }
      }
    },
    "subdomain": {
      "description": "Company's sub domain",
      "type": "string"
    }
  }
}
Name Type Description
actions array of AppResellerAccountCompanyAction Actions available for the current user on this company
active boolean Indicates whether company has completed registration
availableAccesses array of AppResellerAccountCompanyAccessCode Available accesses that the company can have
availableRoles array of Role Available roles that can be assigned to the company users
availableTaxExemptions array of AppResellerAccountTaxExemptionCode Tax exemptions that the company can have
channel string Company's partner
createdOn number Company's creation date, in UNIX Epoch milliseconds
defaultRole Role Default assigned company users role
domain string Company's email domain
domainVerified string The verified domain address
enabled boolean Indicates whether company can log in to the marketplace
externalId string External ID used to identify the company (must be unique)
grantedAccesses array of AppResellerAccountCompanyAccessCode Assigned accesses that the company has
id string Company's identifier
idpConfigurations array of AppResellerAccountIdentityProvider Company's configured identity providers
name string Company's name
phone string Company's phone number
profilePicture string Company's profile picture URL
settings array of AppResellerAccountCompanySetting Company settings available to Company Reseller Managers
stats array of ApplicationSummaryStat Company applications summary stats
subdomain string Company's sub domain

CompanyDomainAccountV2

{
  "company": {
    "customAttributes": [
      {
        "attributeType": "TEXT",
        "hint": "US West, US Central, or US East",
        "label": "Geographic Region",
        "name": "Geographic Region",
        "value": "US"
      },
      {
        "attributeType": "MULTISELECT",
        "hint": "",
        "label": "Label Names",
        "name": "Company Details",
        "valueKeys": [
          "great option"
        ]
      }
    ],
    "defaultRole": "USER",
    "enabled": true,
    "links": [],
    "name": "Company 6702951797",
    "phoneNumber": "+1 123 123 1234",
    "picture": "http://appdirect/profilePics/http://cdn/company.png",
    "reseller": false,
    "uuid": "0fc286dc-40ae-4cd0-9f04-59687fdf39bf",
    "vendor": false
  },
  "companyEntitlementStatus": "ACTIVE",
  "currency": "USD",
  "domainAssociatedApplications": [],
  "domainEntitlementId": 51,
  "domainProvider": {
    "id": 131,
    "imageLogoLarge": "app_resources/2506/thumbs_64/img4627488903781521711.png",
    "name": "MockApp6544683144966352395",
    "providerCompany": "Appdirect",
    "uuid": "fc876968-396a-40bc-824f-01b588d22ad2"
  },
  "endOfContractDate": 1480699590955,
  "launchUrl": "http://appdirect/saml/domain/idp/init/51",
  "links": [],
  "name": "mydomain1.com",
  "owner": {
    "activated": true,
    "allowLogin": true,
    "boostUser": {
      "apsUid": "murnu8w"
    },
    "customAttributes": [],
    "email": "lisa.lopez@company8722006945.com",
    "firstName": "Lisa",
    "lastName": "Lopez",
    "ldapId": "1",
    "links": [],
    "metadata": {
      "apsUid": "murnu8w"
    },
    "picture": "http://appdirect/profilePics/img2147417701652580695.png?184b58e358f087154d94329f9000b28a",
    "roles": [],
    "userId": 109,
    "userName": "lisa.lopez@company8722006945.com",
    "uuid": "3308489f-3448-45c4-bab1-5dd4461ccadd"
  },
  "price": 10.63,
  "renews": true,
  "source": "PURCHASED",
  "status": "ACTIVE",
  "subscriptionId": "b3f9761d-21df-4240-9006-2dbb4b19eec0",
  "uuid": "ec4783be-0325-49c7-b53d-8e4d9631104a"
}
Name Type Description
company CompanyAccountV2 Company
companyEntitlementStatus CompanyEntitlementStatus Status of company entitlement
currency string Company domain currency
domainEntitlementId number Company domain entitlement ID
domainProvider DomainProvider Company domain provider
endOfContractDate number Company domain contract end date
launchUrl string Company domain launch URL
name string Company domain name
owner UserAccountV2 Company domain owner
price number Company domain price
renews boolean Indicates whether renewal of domain is required
source DomainSource Company domain source
status DomainStatus Company domain status
uuid string Company domain unique identifier

CompanyEntitlementStatus

Enumeration of

CompanyEntitlementSuspensionReason

Enumeration of

CompanyGroupAccountV2

{
  "companyDefault": true,
  "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "description": "All company users",
  "externallyManaged": false,
  "links": [
    {
      "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/5acdd82e-5cb7-4a23-b842-38d514aafcdf",
      "rel": "self"
    },
    {
      "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
      "rel": "company"
    },
    {
      "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/5acdd82e-5cb7-4a23-b842-38d514aafcdf/memberships?member=true&page=0&size=50",
      "rel": "memberships"
    }
  ],
  "memberCount": 88,
  "name": "Everyone",
  "systemManaged": true,
  "uuid": "5acdd82e-5cb7-4a23-b842-38d514aafcdf"
}

Resource links

Name Type Description
_embedded object
companyDefault boolean Indicates whether group is the default Everyone group.
companyUuid string Unique identifier of the company.
description string Company group description.
externallyManaged boolean Indicates whether group is externally managed.
links array of Link Resource links
memberCount number Number of members in the group.
name string Company group name.
systemManaged boolean Indicates whether group is system managed.
uuid string Unique identifier of the group.

CompanyGroups

{
  "id": "7e3b3bb8-1b75-408b-8cbf-561ccd910479",
  "name": "Fortune 500 Companies",
  "segments": [
    {
      "id": "04f8d043-10f1-4b89-8c0e-0780e5a62299",
      "name": "iOS users"
    }
  ]
}

Segment group and segments

Name Type Description
id string Segment group ID
name string Segment group name
segments array of Segments Segment details

CompanyReseller

{
  "city": "...",
  "country": "...",
  "customAttributes": "...",
  "name": "...",
  "size": "...",
  "state": "...",
  "street1": "...",
  "street2": "...",
  "uuid": "...",
  "zip": "..."
}
Name Type Description
city string The reseller or customer's city
country string The reseller or customer's country in ISO 3166 two-letter country code
customAttributes object Custom attributes for the reseller or customer
name string The name of the reseller company or customer company
size OrganizationSize The numerical range of employees in the reseller company or customer company. The format is RANGE_#_#
state string The state, province, or region
street1 string The first line of the address
street2 string The second optional line of the address, for example, a floor or suite number
uuid string The unique identifier of the reseller company or customer company
zip string The postal or zip code of the reseller or customer

CompanySegmentAssociationsBatchUpdateRequest

{
  "companyIdsToAdd": [
    "7e3b3bb8-1b75-408b-8cbf-561ccd910479"
  ],
  "companyIdsToRemove": [
    "7e3b3bb8-1b75-408b-8cbf-561ccd910478"
  ],
  "deleteAll": "false"
}

Data required to create or delete an association between segment and companies

Name Type Description
companyIdsToAdd array of string The list of company IDs to associate with the segment, up to a maximum of 1000 IDs
companyIdsToRemove array of string The list of company IDs to disassociate from the segment, up to a maximum of 1000 IDs
deleteAll boolean Set to true to delete all associations

CompanySizeType

Company size types

Enumeration of

CompanyStatus

Company status

Enumeration of

CompanyWS

{
  "companyId": "...",
  "links": [
    {
      "href": "...",
      "rel": "..."
    },
    {
      "href": "...",
      "rel": "..."
    }
  ],
  "name": "..."
}

Company information being used in an event

Name Type Description
companyId string Company id
links array of Link Resource links
name string Company name

Contact

{
  "email": "...",
  "firstName": "...",
  "lastName": "...",
  "phone": "...",
  "phoneExtension": "...",
  "uuid": "..."
}
Name Type Description
email string The email address of the reseller or customer
firstName string The first name of the reseller or customer
lastName string The last name of the reseller or customer
phone string The phone number, including the country and area code, of the reseller or customer
phoneExtension string The phone extension of the reseller or customer's phone number
uuid string The unique identifier of the reseller or customer

Content

{
  "linkedToResource": true,
  "mimeType": "application/pdf",
  "previewUrl": "https://myapp.com/orders/1234?preview",
  "searchText": "string",
  "title": "Order request",
  "url": "https://myapp.com/orders/1234"
}

Structured Search content. When delete parameter is true, the content is removed from the resource.

Name Type Description
delete boolean If true, the content is removed from the resource
linkedToResource boolean Manage duplicate search results for content associated with other resources. If true, link content to associated resources and return it as a single object. If false, content and associated resources are returned as separate objects. Example: Search terms appear in a spreadsheet that is attached to an email. If true, search returns the spreadsheet. If false, search returns the email and the spreadsheet.
mimeType string MIME type of the content
previewUrl string URL of the content preview
searchText string Full text of the content
title string Title of the content
url string URL of the content. Required.

ContentEvent

{
  "action": {
    "text": "a task",
    "verb": "assigned"
  },
  "actor": {
    "identifier": "bob@a13a9998-e025-4751-8fee-72afdc0fe6d5@2cc88871-e942-4910-96e3-0521d7ae52f4",
    "name": "Bob Roberts"
  },
  "changes": {
    "fields": [
      {
        "display": "expanded",
        "label": "Project Status",
        "name": "projectStatus",
        "op": "replace",
        "value": "In progress"
      }
    ],
    "groups": [
      {
        "identifier": "c390a4bf-4f54-418a-87ca-5970c332ba17"
      }
    ],
    "users": [
      {
        "identifier": "bob@a13a9998-e025-4751-8fee-72afdc0fe6d5@2cc88871-e942-4910-96e3-0521d7ae52f4",
        "name": "Bob Roberts"
      }
    ]
  },
  "contents": [
    {
      "linkedToResource": true,
      "mimeType": "application/pdf",
      "previewUrl": "https://myapp.com/orders/1234?preview",
      "searchText": "string",
      "title": "Order request",
      "url": "https://myapp.com/orders/1234"
    }
  ],
  "eventMetadata": {
    "id": "6ed0279c-35ed-4c7e-928e-25e46c080431",
    "timestamp": "2020-06-11T15:23:45Z",
    "type": "ResourceUpdated"
  },
  "key": {
    "instance": "myclient.myapp.com",
    "resourceId": "order-12345",
    "source": "b2fc6737-3d3f-4da2-afda-f80f25b89af9",
    "timestamp": 1500558736123
  }
}

Descriptions of content change events, and the associated content

Name Type Description
action Action Description of changes in the event
actor ContentEventActor The user (accountName) who made the change. There is no actor for system-generated changes.
changes Changes List of field and user access changes to apply to the resource. This field must not be provided if the resource is being deleted ("action.delete": true).
contents array of Content Content items associated with the resource
eventMetadata EventMetadata Metadata associated with the event
key Key Event key. Required.

ContentEventActor

{
  "identifier": "bob@a13a9998-e025-4751-8fee-72afdc0fe6d5@2cc88871-e942-4910-96e3-0521d7ae52f4",
  "name": "Bob Roberts"
}

Identify the application user by identifier (accountName) and name.

Required parameters: Only identifier is required to identify a user.

Name Type Description
identifier string Identifier (accountName) for the application user. Format: {user_handle}@{user_uuid}@{company_uuid}. Required.
name string Full name of the user in the application

ContentEventError

{
  "code": "NOT_FOUND",
  "message": "User not found.",
  "moreInfo": "https://help.appdirect.com/api/appwise.html",
  "status": 404
}
Name Type Description
code string Canonical error code
message string Error message
moreInfo string URL with more information about the error
status integer HTTP status code

ContentEventField

{
  "display": "expanded",
  "label": "Project Status",
  "name": "projectStatus",
  "op": "replace",
  "value": "In progress"
}

Defines a field, valid content, appearance, and behavior

Name Type Description
display Display Defines field display. Optional. Default is expanded. Hidden: Hides the field from the UI. Expanded: Displays the field in the UI.
label string Field label
name string Unique field name. Required.
op string Defines how the field will be merged with an existing field of the same name. Optional. Default is replace.
value string Field value. Required.

ContentEventType

ResourceCreated, ResourceUpdated, ResourceDeleted are used when the Search resource is created, updated, and deleted respectively. ResourceContentUpdated is used when a content item is updated or deleted.

Enumeration of

ContentEventUser

{
  "identifier": "bob@a13a9998-e025-4751-8fee-72afdc0fe6d5@2cc88871-e942-4910-96e3-0521d7ae52f4",
  "name": "Bob Roberts"
}

The application user by identifier (accountName) and name. If delete boolean is true, the user's application account (accountName) for the Search resource is deleted from the ContentEventUser users array.

Required parameters: Only identifier is required to identify a user. Identifier and delete are required for deletion.

Name Type Description
delete boolean If true, delete the user's application account (accountName) for the Search and Search resource (only affects Change node/ContentEventUser users array)
identifier string Identifier (accountName) for the application user. Format: {user_handle}@{user_uuid}@{company_uuid}. Required.
name string Full name of the user in the application

ContractConfiguration

{
  "blockContractDowngrades": true,
  "blockContractUpgrades": false,
  "blockSwitchToShorterContract": true,
  "contractCancellationPeriodLimit": null,
  "contractCancellationPeriodUnit": "NONE",
  "endOfContractGracePeriod": null,
  "endOfContractGracePeriodUnit": "INFINITY",
  "keepContractDateOnPlanChange": false,
  "minimumServiceLength": "24",
  "minimumServiceLengthUnit": "MONTHLY",
  "renewalConfiguration": "MONTH_TO_MONTH",
  "terminationFee": {
    "amount": "2",
    "feeType": "FIXED"
  },
  "terminationFeeGracePeriod": "7",
  "terminationFeeGracePeriodUnit": "DAY",
  "unitTerms": {
    "USER": {
      "blockContractDecrease": true,
      "blockContractIncrease": false,
      "blockOriginalContractDecrease": false
    }
  }
}

Contract configuration options for subscriptions that customers purchase. For example: contract length and cancellation penalities.

Name Type Description
blockContractDowngrades boolean Whether subscriptions can be downgraded mid-contract term
blockContractUpgrades boolean Whether subscriptions can be upgraded mid-contract term
blockSwitchToShorterContract boolean Whether subscriptions can be changed to plans with shorter or no contracts.
contractCancellationPeriodLimit integer Contract cancellation period limit duration. Number of contractCancellationPeriodUnits that define the period before the contract ends, during which customers can no longer cancel the contract and it is renewed.
contractCancellationPeriodUnit CancellationPeriodUnit Contract cancellation period limit units. Time unit by which the contractCancellationPeriodLimit is measured.
endOfContractGracePeriod integer End of contract grace period duration. Number of endofContractGracePeriodUnits that define the period after the contract ends, during which customers can resubscribe before their account and data might be deleted.
endOfContractGracePeriodUnit GracePeriodUnit End of contract grace period unit. Time unit by which the endOfContractGracePeriod is measured.
isDefault boolean Whether it is a default or custom contract
keepContractDateOnPlanChange boolean Whether the remaining contract duration changes when a user changes a subscription pricing plan
minimumServiceLength integer Contract length. The number of minimumServiceLengthUnits that defines contract duration.
minimumServiceLengthUnit MinimumServiceLengthUnit Contract length unit. Time unit by which contract length is measured. For example: MONTHLY
renewalConfiguration RenewalConfiguration Contract renewal configuration. Whether the contract is renewed and, if so, with what terms.
terminationFee TerminationFee Termination fee. A flat or percentage fee charged when customers cancel a contract after the risk-free termination fee grace period ends.
terminationFeeGracePeriod integer Termination fee grace period duration. Number of terminationFeeGracePeriodUnits that define the risk-free period after the contract starts, during which no termination fee is charged if the customer cancels the contract.
terminationFeeGracePeriodUnit TerminationFeeGracePeriodUnit Termination fee grace period unit. Time unit by which the terminationFeeGracePeriod is measured.
unitTerms object Maps a unit type (for example, user) to UnitContractTerms (see object definition). Enabled terms restrict mid-contract quantity changes for the unit type on subscriptions. See example.

Contract

{
  "alignWithParentCycleStartDate": true,
  "autoExtensionPricingId": 12345,
  "blockContractDowngrades": true,
  "blockContractUpgrades": true,
  "blockSwitchToShorterContract": true,
  "cancellationPeriodLimit": 12345,
  "endOfContractGracePeriod": 12345,
  "gracePeriod": {
    "length": 12345,
    "unit": "..."
  },
  "minimumServiceLength": 12345,
  "terminationFee": {
    "description": "...",
    "flatFee": {
      "AUD": 12345,
      "BRL": 12345,
      "CAD": 12345,
      "CHF": 12345,
      "CNY": 12345,
      "DKK": 12345,
      "EUR": 12345,
      "GBP": 12345,
      "GTQ": 12345,
      "INR": 12345,
      "JPY": 12345,
      "KRW": 12345,
      "MXN": 12345,
      "MYR": 12345,
      "NOK": 12345,
      "NZD": 12345,
      "PHP": 12345,
      "SAR": 12345,
      "SEK": 12345,
      "SGD": 12345,
      "USD": 12345,
      "ZAR": 12345
    },
    "percentageFee": 12345,
    "type": "..."
  }
}

Contract associated to a payment plan

Name Type Description
alignWithParentCycleStartDate boolean Is addon cycle start date contract aligned with parent cycle start date
autoExtensionPricingId number Auto extension pricing ID
blockContractDowngrades boolean Is contract downgrade allowed
blockContractUpgrades boolean Is contract upgrade allowed
blockSwitchToShorterContract boolean Is switch to shorter contract allowed
cancellationPeriodLimit number Cancellation period limit
endOfContractGracePeriod number End of contract grace period
gracePeriod Duration Grade period
minimumServiceLength number Minimum service length
terminationFee TerminationFee Termination fee

CostType

Type of cost

Enumeration of

CostTypeCategory

Category of cost

Enumeration of

CreateCompanyGroupAccountV2

{
  "description": "Human Resources",
  "name": "HR"
}
Name Type Description
description string Company group description.
name string Company group name.

CreateCompanyV2Request

{
  "address": {
    "city": "New York",
    "country": "US",
    "state": "NY",
    "street1": "980 West 881st Street",
    "street2": "55AB",
    "zip": "12345"
  },
  "channelAdmin": false,
  "companySize": "SMALL",
  "countryCode": "US",
  "customAttributes": [
    {
      "name": "text_example",
      "value": "foo"
    },
    {
      "name": "multiselect_checkboxes_example",
      "valueKeys": [
        "ipsum",
        "fake"
      ]
    }
  ],
  "defaultRole": "USER",
  "emailAddress": "info@company12345.com",
  "externalId": "P02TSQ3YPZoykqx1a10",
  "firstUser": {
    "email": "john.smith@company12345.com",
    "firstName": "John",
    "lastName": "Smith",
    "roles": [
      "ROLE_SYS_ADMIN"
    ]
  },
  "industry": "Sales",
  "name": "Company Example",
  "phoneNumber": "11234567890",
  "reseller": false,
  "vendor": false,
  "website": "https://www.company12345.com"
}

Payload for "create company" requests

Name Type Description
address CompanyAddress Company address
allowLogin boolean Optional. Default is "true".

When set to "true", the marketplace company allows users, including the first user, to login to the marketplace and receive emails from the marketplace. Users can purchase and assign products within the company. Products can also be purchased on their behalf, and assigned to them.

When set to "false", the marketplace company does not allow company members, including the first user, to login to the marketplace or receive email notifications from the marketplace. Products are purchased and assigned on users behalf, and they access those products directly through the product interface.
billingDayOfMonth integer (Optional) Use this property in company creation requests to set the billing cycle start date. The date applies to all purchases made through the specified company, and overrides the marketplace-level billing cycle date.
channelAdmin boolean Indicates whether the company has Channel Admin access
companySize CompanySizeType Company size
countryCode string Company country code defined by ISO ALPHA-2 standard
customAttributes array of CustomAttributeAccountV2Request Custom attributes
dailyPurchaseLimitExempt boolean Indicates if company is exempt from the marketplace default daily spend limit
dailyPurchaseLimitOverrideAmt number Company-level override amount of marketplace default daily spend limit
defaultRole string The default role newly created users receive
emailAddress string Company email address
externalId string Company external ID
firstUser CreateCompanyV2RequestFirstUser First user of the newly created company
idpUuid string UUID of the identity provider that the user will always use to log in. Contact your AppDirect technical consultant or business consultant to obtain the UUID.
importAppsEnabled boolean The import apps feature is enabled for this company
industry string Company industry sector
name string Company name
onlyAdminsCanBuy boolean Indicates if only selected roles in company that can make purchases or all roles in company can make purchases
phoneNumber string Company phone number
referral boolean Indicates whether the company has Referral access
reseller boolean Indicates whether the company has Reseller access
thirtyDaysPurchaseLimitExempt boolean Indicates if company is exempt from the marketplace default thirty day spend limit
thirtyDaysPurchaseLimitOverrideAmt number Company-level override amount of marketplace default thirty day spend limit
vendor boolean Indicates whether the company has Vendor access
website string Company website URL

CreateCompanyV2RequestFirstUser

{
  "email": "jude.doe@company8578572384.com",
  "firstName": "Jude",
  "lastName": "Doe",
  "position": "Business Analyst",
  "roles": [
    "ROLE_BILLING_ADMIN",
    "ROLE_SYS_ADMIN"
  ]
}

Represents the membership of the first user in a company, who also receives the Company Administrator role by default

Name Type Description
email string Primary email addressed of the user being created
firstName string First name of the user being created
lastName string Last name of the user being created
position string User's job title, also referred to as "Title" on the "My Settings" page in the user interface
roles array of string Roles for this membership. One or more of the following: ROLE_CHANNEL_ADMIN (Marketplace Manager), ROLE_CHANNEL_PRODUCT_SUPPORT (Product Support), ROLE_SALES_SUPPORT (Sales Support), ROLE_RESELLER_MANAGER (Reseller Manager), ROLE_RESELLER (Reseller), ROLE_CHANNEL_SUPPORT (Customer Support), ROLE_SYS_ADMIN (Company Admin), ROLE_BILLING_ADMIN (Billing Admin), ROLE_DEVELOPER (Developer). For user roles (not associated with membership), see UserAccountV2.

CreateCompanyV2Response

{
  "address": {
    "city": "New York",
    "country": "US",
    "state": "NY",
    "street1": "980 West 881st Street",
    "street2": "55AB",
    "zip": "12345"
  },
  "channelAdmin": false,
  "companySize": "SMALL",
  "countryCode": "US",
  "creationDate": 1564783451838,
  "customAttributes": [
    {
      "attributeType": "TEXT",
      "hint": "test",
      "label": "Company Test",
      "name": "company_test",
      "value": "foo"
    },
    {
      "attributeType": "MULTISELECT",
      "hint": "",
      "label": "Checkbox Test",
      "name": "checkbox_test",
      "valueKeys": [
        "bar",
        "ipsum"
      ]
    }
  ],
  "dailyPurchaseLimitExempt": false,
  "dailyPurchaseLimitOverrideAmt": null,
  "defaultRole": "USER",
  "emailAddress": "info@company12345.com",
  "enabled": true,
  "externalId": "P02TSQ3YPZoykqx1a10",
  "firstUser": {
    "email": "john.smith@company12345.com",
    "firstName": "John",
    "lastName": "Smith",
    "roles": [
      "SYS_ADMIN",
      "BILLING_ADMIN",
      "USER"
    ]
  },
  "importAppsEnabled": false,
  "industry": "Finance",
  "links": [
    {
      "href": "https://od-fkprn7q5p.od18.appdirectondemand.com/api/account/v2/companies/7a03ffad-9038-44a5-b749-ae94625e8f30",
      "rel": "self"
    },
    {
      "href": "https://od-fkprn7q5p.od18.appdirectondemand.com/api/account/v2/companies/7a03ffad-9038-44a5-b749-ae94625e8f30/memberships",
      "rel": "memberships"
    }
  ],
  "name": "Company Example",
  "onlyAdminsCanBuy": false,
  "phoneNumber": "11234567890",
  "picture": null,
  "reseller": false,
  "salesAgent": null,
  "status": "INACTIVE",
  "thirtyDaysPurchaseLimitExempt": false,
  "thirtyDaysPurchaseLimitOverrideAmt": null,
  "uuid": "7a03ffad-9038-44a5-b749-ae94625e8f30",
  "vendor": false,
  "website": "https://www.company12345.com"
}

Response payload for "create company" requests

Name Type Description
address CompanyAddress Company address
allowLogin boolean Indicates whether a company's users are managed users (false) or not (true). Managed users access their products directly, not through the marketplace, therefore they cannot log in. The default is "true"
channelAdmin boolean Indicates whether the company has Channel Admin access
companySize CompanySizeType Company size
countryCode string Company country code defined by ISO ALPHA-2 standard
creationDate number Company creation date
customAttributes array of CustomAttributeAccountV2 Custom attributes
dailyPurchaseLimit number Daily spend limit of marketplace
dailyPurchaseLimitExempt boolean Indicates if company is exempt from the marketplace default daily spend limit
dailyPurchaseLimitOverrideAmt number Company-level override amount of marketplace default daily spend limit
dailyPurchaseRemainingAmt number Daily remaining spending amount
defaultRole string The default role newly created users receive
emailAddress string Company email address
enabled boolean Indicates whether company is enabled
externalId string Company external ID
firstUser CreateCompanyV2RequestFirstUser Information about the first user in a company
idpUuid string UUID of the identity provider that the user will always use to log in. Contact your AppDirect technical consultant or business consultant to obtain the UUID.
importAppsEnabled boolean The import apps feature is enabled for this company
industry string Company industry sector
links array of Link Resource links
name string Company name
onlyAdminsCanBuy boolean Indicates if only selected roles in company that can make purchases or all roles in company can make purchases
phoneNumber string Company phone number
picture string Company profile picture URL
referral boolean Indicates whether the company has Referral access
reseller boolean Indicates whether the company has Reseller access
salesAgent Link Sales agent link
status CompanyStatus Company status
thirtyDaysPurchaseLimit number Monthly spend limit of marketplace
thirtyDaysPurchaseLimitExempt boolean Indicates if company is exempt from the marketplace default thirty day spend limit
thirtyDaysPurchaseLimitOverrideAmt number Company-level override amount of marketplace default thirty day spend limit
thirtyDaysPurchaseRemainingAmt number Monthly remaining spending amount
uuid string Company ID
vendor boolean Indicates whether the company has Vendor access
website string Company website URL

CreateUserAccountV2

{
  "allowLogin": true,
  "email": "jude.doe@company8578572384.com",
  "externalId": "john.simpson",
  "firstName": "Jude",
  "idpUuid": "135e3a9f-7f86-46a6-a0af-47a7b3a8936d",
  "lastName": "Doe",
  "username": "john.simpson"
}

User information data

Name Type Description
allowLogin boolean Optional. Default is "true".

When set to "true", the user is invited to this marketplace company with login access. The user can purchase and assign products within the company. Products can also be purchased on their behalf, and assigned to them.

When set to "false", the user is added to this marketplace company without login access. Products are purchased and assigned on their behalf, and they access those products directly through the product interface.

Note: If a user already exists in the marketplace and is being added to an additional company, they must be added with the same login access as their other companies. For example, if a user is currently a member of company A with login access then it's not allowed to add them to company B without login access.
email string Email address of the user being added to this company. Used to determine if user already exists in the marketplace and invite the user to the company when allowLogin=true.
externalId string External identifier of the user
firstName string First name of the user being added to this company.
idpUuid string UUID of the identity provider that the user will always use to log in. Contact your AppDirect technical consultant or business consultant to obtain the UUID.
lastName string Last name of the user being added to this company.
userName string User name.
If not provided, use the user's email address

CreateUserCompanyMembershipAccountV2

{
  "roles": [
    "ROLE_USER"
  ],
  "user": {
    "allowLogin": true,
    "email": "jane.lee@company1151609035.com",
    "firstName": "Jane",
    "lastName": "Lee"
  }
}

Represents a user membership to a company since a user can be a member of multiple companies (Companies)

Name Type Description
roles array of string Optional. When not included the company default role will be used.

Roles for this membership. One or more of the following: ROLE_USER (User), ROLE_CHANNEL_PRODUCT_SUPPORT (Product Support), ROLE_SALES_SUPPORT (Sales Support), ROLE_RESELLER_MANAGER (Reseller Manager), ROLE_RESELLER (Reseller), ROLE_CHANNEL_SUPPORT (Customer Support), ROLE_SYS_ADMIN (Company Admin), ROLE_BILLING_ADMIN (Billing Admin), ROLE_DEVELOPER (Developer). For user roles (not associated with membership), see UserAccountV2.
user CreateUserAccountV2 User data

CreditCardType

Enumeration of

CreditCard

{
  "expirationMonth": 12345,
  "expirationYear": 12345,
  "name": "...",
  "number": "...",
  "securityCode": "...",
  "type": "JCB"
}
Name Type Description
expirationMonth number Expiration month. Required field.
expirationYear number Expiration year. Required field.
name string Name as it appears on credit card. Required field.
number string Credit card number. Required field.
securityCode string Credit card security code. Required field.
type CreditCardType Credit card type. Valid types include VISA, MASTERCARD, AMEX, and DISCOVER.

Currency

Supported currencies for the system

Enumeration of

{
  "active": true
}
Name Type Description
active boolean Currency Exchange Rates can be only deactivated. Allowed value: false.

Content

{
  "content": [
    {
      "active": true,
      "authenticationType": "USER_LOGIN",
      "baseCurrency": {
        "href": "...",
        "id": "..."
      },
      "counterCurrency": {
        "href": "...",
        "id": "..."
      },
      "currencyExchangeRateUuid": "...",
      "oauthKey": "...",
      "rate": 0.5,
      "userId": 12345,
      "validFrom": 1507077229000
    }
  ]
}
Name Type Description
content array of CurrencyExchangeRate

CurrencyExchangeRateRequest

{
  "baseCurrency": "USD",
  "counterCurrency": "CAD",
  "rate": 0.5
}
Name Type Description
baseCurrency Currency A supported External Currency
counterCurrency Currency A supported Marketplace Currency
rate number A currency pair is the quotation and pricing structure of the currencies traded in a forex market. A Currency Pair is represented as XXX/YYY where XXX is the Base currency and YYY is the Counter currency.

In AppDirect the Base currency is an external currency and the Counter currency is a supported currency in your marketplace.

When an exchange rate is provided with a Currency Pair, it represents how much of the Counter currency is required to purchase 1 unit of the Base currency.
EUR/USD=1.18; EUR is the Base currency and USD is the counter currency.
1 EUR is equal to 1.18 USD.
In order to buy 1 EUR, the buyer must pay 1.18 USD.

CurrencyExchangeRate

{
  "active": true,
  "authenticationType": "USER_LOGIN",
  "baseCurrency": {
    "href": "...",
    "id": "..."
  },
  "counterCurrency": {
    "href": "...",
    "id": "..."
  },
  "currencyExchangeRateUuid": "...",
  "oauthKey": "...",
  "rate": 0.5,
  "userId": 12345,
  "validFrom": 1507077229000
}
Name Type Description
active boolean Whether or not the exchange rate is active and can be used in a conversion event
authenticationType string The type of authentication used to create or change an exchange rate instance
baseCurrency Currency A supported External Currency
counterCurrency Currency A supported Marketplace Currency
currencyExchangeRateUuid string Unique identifier for the object
oauthKey string The oauth key used to create or change an exchange rate instance
rate number A currency pair is the quotation and pricing structure of the currencies traded in a forex market. A Currency Pair is represented as XXX/YYY where XXX is the Base currency and YYY is the Counter currency.

In AppDirect the Base currency is an external currency and the Counter currency is a supported currency in your marketplace.

When an exchange rate is provided with a Currency Pair, it represents how much of the Counter currency is required to purchase 1 unit of the Base currency.
EUR/USD=1.18; EUR is the Base currency and USD is the counter currency.
1 EUR is equal to 1.18 USD.
In order to buy 1 EUR, the buyer must pay 1.18 USD.
userId number The user id of the user who created or changed an exchange rate instance
validFrom number Date from which the rate is valid

CurrencyExchangeRateList

{
  "content": [
    {
      "active": true,
      "authenticationType": "USER_LOGIN",
      "baseCurrency": {
        "href": "...",
        "id": "..."
      },
      "counterCurrency": {
        "href": "...",
        "id": "..."
      },
      "currencyExchangeRateUuid": "...",
      "oauthKey": "...",
      "rate": 0.5,
      "userId": 12345,
      "validFrom": 1507077229000
    }
  ],
  "links": [
    {
      "href": "...",
      "rel": "..."
    },
    {
      "href": "...",
      "rel": "..."
    }
  ],
  "page": {
    "number": "0",
    "size": "20",
    "totalElements": "1000",
    "totalPages": "50"
  }
}

Resource links

Name Type Description
content array of CurrencyExchangeRate
links array of Link Resource links
page Page Page info

CustomAttribute

{
  "customAttributes": {
    "multivalue_key": [
      "key_value_1",
      "key_value_2"
    ],
    "single_key": [
      "key_value"
    ]
  }
}

Custom attributes as key-value pairs. Values must be a string array

None

CustomAttributeAccountV2

{
  "attributeType": "MULTISELECT",
  "hint": "",
  "label": "Label Names",
  "name": "Company Details",
  "valueKeys": [
    "great option"
  ]
}

Custom attributes

Name Type Description
attributeType AttributeType Attribute type
hint string Localized hint
label string Localized label
name string Name
value string Value
valueKeys array of string Value keys

CustomAttributeAccountV2Request

{
  "name": "Company Details",
  "valueKeys": [
    "great option"
  ]
}

Custom attributes

Name Type Description
name string Name
value string Value
valueKeys array of string Value keys

CustomAttributeLightV2

{
  "attributeKey": "...",
  "attributeType": "MULTISELECT",
  "label": "...",
  "value": "...",
  "valueKeys": [
    "...",
    "..."
  ],
  "valueOptions": [
    {
      "optionKey": "...",
      "optionLabel": "..."
    },
    {
      "optionKey": "...",
      "optionLabel": "..."
    }
  ]
}
Name Type Description
attributeKey string
attributeType AttributeType
label string
value string
valueKeys array of string
valueOptions array of CustomAttributeLocalizedValueOption

CustomAttributeLocalizedValueOption

{
  "optionKey": "...",
  "optionLabel": "..."
}
Name Type Description
optionKey string
optionLabel string

CustomPrice

{
  "costId": "9742e09a-e1b4-4b9e-b1a7-66df3e41cebe",
  "price": 20
}

Custom price definition.

Name Type Description
costId string ID of the cost/pricing item for which to override prices.
definition Definition Definition for flat/unit range prices.
priceType CustomPriceType
pricingStrategy PricingStrategy Pricing strategy

CustomPriceType

Enumeration of

CustomSetting

{
  "description": "Details of the custom settings for the product. The custom setting value can be string or boolean.",
  "type": "object",
  "title": "CustomSetting",
  "properties": {
    "key": {
      "description": "The custom settings ID.",
      "type": "string"
    },
    "label": {
      "description": "The custom settings label.",
      "type": "string"
    },
    "value": {
      "description": "The custom settings value.",
      "type": "object"
    }
  }
}

Details of the custom settings for the product. The custom setting value can be string or boolean.

Name Type Description
key string The custom settings ID.
label string The custom settings label.
value object The custom settings value.

CustomerCompanyAssociation

{
  "type": "object",
  "title": "CustomerCompanyAssociation",
  "required": [
    "id",
    "resellerCompany",
    "customerCompany",
    "createdOn"
  ],
  "properties": {
    "createdOn": {
      "description": "Date on which new customer company association was created, in UNIX Epoch milliseconds",
      "type": "number"
    },
    "customerCompany": {
      "$ref": "#/components/schemas/CompanyAssociation"
    },
    "id": {
      "description": "Customer company ID",
      "type": "string"
    },
    "resellerCompany": {
      "$ref": "#/components/schemas/CompanyAssociation"
    }
  }
}
Name Type Description
createdOn number Date on which new customer company association was created, in UNIX Epoch milliseconds
customerCompany AppResellerCompanyAssociation A minimum version of a company: includes only the company ID and name
id string Customer company ID
resellerCompany AppResellerCompanyAssociation A minimum version of a company: includes only the company ID and name

CustomerCompanyAssociationConflictResponse

{
  "code": "RESELLER_REQUIRED",
  "message": "Acme is not a reseller company",
  "status": 409
}
Name Type Description
code IllegalCompanyAssociationTypes Invalid company association types
message string Code description
status number HTTP status

CustomerCompanyAssociationCreationRequest

{
  "type": "object",
  "title": "CustomerCompanyAssociationCreationRequest",
  "required": [
    "customerCompanyId",
    "resellerCompanyId"
  ],
  "properties": {
    "customerCompanyId": {
      "description": "Customer company ID",
      "type": "string"
    },
    "resellerCompanyId": {
      "description": "Reseller company ID",
      "type": "string"
    }
  }
}
Name Type Description
customerCompanyId string Customer company ID
resellerCompanyId string Reseller company ID

CustomerCompanyAssociationPagedReadResponse

{
  "type": "object",
  "title": "CustomerCompanyAssociationPagedReadResponse",
  "required": [
    "page",
    "content"
  ],
  "properties": {
    "content": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/CustomerCompanyAssociation"
      }
    },
    "page": {
      "allOf": [
        {
          "$ref": "#/components/schemas/PageMetadata"
        },
        {
          "description": "Page information"
        }
      ]
    }
  }
}
Name Type Description
content array of CustomerCompanyAssociation
page PageMetadata Page information

CustomerTagGroup

{
  "customerTags": [
    {
      "id": 12345,
      "name": "...",
      "numTaggedProducts": 12345
    },
    {
      "id": 12345,
      "name": "...",
      "numTaggedProducts": 12345
    }
  ],
  "hideOnNavigation": true,
  "id": 12345,
  "name": "..."
}

Customer tag group

Name Type Description
customerTags array of CustomerTag List of customer tags
hideOnNavigation boolean Flag to indicate if this customer tag group should be visible in the navigation
id number ID
name string The customer tag group name

CustomerTag

{
  "id": 12345,
  "name": "...",
  "numTaggedProducts": 12345
}

Customer tag

Name Type Description
id number ID
name string Name
numTaggedProducts number Number of product tagged by this customer tag

Customer

{
  "email": "customer@example.com",
  "id": 12345,
  "username": "customer@example.com",
  "uuid": "4d6c8f8e-d05a-11e7-abc4-cec278b6b50a"
}
Name Type Description
email string Customer email
id number Customer ID
username string Customer username
uuid string Customer UUID

Definition

{
  "description": "Definition for flat/unit range prices.",
  "type": "object",
  "title": "Definition",
  "properties": {
    "price": {
      "description": "Flat price.",
      "type": "number"
    },
    "priceRanges": {
      "description": "Unit range prices.",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/PriceRange"
      }
    }
  }
}

Definition for flat/unit range prices.

Name Type Description
price number Flat price.
priceRanges array of PriceRange Unit range prices.

DeliveryAddress

{
  "addressLine1": "Main Street 446",
  "city": "Greenbow",
  "countryCode": "US",
  "name": "John Smith",
  "postalCode": "50505",
  "subdivisionCode": "AL"
}

The shipping address

Name Type Description
addressLine1 string The address
city string The city
countryCode string Country code, in ISO-3166 format.
name string The recipient's name
postalCode string The postal code
subdivisionCode string Subdivision code. For example: state code or province code.

DeveloperAccount

{
  "additionalDomains": [
    "abc1.com",
    "abc2.com"
  ],
  "addressLine": "50 Grove St.",
  "addressLine2": "address line 2",
  "addressLine3": "address line 3",
  "city": "Somerville",
  "contactFirstName": "Alex",
  "contactLastName": "Ferguson",
  "country": "postalCode",
  "customAttributes": {
    "customAtrribute1": "1234567890"
  },
  "developerDeveloperIdentifier": "bcde7116-5d20-4628-83a6-59b032a7cd2e",
  "developerIdentifier": "f0b5c422-0400-459f-879c-ac369d924bb9",
  "email": "abcinc@abc.com",
  "name": "ABC Company",
  "phoneNumber": "415-555-5555",
  "postalCode": "12340",
  "primaryDomain": "abc.com",
  "state": "MA"
}
Name Type Description
additionalDomains array of string
addressLine string
addressLine2 string
addressLine3 string
city string
contactFirstName string
contactLastName string
country string
customAttributes object
developerAccountIdentifier string Required. The identifier of the developer's account from the developer's system.
developerIdentifier string Required. The UUID identifier of the developer's company on the marketplace.
email string
name string
origin string
partner string
phoneNumber string
postalCode string
primaryDomain string
state string

DeveloperAccountSyncWS

{
  "developerAccounts": [
    {
      "additionalDomains": [
        "abc1.com",
        "abc2.com"
      ],
      "addressLine": "50 Grove St.",
      "addressLine2": "address line 2",
      "addressLine3": "address line 3",
      "city": "Somerville",
      "contactFirstName": "Alex",
      "contactLastName": "Ferguson",
      "country": "postalCode",
      "customAttributes": {
        "customAtrribute1": "1234567890"
      },
      "developerDeveloperIdentifier": "bcde7116-5d20-4628-83a6-59b032a7cd2e",
      "developerIdentifier": "f0b5c422-0400-459f-879c-ac369d924bb9",
      "email": "abcinc@abc.com",
      "name": "ABC Company",
      "phoneNumber": "415-555-5555",
      "postalCode": "12340",
      "primaryDomain": "abc.com",
      "state": "MA"
    }
  ],
  "operation": "CREATE",
  "type": "DEVELOPER_ACCOUNT"
}
Name Type Description
developerAccounts array of DeveloperAccount
operation string Required. The operation. Options: 'CREATE' and 'EXPIRE'
type string Required. It must have the value 'DEVELOPER_ACCOUNT'

DisconnectionDetails

{
  "accountName": "bob@a13a9998-e025-4751-8fee-72afdc0fe6d5@2cc88871-e942-4910-96e3-0521d7ae52f4",
  "status": "PENDING_REMOVAL"
}

The user account (accountName) to be disconnected from Search, and the account status

Name Type Description
accountName string The user account name (accountName) to disconnect from Search
status string Disconnection status

Discount

{
  "description": "Discount details",
  "type": "object",
  "title": "Discount",
  "required": [
    "type",
    "description"
  ],
  "properties": {
    "applicationId": {
      "description": "Application ID.",
      "type": "number",
      "nullable": true
    },
    "applicationName": {
      "description": "Name of the application to which the discount applies.",
      "type": "string",
      "nullable": true
    },
    "applicationUuid": {
      "description": "Application UUID.",
      "type": "string",
      "nullable": true
    },
    "autoApply": {
      "description": "True if the discount is automatically applied. Default value is true.",
      "type": "boolean"
    },
    "basePartnerSharePercentage": {
      "description": "Base partner's percentage share of the discount.",
      "type": "number",
      "nullable": true
    },
    "billingCycles": {
      "description": "Number of billing cycles for which the discount should be applied.",
      "type": "number",
      "nullable": true
    },
    "code": {
      "description": "Discount code. Must be at least 4 characters, but no longer than 103 characters.",
      "type": "string",
      "nullable": true
    },
    "createdOn": {
      "description": "Creation date of the discount.",
      "type": "number",
      "nullable": true
    },
    "description": {
      "description": "Description of discount. Required field. Must be at least 4 characters, but no longer than 255 characters.",
      "type": "string"
    },
    "editionId": {
      "description": "Edition ID.",
      "type": "number",
      "nullable": true
    },
    "editionUuid": {
      "description": "Edition UUID.",
      "type": "string",
      "nullable": true
    },
    "expirationDate": {
      "description": "Expiration date for the discount. This date must be in the future.",
      "type": "number",
      "nullable": true
    },
    "id": {
      "description": "Discount ID.",
      "type": "number",
      "nullable": true
    },
    "industryId": {
      "description": "Industry ID.",
      "type": "number",
      "nullable": true
    },
    "maxRedemptions": {
      "description": "Maximum number of redemptions available.",
      "type": "number",
      "nullable": true
    },
    "maxUnits": {
      "description": "Maximum number of units for which to apply the discount.",
      "type": "number"
    },
    "minUnits": {
      "description": "Minimum number of units for which to apply the discount.",
      "type": "number"
    },
    "partnerSharePercentage": {
      "description": "Partner's percentage share of the discount.",
      "type": "number",
      "nullable": true
    },
    "paymentPlanId": {
      "description": "Payment plan ID.",
      "type": "number",
      "nullable": true
    },
    "paymentPlanUuid": {
      "description": "Payment plan UUID.",
      "type": "string",
      "nullable": true
    },
    "percentage": {
      "description": "Percentage discount if discount is of PERCENTAGE type. The percentage value cannot exceed two decimal places (for example, 10.15).",
      "type": "number"
    },
    "price": {
      "description": "Amount to discount if discount is of FIXED_PRICE type.",
      "type": "number",
      "nullable": true
    },
    "redemptionRestriction": {
      "allOf": [
        {
          "$ref": "#/components/schemas/RedemptionRestriction"
        },
        {
          "description": "Redemption restriction. May be NONE, ONCE_PER_USER, or ONCE_PER_COMPANY. Default value is NONE."
        }
      ]
    },
    "redemptions": {
      "description": "Number of times the discount has been redeemed.",
      "type": "number"
    },
    "retainable": {
      "description": "True if the discount is retainable. Retainable discounts can be redeemed on orders that are updated after the discount expires. For example, if an order includes a discount that expires on 01 January 2019, and the order is then updated on 02 January 2019, the discount would still be redeemable. The default value is false (discounts are not retained).",
      "type": "boolean"
    },
    "startDate": {
      "description": "Start date for the discount.",
      "type": "number",
      "nullable": true
    },
    "type": {
      "allOf": [
        {
          "$ref": "#/components/schemas/DiscountType"
        },
        {
          "description": "Discount type. Required field. May be PERCENTAGE or FIXED_PRICE."
        }
      ]
    },
    "unit": {
      "allOf": [
        {
          "$ref": "#/components/schemas/PricingUnit"
        },
        {
          "description": "Pricing unit. May be USER, GIGABYTE, MEGABYTE, HOUR, MINUTE, INVOICE, UNIT, PROJECT, PROPERTY, ITEM, WORD,\nEMAIL, CONTACT, CALL, CREDIT, ROOM, HOST, AGENT, OPERATOR, PROVIDER, MANAGER, TESTER, JVM, SERVER, WEB_USE_MINUTE,\nAUDIO_USE_MINUTE, PIECE, EMPLOYEE_PAY_PERIOD, EMPLOYEE_PER_PAY_PERIOD, COMPUTER, NOT_APPLICABLE, ONE_TIME_SETUP,\nDATA_POINTS, TIER1_API_CALLS, TIER2_API_CALLS, ADVISORY_HOURS, OVERAGE_AUDIO_MINUTE, EMPLOYEE, CONNECTION,\nPUSH_USER, THOUSAND_EMAILS_PER_DAY, PUSH_NOTIFICATION_DEVICES, API_CALLS, SMS_TEXT_MESSAGE, CONTACTS_1000, CONTRACT_FEE,\nTRANSFER_FEE, REACTIVATION_FEE, RECIPIENT, ADDITIONAL_1000_CONTACTS_BLOCK, SCHEDULE_PLAN, EMAILS_1000, EMAILS_2500,\nMOBILE_DEVICE, PAYSLIP, PAYSLIP_CORRECTION, STORE, WEBSITE, EPAPER, PAGE, POSTAGE_AND_PRINT, INTERNATIONAL_POSTAGE_AND_PRINT,\nTIER1_TOP_LEVEL_DOMAIN, TIER2_TOP_LEVEL_DOMAIN, DEDICATED_IP, ENABLELCM, MAXCOMPONENTS, DATA_MANAGEMENT_USER, SPECIALIST_USER,\nPROFESSIONAL_USER, MATERIALITY_MATRIX, STAKEHOLDER_MANAGEMENT, SCORECARD, STANDARD_MAPPING, DONATION_MANAGEMENT, DOCUMENT,\nPACKAGE_SMALL, PACKAGE_LARGE, MEMBER, ATTENDEE, MAILING, RESPONSE, EXTERNAL_INVOICE_FEE, CLIENT_TEST, IMAGE_TRANSFORMATION,\nTOTAL_IMAGE, LICENSE, MAILBOX, FREE_40_INCH_HDTV_PC, FREE_46_INCH_HDTV_PC, FREE_46_INCH_HDTV_PC_MOUNTING, EMPLOYEE_PER_WEEK,\nREGISTER, END_USER, CORE, DEVICE, PORT, MEASURER, PUBLISHED_MEASUREMENT, NODE, SERVER_RULE, VPN_LP, PROXY_LP,\nDESKTOP_CONNECT_LP, CAMERA, MAIN_SOUND_ZONE, SUB_SOUND_ZONE, POST, REPORT, BOX, SESSION, DISPLAY, TRUCKROLL, TRANSACTION_FEE,\nSENDING_API_CALL, LOOKUP_API_CALL, ANALYTICS_API_CALL, MIGRATION_INSTANCE, NFON_SETUP_PER_PHONE_EXTENSION,\nNFON_SETUP_PER_PHONE_EXTENSION_PLUS, NFON_SETUP_PER_EFAX_EXTENSION, NFON_PHONE_EXTENSION, NFON_PHONE_EXTENSION_PLUS,\nNFON_EFAX_EXTENSION, NFON_CALL_CENTER_MONITORING, NFON_NMEETING, NFON_MOBILE_NFON_DEVICE, NFON_ISOFTPHONE_MAC,\nNFON_NSOFTPHONE_STANDARD_WINDOWS, NFON_NSOFTPHONE_PREMIUM_WINDOWS, NFON_NCTI_STANDARD_WINDOWS, NFON_NCTI_STANDARD_CRM_WINDOWS,\nNFON_NCTI_STANDARD_MAC, NFON_NSOFTPHONE_STANDARD_WINDOWS_OR_MOBILE, WESUSTAIN_PERFORMANCE, WESUSTAIN_STAKEHOLDER_REPUTATION,\nWESUSTAIN_WEAPP, FAX, FAX_LINE, ROOM_LINE, DEPARTMENT_LINE, INTERNATIONAL_LICENSE, INTERNATIONAL_DEPARTMENT_LINE,\nINTERNATIONAL_ROOM_LINE, INTERNATIONAL_LINE, CALLING_CREDIT, LINE, TOLLFREE_ROOM_LINE, TOLLFREE_DEPARTMENT_LINE,\nTAXES_AND_FEES, LEAD, OPPORTUNITY, CAMPAIGN, CASE, CUSTOMER, TIER1_STANDARD_LINE, TIER1_ROOM_LINE, TIER1_TOLLFREE_ROOM_LINE,\nTIER1_TOLLFREE_DEPARTMENT_LINE, TIER1_FAX_LINE, TIER1_DEPARTMENT_LINE, TIER2_STANDARD_LINE, TIER2_ROOM_LINE,\nTIER2_DEPARTMENT_LINE, TIER3_STANDARD_LINE, TIER3_ROOM_LINE, TIER3_DEPARTMENT_LINE, TIER4_STANDARD_LINE, TIER4_ROOM_LINE,\nTIER4_DEPARTMENT_LINE, CLUSTER, NODE_4VCPU, FIVE_HUNDRED_GB_SSD, TWELVE_TB_NETWORK_IO, JBOSS_EAP, JBOSS_FUSE, JBOSS_A_MQ,\nJBOSS_BRMS, JBOSS_BPM_SUITE, JBOSS_DATA_GRID, JBOSS_DATA_VIRT, USER_LICENSE, ADDITIONAL_NUMBER_LICENSE, ROOM_PHONE_LICENSE,\nUBERCONFERENCE_PRO_LICENSE, UBERCONFERENCE_PRO_LICENSE_UNBUNDLED, INSTANCE, INDOOR_CAMERA, OUTDOOR_CAMERA, VINGATE_LP_LICENCE,\nADMINISTRATOR, MOBILE_USER, T1, PHONE, AUTO_ATTENDANT, HUNT_GROUP, VOICEMAIL_BOX, TOLL_FREE_NUMBER,\nINBOUND_LONG_DISTANCE_MINUTE, OUTBOUND_LONG_DISTANCE_MINUTE, INBOUND_OUTBOUND_LONG_DISTANCE_MINUTE, SET_TOP_BOX, MODEM,\nACCESS_POINT, CALLING_FEATURE, IAD_DEVICE, ANALOG_LINE, PRI, SBC_DEVICE, ROUTER, INTERNATIONAL_MINUTE, PHONE_LINE,\nDYNAMIC_IP_ADDRESS, STATIC_IP_ADDRESS, GATEWAY, REMOTE_CONTROL, TIER1_STANDARD_SEAT, TIER2_STANDARD_SEAT, TIER3_STANDARD_SEAT,\nTIER4_STANDARD_SEAT, TIER1_TOLL_FREE_SEAT, MILLION_MESSAGES, MESSAGE, WEEKLY, or PHONE_NUMBER."
        }
      ]
    },
    "uuid": {
      "description": "Discount UUID.",
      "type": "string",
      "nullable": true
    },
    "vendorSharePercentage": {
      "description": "Vendor's percentage share of the discount.",
      "type": "number",
      "nullable": true
    }
  }
}

Discount details

Name Type Description
applicationId number Application ID.
applicationName string Name of the application to which the discount applies.
applicationUuid string Application UUID.
autoApply boolean True if the discount is automatically applied. Default value is true.
basePartnerSharePercentage number Base partner's percentage share of the discount.
billingCycles number Number of billing cycles for which the discount should be applied.
code string Discount code. Must be at least 4 characters, but no longer than 103 characters.
createdOn number Creation date of the discount.
description string Description of discount. Required field. Must be at least 4 characters, but no longer than 255 characters.
editionId number Edition ID.
editionUuid string Edition UUID.
expirationDate number Expiration date for the discount. This date must be in the future.
id number Discount ID.
industryId number Industry ID.
maxRedemptions number Maximum number of redemptions available.
maxUnits number Maximum number of units for which to apply the discount.
minUnits number Minimum number of units for which to apply the discount.
partnerSharePercentage number Partner's percentage share of the discount.
paymentPlanId number Payment plan ID.
paymentPlanUuid string Payment plan UUID.
percentage number Percentage discount if discount is of PERCENTAGE type. The percentage value cannot exceed two decimal places (for example, 10.15).
price number Amount to discount if discount is of FIXED_PRICE type.
redemptionRestriction RedemptionRestriction Redemption restriction. May be NONE, ONCE_PER_USER, or ONCE_PER_COMPANY. Default value is NONE.
redemptions number Number of times the discount has been redeemed.
retainable boolean True if the discount is retainable. Retainable discounts can be redeemed on orders that are updated after the discount expires. For example, if an order includes a discount that expires on 01 January 2019, and the order is then updated on 02 January 2019, the discount would still be redeemable. The default value is false (discounts are not retained).
startDate number Start date for the discount.
type DiscountType Discount type. Required field. May be PERCENTAGE or FIXED_PRICE.
unit PricingUnit Pricing unit. May be USER, GIGABYTE, MEGABYTE, HOUR, MINUTE, INVOICE, UNIT, PROJECT, PROPERTY, ITEM, WORD,
EMAIL, CONTACT, CALL, CREDIT, ROOM, HOST, AGENT, OPERATOR, PROVIDER, MANAGER, TESTER, JVM, SERVER, WEB_USE_MINUTE,
AUDIO_USE_MINUTE, PIECE, EMPLOYEE_PAY_PERIOD, EMPLOYEE_PER_PAY_PERIOD, COMPUTER, NOT_APPLICABLE, ONE_TIME_SETUP,
DATA_POINTS, TIER1_API_CALLS, TIER2_API_CALLS, ADVISORY_HOURS, OVERAGE_AUDIO_MINUTE, EMPLOYEE, CONNECTION,
PUSH_USER, THOUSAND_EMAILS_PER_DAY, PUSH_NOTIFICATION_DEVICES, API_CALLS, SMS_TEXT_MESSAGE, CONTACTS_1000, CONTRACT_FEE,
TRANSFER_FEE, REACTIVATION_FEE, RECIPIENT, ADDITIONAL_1000_CONTACTS_BLOCK, SCHEDULE_PLAN, EMAILS_1000, EMAILS_2500,
MOBILE_DEVICE, PAYSLIP, PAYSLIP_CORRECTION, STORE, WEBSITE, EPAPER, PAGE, POSTAGE_AND_PRINT, INTERNATIONAL_POSTAGE_AND_PRINT,
TIER1_TOP_LEVEL_DOMAIN, TIER2_TOP_LEVEL_DOMAIN, DEDICATED_IP, ENABLELCM, MAXCOMPONENTS, DATA_MANAGEMENT_USER, SPECIALIST_USER,
PROFESSIONAL_USER, MATERIALITY_MATRIX, STAKEHOLDER_MANAGEMENT, SCORECARD, STANDARD_MAPPING, DONATION_MANAGEMENT, DOCUMENT,
PACKAGE_SMALL, PACKAGE_LARGE, MEMBER, ATTENDEE, MAILING, RESPONSE, EXTERNAL_INVOICE_FEE, CLIENT_TEST, IMAGE_TRANSFORMATION,
TOTAL_IMAGE, LICENSE, MAILBOX, FREE_40_INCH_HDTV_PC, FREE_46_INCH_HDTV_PC, FREE_46_INCH_HDTV_PC_MOUNTING, EMPLOYEE_PER_WEEK,
REGISTER, END_USER, CORE, DEVICE, PORT, MEASURER, PUBLISHED_MEASUREMENT, NODE, SERVER_RULE, VPN_LP, PROXY_LP,
DESKTOP_CONNECT_LP, CAMERA, MAIN_SOUND_ZONE, SUB_SOUND_ZONE, POST, REPORT, BOX, SESSION, DISPLAY, TRUCKROLL, TRANSACTION_FEE,
SENDING_API_CALL, LOOKUP_API_CALL, ANALYTICS_API_CALL, MIGRATION_INSTANCE, NFON_SETUP_PER_PHONE_EXTENSION,
NFON_SETUP_PER_PHONE_EXTENSION_PLUS, NFON_SETUP_PER_EFAX_EXTENSION, NFON_PHONE_EXTENSION, NFON_PHONE_EXTENSION_PLUS,
NFON_EFAX_EXTENSION, NFON_CALL_CENTER_MONITORING, NFON_NMEETING, NFON_MOBILE_NFON_DEVICE, NFON_ISOFTPHONE_MAC,
NFON_NSOFTPHONE_STANDARD_WINDOWS, NFON_NSOFTPHONE_PREMIUM_WINDOWS, NFON_NCTI_STANDARD_WINDOWS, NFON_NCTI_STANDARD_CRM_WINDOWS,
NFON_NCTI_STANDARD_MAC, NFON_NSOFTPHONE_STANDARD_WINDOWS_OR_MOBILE, WESUSTAIN_PERFORMANCE, WESUSTAIN_STAKEHOLDER_REPUTATION,
WESUSTAIN_WEAPP, FAX, FAX_LINE, ROOM_LINE, DEPARTMENT_LINE, INTERNATIONAL_LICENSE, INTERNATIONAL_DEPARTMENT_LINE,
INTERNATIONAL_ROOM_LINE, INTERNATIONAL_LINE, CALLING_CREDIT, LINE, TOLLFREE_ROOM_LINE, TOLLFREE_DEPARTMENT_LINE,
TAXES_AND_FEES, LEAD, OPPORTUNITY, CAMPAIGN, CASE, CUSTOMER, TIER1_STANDARD_LINE, TIER1_ROOM_LINE, TIER1_TOLLFREE_ROOM_LINE,
TIER1_TOLLFREE_DEPARTMENT_LINE, TIER1_FAX_LINE, TIER1_DEPARTMENT_LINE, TIER2_STANDARD_LINE, TIER2_ROOM_LINE,
TIER2_DEPARTMENT_LINE, TIER3_STANDARD_LINE, TIER3_ROOM_LINE, TIER3_DEPARTMENT_LINE, TIER4_STANDARD_LINE, TIER4_ROOM_LINE,
TIER4_DEPARTMENT_LINE, CLUSTER, NODE_4VCPU, FIVE_HUNDRED_GB_SSD, TWELVE_TB_NETWORK_IO, JBOSS_EAP, JBOSS_FUSE, JBOSS_A_MQ,
JBOSS_BRMS, JBOSS_BPM_SUITE, JBOSS_DATA_GRID, JBOSS_DATA_VIRT, USER_LICENSE, ADDITIONAL_NUMBER_LICENSE, ROOM_PHONE_LICENSE,
UBERCONFERENCE_PRO_LICENSE, UBERCONFERENCE_PRO_LICENSE_UNBUNDLED, INSTANCE, INDOOR_CAMERA, OUTDOOR_CAMERA, VINGATE_LP_LICENCE,
ADMINISTRATOR, MOBILE_USER, T1, PHONE, AUTO_ATTENDANT, HUNT_GROUP, VOICEMAIL_BOX, TOLL_FREE_NUMBER,
INBOUND_LONG_DISTANCE_MINUTE, OUTBOUND_LONG_DISTANCE_MINUTE, INBOUND_OUTBOUND_LONG_DISTANCE_MINUTE, SET_TOP_BOX, MODEM,
ACCESS_POINT, CALLING_FEATURE, IAD_DEVICE, ANALOG_LINE, PRI, SBC_DEVICE, ROUTER, INTERNATIONAL_MINUTE, PHONE_LINE,
DYNAMIC_IP_ADDRESS, STATIC_IP_ADDRESS, GATEWAY, REMOTE_CONTROL, TIER1_STANDARD_SEAT, TIER2_STANDARD_SEAT, TIER3_STANDARD_SEAT,
TIER4_STANDARD_SEAT, TIER1_TOLL_FREE_SEAT, MILLION_MESSAGES, MESSAGE, WEEKLY, or PHONE_NUMBER.
uuid string Discount UUID.
vendorSharePercentage number Vendor's percentage share of the discount.

DiscountDetail

{
  "discountedStartingPrice": "...",
  "highestFixedDiscount": {
    "AUD": 12345,
    "BRL": 12345,
    "CAD": 12345,
    "CHF": 12345,
    "CNY": 12345,
    "DKK": 12345,
    "EUR": 12345,
    "GBP": 12345,
    "GTQ": 12345,
    "INR": 12345,
    "JPY": 12345,
    "KRW": 12345,
    "MXN": 12345,
    "MYR": 12345,
    "NOK": 12345,
    "NZD": 12345,
    "PHP": 12345,
    "SAR": 12345,
    "SEK": 12345,
    "SGD": 12345,
    "USD": 12345,
    "ZAR": 12345
  },
  "highestPercentageDiscount": 12345,
  "startingPricePercentageDiscount": 12345
}

Discount detail

Name Type Description
discountedStartingPrice string Starting price
highestFixedDiscount Price Highest fixed discount
highestPercentageDiscount number Highest percentage discount
startingPricePercentageDiscount number Starting price percentage discount

DiscountRequest

{
  "discountCode": "10%OFF",
  "itemIds": [
    "166e0ce6-4309-4a16-ac9b-61bea7ce1cbc",
    "fa776d2e-cda5-4256-9a27-125a0fe3f448"
  ]
}

Details about the discount to be applied to the product

Name Type Description
discountCode string The discount code can be a combination of letters, numbers, and special characters
itemIds array of string The opportunity's item IDs to which the discount is applied or removed

DiscountType

{
  "type": "string",
  "title": "DiscountType",
  "properties": {
    "DiscountType": {
      "type": "string",
      "enum": [
        "PERCENTAGE",
        "FIXED_PRICE"
      ]
    }
  }
}
Name Type Description
DiscountType string

Display

Display enumeration. Hidden: Hides the field from the UI. Expanded: Displays the field in the UI.

Enumeration of

DomainProvider

{
  "id": 529,
  "imageLogoLarge": "app_resources/529/thumbs_64/img1764112210464997003.png",
  "name": "GoDaddy Domains",
  "providerCompany": "GoDaddy",
  "uuid": "e4f8fb0a-8011-44fa-bceb-98abfb415d36"
}
Name Type Description
id number Application ID
imageLogoLarge string Path to a large image
name string Application name
providerCompany string Provider company name
uuid string Application unique identifier

DomainSource

Enumeration of

DomainStatus

Enumeration of

Duration

{
  "length": 12345,
  "unit": "..."
}

Contract duration

Name Type Description
length number Length
unit string Duration unit

DynamicSegment

{
  "filters": [
    [
      {
        "conditions": [
          {
            "operator": "matches",
            "parameter": "company.state",
            "values": [
              "Quebec"
            ]
          },
          {
            "operator": "matches",
            "parameter": "company.city",
            "values": [
              "Montreal"
            ]
          }
        ]
      },
      {
        "conditions": [
          {
            "operator": "matches",
            "parameter": "company.state",
            "values": [
              "Quebec"
            ]
          },
          {
            "operator": "matches",
            "parameter": "company.city",
            "values": [
              "Montreal"
            ]
          }
        ]
      }
    ]
  ],
  "id": "04f8d043-10f1-4b89-8c0e-0780e5a62299",
  "name": "iOS users",
  "partner": "APPDIRECT",
  "type": "DYNAMIC"
}

Dynamic segments contain users selected automatically based on filter values, as opposed to manual segments, in which Marketplace Managers select companies manually.

Name Type Description
code string Segment codes are unique codes that you can use for B2B integration by using the API to automatically associate companies with segments. Leave this field blank if a segment code is not required. Note that if you modify the code after you create it, your B2B integration might be affected.
filters array of Filters Dynamic filter
id string Segment ID
name string Segment name
partner string Partner name
type string Segment type

DynamicSegmentRequest

{
  "code": "XXYU",
  "filters": [
    [
      {
        "conditions": [
          {
            "operator": "matches",
            "parameter": "company.state",
            "values": [
              "Quebec"
            ]
          },
          {
            "operator": "matches",
            "parameter": "company.city",
            "values": [
              "Montreal"
            ]
          }
        ]
      },
      {
        "conditions": [
          {
            "operator": "matches",
            "parameter": "company.state",
            "values": [
              "Quebec"
            ]
          },
          {
            "operator": "matches",
            "parameter": "company.city",
            "values": [
              "Montreal"
            ]
          }
        ]
      }
    ]
  ],
  "name": "Canada"
}

Data required to create a dynamic segment

Name Type Description
code string Segment code
filters array of Filters Dynamic filter
name string Segment name

EditionBullet

{
  "content": "...",
  "tooltip": "..."
}

Bullet point to display for an edition

Name Type Description
content string Content
tooltip string Tooltip

EditionCustomization

{
  "type": "...",
  "value": "..."
}

Edition customization

Name Type Description
type string Type
value string Value

EditionPricingItemSku

{
  "editionName": "Free Trial Edition",
  "paymentPlanId": 123,
  "skus": [
    {
      "fid1": "yyyy-yyyyyy-yyyy",
      "price": "$0.03",
      "pricingItemId": 20423,
      "sku": "A1B2C3"
    },
    {
      "fid1": "yyyy-yyyyyy-yyyy",
      "price": "$0.17",
      "pricingItemId": 20424,
      "sku": "321CBA"
    }
  ]
}

Payment plans for an edition and related SKUs.

Name Type Description
editionName string Name of the edition.
paymentPlanId integer Unique ID of the payment plan.
skus array of Sku List of information about SKUs associated with a payment plan for the edition.

Edition

{
  "bullet": [
    {
      "content": "...",
      "tooltip": "..."
    },
    {
      "content": "...",
      "tooltip": "..."
    }
  ],
  "bundleOnly": true,
  "code": "...",
  "customerContractRestricted": true,
  "customization": [
    {
      "type": "...",
      "value": "..."
    },
    {
      "type": "...",
      "value": "..."
    }
  ],
  "defaultFreeTrial": true,
  "expiredTrialGracePeriod": 12345,
  "freeTrialDuration": 12345,
  "freeTrialType": "...",
  "invisible": true,
  "item": [
    {
      "amount": 12345,
      "unit": "...",
      "unlimited": true
    },
    {
      "amount": 12345,
      "unit": "...",
      "unlimited": true
    }
  ],
  "lastModified": 12345,
  "leadGen": true,
  "name": "...",
  "plan": [
    {
      "allowCustomUsage": true,
      "contract": {
        "alignWithParentCycleStartDate": true,
        "autoExtensionPricingId": 12345,
        "blockContractDowngrades": true,
        "blockContractUpgrades": true,
        "blockSwitchToShorterContract": true,
        "cancellationPeriodLimit": 12345,
        "endOfContractGracePeriod": 12345,
        "gracePeriod": {},
        "minimumServiceLength": 12345,
        "terminationFee": {}
      },
      "cost": [
        {
          "amount": {},
          "blockContractDecrease": true,
          "blockContractIncrease": true,
          "blockOriginalContractDecrease": true,
          "editionPricingItemId": 12345,
          "id": 12345,
          "increment": 12345,
          "maxUnits": 12345,
          "meteredUsage": true,
          "minUnits": 12345,
          "pricePerIncrement": true,
          "pricingStrategy": "...",
          "unit": "...",
          "unitDependency": "..."
        },
        {
          "amount": {},
          "blockContractDecrease": true,
          "blockContractIncrease": true,
          "blockOriginalContractDecrease": true,
          "editionPricingItemId": 12345,
          "id": 12345,
          "increment": 12345,
          "maxUnits": 12345,
          "meteredUsage": true,
          "minUnits": 12345,
          "pricePerIncrement": true,
          "pricingStrategy": "...",
          "unit": "...",
          "unitDependency": "..."
        }
      ],
      "discount": {
        "amount": {},
        "availableRedemptions": 12345,
        "description": "...",
        "expirationDate": 12345,
        "numOfBillingCycles": 12345,
        "percentage": 12345,
        "pricingUnit": "INTERNATIONAL_ROOM_LINE",
        "startDate": 12345
      },
      "frequency": "...",
      "href": "...",
      "id": 12345,
      "isPrimaryPrice": true,
      "keepBillDateOnUsageChange": true,
      "separatePrepaid": true,
      "tld": "...",
      "uuid": "..."
    },
    {
      "allowCustomUsage": true,
      "contract": {
        "alignWithParentCycleStartDate": true,
        "autoExtensionPricingId": 12345,
        "blockContractDowngrades": true,
        "blockContractUpgrades": true,
        "blockSwitchToShorterContract": true,
        "cancellationPeriodLimit": 12345,
        "endOfContractGracePeriod": 12345,
        "gracePeriod": {},
        "minimumServiceLength": 12345,
        "terminationFee": {}
      },
      "cost": [
        {
          "amount": {},
          "blockContractDecrease": true,
          "blockContractIncrease": true,
          "blockOriginalContractDecrease": true,
          "editionPricingItemId": 12345,
          "id": 12345,
          "increment": 12345,
          "maxUnits": 12345,
          "meteredUsage": true,
          "minUnits": 12345,
          "pricePerIncrement": true,
          "pricingStrategy": "...",
          "unit": "...",
          "unitDependency": "..."
        },
        {
          "amount": {},
          "blockContractDecrease": true,
          "blockContractIncrease": true,
          "blockOriginalContractDecrease": true,
          "editionPricingItemId": 12345,
          "id": 12345,
          "increment": 12345,
          "maxUnits": 12345,
          "meteredUsage": true,
          "minUnits": 12345,
          "pricePerIncrement": true,
          "pricingStrategy": "...",
          "unit": "...",
          "unitDependency": "..."
        }
      ],
      "discount": {
        "amount": {},
        "availableRedemptions": 12345,
        "description": "...",
        "expirationDate": 12345,
        "numOfBillingCycles": 12345,
        "percentage": 12345,
        "pricingUnit": "CUSTOMER",
        "startDate": 12345
      },
      "frequency": "...",
      "href": "...",
      "id": 12345,
      "isPrimaryPrice": true,
      "keepBillDateOnUsageChange": true,
      "separatePrepaid": true,
      "tld": "...",
      "uuid": "..."
    }
  ],
  "primary": true,
  "rank": 12345,
  "restricted": true,
  "revenueType": "...",
  "targetAudience": "...",
  "trial": {
    "length": 12345,
    "unit": "..."
  },
  "uuid": "..."
}

Product edition

Name Type Description
bullet array of EditionBullet List of bullet points
bundleOnly boolean Is a bundle edition only
code string Code
customerContractRestricted boolean Is customer contract restricted
customization array of EditionCustomization List of customization
defaultFreeTrial boolean Is default free trial
expiredTrialGracePeriod number Expired trial grace period
freeTrialDuration number Free trial duration
freeTrialType string Free trial type
id number ID
invisible boolean Is invisible
item array of IncludedItem List of included items
lastModified number Last modified date
leadGen boolean Is collecting a lead instead of purchase
name string Name
plan array of PaymentPlan List of payment plans
primary boolean Is the primary edition
rank number Rank used in the UI for ordering versus the other edition
restricted boolean Is restricted
revenueType string Revenue model type: FREE, ONE_TIME, RECURRING, TIERED
targetAudience string Target audience
trial Duration Trial duration
uuid string Unique identifier

EducationAccountV2

{
  "current": false,
  "degree": "bachelor's",
  "endYear": 2010,
  "field": "Computer Science",
  "school": "MIT",
  "startYear": 2007
}

User profile's education information

Name Type Description
current boolean If currently still at this school
degree string Degree
endYear number End year
field string Field of studies
school string School
startYear number Start year

EmailAddressAccountV2

{
  "address": "alternate@company.com",
  "type": "WORK",
  "verified": false
}

Email address information

Name Type Description
address string Email address
type EmailAddressType Email address type - work or personal
verified boolean Indicates whether the email address is verified

EmailAddressType

Email address type

Enumeration of

Error

{
  "code": "EXTERNAL_ERROR",
  "message": "Execution of an external dependency failed with message: User with email random@appdirect.com was not found in the linked account."
}

Returned error after failed API call.

Name Type Description
code string Error code
message string Error message

ErrorPaymentDetail

{
  "code": "INVALID_REQUEST",
  "message": "Missing parameter"
}

A detail element of an ErrorResponse

Name Type Description
code string The error code, in screaming snake case, for example PAYLOAD_VALIDATION_ERROR
field string The element in the request payload that caused the error
message string Descriptive error message for debugging
moreInfo string Link to documentation for more information

ErrorResponse

{
  "code": "VALIDATION_ERROR",
  "message": "Missing required parameters",
  "status": 400
}

Error details

Name Type Description
code string The error code, in screaming snake case, for example VALIDATION_ERROR
details array of ErrorPaymentDetail
message string Descriptive error message for debugging
moreInfo string Link to documentation for more information
status integer Original HTTP error code, which should be consistent with the response HTTP code

ErrorWS

{
  "code": "...",
  "message": "..."
}
Name Type Description
code string
message string

EventMetadata

{
  "id": "6ed0279c-35ed-4c7e-928e-25e46c080431",
  "timestamp": "2020-06-11T15:23:45Z",
  "type": "ResourceUpdated"
}

Metadata for Search content

Name Type Description
id string Event ID. Required.
timestamp string Event timestamp. Required.
type ContentEventType Event type. Required.

EventProductWS

{
  "links": [
    {
      "href": "...",
      "rel": "..."
    },
    {
      "href": "...",
      "rel": "..."
    }
  ],
  "name": "...",
  "productId": 12345
}

Production information being used in an event

Name Type Description
links array of Link Resource links
name string Product name
productId number Product id

EventType

Enumeration of

Event

{
  "asynchronous": true,
  "company": {
    "companyId": "...",
    "links": [
      {
        "href": "...",
        "rel": "..."
      },
      {
        "href": "...",
        "rel": "..."
      }
    ],
    "name": "..."
  },
  "consumed": true,
  "creationDate": 12345,
  "error": {
    "code": "...",
    "message": "..."
  },
  "manuallyResolved": true,
  "orderId": 12345,
  "product": {
    "links": [
      {
        "href": "...",
        "rel": "..."
      },
      {
        "href": "...",
        "rel": "..."
      }
    ],
    "name": "...",
    "productId": 12345
  },
  "subscriptionId": 12345,
  "successful": true,
  "type": "SUBSCRIPTION_CHANGE",
  "uuid": "..."
}

A subscription related integration event

Name Type Description
asynchronous boolean Whether the event is asynchronous or not
company CompanyWS Company information
consumed boolean Whether the event has been consumed by vendor or not
creationDate number Date when the event was created
error ErrorWS Error message in case the event fails
manuallyResolved boolean Whether the event has been manually resolved
orderId number Order id
product EventProductWS Production information
subscriptionId number Subscription id
successful boolean If the event is consumed, then whether it's successful or not
type EventType Event type
uuid string Unique event identifier

ExecuteActionRequest

{
  "action": "REQUEST_CUSTOMER_APPROVAL"
}
Name Type Description
action string Action name to be executed to a quote version

ExecuteActionResponse

{
  "availableActions": [
    "PRINT_PDF",
    "EDIT_NAME",
    "SHARE_LINK",
    "REVOKE"
  ],
  "createdBy": {
    "company": {
      "id": "d9a6d470-c69a-4403-9355-5953ddcb9efb"
    },
    "id": "d17fee11-c6ce-4f9f-8fb6-9bc55d583699"
  },
  "id": "757d0f09-385c-41df-9781-d6df98584953",
  "name": "API quote version",
  "status": "PENDING"
}

The body of an execute action response

Name Type Description
quote QuoteVersion The body of a quote version

FailedUsageInfo

{
  "description": "Information about a metered usage event for which processing failed and error details",
  "type": "object",
  "title": "FailedUsageInfo",
  "properties": {
    "errorCode": {
      "description": "Code representing the type of error that caused metered usage processing failure. For example: NOT_FOUND, BAD_DATA",
      "type": "string"
    },
    "errorDescription": {
      "description": "Description of the error that caused metered usage processing failure",
      "type": "string"
    }
  }
}

Information about a metered usage event for which processing failed and error details

Name Type Description
errorCode string Code representing the type of error that caused metered usage processing failure. For example: NOT_FOUND, BAD_DATA
errorDescription string Description of the error that caused metered usage processing failure

FeatureCharacteristic

{
  "abovePicture": true,
  "highlight": [
    {
      "displayCheck": true,
      "highlight": "...",
      "id": 12345
    },
    {
      "displayCheck": true,
      "highlight": "...",
      "id": 12345
    }
  ],
  "id": 12345,
  "position": 12345,
  "title": "..."
}

Product feature characteristic

Name Type Description
abovePicture boolean Is characteristic above feature
highlight array of CharacteristicHighlight List of feature highlights
id number
position number Order how the characteristic appear versus the others
title string Describe a characteristic of a feature

Feature

{
  "bullet": [
    {
      "abovePicture": true,
      "highlight": [
        {
          "displayCheck": true,
          "highlight": "...",
          "id": 12345
        },
        {
          "displayCheck": true,
          "highlight": "...",
          "id": 12345
        }
      ],
      "id": 12345,
      "position": 12345,
      "title": "..."
    },
    {
      "abovePicture": true,
      "highlight": [
        {
          "displayCheck": true,
          "highlight": "...",
          "id": 12345
        },
        {
          "displayCheck": true,
          "highlight": "...",
          "id": 12345
        }
      ],
      "id": 12345,
      "position": 12345,
      "title": "..."
    }
  ],
  "description": "...",
  "header": "...",
  "hideOnOverview": true,
  "id": 12345,
  "imageUrl": "...",
  "position": 12345,
  "slogan": "..."
}

Product Feature

Name Type Description
bullet array of FeatureCharacteristic Characteristics
description string Appears under the feature slogan in the feature page and provides a deeper description
header string Serves as the title for your feature and as a navigation and search item.
The title should describe the feature completely without any supporting text, ie "Invoice Creation".
hideOnOverview boolean Allows to either include or exclude features in the "Features & Benefits" section of the overview page.
id number ID
imageUrl string Image URL
position number Allows you to order your features in the left navigation bar
slogan string

FeaturedCustomer

{
  "id": 12345,
  "logoUrl": "...",
  "name": "..."
}

Featured customer of a product

Name Type Description
id number ID
logoUrl string Logo URL
name string Name

FeaturedMedium

{
  "link": "...",
  "linkDescription": "...",
  "source": {
    "id": 12345,
    "logoUrl": "...",
    "name": "..."
  }
}

Media source information in which a product have been featured

Name Type Description
link string Link
linkDescription string Description of the media source
source Source Media source

FeeType

Contract termination fee type

Enumeration of

Field

{
  "fieldType": "TEXT",
  "inputCode": "SubDomain",
  "inputTitle": "Your primary domain name",
  "options": {
    "placeholder": "movies.entertainment.com",
    "suffix": {
      "inputCode": "",
      "text": ".thedomain.com"
    }
  },
  "subTitle": "",
  "tooltip": "Your subdomain and domain names. For example: When subdomain=movies, and domain=.entertainment.com, the subdomain value is: movies.entertainment.com",
  "validations": {
    "expression": "^([^\\W|http(s?)://][a-zA-Z]+)(\\.[a-zA-Z]+)*",
    "maxLength": "255",
    "minLength": "1",
    "readonly": false,
    "required": true
  },
  "value": ""
}
Name Type Description
fieldType string The type of input field associated with the form field. For example: DOMAIN (has 'http'), STRING, EMAIL (has '@').
inputCode string An identifier for the field. For example: domain, username, country, state. Can be used to reference this field and the value in it (for example, see Suffix option).
inputTitle string Descriptive title for the field
options Options Field options
subTitle string Descriptive subtitle for the field
tooltip string Descriptive tooltip for the field
validations RequiredFieldValidationDefinitions Required field definitions. Used to validate field values.
value string The field value

Filter

{
  "conditions": [
    {
      "operator": "matches",
      "parameter": "company.state",
      "values": [
        "Quebec"
      ]
    },
    {
      "operator": "matches",
      "parameter": "company.city",
      "values": [
        "Montreal"
      ]
    }
  ],
  "operator": "ALL_OF"
}

Filter

Name Type Description
conditions array of FilterExpression
operator string Filter operator

FilterExpression

{
  "operator": "matches",
  "parameter": "company.state",
  "values": [
    "Quebec"
  ]
}

Filter expression

Name Type Description
operator string Filter operator
parameter string Filter parameter field
values array of string Values for the parameter field

FilterParameter

{
  "fields": [
    {
      "dataType": "text",
      "key": "company.state",
      "label": "state"
    }
  ],
  "key": "company",
  "label": "company"
}

Filter parameter

Name Type Description
fields array of FilterParameterField List of fields for the filter parameter
key string Unique identifier for the filter parameter
label string Label for the filter parameter

FilterParameterField

{
  "dataType": "text",
  "key": "company.state",
  "label": "state"
}

Filter parameter fields

Name Type Description
dataType string Data type of the field
key string Unique identifier for the filter field
label string Label for the filter field
valueLabels object Labels for the values
values array of string List of values for the filter field

Filters

[
  {
    "conditions": [
      {
        "operator": "matches",
        "parameter": "company.state",
        "values": [
          "Quebec"
        ]
      },
      {
        "operator": "matches",
        "parameter": "company.city",
        "values": [
          "Montreal"
        ]
      }
    ]
  },
  {
    "conditions": [
      {
        "operator": "matches",
        "parameter": "company.state",
        "values": [
          "Quebec"
        ]
      },
      {
        "operator": "matches",
        "parameter": "company.city",
        "values": [
          "Montreal"
        ]
      }
    ]
  }
]

Filters

Array of Filter

Form

{
  "context": "CART_LEVEL",
  "fields": [
    {
      "fieldType": "TEXT",
      "inputCode": "FirstName",
      "inputTitle": "First name",
      "options": {
        "suffix": {
          "inputCode": "",
          "text": ""
        }
      },
      "subTitle": "",
      "tooltip": "",
      "validations": {
        "expression": "^[A-Za-z]+(((\\'|\\-|\\.(\\s)?|\\,(\\s)?|\\s)?([A-Za-z])+))*$",
        "maxLength": "255",
        "minLength": "2",
        "readonly": false,
        "required": true
      },
      "value": "John"
    },
    {
      "fieldType": "COUNTRY",
      "inputCode": "Address/ISO3Country",
      "inputTitle": "Country",
      "options": {
        "placeholder": "",
        "suffix": {
          "text": ""
        }
      },
      "subTitle": "",
      "tooltip": "",
      "validations": {
        "expression": "^[A-Za-z]{2}$",
        "maxLength": "3",
        "minLength": "2",
        "readonly": false,
        "required": true
      },
      "value": "USA"
    },
    {
      "fieldType": "TEXT",
      "inputCode": "SubDomain",
      "inputTitle": "Your primary domain name",
      "options": {
        "placeholder": "movies.entertainment.com",
        "suffix": {
          "inputCode": "",
          "text": ".thedomain.com"
        }
      },
      "subTitle": "",
      "tooltip": "Your subdomain and domain names. For example: When subdomain=movies, and domain=entertainment.com, the subdomain value is: movies.entertainment.com",
      "validations": {
        "expression": "^([^\\W|http(s?)://][a-zA-Z]+)(\\.[a-zA-Z]+)*",
        "maxLength": "255",
        "minLength": "1",
        "readonly": false,
        "required": true
      },
      "value": ""
    }
  ],
  "isvIdentifier": "ISV",
  "subTitle": "Additional Information Subtitle",
  "title": "Additional Information"
}

A group of required fields. Forms are used to organize required fields into meaningful groups.Required field definitions

Name Type Description
context string Response organization. ITEM_LEVEL: Required fields listed for each product. CART_LEVEL: Products grouped by vendor (ISV) with one list of required fields that apply to all the vendor's products.
fields array of Field All relevant information related to fields in the form
isvIdentifier string The vendor's (ISV's) unique identifier
subTitle string Descriptive subtitle for the form
title string The form title

FreeTrialEdition

{
  "automaticUpgradeToPaidEnabled": true,
  "editionId": 9890,
  "editionName": "Free Trial",
  "requireBillingInfo": true
}

These settings impact the billing information and conversion requirements for free trials.

Name Type Description
automaticUpgradeToPaidEnabled boolean Indicates whether free trial was automatically upgraded to a paid edition.
editionId integer Unique ID of the edition.
editionName string Name of the edition.
requireBillingInfo boolean Indicates whether billing address and payment method is required for purchasing this edition.

GatewayResponse

{
  "avs": true,
  "code": "...",
  "cvv": true,
  "message": "..."
}
Name Type Description
avs boolean True if address is validated.
code string Code.
cvv boolean True if credit card is validated.
message string Message.

GeneralSettings

{
  "additionalSettings": {
    "validations": [
      {
        "field": "externalIdentifier",
        "maxLength": 36
      },
      {
        "field": "productStockNumber",
        "maxLength": 36
      }
    ]
  },
  "apiHealthMaintenance": {
    "assignAndUnassign": {
      "disabled": true,
      "tooltip": "This endpoint has been disabled by the developer.",
      "value": false
    },
    "purchase": {
      "disabled": false,
      "value": true
    },
    "singleSignOn": {
      "disabled": false,
      "value": false
    },
    "updateSubscription": {
      "disabled": true,
      "tooltip": "The product is part of a bundle.",
      "value": true
    }
  },
  "settings": {
    "collectLeads": {
      "assignLeadsToDevelopers": false,
      "editionLeadGenEnabled": false,
      "enabled": true,
      "options": [
        "inAdditionToPurchase",
        "insteadOfPurchase"
      ],
      "selectedOption": "inAdditionToPurchase"
    },
    "disableSelfServe": true,
    "hideAllPricing": true,
    "sellDomainAsStandalone": true,
    "showAsComingSoon": true,
    "sortingRank": {
      "options": [
        "Very High",
        "High",
        "Medium",
        "Low",
        "Very Low"
      ],
      "selectedOption": "Very Low"
    },
    "termsOfServiceURL": "http://www.google.com",
    "validations": [
      {
        "field": "termsOfServiceURL",
        "maxLength": 1024
      }
    ],
    "visibleOnMarketplace": true,
    "visibleOnNetwork": true
  }
}

Information about the availability of the product, API health maintenance, and additional settings.

Name Type Description
additionalSettings AdditionalSettings Information about additional settings for a product.
apiHealthMaintenance ApiHealthMaintenanceSettings Information about API maintenance that includes assign/unassign users, update subscription, single sign-on product and purchase product.
settings AvailabilitySettings Allow specific information to appear on the product profile page and whether customers can purchase the product or submit lead information.

GracePeriodUnit

End-of-contract grace period unit. Time unit by which the endOfContractGracePeriod is measured.

Enumeration of

Group

{
  "identifier": "c390a4bf-4f54-418a-87ca-5970c332ba17"
}

UUID of a user group configured in the marketplace. Gives resource visibility to a group of users.

Name Type Description
delete boolean Delete resource visibility for the group
identifier string UUID of a user group configured in the marketplace. Required.

HalResourceSupport

{
  "_embedded": {
    "property1": {},
    "property2": {}
  },
  "links": [
    {
      "href": "...",
      "rel": "..."
    },
    {
      "href": "...",
      "rel": "..."
    }
  ]
}

Resource links

Name Type Description
_embedded object
links array of Link Resource links

HTTPMethod

HTTP method type

Enumeration of

IM

{
  "account": "da853378-2e9a-4944-ad53-6257bf773ace",
  "type": "GOOGLE_TALK"
}

Instant messenger

Name Type Description
account string Account identifier
type IMType Account type

IMType

Instant messenger type

Enumeration of

IllegalCompanyAssociationTypes

Invalid company association types

Enumeration of

IllegalSubscriptionAssociationTypes

Invalid subscription association types

Enumeration of

InactiveUserAccountV2

{
  "activated": true,
  "email": "alex.gonsalez@company2438285395.com",
  "password": "some-password",
  "privacyPolicy": true,
  "termsOfService": true
}

User activation information

Name Type Description
activated boolean Is user activated
email string User email
password string User password
privacyPolicy boolean Indicates whether the user has agreed to the privacy policy
termsOfService boolean Indicates whether the user has accepted the terms of service

IncludedItem

{
  "amount": 12345,
  "unit": "...",
  "unlimited": true
}

Included item in an edition

Name Type Description
amount number Amount
unit string Item unit
unlimited boolean Is unlimited

IndustryChoice

{
  "industryId": 56,
  "name": "Industry2",
  "selected": false
}

Details of industry choice options.

Name Type Description
industryId integer Unique ID of the industry choice option.
name string Name of the industry choice option.
selected boolean Indicates whether industry choice option is selected.

IntegrationProductSettingsFormFieldOptions

{
  "content": "...",
  "value": "..."
}
Name Type Description
content string The content of the HTML option
value string The value of the option

IntegrationProductSettingsFormField

{
  "integrationAdditionalSettingsFormFieldOptions": [
    {
      "content": "...",
      "value": "..."
    },
    {
      "content": "...",
      "value": "..."
    }
  ],
  "key": "...",
  "label": "...",
  "repeatedForEachUnit": true,
  "suffix": "...",
  "type": "..."
}

Integration product settings form field

Name Type Description
integrationAdditionalSettingsFormFieldOptions array of IntegrationProductSettingsFormFieldOptions The list of select options if the field type is a select field
key string The key identifying the value(s) when submitted to the developer in the order configuration
label string The prefix label of the form field (shown before of the input)
repeatedForEachUnit boolean Whether this form field will be repeated for each purchased unit of an add-on.
This allows collecting values specific to each purchased unit.
If true, the short description of the add-on will replace the label of the form field.
suffix string The suffix label of the form field (shown after of the input)
type string The type of input field associated with the form field. Possible values are SELECT, and TEXT

IntegrationProductSettingsForm

{
  "description": "...",
  "formField": [
    {
      "integrationAdditionalSettingsFormFieldOptions": [
        {
          "content": "...",
          "value": "..."
        },
        {
          "content": "...",
          "value": "..."
        }
      ],
      "key": "...",
      "label": "...",
      "repeatedForEachUnit": true,
      "suffix": "...",
      "type": "..."
    },
    {
      "integrationAdditionalSettingsFormFieldOptions": [
        {
          "content": "...",
          "value": "..."
        },
        {
          "content": "...",
          "value": "..."
        }
      ],
      "key": "...",
      "label": "...",
      "repeatedForEachUnit": true,
      "suffix": "...",
      "type": "..."
    }
  ],
  "hiddenByDefault": true,
  "showFormControlLabel": "...",
  "specificToTopLevelDomain": "...",
  "title": "..."
}

Integration product settings form

Name Type Description
description string A description or instructions around the values requested in the form.
It should give the customer context for the information they need to input.
formField array of IntegrationProductSettingsFormField Integration product settings form fields
hiddenByDefault boolean Whether the form is hidden by default.
If true, the user must check a checkbox to show it.
showFormControlLabel string Label for the checkbox or other control (only shown if hiddenByDefault is true) that allows the user to show the form
specificToTopLevelDomain string If the product is of type DOMAIN_RESELLER and this is set, the form should only be used when this top-level domain is selected
title string The title of the form.
Should be descriptive of the values expected below.

IntegrationProductSettings

{
  "enabledForSubscriptionChange": true,
  "form": [
    {
      "description": "...",
      "formField": [
        {
          "integrationAdditionalSettingsFormFieldOptions": [
            {},
            {}
          ],
          "key": "...",
          "label": "...",
          "repeatedForEachUnit": true,
          "suffix": "...",
          "type": "..."
        },
        {
          "integrationAdditionalSettingsFormFieldOptions": [
            {},
            {}
          ],
          "key": "...",
          "label": "...",
          "repeatedForEachUnit": true,
          "suffix": "...",
          "type": "..."
        }
      ],
      "hiddenByDefault": true,
      "showFormControlLabel": "...",
      "specificToTopLevelDomain": "...",
      "title": "..."
    },
    {
      "description": "...",
      "formField": [
        {
          "integrationAdditionalSettingsFormFieldOptions": [
            {},
            {}
          ],
          "key": "...",
          "label": "...",
          "repeatedForEachUnit": true,
          "suffix": "...",
          "type": "..."
        },
        {
          "integrationAdditionalSettingsFormFieldOptions": [
            {},
            {}
          ],
          "key": "...",
          "label": "...",
          "repeatedForEachUnit": true,
          "suffix": "...",
          "type": "..."
        }
      ],
      "hiddenByDefault": true,
      "showFormControlLabel": "...",
      "specificToTopLevelDomain": "...",
      "title": "..."
    }
  ],
  "preSubmitValidationRequired": true,
  "validationUrl": "..."
}

Integration product settings information. Defines whether and what additional order information is gathered during checkout.

Name Type Description
enabledForSubscriptionChange boolean Whether subscription change (not just subscription order) requires prompting again for product settings
form array of IntegrationProductSettingsForm Integration additional settings forms
preSubmitValidationRequired boolean Whether the user must explicitly click a button to perform settings validation prior to submitting the settings and continuing the order
validationUrl string Product settings validation URL.
This endpoint will receive requests to validate the user-entered values.

IntegrationConfiguration

{
  "domainManagementEnabled": true,
  "productSettings": {
    "enabledForSubscriptionChange": true,
    "form": [
      {
        "description": "...",
        "formField": [
          {},
          {}
        ],
        "hiddenByDefault": true,
        "showFormControlLabel": "...",
        "specificToTopLevelDomain": "...",
        "title": "..."
      },
      {
        "description": "...",
        "formField": [
          {},
          {}
        ],
        "hiddenByDefault": true,
        "showFormControlLabel": "...",
        "specificToTopLevelDomain": "...",
        "title": "..."
      }
    ],
    "preSubmitValidationRequired": true,
    "validationUrl": "..."
  }
}

Integration configuration. Defines information about the product's integration to the vendor.

Name Type Description
domainManagementEnabled boolean When set to true, the buyer must either purchase a domain or provide an existing domain during checkout.
productSettings IntegrationProductSettings Integration product settings information

InvitationAccountV2

{
  "accepted": false,
  "company": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "createdOn": 1516728509000,
  "email": "invite-1@appdirect.local",
  "externalIdentifier": "invite-1@appdirect.local",
  "inviter": "superuser+1@appdirect.com",
  "lastModified": 1516728509000,
  "role": "SYS_ADMIN"
}

Structure representing an invitation

Name Type Description
accepted boolean Accepted invitation
createdOn number Date created
email string Email the invitation was submitted to
externalIdentifier string External identifier
inviter string User inviting
lastModified number Last modified date
role Role Role associated. May accept a role with 'ROLE_' prefix. For example: 'ROLE_USER' or 'ROLE_DEVELOPER'

InvitationError

{
  "email": "test2@email.com",
  "externalIdentifier": "",
  "index": 1,
  "role": "ROLE_USER",
  "type": "ALREADY_EXISTS"
}
Name Type Description
email string Email address of the invitee
externalIdentifier string External identifier
index number Index number of the invitation.
role string Associated role. Accepts role names with or without a 'ROLE_' prefix, for example 'ROLE_USER' or 'USER'.
type InvitationErrorType Invitation error type

InvitationErrorType

Enumeration of

InvitationRequestAccountV2

{
  "email": "invite-1@appdirect.local",
  "role": "SYS_ADMIN"
}

Structure representing an invitation

Name Type Description
email string Email the invitation was sent to.
role Role Associated role. Accepts role names with or without a 'ROLE_' prefix, for example 'ROLE_USER' or 'USER'.

InvoiceLineType

Enumeration of

InvoiceLine

{
  "description": "...",
  "id": 12345,
  "itemId": 12345,
  "orderIds": [
    "12345"
  ],
  "percentage": 12345,
  "periodEnd": 12345,
  "periodStart": 12345,
  "price": 12345,
  "quantity": 12345,
  "saleRepCompany": {
    "isReseller": true,
    "isSalesSupport": true,
    "name": "Sample Reseller",
    "uuid": "36f631b9-caef-4f19-be41-e70173f17f0d"
  },
  "saleRepUser": {
    "isReseller": true,
    "isSalesSupport": true,
    "name": "Sample Reseller User",
    "uuid": "fd94512f-7fd6-4063-bb8c-bec18ba6f509"
  },
  "total": 12345,
  "type": "SUB_ACCOUNT",
  "vendor": {
    "name": "Sample Vendor",
    "uuid": "3ea46469-36a7-4216-966b-5f0c61c72faa"
  }
}
Name Type Description
description string Description
editionId number Edition ID
id number ID
itemId number Deprecated: Item ID
paymentPlanId number Payment Plan ID
percentage number Percentage
periodEnd number Period end
periodStart number Period start
price number Item price
pricingUnit string Pricing Unit
productId number Product ID
quantity number Quantity
saleRepCompany SaleRepCompany SaleRepCompany
saleRepUser SaleRepUser SaleRepUser
total number Total
type InvoiceLineType Invoice line type. Can be ITEM, DISCOUNT, TAX, DELEGATED_INVOICE,
TERMINATION_FEE or SUB_ACCOUNT;
vendor Vendor Vendor

InvoiceListing

{
  "company": {
    "href": "...",
    "id": "..."
  },
  "creationDate": 12345,
  "currency": "DKK",
  "dueDate": 12345,
  "invoiceId": 12345,
  "links": [
    {
      "href": "...",
      "rel": "..."
    },
    {
      "href": "...",
      "rel": "..."
    }
  ],
  "referenceNumber": "...",
  "status": "PAID",
  "total": 12345,
  "user": {
    "href": "...",
    "id": "..."
  }
}

Resource links

Name Type Description
company LinkWS Link to company information.
creationDate number Creation date for the invoice.
currency Currency Currency.
dueDate number Due date for the invoice.
invoiceId number Invoice ID.
links array of Link Resource links
orderIds array of string Array of Order IDs
referenceNumber string Reference number.
status InvoiceStatus Invoice status, either PAID, UNPAID, CARRIED, or VOIDED.
total number Invoice total.
user LinkWS Link to user information.

InvoiceStatus

Enumeration of

Invoice

{
  "company": {
    "href": "...",
    "id": "..."
  },
  "creationDate": 12345,
  "currency": "KRW",
  "delegatedToInvoice": {
    "href": "...",
    "id": "..."
  },
  "dueDate": 12345,
  "includedInvoices": [
    {
      "href": "...",
      "id": "..."
    },
    {
      "href": "...",
      "id": "..."
    }
  ],
  "invoiceId": 12345,
  "invoiceLines": [
    {
      "description": "...",
      "id": 12345,
      "itemId": 12345,
      "percentage": 12345,
      "periodEnd": 12345,
      "periodStart": 12345,
      "price": 12345,
      "quantity": 12345,
      "total": 12345,
      "type": "ITEM"
    },
    {
      "description": "...",
      "id": 12345,
      "itemId": 12345,
      "percentage": 12345,
      "periodEnd": 12345,
      "periodStart": 12345,
      "price": 12345,
      "quantity": 12345,
      "total": 12345,
      "type": "TAX"
    }
  ],
  "links": [
    {
      "href": "...",
      "rel": "..."
    },
    {
      "href": "...",
      "rel": "..."
    }
  ],
  "orderIds": [
    "1234"
  ],
  "referenceNumber": "...",
  "status": "VOIDED",
  "total": 12345,
  "user": {
    "href": "...",
    "id": "..."
  }
}

Resource links

Name Type Description
company LinkWS Link to company information.
creationDate number Creation date for the invoice.
currency Currency Currency.
delegatedToInvoice LinkWS Link to the delegated invoice
dueDate number Due date for the invoice.
includedInvoices array of LinkWS List of links to the included invoices
invoiceId number Invoice ID.
invoiceLines array of InvoiceLine List of Invoice lines
links array of Link Resource links
orderIds array of string Array of Order IDs
referenceNumber string Reference number.
status InvoiceStatus Invoice status, either PAID, UNPAID, CARRIED, or VOIDED.
total number Invoice total.
user LinkWS Link to user information.

Item

{
  "id": "166e0ce6-4309-4a16-ac9b-61bea7ce1cbc",
  "pricing": [
    {
      "costType": "RECURRING_FLAT",
      "description": "Gold plan",
      "quantity": "1.0000000000",
      "salePrice": "55.0000000000",
      "totalSalePrice": "55.0000000000"
    },
    {
      "costType": "INCLUDED",
      "description": "Per User Fee Included",
      "quantity": "1.0000000000",
      "salePrice": "0.0000000000",
      "totalSalePrice": "0.0000000000"
    }
  ],
  "pricingPlan": {
    "id": "19c06143-b21c-43c4-b236-eeca61512753",
    "name": "Gold plan"
  },
  "product": {
    "editionId": "b06358bc-cb63-45e6-87c7-19db9b0cf696",
    "id": "fa776d2e-cda5-4256-9a27-125a0fe3f448",
    "name": "Supported Product for Opportunity MVP"
  }
}

Item

Name Type Description
id string Item ID
parentItemId string The parent product's ID, which is only relevant and required for add-on products
pricing array of OpportunityPricing The cost and flat rates for each quantifiable unit
pricingPlan PricingPlan Pricing plan information
product OpportunityProduct Production information

Key

{
  "instance": "myclient.myapp.com",
  "resourceId": "order-12345",
  "source": "b2fc6737-3d3f-4da2-afda-f80f25b89af9",
  "timestamp": 1500558736123
}

Identify a resource

Name Type Description
instance string Vendor account identifier within the application. Required.
resourceId string Unique ID of the resource in the instance. Required.
source string Application UUID. Note: Application UUID = Product UUID. Required.
timestamp integer UTC timestamp of when the event occurred in epoch format, with millisecond precision

LeadActivity

{
  "actorCompany": {
    "id": "386626c0-1234-4515-8450-4a720bb5d029",
    "name": "Reseller Company"
  },
  "allowedResourcesAccess": [
    "CONTEXT_QUOTE",
    "ACTOR_COMPANY"
  ],
  "contextQuote": {
    "applicationName": "Appsome Product",
    "friendlyId": "ZVVZNQ",
    "id": "df4e34c4-4f82-458d-ba4a-db68c27878a6"
  },
  "createdOn": 1533222783000,
  "id": "633d1fa9-16ce-4448-8741-85960ecee365",
  "partner": "APPDIRECT",
  "verb": "LEAD_QUOTE_LINKED",
  "verbContext": "COMPANY"
}

Information about the lead activity

Name Type Description
actorCompany LeadCompany Information about the company that acted on the lead
allowedResourcesAccess array of LeadActivityResource The lead's activity resource (the type of object that the activity refers to)
contextApplication LeadProduct Information about the product profile from where the lead originated or the linked product
contextCompany LeadCompany Information about the company whose user the lead was assigned to
contextPurchaseOrder LeadPurchaseOrder Information about the linked order
contextQuote LeadQuote Information about the linked quote
createdOn number Date on which the activity was created, in UNIX Epoch milliseconds
id string Lead activity ID
partner string Marketplace partner code
verb LeadActivityVerb Lead activity action (or verb)
verbContext LeadActivityVerbContext Lead activity action's context (or verb context)

LeadActivityPagedReadResponse

{
  "description": "Paged response as an array of lead activity objects",
  "type": "object",
  "title": "LeadActivityPagedReadResponse",
  "required": [
    "page",
    "content"
  ],
  "properties": {
    "content": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/LeadActivity"
      }
    },
    "page": {
      "allOf": [
        {
          "$ref": "#/components/schemas/PageMetadata"
        },
        {
          "description": "Page information"
        }
      ]
    }
  }
}

Paged response as an array of lead activity objects

Name Type Description
content array of LeadActivity
page PageMetadata Page information

LeadActivityResource

The lead's activity resource (the type of object that the activity refers to)

Enumeration of

LeadActivityVerb

Lead activity action (or verb)

Enumeration of

LeadActivityVerbContext

Lead activity action's context (or verb context)

Enumeration of

LeadAssignmentRequest

{
  "leadId": "29a1dc26-8088-475c-ba75-7b73915a0fab",
  "recipient": {
    "companyId": "386626c0-1234-4515-8450-4a720bb5d029",
    "participantType": "COMPANY"
  }
}

Information about the person to whom the lead is being assigned

Name Type Description
leadId string Lead ID
recipient LeadParticipant The participant to whom the lead is being assigned

LeadAssignmentResponse

{
  "description": "Information about the assigned lead",
  "type": "object",
  "title": "LeadAssignmentResponse",
  "required": [
    "lead"
  ],
  "properties": {
    "lead": {
      "allOf": [
        {
          "$ref": "#/components/schemas/LeadResponse"
        },
        {
          "description": "The assigned lead"
        }
      ]
    }
  }
}

Information about the assigned lead

Name Type Description
lead LeadResponse The assigned lead

LeadCompany

{
  "id": "386626c0-53e2-4515-ffff-4a720bb5d029",
  "name": "Reseller Company"
}

Information about the marketplace company related to the lead

Name Type Description
id string Company ID
name string Company name

LeadCompanyAssociationRequest

{
  "leadId": "ce9d1713-7a48-43e4-bb43-b6880a19df24",
  "user": {
    "companyId": "62377315-61ba-4b50-9891-02799bef4257",
    "id": "1661c8d8-357b-4e8d-a0b9-a571ff00924b"
  }
}

Contains information about user and company to associate with the lead

Name Type Description
leadId string Lead ID
user LeadUser The user and company who are being associated with the lead

LeadConversionResponse

{
  "description": "Information about the lead conversion",
  "type": "object",
  "title": "LeadConversionResponse",
  "required": [
    "lead"
  ],
  "properties": {
    "lead": {
      "allOf": [
        {
          "$ref": "#/components/schemas/LeadResponse"
        },
        {
          "description": "The lead that has been converted or is in the conversion approval process"
        }
      ]
    }
  }
}

Information about the lead conversion

Name Type Description
lead LeadResponse The lead that has been converted or is in the conversion approval process

LeadCreationRequest

{
  "customer": {
    "company": {
      "city": "Miami",
      "country": "US",
      "name": "Acme",
      "state": "FL",
      "street1": "1234 Main St",
      "street2": "30th Floor, Apt B",
      "zip": "33033"
    },
    "contact": {
      "email": "john.doe@acme.com",
      "firstName": "John",
      "lastName": "Doe",
      "phone": "+13055555555"
    }
  },
  "leadType": "MANUAL",
  "partner": "APPDIRECT"
}

The lead creation request object. Some fields are mandatory depending on the type of the lead.

Name Type Description
creator LeadUser Information about the marketplace user who created the lead (required if the lead type is MANUAL)
customAttributes object Custom attributes associated with the lead. This is a key-value object where the values are a set of strings associated with a given key, which is also a String.
customer LeadCustomer Information about the customer and the customer's company
leadType LeadType Lead type
notes string Notes attached to the lead
partner string Marketplace partner code
profileCompany LeadCompany Information about the company profile from which the lead originated (required if the lead type is COMPANY)
profileProduct LeadProduct Information about the product profile from which the lead originated (required if the lead type is PRODUCT)
profileProductEdition LeadProductEdition Information about the edition from the product profile from which the lead originated (required if the lead type is PRODUCT). This object also requires profileProduct.
reseller LeadUser Information about the reseller associated with the lead (required if the lead was created manually by a reseller)

LeadCustomer

{
  "customer": {
    "company": {
      "city": "Beverly Hills",
      "country": "US",
      "name": "Acme",
      "size": "RANGE_1_9",
      "state": "CA",
      "street1": "1234 Main St",
      "street2": "Suite 100",
      "zip": "90210"
    },
    "contact": {
      "email": "john.doe@acme.com",
      "firstName": "John",
      "lastName": "Doe",
      "phone": "+14455555555"
    }
  }
}

Information about the customer and customer company

Name Type Description
company LeadCustomerCompany Information about the customer's company, including address and company size
contact LeadCustomerContact Customer contact information

LeadCustomerCompany

{
  "company": {
    "city": "Beverly Hills",
    "country": "US",
    "name": "Acme",
    "size": "RANGE_1_9",
    "state": "CA",
    "street1": "1234 Main St",
    "street2": "Suite 100",
    "zip": "90210"
  }
}

Information about the customer's company, including address and company size

Name Type Description
city string City or town
country string The two-letter country code, in ISO 3166 format
name string Company Name
size string Company size, as determined by number of employees
state string State, province, or region
street1 string First line of street address
street2 string Second line of street address (suite, floor, and so on)
zip string ZIP or postal code

LeadCustomerContact

{
  "contact": {
    "email": "john.doe@acme.com",
    "firstName": "John",
    "lastName": "Doe",
    "phone": "+14455555555",
    "phoneExtension": "123"
  }
}

Customer contact information

Name Type Description
email string Email address
firstName string First name
lastName string Last name
phone string Phone number
phoneExtension string Phone number extension

LeadEdition

{
  "name": "...",
  "uuid": "..."
}
Name Type Description
name string The name of the edition
uuid string The unique identifier for the edition

LeadPagedReadResponse

{
  "description": "Paged response as an array of lead objects",
  "type": "object",
  "title": "LeadPagedReadResponse",
  "required": [
    "page",
    "content"
  ],
  "properties": {
    "content": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/LeadResponse"
      }
    },
    "page": {
      "allOf": [
        {
          "$ref": "#/components/schemas/PageMetadata"
        },
        {
          "description": "Page information"
        }
      ]
    }
  }
}

Paged response as an array of lead objects

Name Type Description
content array of LeadResponse
page PageMetadata Page information

LeadParticipant

{
  "participantType": "CHANNEL",
  "partner": "APPDIRECT"
}

Information about the person who is receiving or referring the lead

Name Type Description
companyId string The company's ID (only for COMPANY types)
companyName string The company's name (only for COMPANY types)
participantType string The type of the participant involved. It can be CUSTOMER (an anonymous participant), COMPANY (a Reseller, Referral or Developer company participant) or CHANNEL (a Partner participant).
partner string The partner code of the marketplace (only for CHANNEL types)

LeadProduct

{
  "id": "009fd909-aaaa-4e37-bbad-701f87724bca",
  "name": "Appsome Product",
  "provider": "APPDIRECT"
}

Information about the product related to a lead

Name Type Description
id string Product ID
name string Product name
provider string Marketplace partner code

LeadProductEdition

{
  "id": "d4610cd4-09d5-abcd-a769-a47666a1c311",
  "name": "Enterprise Edition"
}

Information about the product edition related to a lead

Name Type Description
id string Edition ID
name string Edition name

LeadPurchaseOrder

{
  "id": 1234
}

Information about the purchase order linked to the lead

Name Type Description
id number Purchase order ID

LeadQuote

{
  "applicationName": "AUTO_WEBAPP_NEW",
  "friendlyId": "ZVVZNQ",
  "id": "df4e34c4-4f82-458d-ba4a-db68c27878a6"
}

Information about a quote linked to the lead

Name Type Description
applicationName string The product name from the quote
friendlyId string Quote ID in friendly format
id string Quote ID

LeadResponse

{
  "description": "The lead response. Depending on the action and status, some information might not be available.",
  "type": "object",
  "title": "LeadResponse",
  "required": [
    "id",
    "partner",
    "leadType",
    "status",
    "customer",
    "createdOn",
    "lastModified",
    "referrer",
    "recipient"
  ],
  "properties": {
    "convertedCompany": {
      "allOf": [
        {
          "$ref": "#/components/schemas/LeadCompany"
        },
        {
          "description": "Information about the marketplace's converted customer's company (only after the lead is converted)"
        }
      ]
    },
    "convertedUser": {
      "allOf": [
        {
          "$ref": "#/components/schemas/LeadUser"
        },
        {
          "description": "Information about the marketplace's converted customer (only after the lead is converted)"
        }
      ]
    },
    "createdOn": {
      "description": "The date on which the lead was created, in UNIX Epoch milliseconds",
      "type": "number"
    },
    "creator": {
      "allOf": [
        {
          "$ref": "#/components/schemas/LeadUser"
        },
        {
          "description": "Information about the marketplace user who created the lead (only if lead type is MANUAL)"
        }
      ]
    },
    "customAttributes": {
      "description": "Custom attributes associated with the lead",
      "type": "object"
    },
    "customer": {
      "allOf": [
        {
          "$ref": "#/components/schemas/LeadCustomer"
        },
        {
          "description": "Information about the customer and the customer's company"
        }
      ]
    },
    "id": {
      "description": "Lead ID",
      "type": "string"
    },
    "lastModified": {
      "description": "The date on which the lead was last modified, in UNIX Epoch milliseconds",
      "type": "number"
    },
    "leadType": {
      "allOf": [
        {
          "$ref": "#/components/schemas/LeadType"
        },
        {
          "description": "Lead type"
        }
      ]
    },
    "notes": {
      "description": "Notes attached to the lead",
      "type": "string"
    },
    "partner": {
      "description": "Marketplace partner code",
      "type": "string"
    },
    "profileCompany": {
      "allOf": [
        {
          "$ref": "#/components/schemas/LeadCompany"
        },
        {
          "description": "Information about the company profile from which the lead originated (only if the lead type is COMPANY)"
        }
      ]
    },
    "profileProduct": {
      "allOf": [
        {
          "$ref": "#/components/schemas/LeadProduct"
        },
        {
          "description": "Information about the product profile from which the lead originated. This property is only returned in response to the [https://help.appdirect.com/api/appreseller.html#get-lead-details] request and the lead type is PRODUCT."
        }
      ]
    },
    "profileProductEdition": {
      "allOf": [
        {
          "$ref": "#/components/schemas/LeadProductEdition"
        },
        {
          "description": "Information about the edition from the product profile from which the lead originated. This property is only returned in response to the [https://help.appdirect.com/api/appreseller.html#get-lead-details] request and the lead type is PRODUCT."
        }
      ]
    },
    "recipient": {
      "allOf": [
        {
          "$ref": "#/components/schemas/LeadParticipant"
        },
        {
          "description": "Information about the user or partner who is receiving the lead"
        }
      ]
    },
    "referrer": {
      "allOf": [
        {
          "$ref": "#/components/schemas/LeadParticipant"
        },
        {
          "description": "Information about the customer, user, or partner who is referring the lead"
        }
      ]
    },
    "reseller": {
      "allOf": [
        {
          "$ref": "#/components/schemas/LeadUser"
        },
        {
          "description": "Information about the reseller associated with the lead (only if created manually by a reseller)"
        }
      ]
    },
    "result": {
      "allOf": [
        {
          "$ref": "#/components/schemas/LeadResult"
        },
        {
          "description": "Additional status information about the lead (only after the lead is converted)"
        }
      ]
    },
    "status": {
      "allOf": [
        {
          "$ref": "#/components/schemas/LeadStatus"
        },
        {
          "description": "Lead status"
        }
      ]
    }
  }
}

The lead response. Depending on the action and status, some information might not be available.

Name Type Description
convertedCompany LeadCompany Information about the marketplace's converted customer's company (only after the lead is converted)
convertedUser LeadUser Information about the marketplace's converted customer (only after the lead is converted)
createdOn number The date on which the lead was created, in UNIX Epoch milliseconds
creator LeadUser Information about the marketplace user who created the lead (only if lead type is MANUAL)
customAttributes object Custom attributes associated with the lead
customer LeadCustomer Information about the customer and the customer's company
id string Lead ID
lastModified number The date on which the lead was last modified, in UNIX Epoch milliseconds
leadType LeadType Lead type
notes string Notes attached to the lead
partner string Marketplace partner code
profileCompany LeadCompany Information about the company profile from which the lead originated (only if the lead type is COMPANY)
profileProduct LeadProduct Information about the product profile from which the lead originated. This property is only returned in response to the [https://help.appdirect.com/api/appreseller.html#get-lead-details] request and the lead type is PRODUCT.
profileProductEdition LeadProductEdition Information about the edition from the product profile from which the lead originated. This property is only returned in response to the [https://help.appdirect.com/api/appreseller.html#get-lead-details] request and the lead type is PRODUCT.
recipient LeadParticipant Information about the user or partner who is receiving the lead
referrer LeadParticipant Information about the customer, user, or partner who is referring the lead
reseller LeadUser Information about the reseller associated with the lead (only if created manually by a reseller)
result LeadResult Additional status information about the lead (only after the lead is converted)
status string Lead status

LeadResult

Additional status information about CONVERTED leads

Enumeration of

The lead status. PENDING_FOR_MANAGERS requires SUBMITTED and PENDING_CONVERSION_APPROVAL; ACCEPTED_FOR_MANAGERS requires ASSIGNED, CONVERSION_APPROVED, CONVERTED, DELETED, DISQUALIFIED and LEGACY.

Enumeration of

LeadType

The type of lead. Leads created manually by users have the MANUAL type. Leads created by anonymous users through profiles have the PRODUCT or COMPANY types, depending on whether they were created from product profiles or reseller company profiles respectively.

Enumeration of

LeadUpdateRequest

{
  "customer": {
    "company": {
      "name": "Globex",
      "street2": "5th floor"
    },
    "contact": {
      "email": "jane.doe@globex.com",
      "firstName": "Jane",
      "lastName": "Doe"
    }
  },
  "notes": "Updated company name, added floor and changed person to be contacted"
}

The lead information to update

Name Type Description
customer LeadCustomer Information about the customer and the customer's company
notes string Notes attached to the lead

LeadUser

{
  "companyId": "386626c0-53e2-4515-ffff-4a720bb5d029",
  "companyName": "Reseller Company",
  "id": "01d75b7c-ea78-ffff-9e58-6ad217bddcbd",
  "role": "RESELLER"
}

Information about the marketplace user related to the lead

Name Type Description
companyId string Company ID
companyName string Company name
id string User ID
role string User role (if applicable)

LedgerLineDetails

{
  "amount": 10,
  "createdOn": 1506083752000,
  "currency": "JPY",
  "customer": {
    "email": "enduser003@appdirect.com",
    "id": 4712,
    "username": "enduser003@appdirect.com",
    "uuid": "62c8b934-aca8-4ed2-bcd5-8f798fd19355"
  },
  "editionId": 7552,
  "editionName": "Recurring Edition",
  "editionPricingItemId": 14467,
  "id": 6,
  "invoiceId": 8568,
  "invoiceLineId": 8569,
  "issuerParty": {
    "id": "RESELLERSMARKETPLACE",
    "name": "RESELLER MARKETPLACE",
    "type": "CHANNEL",
    "uuid": "5d08ea40-c948-40e2-9335-1f3c513a6524"
  },
  "lastModified": 1506083752000,
  "lineItemDescription": "TEST - Recurring Edition - Monthly Fee Period from 09/22/17 to 10/22/17",
  "lineItemType": "ITEM",
  "orderId": 3598,
  "payments": [
    {
      "id": 5881,
      "type": "MANUAL"
    }
  ],
  "productId": 3402,
  "productName": "TEST",
  "recipientParty": {
    "id": "4052",
    "name": "Reseller Company 02",
    "type": "RESELLER",
    "uuid": "d282c59d-129a-4281-b390-a7d61876d9ce"
  },
  "reconciliationDate": 1506083747000,
  "reconciliationType": "ITEM",
  "transferStatus": "OPEN",
  "type": "DEBIT"
}
Name Type Description
amount number Ledger line amount. Decimal value
createdOn number Ledger line created on date
currency Currency Ledger line currency
customer Customer End customer
editionId number Application edition ID
editionName string Application edition name
editionPricingItemId number Edition pricing item ID
id number Ledger line ID
invoiceId number Invoice ID
invoiceLineId number Invoice Line ID
issuerParty Party Issuer party
lastModified number Ledger line last modified
lineItemDescription string Item line description
lineItemType InvoiceLineType Item line type
orderId number The purchase order ID related to the invoice that triggered this ledger line
payments array of PaymentIdAndType Payments made against the invoice that generated this ledger line
productId number The product ID that was sold and triggered the creation of the ledger line
productName string The product name that was sold and triggered the creation of the ledger line
recipientParty Party Recipient party
reconciliationDate number Reconciliation date
reconciliationType ReconciliationType Reconciliation type
transferId number Transfer ID
transferStatus TransferStatus Transfer status
type LedgerLineOperationType The operation type of the ledger line

LedgerLineOperationType

Enumeration of

{
  "href": "...",
  "rel": "..."
}
Name Type Description
href string
rel string

LinkWS

{
  "href": "...",
  "id": "..."
}
Name Type Description
href string
id string

ListingInfo

{
  "blurb": "...",
  "imageSrcset": {
    "property1": "...",
    "property2": "..."
  },
  "imageUrl": "...",
  "mobileAppStoreId": "...",
  "mobileBundleId": "...",
  "myAppLogoIconSrcset": {
    "property1": "...",
    "property2": "..."
  },
  "myAppLogoIconUrl": "...",
  "overview": "...",
  "profileImageSrcset": {
    "property1": "...",
    "property2": "..."
  },
  "profileImageUrl": "...",
  "rating": 12345,
  "reviewCount": 12345
}

Product information used for listing on the marketplace

Name Type Description
blurb string Short description
imageSrcset object Image Srcset URLs
imageUrl string Image URL
mobileAppStoreId string iTunes AppStore ID
mobileBundleId string Mobile app bundle identifier
myAppLogoIconSrcset object MyApp logo icon Srcset URLs
myAppLogoIconUrl string MyApp logo icon URL
overview string Overview
profileImageSrcset object Profile image Srcset URLs
profileImageUrl string Profile image URL
rating number User-submitted rating
reviewCount number Number of reviews

MarketplacePricing

{
  "bullet": [
    {
      "content": "...",
      "tooltip": "..."
    },
    {
      "content": "...",
      "tooltip": "..."
    }
  ],
  "edition": [
    {
      "bullet": [
        {
          "content": "...",
          "tooltip": "..."
        },
        {
          "content": "...",
          "tooltip": "..."
        }
      ],
      "bundleOnly": true,
      "code": "...",
      "customerContractRestricted": true,
      "customization": [
        {
          "type": "...",
          "value": "..."
        },
        {
          "type": "...",
          "value": "..."
        }
      ],
      "defaultFreeTrial": true,
      "expiredTrialGracePeriod": 12345,
      "freeTrialDuration": 12345,
      "freeTrialType": "...",
      "invisible": true,
      "item": [
        {
          "amount": 12345,
          "unit": "...",
          "unlimited": true
        },
        {
          "amount": 12345,
          "unit": "...",
          "unlimited": true
        }
      ],
      "lastModified": 12345,
      "leadGen": true,
      "name": "...",
      "plan": [
        {
          "allowCustomUsage": true,
          "contract": {},
          "cost": [
            {},
            {}
          ],
          "discount": {},
          "frequency": "...",
          "href": "...",
          "id": 12345,
          "isPrimaryPrice": true,
          "keepBillDateOnUsageChange": true,
          "separatePrepaid": true,
          "tld": "...",
          "uuid": "..."
        },
        {
          "allowCustomUsage": true,
          "contract": {},
          "cost": [
            {},
            {}
          ],
          "discount": {},
          "frequency": "...",
          "href": "...",
          "id": 12345,
          "isPrimaryPrice": true,
          "keepBillDateOnUsageChange": true,
          "separatePrepaid": true,
          "tld": "...",
          "uuid": "..."
        }
      ],
      "primary": true,
      "rank": 12345,
      "restricted": true,
      "revenueType": "...",
      "targetAudience": "...",
      "trial": {
        "length": 12345,
        "unit": "..."
      },
      "uuid": "..."
    },
    {
      "bullet": [
        {
          "content": "...",
          "tooltip": "..."
        },
        {
          "content": "...",
          "tooltip": "..."
        }
      ],
      "bundleOnly": true,
      "code": "...",
      "customerContractRestricted": true,
      "customization": [
        {
          "type": "...",
          "value": "..."
        },
        {
          "type": "...",
          "value": "..."
        }
      ],
      "defaultFreeTrial": true,
      "expiredTrialGracePeriod": 12345,
      "freeTrialDuration": 12345,
      "freeTrialType": "...",
      "invisible": true,
      "item": [
        {
          "amount": 12345,
          "unit": "...",
          "unlimited": true
        },
        {
          "amount": 12345,
          "unit": "...",
          "unlimited": true
        }
      ],
      "lastModified": 12345,
      "leadGen": true,
      "name": "...",
      "plan": [
        {
          "allowCustomUsage": true,
          "contract": {},
          "cost": [
            {},
            {}
          ],
          "discount": {},
          "frequency": "...",
          "href": "...",
          "id": 12345,
          "isPrimaryPrice": true,
          "keepBillDateOnUsageChange": true,
          "separatePrepaid": true,
          "tld": "...",
          "uuid": "..."
        },
        {
          "allowCustomUsage": true,
          "contract": {},
          "cost": [
            {},
            {}
          ],
          "discount": {},
          "frequency": "...",
          "href": "...",
          "id": 12345,
          "isPrimaryPrice": true,
          "keepBillDateOnUsageChange": true,
          "separatePrepaid": true,
          "tld": "...",
          "uuid": "..."
        }
      ],
      "primary": true,
      "rank": 12345,
      "restricted": true,
      "revenueType": "...",
      "targetAudience": "...",
      "trial": {
        "length": 12345,
        "unit": "..."
      },
      "uuid": "..."
    }
  ],
  "footnote": [
    "...",
    "..."
  ],
  "pricingSummary": "..."
}

List of editions for a product

Name Type Description
bullet array of Bullet List of plan inclusion for all editions
edition array of Edition List of editions
footnote array of string List of footnotes
pricingSummary string Pricing summary

MarketplaceProductSettingActiveComponentsWS

{
  "productInformation": {
    "appFromNetwork": false,
    "productName": "AUTO_WEBAPP_NEW"
  },
  "showAPIHealthMaintenanceContainer": true,
  "showAdditionalSettingsContainer": false,
  "showAsComingSoon": true,
  "showAttributesContainer": true,
  "showBillingCycleStartDay": false,
  "showBillingPatternsContainer": false,
  "showBillingSettingsContainer": true,
  "showBillingTab": true,
  "showCategoriesContainer": true,
  "showCollectLeads": true,
  "showCompanyGroupSegmentsContainer": true,
  "showCustomerGroupsContainer": true,
  "showDisableSelfService": false,
  "showFID1Number": false,
  "showFreeTrialBillingOptionsContainer": true,
  "showHideAllPricing": true,
  "showMerchandisingOptionsContainer": true,
  "showProductLinesContainer": true,
  "showProductTab": true,
  "showSKUsContainer": false,
  "showSellDomainAsStandalone": false,
  "showSettingsContainer": true,
  "showSetupFeeTaxCode": false,
  "showSkipFirstPayment": false,
  "showSortingRank": true,
  "showTaxCode": true,
  "showTermsOfServiceURL": false,
  "showVisibleOnMarketplace": true,
  "showVisibleOnNetwork": true
}

Information about the active component for product setting UI on marketplace.

Name Type Description
productInformation ProductInformation Information about the product, such as the name, icon URL, and if it is a network product.
showAPIHealthMaintenanceContainer boolean Indicates whether API health maintenance settings are visible in UI.
showAdditionalSettingsContainer boolean Indicates whether Additional Settings are visible in UI.
showAsComingSoon boolean Indicates whether Coming Soon setting is visible in UI.
showAttributesContainer boolean Indicates whether Attributes settings are visible in UI.
showBillingCycleStartDay boolean Indicates whether Billing Cycle Start Day setting is visible in UI.
showBillingPatternsContainer boolean Indicates whether Billing Patterns settings are visible in UI.
showBillingSettingsContainer boolean Indicates whether Billing settings are visible in UI.
showBillingTab boolean Indicates whether Billing Tab is visible in UI.
showCategoriesContainer boolean Indicates whether Categories settings are visible in UI.
showCollectLeads boolean Indicates whether Collect Leads setting is visible in UI.
showCompanyGroupSegmentsContainer boolean Indicates whether the segment group container is visible in the user interface
showCustomerGroupsContainer boolean Indicates whether Customer Groups settings are visible in UI.
showDisableSelfService boolean Indicates whether Disable Self Service setting is visible in UI.
showFID1Number boolean Indicates whether FID1Number setting is visible in UI.
showFreeTrialBillingOptionsContainer boolean Indicates whether Free Trial Billing Options settings are visible in UI.
showHideAllPricing boolean Indicates whether Hide All Pricing setting is visible in UI.
showMerchandisingOptionsContainer boolean Indicates whether Merchandising Options settings are visible in UI.
showProductLinesContainer boolean Indicates whether Product Lines settings are visible in UI.
showProductTab boolean Indicates whether Product Tab is visible in UI.
showSKUsContainer boolean Indicates whether SKUs settings are visible in UI.
showSellDomainAsStandalone boolean Indicates whether Sell Domain As Standalone setting is visible in UI.
showSettingsContainer boolean Indicates whether settings are visible in UI.
showSetupFeeTaxCode boolean Indicates whether Setup Fee Tax Code setting is visible in UI.
showSkipFirstPayment boolean Indicates whether Skip First Payment setting is visible in UI.
showSortingRank boolean Indicates whether Sorting Rank setting is visible in UI.
showTaxCode boolean Indicates whether Tax Code setting is visible in UI.
showTermsOfServiceURL boolean Indicates whether Terms Of Service URL setting is visible in UI.
showVisibleOnMarketplace boolean Indicates whether Visible On Marketplace setting is visible in UI.
showVisibleOnNetwork boolean Indicates whether Visible On Network setting is visible in UI.

MarketplaceProductSettings

{
  "billing": {
    "billingSettings": {
      "billingCycle": {
        "options": [
          "MP_DEFAULT_CYCLE",
          "FIRST_DAY_OF_THE_MONTH",
          "LAST_DAY_OF_THE_MONTH",
          "PURCHASE_DAY",
          "CUSTOM_DAY_OF_THE_MONTH"
        ],
        "selectedOption": "FIRST_DAY_OF_THE_MONTH",
        "startDay": 1
      },
      "setupFeeTaxCode": "DEF456",
      "skipFirstPayment": true,
      "taxCode": "ABC123",
      "validations": [
        {
          "field": "startDay",
          "maxValue": 31,
          "minValue": 1,
          "numeric": true
        },
        {
          "field": "taxCode",
          "maxLength": 255
        },
        {
          "field": "setupFeeTaxCode",
          "maxLength": 25
        }
      ]
    },
    "freeTrialBillingOptions": [
      {
        "automaticUpgradeToPaidEnabled": true,
        "editionId": 9890,
        "editionName": "Free Trial",
        "requireBillingInfo": true
      }
    ],
    "skuSettings": {
      "editionPricingItems": [
        {
          "editionName": "Free Trial Edition",
          "paymentPlanId": 123,
          "skus": [
            {
              "fid1": "yyyy-yyyyyy-yyyy",
              "price": "$0.03",
              "pricingItemId": 20423,
              "sku": "A1B2C3"
            },
            {
              "fid1": "yyyy-yyyyyy-yyyy",
              "price": "$0.17",
              "pricingItemId": 20424,
              "sku": "321CBA"
            }
          ]
        }
      ],
      "validations": [
        {
          "alphanumeric": true,
          "field": "sku",
          "maxLength": 6,
          "minLength": 6,
          "required": true
        },
        {
          "field": "fid1",
          "maxLength": 25,
          "minLength": 2,
          "required": false
        }
      ]
    }
  },
  "general": {
    "additionalSettings": {
      "validations": [
        {
          "field": "externalIdentifier",
          "maxLength": 36
        },
        {
          "field": "productStockNumber",
          "maxLength": 36
        }
      ]
    },
    "apiHealthMaintenance": {
      "assignAndUnassign": {
        "disabled": true,
        "tooltip": "This endpoint has been disabled by the developer.",
        "value": false
      },
      "purchase": {
        "disabled": false,
        "value": true
      },
      "singleSignOn": {
        "disabled": false,
        "value": false
      },
      "updateSubscription": {
        "disabled": true,
        "tooltip": "The product is part of a bundle.",
        "value": true
      }
    },
    "settings": {
      "collectLeads": {
        "assignLeadsToDevelopers": false,
        "editionLeadGenEnabled": false,
        "enabled": true,
        "options": [
          "inAdditionToPurchase",
          "insteadOfPurchase"
        ],
        "selectedOption": "inAdditionToPurchase"
      },
      "disableSelfServe": true,
      "hideAllPricing": true,
      "sellDomainAsStandalone": true,
      "showAsComingSoon": true,
      "sortingRank": {
        "options": [
          "Very High",
          "High",
          "Medium",
          "Low",
          "Very Low"
        ],
        "selectedOption": "Very Low"
      },
      "termsOfServiceURL": "http://www.google.com",
      "validations": [
        {
          "field": "termsOfServiceURL",
          "maxLength": 1024
        }
      ],
      "visibleOnMarketplace": true,
      "visibleOnNetwork": true
    }
  },
  "productGroups": {
    "attributes": [
      {
        "attributeId": 56,
        "name": "English",
        "options": [
          {
            "attributeOptionId": 128,
            "name": "EngOpt1",
            "selected": true
          },
          {
            "attributeOptionId": 129,
            "name": "EngOpt2",
            "selected": false
          },
          {
            "attributeOptionId": 130,
            "name": "EngOpt3",
            "selected": false
          },
          {
            "attributeOptionId": 131,
            "name": "EngOpt4",
            "selected": false
          },
          {
            "attributeOptionId": 132,
            "name": "EngOpt5",
            "selected": false
          },
          {
            "attributeOptionId": 133,
            "name": "EngOpt6",
            "selected": false
          },
          {
            "attributeOptionId": 134,
            "name": "EngOpt7",
            "selected": false
          }
        ],
        "required": false
      }
    ],
    "categories": {
      "options": [
        {
          "categoryId": 0,
          "name": "Select a Category",
          "subCategories": [
            {
              "name": "Select a Sub Category",
              "subCategoryId": 0
            }
          ]
        },
        {
          "categoryId": 186,
          "name": "Numbers",
          "subCategories": [
            {
              "name": "Select a Sub Category",
              "subCategoryId": 0
            },
            {
              "name": "One",
              "subCategoryId": 113
            },
            {
              "name": "Two",
              "subCategoryId": 114
            }
          ]
        }
      ],
      "required": false,
      "selectedOptions": [
        {
          "categoryId": 0,
          "subCategoryId": 0
        },
        {
          "categoryId": 186,
          "subCategoryId": 0
        },
        {
          "categoryId": 186,
          "subCategoryId": 115
        }
      ],
      "tooltip": "Add categories to your application"
    },
    "customerGroups": [
      {
        "name": "New Customer Group",
        "options": [
          {
            "industryId": 55,
            "name": "Industry1",
            "selected": true
          },
          {
            "industryId": 56,
            "name": "Industry2",
            "selected": false
          }
        ],
        "required": true,
        "userAttributeId": 31
      }
    ],
    "merchandisingOptions": {
      "badges": {
        "options": [
          {
            "badgeId": 7,
            "imageUrl": "common_resources/attributeOptions/128/badge.png?e5dc31b07b947203ce979bd55032f960",
            "name": "EngOpt1",
            "position": 1
          },
          {
            "badgeId": 8,
            "imageUrl": "common_resources/attributeOptions/129/badge.png?e5dc31b07b947203ce979bd55032f960",
            "name": "EngOpt2",
            "position": 2
          },
          {
            "badgeId": 9,
            "imageUrl": "common_resources/attributeOptions/130/badge.png?fd55e224f0cc01dd33f6ae864002e880",
            "name": "EngOpt3"
          },
          {
            "badgeId": 10,
            "imageUrl": "common_resources/attributeOptions/null/badge.png?e5dc31b07b947203ce979bd55032f960",
            "name": "EngOpt4"
          }
        ],
        "selectedOptions": [
          7,
          8
        ]
      },
      "ribbons": {
        "options": [
          {
            "ribbonId": 0,
            "text": "Choose One"
          },
          {
            "color": "#0004FF",
            "ribbonId": 8,
            "text": "Discount",
            "textColor": "#FFFFF"
          },
          {
            "color": "#0004FF",
            "ribbonId": 7,
            "text": "Free",
            "textColor": "#FFFFF"
          },
          {
            "color": "#0004FF",
            "ribbonId": 9,
            "text": "Special",
            "textColor": "#FFFFF"
          }
        ],
        "selectedOption": 7
      }
    },
    "productLines": [
      {
        "name": "MSFT",
        "productLineId": 1,
        "selected": false
      }
    ]
  },
  "productInformation": {
    "appFromNetwork": false,
    "iconUrl": "https://ad-dev-dump1.s3.amazonaws.com/app_resources/157/thumbs_64/img7932941780668708927.png",
    "productName": "AUTO_WEBAPP_NEW"
  }
}

Product setting information

Name Type Description
billing Billing Information about the billing settings, free trials, billing patterns, or SKU settings of the product.
general GeneralSettings Information about the availability of the product, API health maintenance, and additional settings.
productGroups ProductGroups Information about the categories, attributes, product lines, customer groups, and merchandising options of the product.
productInformation ProductInformation Information about the product, such as the name, icon URL, and whether it is a network product.

MarkupPricingType

Markup pricing types

Enumeration of

MerchandisingBadgeOption

{
  "badgeId": 7,
  "imageUrl": "common_resources/attributeOptions/128/badge.png?e5dc31b07b947203ce979bd55032f960",
  "name": "EngOpt1",
  "position": 1
}

Information about the badge option for this product.

Name Type Description
badgeId integer Unique ID of the badge option.
imageUrl string Badge image URL.
name string Name of the badge option.
position integer Position of the badge.

MerchandisingBadgeSelections

{
  "options": [
    {
      "badgeId": 7,
      "imageUrl": "common_resources/attributeOptions/128/badge.png?e5dc31b07b947203ce979bd55032f960",
      "name": "EngOpt1",
      "position": 1
    },
    {
      "badgeId": 8,
      "imageUrl": "common_resources/attributeOptions/129/badge.png?e5dc31b07b947203ce979bd55032f960",
      "name": "EngOpt2",
      "position": 2
    },
    {
      "badgeId": 9,
      "imageUrl": "common_resources/attributeOptions/130/badge.png?fd55e224f0cc01dd33f6ae864002e880",
      "name": "EngOpt3"
    },
    {
      "badgeId": 10,
      "imageUrl": "common_resources/attributeOptions/null/badge.png?e5dc31b07b947203ce979bd55032f960",
      "name": "EngOpt4"
    }
  ],
  "selectedOptions": [
    7,
    8
  ]
}

Information about promotional image badges available for the product.

Name Type Description
options array of MerchandisingBadgeOption List of badge options for the product.
selectedOptions array of integer List of unique IDs of badges selected for the product.

MerchandisingOptions

{
  "badges": {
    "options": [
      {
        "badgeId": 7,
        "imageUrl": "common_resources/attributeOptions/128/badge.png?e5dc31b07b947203ce979bd55032f960",
        "name": "EngOpt1",
        "position": 1
      },
      {
        "badgeId": 8,
        "imageUrl": "common_resources/attributeOptions/129/badge.png?e5dc31b07b947203ce979bd55032f960",
        "name": "EngOpt2",
        "position": 2
      },
      {
        "badgeId": 9,
        "imageUrl": "common_resources/attributeOptions/130/badge.png?fd55e224f0cc01dd33f6ae864002e880",
        "name": "EngOpt3"
      },
      {
        "badgeId": 10,
        "imageUrl": "common_resources/attributeOptions/null/badge.png?e5dc31b07b947203ce979bd55032f960",
        "name": "EngOpt4"
      }
    ],
    "selectedOptions": [
      7,
      8
    ]
  },
  "ribbons": {
    "options": [
      {
        "ribbonId": 0,
        "text": "Choose One"
      },
      {
        "color": "#0004FF",
        "ribbonId": 8,
        "text": "Discount",
        "textColor": "#FFFFF"
      },
      {
        "color": "#0004FF",
        "ribbonId": 7,
        "text": "Free",
        "textColor": "#FFFFF"
      },
      {
        "color": "#0004FF",
        "ribbonId": 9,
        "text": "Special",
        "textColor": "#FFFFF"
      }
    ],
    "selectedOption": 7
  }
}

Information about the badges and ribbons added to the product.

Name Type Description
badges MerchandisingBadgeSelections Information about promotional image badges available for the product.
ribbons MerchandisingRibbonSelection Information about promotional text ribbons available for the product.

MerchandisingRibbonOption

{
  "color": "#0004FF",
  "ribbonId": 8,
  "text": "Discount",
  "textColor": "#FFFFF"
}

Details of the ribbon option for the product.

Name Type Description
color string Color of the ribbon option.
ribbonId integer Unique ID of the ribbon option.
text string Text of the ribbon option.
textColor string Text color of the ribbon option.

MerchandisingRibbonSelection

{
  "options": [
    {
      "ribbonId": 0,
      "text": "Choose One"
    },
    {
      "color": "#0004FF",
      "ribbonId": 8,
      "text": "Discount",
      "textColor": "#FFFFF"
    },
    {
      "color": "#0004FF",
      "ribbonId": 7,
      "text": "Free",
      "textColor": "#FFFFF"
    },
    {
      "color": "#0004FF",
      "ribbonId": 9,
      "text": "Special",
      "textColor": "#FFFFF"
    }
  ],
  "selectedOption": 7
}

Information about promotional text ribbons available for the product.

Name Type Description
options array of MerchandisingRibbonOption List of ribbon options for the product.
selectedOption integer Selected unique ID of ribbon for the product.

MeteredUsageItem

{
  "description": "List of metered usage events associated with a customer's subscription.",
  "type": "object",
  "title": "MeteredUsageItem",
  "properties": {
    "accountId": {
      "description": "Unique identifier that associates a vendor (ISV), customer company, and subscription. Represents company entitlement. Provided by vendor (ISV) when subscription purchased. Marketplace Managers can locate it in the user interface Integration Event event logs.",
      "type": "string"
    },
    "usageList": {
      "description": "List of metered usage event details.",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/UsageItem"
      }
    }
  }
}

List of metered usage events associated with a customer's subscription.

Name Type Description
accountId string Unique identifier that associates a vendor (ISV), customer company, and subscription. Represents company entitlement. Provided by vendor (ISV) when subscription purchased. Marketplace Managers can locate it in the user interface Integration Event event logs.
usageList array of UsageItem List of metered usage event details.

MeteredUsageRequest

{
  "description": "Metered usage event submission",
  "type": "object",
  "title": "MeteredUsageRequest",
  "properties": {
    "billable": {
      "description": "Indicates usage is billable (true) or estimated (false). Required.",
      "type": "boolean"
    },
    "idempotencyKey": {
      "description": "Unique caller-generated identifier for the metered usage that is sent. Ensures duplicate submissions can be identified and an error returned. Required.",
      "type": "string"
    },
    "requestGroupId": {
      "description": "A caller-generated identifier to group related metered usage requests. For example, 'January 2022' to group all requests that include January billing period events.",
      "type": "string",
      "nullable": true
    },
    "usages": {
      "description": "List of metered usage events.",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/MeteredUsageItem"
      }
    }
  }
}

Metered usage event submission

Name Type Description
billable boolean Indicates usage is billable (true) or estimated (false). Required.
idempotencyKey string Unique caller-generated identifier for the metered usage that is sent. Ensures duplicate submissions can be identified and an error returned. Required.
requestGroupId string A caller-generated identifier to group related metered usage requests. For example, 'January 2022' to group all requests that include January billing period events.
usages array of MeteredUsageItem List of metered usage events.

MeteredUsageRequestAccepted

{
  "description": "Reported metered usage received and accepted",
  "type": "object",
  "title": "MeteredUsageRequestAccepted",
  "properties": {
    "idempotencyKey": {
      "description": "Unique caller-generated identifier sent with the metered usage submission.",
      "type": "string"
    },
    "queryUsageStatus": {
      "description": "API endpoint to fetch the processing status of all metered usage events submitted with the request.",
      "type": "string"
    },
    "requestId": {
      "description": "Unique system-assigned identifier for the metered usage request. Returned with the response.",
      "type": "string"
    }
  }
}

Reported metered usage received and accepted

Name Type Description
idempotencyKey string Unique caller-generated identifier sent with the metered usage submission.
queryUsageStatus string API endpoint to fetch the processing status of all metered usage events submitted with the request.
requestId string Unique system-assigned identifier for the metered usage request. Returned with the response.

MinimumServiceLengthUnit

Time unit for contract length. This property must have the same value as the contract length unit configured for the pricing plan.

Enumeration of

MosiUser

{
  "username": "adazuretest@sdasd21321.onmicrosoft.com"
}
Name Type Description
username string

MyAppState

MyApp state type

Enumeration of

MyAppsList

{
  "content": [
    {
      "addon": false,
      "addonParentApplicationId": 1,
      "addonParentEntitlementId": null,
      "appLinkLocation": "http://www.nytimes.com",
      "appLinkUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "appLinkVersions": {
        "common": [
          "1.0"
        ]
      },
      "applicationId": 3281,
      "applicationProfileUrl": "http://appdirect.com/apps/3281",
      "assignUrl": "http://appdirect.com/account/assign?companyEntitlementId=1603",
      "assigned": true,
      "assignmentEnabled": true,
      "authenticationMethod": "OPENID",
      "autoUpgradeToPaid": false,
      "baseUrl": "http://appdirect.com",
      "billableEntitlementId": 1603,
      "blurb": "C24769040",
      "bundled": false,
      "bypassTermsWhenDefault": false,
      "changeSubscriptionEnabled": true,
      "companyEntitlementExternalPartnerIdentifier": "42bdd7be-9807-45f5-ab97-4b345a59e89f",
      "companyEntitlementExternalVendorIdentifier": "42bdd7be-9807-45f5-ab97-4b345a59e89f",
      "companyEntitlementId": 1603,
      "companyEntitlementLabel": "Acme Utilities",
      "companyEntitlementMetadata": {},
      "companyEntitlementStatus": "ACTIVE",
      "companyEntitlementSuspensionReason": "PAYMENT_OVERDUE",
      "companyEntitlementUuid": "79c142b0-12bd-441c-ad2d-f5b3d21034be",
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "companyWide": true,
      "contractExpired": false,
      "contractExpiring": false,
      "customIntegration": "NEW_RELIC",
      "daysUntilPayment": -998,
      "description": null,
      "developerName": "Appdirect",
      "editionCode": "RECURRING",
      "editionId": 7283,
      "editionName": "Recurring Edition",
      "endOfContractDate": 1504072800000,
      "free": false,
      "gridImagePath": "app_resources/244/myAppIcon/img7760809170859065004.png?9a1be8ccdab998703894391bc9488436",
      "gridImageSrcset": {
        "default": "http://localhost:8080/app_resources/244/myAppIcon/img7760809170859065004.png"
      },
      "hideAppTile": false,
      "imageBaseUrl": "http://appdirect.com",
      "imageUrl": "http://appdirect.com/app_resources/244/myAppIcon/img7760809170859065004.png?9a1be8ccdab998703894391bc9488436",
      "importableApplicationUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "imported": false,
      "importedPasswordManager": false,
      "invoiceExternallyProcessed": false,
      "invoiceStatus": "PAID",
      "keychainApplicationId": 1,
      "keychainCredentialsId": 1,
      "launchUrl": "http://appdirect.com/launch?userEntitlementId=1891",
      "legacyBundleCompanyEntitlementId": 1,
      "linkUrl": "http://appdirect.com/viewVideo/1",
      "links": [
        {
          "href": "http://appdirect.com/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/memberships/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1/myapps/assigned/1891",
          "rel": "self"
        }
      ],
      "manageOnVendorUrl": "http://appdirect.com/launch?userEntitlementId=1891&manage=true",
      "manageUrl": "http://appdirect.com/account/apps/1603",
      "name": "C24769040_B",
      "newSubscriptionEnabled": true,
      "newUpload": false,
      "openIdConnectInitiateLoginMethod": "GET",
      "openIdLoginMethod": "GET",
      "openIdLoginUrl": "http://openid.login",
      "orderDuration": "MONTHLY",
      "overdue": false,
      "overview": "C24769040",
      "ownerFirstName": "super",
      "ownerId": 1,
      "ownerLastName": "user",
      "ownerUuid": "2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1",
      "partner": "APPDIRECT",
      "payUrl": "http://appdirect.com/pay?userEntitlementId=12",
      "paymentDueDate": 1425798000000,
      "pending": false,
      "pendingAppId": null,
      "pendingAppType": "REQUESTED",
      "pendingAsync": true,
      "pendingCreation": false,
      "pendingEventType": "SUBSCRIPTION_CANCEL",
      "preDisabled": false,
      "privacyUrl": "https://www.appdirect.com/privacystatement/en-us/core/default.aspx",
      "productType": "WEB_APP",
      "publishedOn": 1490375822000,
      "purchaseOrderId": 3756,
      "purchaseUrl": "http://appdirect.com/purchase/1?fromEntitlementId=12",
      "purchased": true,
      "remainingFreeTrialDays": -92,
      "requestable": false,
      "requested": false,
      "samlProviderUuid": "2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1",
      "sampleApp": false,
      "shortcut": "google",
      "simple": false,
      "simpleEntitlementId": 1,
      "simpleEntitlementUuid": "42bdd7be-9807-45f5-ab97-4b345a59e89f",
      "slogan": "Turn your website Visitors into Customers",
      "ssoEnabled": true,
      "startDate": 1504072800000,
      "state": "ACTIVE",
      "subscriptionEventPending": true,
      "supportEmail": "support@company.com",
      "supportKb": "http://support.appdirect.com",
      "supportPhone": "1-800-557-4434",
      "systemTileType": "PASSWORD_MANAGER",
      "termsUrl": "https://www.appdirect.com/en-us/legal/intellectualproperty/copyright/default.aspx",
      "upgradeToPaid": false,
      "usageType": "MULTI_USER",
      "useMessage": "Call the team on 0800150247",
      "useMessageTitle": "Get IT Support Now",
      "userEntitlementCreatedOn": 1504147976000,
      "userEntitlementExternalVendorIdentifier": "42bdd7be-9807-45f5-ab97-4b345a59e89f",
      "userEntitlementId": 1891,
      "userEntitlementMetadata": {},
      "userEntitlementStatus": "ACTIVE",
      "userEntitlementUuid": "42bdd7be-9807-45f5-ab97-4b345a59e89f",
      "userUuid": "2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1"
    }
  ],
  "links": []
}

List of user associated apps

Name Type Description
content array of UserApplication User applications
links array of Link Custom attributes for this company

MyAppsUrl

"http://appdirect.com/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/memberships/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1/myapps/assigned/1891"

MyApps URL

Name Type Description
MyAppsUrl string MyApps URL link

{
  "attributeGroups": [
    {
      "attribute": [
        {
          "id": 12345,
          "name": "...",
          "numTaggedProducts": 12345
        },
        {
          "id": 12345,
          "name": "...",
          "numTaggedProducts": 12345
        }
      ],
      "id": 12345,
      "name": "...",
      "showOnNavigation": true,
      "vendorTaggable": true
    },
    {
      "attribute": [
        {
          "id": 12345,
          "name": "...",
          "numTaggedProducts": 12345
        },
        {
          "id": 12345,
          "name": "...",
          "numTaggedProducts": 12345
        }
      ],
      "id": 12345,
      "name": "...",
      "showOnNavigation": true,
      "vendorTaggable": true
    }
  ],
  "categories": [
    {
      "id": 12345,
      "name": "...",
      "numTaggedProducts": 12345,
      "subCategories": [
        {
          "id": 12345,
          "name": "...",
          "numTaggedProducts": 12345
        },
        {
          "id": 12345,
          "name": "...",
          "numTaggedProducts": 12345
        }
      ]
    },
    {
      "id": 12345,
      "name": "...",
      "numTaggedProducts": 12345,
      "subCategories": [
        {
          "id": 12345,
          "name": "...",
          "numTaggedProducts": 12345
        },
        {
          "id": 12345,
          "name": "...",
          "numTaggedProducts": 12345
        }
      ]
    }
  ],
  "categorySortOrder": "NONE",
  "customerTagGroups": [
    {
      "customerTags": [
        {
          "id": 12345,
          "name": "...",
          "numTaggedProducts": 12345
        },
        {
          "id": 12345,
          "name": "...",
          "numTaggedProducts": 12345
        }
      ],
      "hideOnNavigation": true,
      "id": 12345,
      "name": "..."
    },
    {
      "customerTags": [
        {
          "id": 12345,
          "name": "...",
          "numTaggedProducts": 12345
        },
        {
          "id": 12345,
          "name": "...",
          "numTaggedProducts": 12345
        }
      ],
      "hideOnNavigation": true,
      "id": 12345,
      "name": "..."
    }
  ],
  "platforms": [
    {
      "attributeDefinition": [
        {
          "createdOn": 12345,
          "hint": "...",
          "isRequired": true,
          "key": "...",
          "label": "...",
          "lastModified": 12345,
          "option": [
            {},
            {}
          ],
          "order": 12345,
          "type": "...",
          "uuid": "..."
        },
        {
          "createdOn": 12345,
          "hint": "...",
          "isRequired": true,
          "key": "...",
          "label": "...",
          "lastModified": 12345,
          "option": [
            {},
            {}
          ],
          "order": 12345,
          "type": "...",
          "uuid": "..."
        }
      ],
      "createdOn": 12345,
      "description": "...",
      "iconUrl": "...",
      "isVersionSupported": true,
      "lastModified": 12345,
      "name": "...",
      "numTaggedProducts": 12345,
      "uuid": "..."
    },
    {
      "attributeDefinition": [
        {
          "createdOn": 12345,
          "hint": "...",
          "isRequired": true,
          "key": "...",
          "label": "...",
          "lastModified": 12345,
          "option": [
            {},
            {}
          ],
          "order": 12345,
          "type": "...",
          "uuid": "..."
        },
        {
          "createdOn": 12345,
          "hint": "...",
          "isRequired": true,
          "key": "...",
          "label": "...",
          "lastModified": 12345,
          "option": [
            {},
            {}
          ],
          "order": 12345,
          "type": "...",
          "uuid": "..."
        }
      ],
      "createdOn": 12345,
      "description": "...",
      "iconUrl": "...",
      "isVersionSupported": true,
      "lastModified": 12345,
      "name": "...",
      "numTaggedProducts": 12345,
      "uuid": "..."
    }
  ],
  "vendors": [
    {
      "name": "...",
      "uuid": "..."
    },
    {
      "name": "...",
      "uuid": "..."
    }
  ]
}

Defines possible product tags that can be used to filter applications during a search

Name Type Description
attributeGroups array of AttributeGroup The attribute groups
categories array of Category The categories
categorySortOrder CategorySortOrderType When set to MANUAL, Marketplace Managers can manually set the order in which categories are displayed in the user interface. When set to NONE (default), it is not possible to change category display order.
customerTagGroups array of CustomerTagGroup The customer tag groups
platforms array of Platform The platforms
vendors array of VendorCompany The vendors

NotificationAudienceType

Enumeration of

NotificationCommonElementDefinition

{
  "type": "object",
  "title": "NotificationCommonElementDefinition",
  "properties": {
    "methods": {
      "description": "Notification methods(Email, sms)",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/NotificationMethod"
      }
    },
    "position": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Position"
        },
        {
          "description": "Position of the element in the template(Top, bottom)"
        }
      ]
    },
    "type": {
      "allOf": [
        {
          "$ref": "#/components/schemas/NotificationCommonElementType"
        },
        {
          "description": "Notification common element type"
        }
      ]
    }
  }
}
Name Type Description
methods array of NotificationMethod Notification methods(Email, sms)
position Position Position of the element in the template(Top, bottom)
type NotificationCommonElementType Notification common element type

NotificationCommonElementType

Enumeration of

NotificationCommonEmailElementWS

{
  "type": "object",
  "title": "NotificationCommonEmailElementWS",
  "required": [
    "type",
    "content",
    "locale"
  ],
  "properties": {
    "content": {
      "description": "Email notification content",
      "type": "string"
    },
    "defaultCommonElement": {
      "description": "If the elements are default common elements",
      "type": "boolean"
    },
    "enabled": {
      "description": "If the email template is enabled",
      "type": "boolean"
    },
    "id": {
      "description": "Email notification template ID",
      "type": "number"
    },
    "locale": {
      "description": "Email notification locale to determine the language",
      "type": "string"
    },
    "partner": {
      "description": "Partner being used to render the email",
      "type": "string"
    },
    "type": {
      "allOf": [
        {
          "$ref": "#/components/schemas/NotificationCommonElementType"
        },
        {
          "description": "Email notification common element type"
        }
      ]
    }
  }
}
Name Type Description
content string Email notification content
defaultCommonElement boolean If the elements are default common elements
enabled boolean If the email template is enabled
id number Email notification template ID
locale string Email notification locale to determine the language
partner string Partner being used to render the email
type NotificationCommonElementType Email notification common element type

NotificationEmailTemplateWS

{
  "type": "object",
  "title": "NotificationEmailTemplateWS",
  "required": [
    "type",
    "locale",
    "subject",
    "content"
  ],
  "properties": {
    "content": {
      "description": "Email notification content",
      "type": "string"
    },
    "defaultTemplate": {
      "description": "If the template is a default template of it's kind",
      "type": "boolean"
    },
    "directSales": {
      "description": "If the template is used for a direct sale product",
      "type": "boolean"
    },
    "enabled": {
      "description": "If the email template is enabled",
      "type": "boolean"
    },
    "fallbackEmailTemplateId": {
      "description": "The ID of the template to fallback to if current one is disabled or not existing",
      "type": "number"
    },
    "id": {
      "description": "Email notification template ID",
      "type": "number"
    },
    "locale": {
      "description": "Email notification locale to determine the language",
      "type": "string"
    },
    "partner": {
      "description": "Partner being used to render the email",
      "type": "string"
    },
    "reminderPattern": {
      "description": "Notification reminder pattern",
      "type": "string"
    },
    "subject": {
      "description": "Email notification subject",
      "type": "string"
    },
    "type": {
      "allOf": [
        {
          "$ref": "#/components/schemas/NotificationTemplateType"
        },
        {
          "description": "Email notification template type"
        }
      ]
    }
  }
}
Name Type Description
content string Email notification content
defaultTemplate boolean If the template is a default template of it's kind
directSales boolean If the template is used for a direct sale product
enabled boolean If the email template is enabled
fallbackEmailTemplateId number The ID of the template to fallback to if current one is disabled or not existing
id number Email notification template ID
locale string Email notification locale to determine the language
partner string Partner being used to render the email
reminderPattern string Notification reminder pattern
subject string Email notification subject
type NotificationTemplateType Email notification template type

NotificationMethod

Enumeration of

NotificationMethodTemplate

{
  "type": "object",
  "title": "NotificationMethodTemplate",
  "properties": {
    "enabled": {
      "description": "If notification method is enabled",
      "type": "boolean"
    },
    "method": {
      "allOf": [
        {
          "$ref": "#/components/schemas/NotificationMethod"
        },
        {
          "description": "Notification method(Email or sms)"
        }
      ]
    }
  }
}
Name Type Description
enabled boolean If notification method is enabled
method NotificationMethod Notification method(Email or sms)

NotificationParameterType

Enumeration of

NotificationParameterValueType

Enumeration of

NotificationReminderType

Enumeration of

NotificationSmsTemplateWS

{
  "type": "object",
  "title": "NotificationSmsTemplateWS",
  "required": [
    "type",
    "locale",
    "content"
  ],
  "properties": {
    "content": {
      "description": "SMS notification content",
      "type": "string"
    },
    "directSales": {
      "description": "If the template is used for a direct sale product",
      "type": "boolean"
    },
    "enabled": {
      "description": "If the SMS template is enabled",
      "type": "boolean"
    },
    "id": {
      "description": "SMS notification template ID",
      "type": "number"
    },
    "locale": {
      "description": "SMS notification locale to determine the language",
      "type": "string"
    },
    "type": {
      "allOf": [
        {
          "$ref": "#/components/schemas/NotificationTemplateType"
        },
        {
          "description": "SMS notification template type"
        }
      ]
    }
  }
}
Name Type Description
content string SMS notification content
directSales boolean If the template is used for a direct sale product
enabled boolean If the SMS template is enabled
id number SMS notification template ID
locale string SMS notification locale to determine the language
type NotificationTemplateType SMS notification template type

NotificationTemplateCategory

Enumeration of

NotificationTemplateDefinition

{
  "type": "object",
  "title": "NotificationTemplateDefinition",
  "properties": {
    "audience": {
      "allOf": [
        {
          "$ref": "#/components/schemas/NotificationAudienceType"
        },
        {
          "description": "Notification audienceType(New user, existing user, etc)"
        }
      ]
    },
    "category": {
      "allOf": [
        {
          "$ref": "#/components/schemas/NotificationTemplateCategory"
        },
        {
          "description": "Notification template category(Billing, account, etc)"
        }
      ]
    },
    "generated": {
      "description": "If the template body is generated",
      "type": "boolean"
    },
    "methods": {
      "description": "Notification methods(Email, sms)",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/NotificationMethodTemplateWS"
      }
    },
    "reminder": {
      "allOf": [
        {
          "$ref": "#/components/schemas/NotificationReminderType"
        },
        {
          "description": "Notification reminder type"
        }
      ]
    },
    "required": {
      "description": "If the template can be disabled or not",
      "type": "boolean"
    },
    "type": {
      "allOf": [
        {
          "$ref": "#/components/schemas/NotificationTemplateType"
        },
        {
          "description": "Notification template type"
        }
      ]
    }
  }
}
Name Type Description
audience NotificationAudienceType Notification audienceType(New user, existing user, etc)
category NotificationTemplateCategory Notification template category(Billing, account, etc)
generated boolean If the template body is generated
methods array of NotificationMethodTemplate Notification methods(Email, sms)
reminder NotificationReminderType Notification reminder type
required boolean If the template can be disabled or not
type NotificationTemplateType Notification template type

NotificationTemplateParameter

{
  "type": "object",
  "title": "NotificationTemplateParameter",
  "properties": {
    "parameterName": {
      "description": "Notification template parameter name",
      "type": "string"
    },
    "type": {
      "allOf": [
        {
          "$ref": "#/components/schemas/NotificationParameterType"
        },
        {
          "description": "Notification template parameter type(USERNAME, CHANNEL NAME, etc)"
        }
      ]
    },
    "valueType": {
      "allOf": [
        {
          "$ref": "#/components/schemas/NotificationParameterValueType"
        },
        {
          "description": "Notification parameter value type(single value, collections, etc)"
        }
      ]
    }
  }
}
Name Type Description
parameterName string Notification template parameter name
type NotificationParameterType Notification template parameter type(USERNAME, CHANNEL NAME, etc)
valueType NotificationParameterValueType Notification parameter value type(single value, collections, etc)

NotificationTemplateType

Enumeration of

Opportunity

{
  "actionRestrictions": {},
  "availableActions": [
    "EDIT",
    "FINALIZE",
    "SUBMIT_FOR_REVIEW",
    "ADD_PRODUCT",
    "SET_CUSTOM_PRICE",
    "SET_CUSTOM_CONTRACT",
    "SET_PROVISIONING_DATE",
    "SET_BILLING_DATE",
    "SET_COMMISSION_RATE",
    "CHANGE_OPPORTUNITY_OWNER"
  ],
  "createdOn": "1546300800000",
  "currency": "USD",
  "customerUser": {
    "company": {
      "id": "100",
      "name": "Customer Company"
    },
    "email": "ubrownfield@stark.com",
    "firstName": "Ulysses",
    "id": "498c62ea-ad14-48e6-96ce-5400c617444c",
    "lastName": "Brownfield"
  },
  "id": "ef6c414f-39da-401f-a4b8-81adc6190fda",
  "items": [
    {
      "id": "4ccf689b-4339-4fc9-a8b3-b05c5a87c1be",
      "pricingPlanId": "4bc864b5-f63f-4933-be19-3700aa9a8cc4",
      "subscriptionCustomAttributes": {
        "intended_os": [
          "other",
          "ios",
          "macos"
        ],
        "sales_agent_id": [
          "R353113R"
        ]
      },
      "units": [
        {
          "quantity": "20",
          "unit": "USER"
        }
      ],
      "vendorRequiredFields": {
        "email": [
          "john.doe@acme.com"
        ],
        "lastname": [
          "doe"
        ],
        "name": [
          "jonh"
        ]
      }
    },
    {
      "id": "dece524d-0466-4185-b3bb-1f8a300c37cd",
      "pricingPlanId": "80b85538-ffc1-4c4b-acb1-1bf87c8c2fc4",
      "units": []
    }
  ],
  "name": "Jarvis Iniative",
  "ownerUser": {
    "company": {
      "id": "1",
      "name": "Acme Corp."
    },
    "email": "john.doe@acme.com",
    "firstName": "John",
    "id": "d781ac09-b4fe-4d57-8ba2-4640fc5b7c49",
    "lastName": "Doe"
  },
  "purchaseEffectiveDate": "1577750400000",
  "status": "OPEN"
}
Name Type Description
actionRestrictions ActionRestriction Action restrictions on the opportunity
availableActions array of AvailableAction Available actions on the opportunity
createdOn number Opportunity creation date, in UNIX Epoch milliseconds
currency OpportunityCurrency The currency using the ISO-4217 currency code
customerUser User
id string Opportunity ID
items array of OpportunityItem List of items in the opportunity
name string Opportunity name
ownerUser User
purchaseCustomAttributes CustomAttribute Custom attributes related to the purchase
purchaseEffectiveDate number Opportunity purchase effective date, in UNIX Epoch milliseconds
purchaseId string Purchase ID
purchaseNumber string Purchase number
status OpportunityStatus Opportunity status

OpportunityClone

{
  "opportunityId": "498c62ea-ad14-48e6-96ce-5400c617444c"
}

The response text containing the cloned opportunity ID.

Name Type Description
opportunityId string The ID of the cloned opportunity

OpportunityCloneRequest

{
  "customerCompanyId": "498c62ea-ad14-48e6-96ce-5400c617444c",
  "customerId": "505f0a0c-57a7-4d9e-9fac-66bbf557ac4d",
  "name": "Opportunity name - COPY",
  "ownerCompanyId": "6a62244e-aa2f-461b-8c7a-3a0e091be9d3",
  "ownerId": "d781ac09-b4fe-4d57-8ba2-4640fc5b7c49"
}

The parameters to be used when cloning the opportunity

Name Type Description
customerCompanyId string The company ID of the customer
customerId string The user ID of the customer
name string The name of the opportunity
ownerCompanyId string The company ID of the sales agent
ownerId string The user ID of the sales agent

OpportunityCreationRequest

{
  "currency": "USD",
  "customerCompanyId": "498c62ea-ad14-48e6-96ce-5400c617444c",
  "customerId": "505f0a0c-57a7-4d9e-9fac-66bbf557ac4d",
  "items": [
    {
      "pricingPlanId": "85d30404-c56b-4dff-9f3b-06636477fe55",
      "units": [
        {
          "quantity": 10,
          "unit": "USER"
        }
      ]
    },
    {
      "pricingPlanId": "d12931cf-eac6-45fa-8965-d33b1c5698b0",
      "units": []
    }
  ],
  "ownerCompanyId": "6a62244e-aa2f-461b-8c7a-3a0e091be9d3",
  "ownerId": "d781ac09-b4fe-4d57-8ba2-4640fc5b7c49"
}
Name Type Description
currency OpportunityCurrency The currency using the ISO-4217 currency code
customerCompanyId string Customer company ID
customerId string Customer user ID
items array of OpportunityItem List of items in the opportunity
name string Opportunity name
ownerCompanyId string Sales agent company ID
ownerId string Sales agent user ID
purchaseEffectiveDate number Opportunity purchase effective date, in UNIX Epoch milliseconds

OpportunityCurrency

The currency using the ISO-4217 currency code

Enumeration of

OpportunityError

{
  "code": "SERVICE_UNAVAILABLE",
  "message": "Unable to reach the service, please contact support@appdirect.com",
  "status": 503
}

Opportunities API error description

Name Type Description
code OpportunityErrorCode The error code associated with the response
details array of OpportunityErrorDetails Additional error details
message string Descriptive error message for debugging
status integer HTTP status code

OpportunityErrorCode

The error code associated with the response

Enumeration of

OpportunityErrorDetails

{
  "description": "Additional error details returned after opportunity API call failure",
  "type": "object",
  "title": "OpportunityErrorDetails",
  "required": [
    "field",
    "code",
    "message"
  ],
  "properties": {
    "code": {
      "$ref": "#/components/schemas/OpportunityErrorCode"
    },
    "field": {
      "description": "Field related to the error",
      "type": "string"
    },
    "message": {
      "description": "Error description",
      "type": "string"
    }
  }
}

Additional error details returned after opportunity API call failure

Name Type Description
code OpportunityErrorCode The error code associated with the response
field string Field related to the error
message string Error description

OpportunityItem

{
  "billingConfiguration": {
    "date": "1546300800000",
    "strategy": "CUSTOM"
  },
  "id": "37f56046-2cec-4bf4-a4e2-5a733dc849a9",
  "pricingPlanId": "a22c03e9-9e27-4e85-8433-78f246345685",
  "provisioningConfiguration": {
    "date": "1546300800000",
    "strategy": "CUSTOM"
  },
  "subscriptionCustomAttributes": {
    "intended_os": [
      "other",
      "ios",
      "macos"
    ],
    "sales_agent_id": [
      "R353113R"
    ]
  },
  "units": [
    {
      "quantity": "8",
      "unit": "USER"
    }
  ],
  "vendorRequiredFields": {
    "email": [
      "john.doe@acme.com"
    ],
    "lastname": [
      "doe"
    ],
    "name": [
      "john"
    ]
  }
}
Name Type Description
billingConfiguration BillingConfiguration Custom billing dates
id string Item ID
parentItemId string The parent product's Product ID. Only relevant to and required for add-on products.
pricingPlanId string Pricing plan ID
productId string Product ID
provisioningConfiguration ProvisioningConfiguration Custom service activation dates
subscriptionCustomAttributes CustomAttribute Custom attributes related to the subscription
units array of BillingConfiguration List of units (quantity and type) associated with the item
vendorRequiredFields CustomAttribute Custom attributes related to vendor required fields for the subscription

OpportunityItemDetail

{
  "billingConfiguration": {
    "date": "1546300800000",
    "strategy": "CUSTOM"
  },
  "contractConfiguration": {
    "blockContractDowngrades": true,
    "blockContractUpgrades": false,
    "blockSwitchToShorterContract": true,
    "contractCancellationPeriodLimit": null,
    "contractCancellationPeriodUnit": "NONE",
    "endOfContractGracePeriod": null,
    "endOfContractGracePeriodUnit": "INFINITY",
    "keepContractDateOnPlanChange": false,
    "minimumServiceLength": "3",
    "minimumServiceLengthUnit": "MONTHLY",
    "renewalConfiguration": "MONTH_TO_MONTH",
    "terminationFee": {
      "amount": "2",
      "feeType": "FIXED"
    },
    "terminationFeeGracePeriod": "7",
    "terminationFeeGracePeriodUnit": "DAY",
    "unitTerms": {
      "USER": {
        "blockContractDecrease": true,
        "blockContractIncrease": false,
        "blockOriginalContractDecrease": false
      }
    }
  },
  "id": "37f56046-2cec-4bf4-a4e2-5a733dc849a9",
  "pricing": [
    {
      "costType": "RECURRING_FLAT",
      "costTypeCategory": "RECURRING",
      "description": "RECURRING_FLAT",
      "priceRanges": [],
      "pricingStrategy": "FREE",
      "quantity": "1.0000000000",
      "salePrice": "14.9500000000",
      "totalSalePrice": "14.9500000000",
      "wholesalePrice": "12.0000000000"
    },
    {
      "costType": "INCLUDED",
      "costTypeCategory": "RECURRING",
      "description": "INCLUDED",
      "priceRanges": [],
      "pricingStrategy": "UNLIMITED",
      "salePrice": "0.0000000000",
      "totalSalePrice": "0.0000000000",
      "unit": "USER",
      "wholesalePrice": "0.0000000000"
    }
  ],
  "pricingPlan": {
    "id": "031d9ed2-3df1-44f5-876a-6b4318ba7bdb",
    "name": "Recurring Edition with Unlimited Included Users"
  },
  "product": {
    "id": "cc0c7c28-ea65-4bab-8a4a-5e84d90ab291",
    "logo": "https://logs.acme.com/400x400/ddd/000.png&text=Appsome+App",
    "name": "Appsome Webapp",
    "type": "WEB_APP"
  },
  "provisioningConfiguration": {
    "date": "1546300800000",
    "strategy": "CUSTOM"
  },
  "subscriptionCustomAttributes": {
    "intended_os": [
      "other",
      "ios",
      "macos"
    ],
    "sales_agent_id": [
      "R353113R"
    ]
  },
  "units": [
    {
      "quantity": "8",
      "unit": "USER"
    }
  ],
  "vendorRequiredFields": {
    "email": [
      "john.doe@acme.com"
    ],
    "lastname": [
      "doe"
    ],
    "name": [
      "jonh"
    ]
  }
}
Name Type Description
billingConfiguration BillingConfiguration Custom billing dates
contractConfiguration ContractConfiguration Contract configuration
id string Item ID
pricing array of OpportunityPricing Cost of each quantifiable unit and flat rates
pricingPlan PricingPlan Pricing plan information
product OpportunityProduct Product information
provisioningConfiguration ProvisioningConfiguration Custom service activation dates
subscriptionCustomAttributes CustomAttribute Custom attributes related to the subscription
units array of Unit List of units (quantity and type) associated with the item
vendorRequiredFields CustomAttribute Custom attributes related to vendor required fields for the subscription

OpportunityItemUpdateRequest

{
  "billingConfiguration": {
    "date": "1546300800000",
    "strategy": "CUSTOM"
  },
  "contractConfiguration": {
    "blockContractDowngrades": true,
    "blockContractUpgrades": false,
    "blockSwitchToShorterContract": true,
    "contractCancellationPeriodLimit": null,
    "contractCancellationPeriodUnit": "NONE",
    "endOfContractGracePeriod": null,
    "endOfContractGracePeriodUnit": "INFINITY",
    "keepContractDateOnPlanChange": false,
    "minimumServiceLength": "3",
    "minimumServiceLengthUnit": "MONTHLY",
    "renewalConfiguration": "MONTH_TO_MONTH",
    "terminationFee": {
      "amount": "2",
      "feeType": "FIXED"
    },
    "terminationFeeGracePeriod": "7",
    "terminationFeeGracePeriodUnit": "DAY",
    "unitTerms": {
      "USER": {
        "blockContractDecrease": true,
        "blockContractIncrease": false,
        "blockOriginalContractDecrease": false
      }
    }
  },
  "customPrices": [
    {
      "costId": "e5f403a3-7ba0-45d4-8117-8dd8cbceb6c6",
      "price": 100
    },
    {
      "costId": "9742e09a-e1b4-4b9e-b1a7-66df3e41cebe",
      "price": 20
    }
  ],
  "id": "37f56046-2cec-4bf4-a4e2-5a733dc849a9",
  "pricingPlanId": "a22c03e9-9e27-4e85-8433-78f246345685",
  "provisioningConfiguration": {
    "date": "1546300800000",
    "strategy": "CUSTOM"
  },
  "subscriptionCustomAttributes": {
    "intended_os": [
      "other",
      "ios",
      "macos"
    ],
    "sales_agent_id": [
      "R353113R"
    ]
  },
  "units": [
    {
      "quantity": "8",
      "unit": "USER"
    }
  ],
  "vendorRequiredFields": {
    "email": [
      "john.doe@acme.com"
    ],
    "lastname": [
      "Doe"
    ],
    "name": [
      "John"
    ]
  }
}
Name Type Description
billingConfiguration BillingConfiguration Determines when the billing cycle starts. Set UPON_SERVICE_ACTIVATION to start the billing cycle according to the specified provisioning strategy (either immediately after the opportunity is finalized or on a custom provisioning date). Set NEXT_BILLING_CYCLE to start the billing cycle according to the marketplace billing configuration (for example, first of the month). Set CUSTOM to start the billing cycle on a specified date in the future.
contractConfiguration ContractConfiguration Contract configuration options for subscriptions that customers purchase. For example: contract length and cancellation penalities.
customPrices array of CustomPrice List of custom prices per cost
id string Item ID
pricingPlanId string Pricing plan ID
provisioningConfiguration ProvisioningConfiguration Determines when to send the service activation request to the vendor, either immediately after the opportunity is finalized (set the provisioning strategy to IMMEDIATELY) or at a future date (set the provisioning strategy to CUSTOM and set the desired date).
subscriptionCustomAttributes CustomAttribute Custom attributes as key-value pairs. Values must be a string array
units array of Unit List of units (quantity and type) associated with the item
vendorRequiredFields CustomAttribute Custom attributes as key-value pairs. Values must be a string array

OpportunityLight

{
  "createdOn": 1557861989000,
  "customerUser": {
    "company": {
      "id": "100",
      "name": "Customer Company"
    },
    "email": "ubrownfield@stark.com",
    "firstName": "Ulysses",
    "id": "498c62ea-ad14-48e6-96ce-5400c617444c",
    "lastName": "Brownfield"
  },
  "id": "ef6c414f-39da-401f-a4b8-81adc6190fda",
  "name": "Jarvis Iniative",
  "ownerType": "PLATFORM_OWNER",
  "ownerUser": {
    "company": {
      "id": "1",
      "name": "Acme Corp."
    },
    "email": "john.doe@acme.com",
    "firstName": "John",
    "id": "d781ac09-b4fe-4d57-8ba2-4640fc5b7c49",
    "lastName": "Doe"
  },
  "purchaseEffectiveDate": 1577750400000,
  "status": "CLOSED"
}
Name Type Description
createdOn number Opportunity creation date, in UNIX Epoch milliseconds
customerUser User
id string Opportunity ID
name string Opportunity name
ownerType OpportunityOwnerType Opportunity owner type code
ownerUser User
purchaseEffectiveDate number Opportunity purchase effective date, in UNIX Epoch milliseconds
status OpportunityStatus Opportunity status

OpportunityOwnerType

Opportunity owner type code

Enumeration of

OpportunityPage

{
  "type": "object",
  "title": "OpportunityPage",
  "properties": {
    "content": {
      "description": "List of opportunities",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/OpportunityLight"
      }
    },
    "page": {
      "allOf": [
        {
          "$ref": "#/components/schemas/PageMetadata"
        },
        {
          "description": "Page information"
        }
      ]
    }
  }
}
Name Type Description
content array of OpportunityLight List of opportunities
page PageMetadata Page information

OpportunityPricing

{
  "costType": "RECURRING_FLAT",
  "costTypeCategory": "RECURRING",
  "description": "RECURRING_FLAT",
  "frequency": "MONTHLY",
  "priceRanges": [
    {
      "max": "100",
      "min": "1"
    }
  ],
  "pricingStrategy": "FLAT",
  "quantity": "1.0000000000",
  "salePrice": "14.9500000000",
  "totalSalePrice": "14.9500000000",
  "wholesalePrice": "12.0000000000"
}

Pricing structure for an item

Name Type Description
costId string The cost ID
costType CostType The type of cost
costTypeCategory CostTypeCategory The category of cost
description string Description of each pricing line
frequency PricingPeriod The billing frequency for the pricing plan.
priceRanges array of PriceRangeItem Range of units for which the price is valid
pricingStrategy OpportunityPricingStrategy The pricing strategy for the pricing plan
quantity string Quantity
salePrice string Sale price
totalSalePrice string Total sale price
unit string Unit
wholesalePrice string Wholesale price

OpportunityPricingStrategy

Pricing strategy

Enumeration of

OpportunityProduct

{
  "id": "cc0c7c28-ea65-4bab-8a4a-5e84d90ab291",
  "logo": "https://logs.acme.com/400x400/ddd/000.png&text=Appsome+App",
  "name": "Appsome Webapp",
  "type": "WEB_APP"
}
Name Type Description
id string Product ID
logo string Product logo URL
name string Product name
type string Product type

OpportunityShipping

{
  "deliveryAddress": {
    "addressLine1": "Main Street 446",
    "city": "Greenbow",
    "countryCode": "US",
    "name": "John Smith",
    "postalCode": "50505",
    "subdivisionCode": "AL"
  },
  "sameAsBillingAddress": false
}

Shipping information that applies to all physical goods on the opportunity

Name Type Description
deliveryAddress DeliveryAddress The shipping address
sameAsBillingAddress boolean Whether customer requests to use billing address as shipping address. WARNING: Does not manage addresses; does not change shipping address to billing address, nor update shipping address if billing address changes.

OpportunityStatus

Opportunity status

Enumeration of

OpportunitySummary

{
  "amountDueAfterTax": "0.0000000000",
  "amountDueBeforeTax": "0.0000000000",
  "items": [
    {
      "contractConfiguration": {
        "blockContractDowngrades": true,
        "blockContractUpgrades": true,
        "blockSwitchToShorterContract": true,
        "keepContractDateOnPlanChange": true,
        "minimumServiceLength": 1,
        "minimumServiceLengthUnit": "YEARLY",
        "unitTerms": {}
      },
      "id": "c57331b7-0820-44ac-ad75-ee4ab2783b7c",
      "pricing": [
        {
          "costType": "RECURRING_FLAT",
          "description": "Tiered monthly+yearly flat with included",
          "quantity": "1.0000000000",
          "totalSalePrice": "240.0000000000"
        },
        {
          "costType": "INCLUDED",
          "description": "INCLUDED",
          "quantity": "1.0000000000",
          "totalSalePrice": "0.0000000000"
        }
      ],
      "pricingPlan": {
        "editionCode": "Tiered monthly+yearly flat with included",
        "id": "7e1fd1fa-de0e-49e9-9e6a-9c474c57f22d",
        "name": "Tiered monthly+yearly flat with included YEARLY"
      },
      "product": {
        "hasAddons": false,
        "id": "fa776d2e-cda5-4256-9a27-125a0fe3f448",
        "isAddon": false,
        "name": "Supported Product for Opportunity MVP",
        "type": "WEB_APP_STACKED"
      },
      "unitDefinitions": [
        {
          "allowDecimals": false,
          "meteredUsage": false,
          "minimum": "1.0000000000",
          "pricePerIncrement": false,
          "readOnly": true,
          "unit": "USER"
        }
      ]
    }
  ],
  "recurringTotals": [
    {
      "billingCycle": {
        "dayOfMonth": 17,
        "period": "YEARLY"
      },
      "totalSalePrice": "240.0000000000"
    }
  ],
  "taxSummary": []
}

Opportunity taxes, subtotals, totals and recurring totals

Name Type Description
amountDueAfterTax string Amount due after taxes
amountDueBeforeTax string Amount due before taxes
items array of OpportunityItemDetail List of item details
recurringTotals array of TotalRecurring Recurring charge totals
taxSummary array of TaxDetail Details of a specific type of tax applied to a charged cost

OpportunityUpdateOwnerRequest

{
  "ownerCompanyId": "6a62244e-aa2f-461b-8c7a-3a0e091be9d3",
  "ownerId": "d781ac09-b4fe-4d57-8ba2-4640fc5b7c49"
}
Name Type Description
ownerCompanyId string The unique company ID of the owner
ownerId string The unique user ID of the owner

OpportunityUpdateRequest

{
  "name": "New opportunity",
  "purchaseCustomAttributes": {
    "paid_off_platform_contact": [
      "janet.doe@accounting.acme.com"
    ]
  },
  "purchaseEffectiveDate": 1577750400000
}
Name Type Description
name string Opportunity name
purchaseCustomAttributes CustomAttribute Custom attributes related to the purchase
purchaseEffectiveDate number Opportunity purchase effective date, in UNIX Epoch milliseconds

OpportunityValidation

{
  "blockingErrors": [
    {
      "code": "REQUIRED_FIELD_VALIDATION_ERROR",
      "itemId": "eb690c8d-1c57-497c-82bf-a4194362d954",
      "message": "There are validation errors",
      "messageParameters": [
        {
          "key": "REQUIRED_FIELD_KEY",
          "value": "USERNAME"
        },
        {
          "key": "REQUIRED_FIELD_ERROR_MESSAGE",
          "value": "The username is not valid"
        }
      ]
    }
  ],
  "pendingValidations": [
    "SUBSCRIPTION_VALIDATIONS"
  ]
}

Failed and in-progress (pending) opportunity validations

Name Type Description
blockingErrors array of ValidationDetail Failed validation errors and the associated items, when applicable
pendingValidations array of string List of validations which are still being processed and whose result should be retrieved later

Options

{
  "placeholder": "Enter your domain here",
  "suffix": {
    "inputCode": "DOMAIN",
    "text": "domainsuffix.com"
  }
}

Field options

Name Type Description
placeholder string Tip that appears in an unpopulated text field. For example: Enter your domain here. Optional.
suffix Suffix The suffix label that appears to the right of the form field. For example, for a domain field, the suffix might be .com. Optional. The suffix can be populated by text OR the value in another form field referenced by an input code.

OrderContractRenewalWS

{
  "order": {
    "href": "...",
    "id": "..."
  },
  "paymentPlan": {
    "allowCustomUsage": true,
    "contract": {},
    "cost": [
      {},
      {}
    ],
    "discount": {},
    "frequency": "...",
    "href": "...",
    "id": 12345,
    "isPrimaryPrice": true,
    "keepBillDateOnUsageChange": true,
    "primaryPrice": true,
    "separatsePrepaid": true,
    "tld": "...",
    "uuid": "..."
  }
}
Name Type Description
order LinkWS Link to the order
paymentPlan PaymentPlan Contract renewal payment plan

OrderContract

{
  "alignWithParentCycleStartDate": true,
  "autoExtensionPricingUuid": "0a12c84d-984f-4f64-943b-8e6f47a28d55",
  "blockContractDowngrades": true,
  "blockContractUpgrades": false,
  "blockSwitchToShorterContract": true,
  "cancellationPeriodLimit": null,
  "continueWithoutContract": true,
  "endOfContractDate": 1588789800000,
  "endOfContractGracePeriod": null,
  "gracePeriodEndDate": null,
  "keepContractDateOnPlanChange": false,
  "minimumServiceLength": 24,
  "renewal": null,
  "terminationFee": {
    "description": "Fee",
    "estimatedCost": 254.6628,
    "percentage": 100,
    "price": null,
    "type": "PERCENTAGE"
  },
  "unitTerms": [
    {
      "blockContractDecrease": false,
      "blockContractIncrease": true,
      "blockOriginalContractDecrease": false,
      "unit": "USER"
    }
  ]
}
Name Type Description
alignWithParentCycleStartDate boolean For add-on products, determines whether to align the contract start date with the parent subscription start date. This is an internal setting.
autoExtensionPricingUuid string The edition pricing ID to which to bind the contract when it is automatically renewed. To retrieve the value, use the "uuid" value from the "Read payment plan" https://help.appdirect.com/api/appdirect.html#read-payment-plan request.
blockContractDowngrades boolean Determines whether to block downgrades to the contract terms
blockContractUpgrades boolean Determines whether to block upgrades to the contract terms
blockSwitchToShorterContract boolean Determines whether to block the ability to switch to a shorter contract
cancellationPeriodLimit number Cancellation period limit
continueWithoutContract boolean Determines whether to continue the subscription without a contract
endOfContractDate number End date for contract
endOfContractGracePeriod number Grace period for end of contract
gracePeriodEndDate number End date for grace period
keepContractDateOnPlanChange boolean Determines whether to keep the contract date if the plan changes
minimumServiceLength number Minimum service length of contract
renewal OrderContractRenewalWS Link to OrderContractRenewalWS object
terminationFee OrderTerminationFeeWS Link to OrderTerminationFeeWS object
unitTerms array of OrderUnitContractWS List of contract unit terms

OrderDetailedListing

{
  "orders": [
    {
      "_embedded": {
        "property1": {},
        "property2": {}
      },
      "activated": true,
      "company": {
        "href": "...",
        "id": "..."
      },
      "contract": {},
      "currency": "...",
      "customAttribute": [
        {
          "attributeType": "MULTISELECT",
          "name": "...",
          "value": "...",
          "valueKeys": [
            "...",
            "..."
          ]
        },
        {
          "attributeType": "MULTISELECT",
          "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": "..."
      },
      "oneTimeOrder": [
        {
          "_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": {}
        }
      ],
      "orderLine": [
        {},
        {}
      ],
      "parameter": [
        {
          "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": "..."
      }
    },
    {
      "_embedded": {
        "property1": {},
        "property2": {}
      },
      "activated": true,
      "company": {
        "href": "...",
        "id": "..."
      },
      "contract": {},
      "currency": "...",
      "customAttribute": [
        {
          "attributeType": "MULTISELECT",
          "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": "..."
      },
      "oneTimeOrder": [
        {
          "_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": {}
        }
      ],
      "orderLine": [
        {},
        {}
      ],
      "parameter": [
        {
          "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": "..."
      }
    }
  ],
  "total": 12345
}
Name Type Description
order array of Order List of orders.
total number

OrderLineDetailsWS

{
  "quantity": "1",
  "unit": "USER"
}

Unit type and quantity

Name Type Description
quantity string Quantity
unit string Pricing Unit

OrderLine

{
  "description": "Test App 1 - null - Per User Fee",
  "editionName": "Edition 1",
  "editionPricingId": 1,
  "id": 3,
  "listingPrice": 10,
  "price": 10,
  "quantity": 1,
  "totalPrice": 10,
  "type": "ITEM",
  "unit": "USER"
}
Name Type Description
applicationName number The order line application name
basePrice number Base price for the order line item
channelMarkupPrice number The marketplace sale price for the order line item
editionDescription string The order line description
editionName string The order line edition name
editionPricingItemId number Edition pricing item ID
id number Order line ID
listingPrice number The listing price for the order line item
percentage number The percentage associated with the order line item price. It can be a positive value (for example, for tax) or negative (for discounts).
price number The price for the order line item
quantity number Quantity for the order line item
resellerMarkupPrice number The reseller markup price for the order line item
totalPrice number The total price for the order line item
type string Order line type, which can be ITEM, TAX, PENALTY, or DISCOUNT
unit string Pricing unit for the order line item, such as USER, GIGABYTE, HOUR, and so on depending on product configuration
wholesalePrice number The wholesale price for the order line item

OrderListing

{
  "_embedded": {
    "property1": {},
    "property2": {}
  },
  "company": {
    "href": "...",
    "id": "..."
  },
  "currency": "...",
  "endDate": 12345,
  "endOfDiscountDate": 12345,
  "frequency": "...",
  "id": 12345,
  "links": [
    {
      "href": "...",
      "rel": "..."
    },
    {
      "href": "...",
      "rel": "..."
    }
  ],
  "nextBillingDate": 12345,
  "paymentPlan": {
    "href": "...",
    "id": "..."
  },
  "referenceCode": "...",
  "salesSupportUser": {
    "href": "...",
    "id": "..."
  },
  "startDate": 12345,
  "status": "...",
  "totalPrice": 12345,
  "type": "...",
  "user": {
    "href": "...",
    "id": "..."
  }
}

Resource links

Name Type Description
_embedded object
company LinkWS Link to company information.
currency string Currency.
endDate number Order end date.
endOfDiscountDate number Discount end date.
frequency string Frequency.
id number ID.
links array of Link Resource links
nextBillingDate number Next billing date for the order
parentSubscriptionId number Parent subscription ID of an add-on subscription
paymentPlan LinkWS Link to the payment plan
referenceCode string Reference code
salesSupportCompany LinkWS Link to sales support company information
salesSupportUser LinkWS Link to sales support user information
serviceStartDate number Service start date for the order
startDate number Order start date
status string Order status
totalPrice number Total price for the order
type string Type.
user LinkWS Link to user information

OrderPagedReadItem

{
  "applicationName": "AUTO_DISCOUNTS_APP",
  "company": {
    "id": "386626c0-53e2-4515-8450-4a720bb5d029",
    "name": "ACME"
  },
  "createdOn": 1529083173000,
  "editionName": "Edition",
  "frequency": "One Time",
  "id": "1234",
  "orderCartId": "4567",
  "status": "PENDING MANUAL RECOVERY",
  "totalFee": "USD350.00"
}
Name Type Description
applicationName string Application name
company AppResellerCompanyAssociation A minimum version of a company: includes only the company ID and name
createdOn number Creation date of the order, in Unix timestamp format
editionName string Edition name
frequency string Frequency (valid values are MONTHLY, QUARTERLY, SIX_MONTHS, YEARLY, TWO_YEARS, THREE_YEARS, DAILY)
id string Order ID
orderCartId string Order cart ID
status string Order status (valid values are INITIALIZED, PENDING_USER_APPROVAL, PENDING_REMOTE_CREATION, PENDING_MANUAL_RECOVERY, PENDING_ASYNCHRONOUS_CREATION, FREE_TRIAL, ACTIVE, FINISHED, ONE_TIME, CANCELLED, SUSPENDED, FREE_TRIAL_EXPIRED, FREE_TRIAL_CANCELLED, DELETED, FAILED, UPCOMING, PENDING_MIGRATION_ACTIVATION, PENDING_DELAYED_PROVISIONING)
totalFee string Total fee for the order

OrderPagedReadResponse

{
  "content": [
    {
      "applicationName": "AUTO_DISCOUNTS_APP",
      "company": {
        "id": "698555fc-bc65-4163-9fee-16308edec41b",
        "name": "Company A"
      },
      "createdOn": 1529083173000,
      "editionName": "Edition",
      "frequency": "One Time",
      "id": "1234",
      "orderCardId": "4567",
      "status": "ACTIVE",
      "totalFee": "USD350.00"
    },
    {
      "applicationName": "AUTO_DISCOUNTS_APP",
      "company": {
        "id": "386626c0-53e2-4515-8450-4a720bb5d029",
        "name": "Company B"
      },
      "createdOn": 1529083173000,
      "editionName": "Edition",
      "frequency": "One Time",
      "id": "4567",
      "orderCardId": "4567",
      "status": "PENDING MANUAL RECOVERY",
      "totalFee": "USD350.00"
    }
  ],
  "page": {
    "number": 1,
    "size": 10,
    "totalElements": 2,
    "totalPages": 1
  }
}
Name Type Description
content array of OrderPagedReadItem List of orders
page PageMetadata Page information

OrderTerminationFeeWS

{
  "description": "Flat rate fee",
  "estimatedCost": null,
  "gracePeriod": 5,
  "gracePeriodUnit": "DAYS",
  "percentage": null,
  "price": 5,
  "type": "FLAT_RATE"
}
Name Type Description
description string Termination fee description
estimatedCost number Estimated termination fee if the order were canceled immediately. Only populated with the Preview Cancel and Cancel operations.
gracePeriod number Grace period for the termination fee
gracePeriodUnit string Unit (days or months) of the grace period (if any) for the termination fee
percentage number Percentage to charge for the termination fee
price number Flat rate price to charge for the termination fee
type string Termination fee type, which can be NONE, PERCENTAGE, or FLAT_RATE

OrderUnitContractWS

{
  "blockContractDecrease": false,
  "blockContractIncrease": true,
  "blockOriginalContractDecrease": false,
  "unit": "USER"
}
Name Type Description
blockContractDecrease boolean Determines whether to block quantity decreases for this unit
blockContractIncrease boolean Determines whether to block quantity increases for this unit
blockOriginalContractDecrease boolean Determines whether to block quantity decreases for this unit if the new quantity would be smaller than the quantity specified in the original contract
unit string The unit type

Order

{
  "_embedded": {
    "property1": {},
    "property2": {}
  },
  "activated": true,
  "company": {
    "href": "...",
    "id": "..."
  },
  "contract": {},
  "currency": "...",
  "customAttributes": [
    {
      "attributeType": "TEXT",
      "name": "...",
      "value": "...",
      "valueKeys": [
        "...",
        "..."
      ]
    },
    {
      "attributeType": "MULTISELECT",
      "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": {
        "href": "...",
        "id": "..."
      },
      "currency": "...",
      "endDate": 12345,
      "endOfDiscountDate": 12345,
      "frequency": "...",
      "id": 12345,
      "links": [
        {
          "href": "...",
          "rel": "..."
        },
        {
          "href": "...",
          "rel": "..."
        }
      ],
      "nextBillingDate": 12345,
      "paymentPlan": {
        "href": "...",
        "id": "..."
      },
      "referenceCode": "...",
      "salesSupportUser": {
        "href": "...",
        "id": "..."
      },
      "startDate": 12345,
      "status": "...",
      "totalPrice": 12345,
      "type": "...",
      "user": {
        "href": "...",
        "id": "..."
      }
    },
    {
      "_embedded": {
        "property1": {},
        "property2": {}
      },
      "company": {
        "href": "...",
        "id": "..."
      },
      "currency": "...",
      "endDate": 12345,
      "endOfDiscountDate": 12345,
      "frequency": "...",
      "id": 12345,
      "links": [
        {
          "href": "...",
          "rel": "..."
        },
        {
          "href": "...",
          "rel": "..."
        }
      ],
      "nextBillingDate": 12345,
      "paymentPlan": {
        "href": "...",
        "id": "..."
      },
      "referenceCode": "...",
      "salesSupportUser": {
        "href": "...",
        "id": "..."
      },
      "startDate": 12345,
      "status": "...",
      "totalPrice": 12345,
      "type": "...",
      "user": {
        "href": "...",
        "id": "..."
      }
    }
  ],
  "orderLines": [
    {},
    {}
  ],
  "parameters": [
    {
      "name": "...",
      "value": "..."
    },
    {
      "name": "...",
      "value": "..."
    }
  ],
  "paymentPlan": {
    "allowCustomUsage": true,
    "contract": {
      "alignWithParentCycleStartDate": true,
      "autoExtensionPricingId": 12345,
      "blockContractDowngrades": true,
      "blockContractUpgrades": true,
      "blockSwitchToShorterContract": true,
      "cancellationPeriodLimit": 12345,
      "endOfContractGracePeriod": 12345,
      "gracePeriod": {},
      "minimumServiceLength": 12345,
      "terminationFee": {}
    },
    "cost": [
      {
        "amount": {},
        "blockContractDecrease": true,
        "blockContractIncrease": true,
        "blockOriginalContractDecrease": true,
        "editionPricingItemId": 12345,
        "id": 12345,
        "increment": 12345,
        "maxUnits": 12345,
        "meteredUsage": true,
        "minUnits": 12345,
        "pricePerIncrement": true,
        "pricingStrategy": "...",
        "unit": "...",
        "unitDependency": "..."
      },
      {
        "amount": {},
        "blockContractDecrease": true,
        "blockContractIncrease": true,
        "blockOriginalContractDecrease": true,
        "editionPricingItemId": 12345,
        "id": 12345,
        "increment": 12345,
        "maxUnits": 12345,
        "meteredUsage": true,
        "minUnits": 12345,
        "pricePerIncrement": true,
        "pricingStrategy": "...",
        "unit": "...",
        "unitDependency": "..."
      }
    ],
    "discount": {
      "amount": {},
      "availableRedemptions": 12345,
      "description": "...",
      "expirationDate": 12345,
      "numOfBillingCycles": 12345,
      "percentage": 12345,
      "pricingUnit": "CALLING_FEATURE",
      "startDate": 12345
    },
    "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": "..."
  }
}

Resource links

Name Type Description
_embedded object
activated boolean True if the subscription has been activated
company LinkWS Link to company information.
contract OrderContract The contract terms of the order, if applicable. If the order does not have contract terms, this field is null.
currency string Currency.
customAttributes array of CustomAttribute List of custom attributes associated with this order
discount LinkWS Link to the discount applied to this order (optional)
discountId number The unique identifier for the discount applied to this order
endDate number Order end date.
endOfDiscountDate number Discount end date.
frequency string Frequency.
id number ID.
links array of Link Resource links
nextBillingDate number Next billing date for the order
nextOrder LinkWS Link to the next order for this subscription
oneTimeOrders array of OrderListing List of one time orders associated with this subscription order
orderLines array of OrderLine List of order lines for this subscription order
parameters array of Parameter List of custom parameters associated with this order
parentSubscriptionId number Parent subscription ID of an add-on subscription
paymentPlan PaymentPlan Payment plan for this order
paymentPlanId number The unique identifier for the payment plan for this order
previousOrder LinkWS Link to the previous order for this subscription
referenceCode string Reference code
salesSupportCompany LinkWS Link to sales support company information
salesSupportUser LinkWS Link to sales support user information
serviceStartDate number Service start date for the order
startDate number Order start date
status string Order status
totalPrice number Total price for the order
type string Type.
user LinkWS Link to user information

OrganizationSize

Enumeration of

OriginApi

Enumeration of

OverviewInfo

{
  "benefit": [
    {
      "description": "...",
      "title": "..."
    },
    {
      "description": "...",
      "title": "..."
    }
  ],
  "demoUrl": "...",
  "documentationUrl": "...",
  "downloadDocumentationUrl": "...",
  "downloadFileSize": 12345,
  "imageSrcset": {
    "property1": "...",
    "property2": "..."
  },
  "imageUrl": "...",
  "splashDescription": "...",
  "splashTitle": "...",
  "systemRequirements": "...",
  "versions": {
    "entry": [
      {},
      {}
    ]
  }
}

Overview details shown in a product profile

Name Type Description
benefit array of Benefit List of product benefits
demoUrl string Demo URL
documentationUrl string Documentation URL
downloadDocumentationUrl string Documentation URL for downloadable apps
downloadFileSize number Download file size for downloadable apps
imageSrcset object Image Srcset
imageUrl string Image URL
splashDescription string Splash description
splashTitle string Splash title
systemRequirements string System requirements
versions XmlMappableMultiValueMap Available versions

PMBasePaymentMethod

{
  "billingAddress": {
    "city": "Montreal",
    "country": "CA",
    "state": "Quebec",
    "street1": "279 Prince St",
    "zip": "H3C 2N4"
  },
  "paymentMethodType": "CARD",
  "properties": {
    "brand": "VISA",
    "cardHolderName": "John Smith",
    "expirationMonth": "5",
    "expirationYear": "2019",
    "number": "4111111111111111"
  }
}

Payment method base fields.

Name Type Description
billingAddress BillingAddress The billing for the payment method.
paymentMethodType string The type of payment method, such as CARD, BANKACCOUNT, and so on.
properties object The properties of the payment method, as listed in getPaymentMethodTypes

PMDefaultPaymentMethod

{
  "paymentMethodId": "e35c2f85-ef92-4a8f-89f0-45b62fb95fa7"
}

Default payment method definition

Name Type Description
paymentMethodId string The ID of the default payment method

PMDefaultPaymentMethodRequest

{
  "companyId": "9c130291-cf29-4272-8005-a280b1e81388",
  "ownerId": "40e8af95-4caf-415a-96d9-7b023207b535",
  "paymentMethodId": "e35c2f85-ef92-4a8f-89f0-45b62fb95fa7"
}

Information required to set a default payment method

Name Type Description
companyId string ID of the company of which the user is a member
ownerId string ID of the user who owns the default payment method
paymentMethodId string ID of the default payment method

PaymentMethodAppMarket

{
  "accountDisplay": "1111",
  "billingAddress": {
    "city": "Montreal",
    "country": "CA",
    "state": "Quebec",
    "street1": "279 Prince St",
    "zip": "H3C 2N4"
  },
  "default": false,
  "id": "e35c2f85-ef92-4a8f-89f0-45b62fb95fa7",
  "paymentMethodType": "CARD",
  "properties": {
    "brand": "VISA",
    "cardHolderName": "John Smith",
    "expirationMonth": "5",
    "expirationYear": "2019"
  }
}

The payment method definition, as returned by creation.

Name Type Description
accountDisplay string Account display text, such as the last 4 digits of the credit card number.
billingAddress BillingAddress The billing for the payment method.
default boolean Indicates whether this is the default payment method.
id string Id of the payment method.
paymentMethodType string The type of payment method, such as CARD, BANKACCOUNT, and so on.
properties object The properties of the payment method, as listed in getPaymentMethodTypes

PaymentMethodForTokenization

{
  "accountDisplay": "1111",
  "billingAddress": {
    "city": "Montreal",
    "country": "CA",
    "state": "Quebec",
    "street1": "279 Prince St",
    "zip": "H3C 2N4"
  },
  "default": false,
  "paymentMethodType": "CARD",
  "properties": {
    "brand": "VISA",
    "cardHolderName": "John Smith",
    "expirationMonth": "5",
    "expirationYear": "2019"
  }
}

The payment method definition, as returned by tokenization.

Name Type Description
accountDisplay string Account display text, such as the last 4 digits of the credit card number.
billingAddress BillingAddress The billing for the payment method.
default boolean Indicates whether this is the default payment method..
paymentMethodType string The type of payment method, such as CARD, BANKACCOUNT, and so on.
properties object The properties of the payment method, as listed in getPaymentMethodTypes

PMPaymentMethodRequest

{
  "companyId": "9c130291-cf29-4272-8005-a280b1e81388",
  "ownerId": "40e8af95-4caf-415a-96d9-7b023207b535",
  "token": "pm_0838a859-dfa6-4863-aa38-042d50a9e69a"
}

The Payload to create a payment method. There are two ways to create a payment method: with a token or with full payment method data. In the latter case, the request is similar to the one for createPaymentMethodToken, but with the addition of the ownerId and companyId parameters.

Name Type Description
billingAddress BillingAddress Required when creating a payment method from payment method data, not applicable when creating it from token.
companyId string The ID of the company in which to create the payment method.
ownerId string The ID of the user who owns the payment method.
paymentMethodType string The type of payment method, such as CARD, BANKACCOUNT, and so on.
Required when creating a payment method from payment method data, not applicable when creating it from token.
properties object The properties of the payment method, as listed in getPaymentMethodTypes
Required when creating a payment method from payment method data, not applicable when creating it from token.
token string Token of the payment method, as returned by createPaymentMethodToken.
Required when creating a payment method from a token, not applicable when creating it from payment method data.

PaymentMethodTokenRequest

{
  "billingAddress": {
    "city": "Montreal",
    "country": "CA",
    "state": "Quebec",
    "street1": "279 Prince St",
    "zip": "H3C 2N4"
  },
  "paymentMethodType": "CARD",
  "properties": {
    "brand": "VISA",
    "cardHolderName": "John Smith",
    "expirationMonth": "5",
    "expirationYear": "2019",
    "number": "4111111111111111",
    "securityCode": "123"
  }
}

The Payload used to tokenize a Payment Method.

Name Type Description
billingAddress BillingAddress The billing for the payment method.
paymentMethodType string The type of payment method, such as CARD, BANKACCOUNT, and so on.
properties object The properties of the payment method, as listed in getPaymentMethodTypes

PMPaymentMethodTokenResponse

{
  "expiration": "2018-04-112T19:15:00Z",
  "id": "pm_0838a859-dfa6-4863-aa38-042d50a9e69a",
  "paymentMethod": {
    "accountDisplay": "1111",
    "billingAddress": {
      "city": "Montreal",
      "country": "CA",
      "state": "Quebec",
      "street1": "279 Prince St",
      "zip": "H3C 2N4"
    },
    "paymentMethodType": "CARD",
    "properties": {
      "brand": "VISA",
      "cardHolderName": "John Smith",
      "expirationMonth": "5",
      "expirationYear": "2019"
    }
  }
}

The tokenized Payment Method.

Name Type Description
expiration string The date and time when the token expires
id string The token for the payment method.
paymentMethod PaymentMethodForTokenization The payment method definition, as returned by tokenization.

PMPaymentMethodType

{
  "addressNeeded": true,
  "paymentMethodType": "CARD",
  "propertyDefinitions": [
    {
      "maxLength": 255,
      "minLength": 0,
      "name": "cardHolderName",
      "type": "string"
    },
    {
      "maxLength": 255,
      "minLength": 0,
      "name": "number",
      "type": "string"
    },
    {
      "maxLength": 4,
      "minLength": 0,
      "name": "securityCode",
      "secret": true,
      "type": "string"
    },
    {
      "maxLength": 2,
      "minLength": 1,
      "name": "expirationMonth",
      "type": "number"
    },
    {
      "maxLength": 4,
      "minLength": 2,
      "name": "expirationYear",
      "type": "number"
    },
    {
      "maxLength": 255,
      "minLength": 0,
      "name": "brand",
      "possibleValues": [
        "VISA",
        "MASTERCARD",
        "AMEX",
        "DINERS_CLUB",
        "DISCOVER",
        "JCB",
        "UNKNOWN",
        "GATEWAY"
      ],
      "readOnly": true,
      "type": "string"
    }
  ]
}

The Payment Method Type definition.

Name Type Description
addressNeeded boolean Indicates whether an address is required for this payment method type.
paymentMethodType string The type of payment method (CARD, BANKACCOUNT, and so on).
propertyDefinitions array of PMPropertyDefinition Definition of the properties applicable to this payment method type.

PMPropertyDefinition

{
  "maxLength": 255,
  "minLength": 0,
  "name": "cardHolderName",
  "type": "string"
}

A field metadata definition

Name Type Description
maxLength number Maximum length of the property's value.
minLength number Minimum length of the field's value. The default is 0.
name string The property's name.
possibleValues array of string If the property represents an enum, this contains the supported enum values.
readOnly boolean Indicates whether this property is writable.
regex string Describes the regular expression used for validation of the value of this property.
required boolean Indicates whether this property is required. The default is false.
secret boolean Indicates whether this property must be masked. The default is false.
type string The property's type, for example string, number, boolean, address, and so on.

PageMeta

{
  "number": 1,
  "size": 2,
  "totalElements": 10,
  "totalPages": 2
}
Name Type Description
number number Page number
size number Number of results to return
totalElements number Total number of elements
totalPages number Total number of pages

PageMetadata

{
  "number": 12345,
  "size": 12345,
  "totalElements": 12345,
  "totalPages": 12345
}
Name Type Description
number number Page number
size number Size of the page to be returned
totalElements number Total number of elements
totalPages number Total number of pages

PagedActivityAccountV2

{
  "content": [
    {
      "actor": {
        "activated": false,
        "deleted": false,
        "email": "c2801919@appdirect.com",
        "externalId": null,
        "id": 1344,
        "name": "C2801919_first last",
        "personalInfoMasked": false,
        "profileLinkMasked": false,
        "roleChanges": null,
        "type": "USER",
        "userRemovedFromCompanyObject": false,
        "userRemovedFromCompanyTarget": false,
        "uuid": "966216bb-bb4e-4766-8849-fd72eead20ce"
      },
      "context": {
        "description": "Documentation Center 283",
        "header": "Documentation Center 283",
        "imageUrl": "https://d33na3ni6eqf5j.cloudfront.net/importable_app_resources/81858cea-627f-45ee-8906-67d5a23dd3bf/list.png?b5960593b97c0fdd95bc9b81c08e70bb"
      },
      "links": [],
      "object": {
        "companyLinkMasked": false,
        "externalId": null,
        "id": 26,
        "name": "Company 6032459369",
        "type": "COMPANY",
        "uuid": "222cf5ff-7795-4ece-b612-83ef6b72bb30"
      },
      "origin": "MARKETPLACE",
      "subject": {
        "activated": true,
        "deleted": false,
        "email": "susan.doe@company5087848592.com",
        "externalId": null,
        "id": 30,
        "name": "Susan Doe",
        "personalInfoMasked": false,
        "profileLinkMasked": false,
        "type": "USER",
        "userRemovedFromCompanyObject": false,
        "userRemovedFromCompanyTarget": false,
        "uuid": "8487f55b-05be-4c0e-97d8-021e5ca4008b"
      },
      "target": {
        "companyLinkMasked": false,
        "externalId": null,
        "id": 194379,
        "name": "Matts Company",
        "type": "COMPANY",
        "uuid": "a0504b87-f21f-40fe-9de1-e8479776a26f"
      },
      "timestamp": [
        2016,
        12,
        2,
        17,
        25,
        56,
        414
      ],
      "verb": "COMPANY_ACTIVATED"
    },
    {
      "actor": {
        "activated": false,
        "deleted": false,
        "email": "c3945627346@appdirect.com",
        "externalId": null,
        "id": 1434,
        "name": "Adam Smith",
        "personalInfoMasked": false,
        "profileLinkMasked": false,
        "roleChanges": null,
        "type": "USER",
        "userRemovedFromCompanyObject": false,
        "userRemovedFromCompanyTarget": false,
        "uuid": "ac6216bb-bb4e-4766-8849-fd72eead20ce"
      },
      "context": {
        "description": "Documentation Center 283",
        "header": "Documentation Center 283",
        "imageUrl": "https://d33na3ni6eqf5j.cloudfront.net/importable_app_resources/81858cea-627f-45ee-8906-67d5a23dd3bf/list.png?b5960593b97c0fdd95bc9b81c08e70bb"
      },
      "links": [],
      "object": {
        "companyLinkMasked": false,
        "externalId": null,
        "id": 26,
        "name": "Company 6032459369",
        "type": "COMPANY",
        "uuid": "222cf5ff-7795-4ece-b612-83ef6b72bb30"
      },
      "origin": null,
      "subject": {
        "activated": true,
        "deleted": false,
        "email": "susan.doe@company5087848592.com",
        "externalId": null,
        "id": 30,
        "name": "Susan Doe",
        "personalInfoMasked": false,
        "profileLinkMasked": false,
        "type": "USER",
        "userRemovedFromCompanyObject": false,
        "userRemovedFromCompanyTarget": false,
        "uuid": "8487f55b-05be-4c0e-97d8-021e5ca4008b"
      },
      "target": {
        "companyLinkMasked": false,
        "externalId": null,
        "id": 149379,
        "name": "Global Company",
        "type": "COMPANY",
        "uuid": "70904b87-a2bf-40fe-9de1-e8479776a26f"
      },
      "timestamp": [
        2016,
        12,
        2,
        17,
        25,
        56,
        401
      ],
      "verb": "USER_JOINED"
    }
  ],
  "links": [],
  "page": {
    "number": 0,
    "size": 2,
    "totalElements": 2,
    "totalPages": 1
  }
}

Represents a paged collection of ActivityAccountV2

Name Type Description
content array of ActivityAccountV2 An array of paged company activities
links array of Link Resource links
page PageMetadata

PagedAvailableCompanySegmentAssociation

{
  "content": [
    {
      "id": "04f8d043-10f1-4b89-8c0e-0780e5a62299",
      "name": "Canada Company",
      "selected": false
    },
    {
      "id": "04f8d043-10f1-4b89-8c0e-0780e5a62298",
      "name": "US Company",
      "selected": true
    }
  ],
  "page": {
    "number": 1,
    "size": 2,
    "totalElements": 10,
    "totalPages": 2
  }
}

Paged information about all marketplace companies, including whether they are associated with the segment

Name Type Description
content array of AvailableCompanySegmentAssociation Information about all marketplace companies, including whether they are associated with the segment
page PageMeta Page meta information

PagedCompanyAccountV2

{
  "content": [
    {
      "address": {
        "city": "Calgary",
        "country": "Canada",
        "state": "AB",
        "street1": "Harris Place NW",
        "street2": "907",
        "zip": "T3B2V4"
      },
      "channelAdmin": true,
      "companySize": "SMALL",
      "countryCode": "US",
      "creationDate": 1457416568000,
      "customAttributes": [],
      "defaultRole": "USER",
      "emailAddress": "john.smith@example.com",
      "enabled": true,
      "externalId": "37ac4899-0847-41ac-8e6b-adfde0363b37",
      "industry": "Finance",
      "links": [
        {
          "href": "http://marketplace.local:8080/api/account/v2/companies/a3f385be-e10b-444e-99d1-95cd7d4c1f5a",
          "rel": "self"
        },
        {
          "href": "http://marketplace.local:8080/api/account/v2/companies/a3f385be-e10b-444e-99d1-95cd7d4c1f5a/memberships",
          "rel": "memberships"
        }
      ],
      "name": "John & Co",
      "phoneNumber": "888-888-8888",
      "picture": null,
      "reseller": false,
      "salesAgent": {
        "href": "http://marketplace.local:8080/api/account/v2/users/a3f385be-e10b-444e-99d1-95cd7d4c1f5a",
        "rel": "salesRepLink"
      },
      "salesSupport": false,
      "uuid": "a3f385be-e10b-444e-99d1-95cd7d4c1f5a",
      "vendor": true,
      "website": "example.com"
    },
    {
      "address": {
        "city": "Calgary",
        "country": "Canada",
        "state": "AB",
        "street1": "Harris Place NW",
        "street2": "907",
        "zip": "T3B2V4"
      },
      "channelAdmin": true,
      "companySize": "SMALL",
      "countryCode": "US",
      "creationDate": 1521573411000,
      "customAttributes": [
        {
          "attributeType": "TEXT",
          "hint": "",
          "label": "C1593404",
          "name": "C1593404",
          "value": "t1"
        }
      ],
      "defaultRole": "USER",
      "emailAddress": "john.smith@example.com",
      "enabled": false,
      "externalId": "b34974b2-f5d6-4326-9859-5247dc42ee60",
      "industry": "Finance",
      "links": [
        {
          "href": "http://marketplace.local:8080/api/account/v2/companies/42f4e0cd-0614-4695-87ba-fcaee49fb995",
          "rel": "self"
        },
        {
          "href": "http://marketplace.local:8080/api/account/v2/companies/42f4e0cd-0614-4695-87ba-fcaee49fb995/memberships",
          "rel": "memberships"
        }
      ],
      "name": "John & Co",
      "phoneNumber": "888-888-8888",
      "picture": null,
      "reseller": false,
      "salesAgent": {
        "href": "http://marketplace.local:8080/api/account/v2/users/a3f385be-e10b-444e-99d1-95cd7d4c1f5a",
        "rel": "salesRepLink"
      },
      "salesSupport": false,
      "uuid": "42f4e0cd-0614-4695-87ba-fcaee49fb995",
      "vendor": true,
      "website": "example.com"
    }
  ],
  "links": [],
  "page": {
    "number": 0,
    "size": 50,
    "totalElements": 2,
    "totalPages": 1
  }
}

A paged collection of CompanyAccountV2 objects

Name Type Description
content array of CompanyAccountV2 An array of paged companies
links array of Link Resource links
page PageMetadata

PagedCompanyDomainAccountV2

{
  "content": [
    {
      "company": {
        "customAttributes": [
          {
            "attributeType": "TEXT",
            "hint": "US West, US Central, or US East",
            "label": "Geographic Region",
            "name": "Geographic Region",
            "value": "US"
          },
          {
            "attributeType": "MULTISELECT",
            "hint": "",
            "label": "Label Names",
            "name": "Company Details",
            "valueKeys": [
              "great option"
            ]
          }
        ],
        "defaultRole": "USER",
        "enabled": true,
        "links": [],
        "name": "Company 6702951797",
        "phoneNumber": "+1 123 123 1234",
        "picture": "http://appdirect/profilePics/http://cdn/company.png",
        "reseller": false,
        "uuid": "0fc286dc-40ae-4cd0-9f04-59687fdf39bf",
        "vendor": false
      },
      "companyEntitlementStatus": "ACTIVE",
      "currency": "USD",
      "domainAssociatedApplications": [],
      "domainEntitlementId": 51,
      "domainProvider": {
        "id": 131,
        "imageLogoLarge": "app_resources/2506/thumbs_65/img4627488903781521711.png",
        "name": "MockApp6544683144966352395",
        "providerCompany": "Appdirect",
        "uuid": "fc876968-396a-40bc-824f-01b588d22ad2"
      },
      "endOfContractDate": 1480699590955,
      "launchUrl": "http://appdirect/saml/domain/idp/init/51",
      "links": [],
      "name": "mydomain1.com",
      "owner": {
        "activated": true,
        "allowLogin": true,
        "boostUser": {
          "apsUid": "murnu8w"
        },
        "email": "lisa.lopez@company8722006945.com",
        "firstName": "Lisa",
        "lastName": "Lopez",
        "ldapId": "1",
        "links": [],
        "metadata": {
          "apsUid": "murnu8w"
        },
        "picture": "http://appdirect/profilePics/img2147417701652580695.png?184b58e358f087154d94329f9000b28a",
        "roles": [],
        "userId": 109,
        "userName": "lisa.lopez@company8722006945.com",
        "uuid": "3308489f-3448-45c4-bab1-5dd4461ccadd"
      },
      "price": 10.63,
      "renews": true,
      "source": "PURCHASED",
      "status": "ACTIVE",
      "subscriptionId": "b3f9761d-21df-4240-9006-2dbb4b19eec0",
      "uuid": "ec4783be-0325-49c7-b53d-8e4d9631104a"
    },
    {
      "company": {
        "customAttributes": [
          {
            "attributeType": "TEXT",
            "hint": "US West, US Central, or US East",
            "label": "Geographic Region",
            "name": "Geographic Region",
            "value": "US"
          },
          {
            "attributeType": "MULTISELECT",
            "hint": "",
            "label": "Label Names",
            "name": "Company Details",
            "valueKeys": [
              "great option"
            ]
          }
        ],
        "defaultRole": "USER",
        "enabled": true,
        "links": [],
        "name": "Company 6702951797",
        "phoneNumber": "+1 123 123 1234",
        "picture": "http://appdirect/profilePics/http://cdn/company.png",
        "reseller": false,
        "uuid": "0fc286dc-40ae-4cd0-9f04-59687fdf39bf",
        "vendor": false
      },
      "companyEntitlementStatus": "ACTIVE",
      "currency": "USD",
      "domainAssociatedApplications": [],
      "domainEntitlementId": 51,
      "domainProvider": {
        "id": 131,
        "imageLogoLarge": "app_resources/2506/thumbs_64/img4627488903781521711.png",
        "name": "MockApp6544683144966352395",
        "providerCompany": "Appdirect",
        "uuid": "fc876968-396a-40bc-824f-01b588d22ad2"
      },
      "endOfContractDate": 1480699590955,
      "launchUrl": "http://appdirect/saml/domain/idp/init/51",
      "links": [],
      "name": "mydomain2.com",
      "owner": {
        "activated": true,
        "allowLogin": true,
        "boostUser": null,
        "email": "lisa.lopez@company8722006945.com",
        "firstName": "Lisa",
        "lastName": "Lopez",
        "ldapId": null,
        "links": [],
        "metadata": {},
        "picture": null,
        "roles": [],
        "userId": 109,
        "userName": "lisa.lopez@company8722006945.com",
        "uuid": "3308489f-3448-45c4-bab1-5dd4461ccadd"
      },
      "price": 10.63,
      "renews": true,
      "source": "PURCHASED",
      "status": "ACTIVE",
      "subscriptionId": "4b19761c-a7a2-4d95-b3bf-66e1c66b0a1a",
      "uuid": "9e986b20-0c6f-4a65-9321-d31956aa3f40"
    }
  ],
  "links": []
}

Represents a paged collection of CompanyDomainAccountV2

Name Type Description
content array of CompanyDomainAccountV2
links array of Link Resource links
page PageMetadata

PagedCompanyGroupAccountV2

{
  "content": [
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "new-group-1-desc",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/feff91cf-e5b3-4833-9ad2-47a8c3d4deeb",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/feff91cf-e5b3-4833-9ad2-47a8c3d4deeb/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 0,
      "name": "new-group-1",
      "systemManaged": false,
      "uuid": "feff91cf-e5b3-4833-9ad2-47a8c3d4deeb"
    },
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "All Billing Admin users",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/84d6c781-9290-461c-a18f-010791cb87ca",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/84d6c781-9290-461c-a18f-010791cb87ca/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 20,
      "name": "Billing Admins",
      "systemManaged": true,
      "uuid": "84d6c781-9290-461c-a18f-010791cb87ca"
    },
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "All Reseller users",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/b7c9099c-aff1-42a9-824c-7f8a7ee1ab93",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/b7c9099c-aff1-42a9-824c-7f8a7ee1ab93/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 1,
      "name": "Resellers",
      "systemManaged": true,
      "uuid": "b7c9099c-aff1-42a9-824c-7f8a7ee1ab93"
    },
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "All Developer users",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/a7d34c49-a376-433b-af53-f51be1cf2038",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/a7d34c49-a376-433b-af53-f51be1cf2038/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 78,
      "name": "Developers",
      "systemManaged": true,
      "uuid": "a7d34c49-a376-433b-af53-f51be1cf2038"
    },
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "All Sales Support users",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/73f252d5-0dbe-4414-8384-edb7544b83b6",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/73f252d5-0dbe-4414-8384-edb7544b83b6/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 13,
      "name": "Sales Support",
      "systemManaged": true,
      "uuid": "73f252d5-0dbe-4414-8384-edb7544b83b6"
    },
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "All Product Support users",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/b0cf07b9-9953-406f-ba64-b4ca239f30bf",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/b0cf07b9-9953-406f-ba64-b4ca239f30bf/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 12,
      "name": "Product Support",
      "systemManaged": true,
      "uuid": "b0cf07b9-9953-406f-ba64-b4ca239f30bf"
    },
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "All Reseller Manager users",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/6d970a9e-a702-406f-808b-9483163efdd1",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/6d970a9e-a702-406f-808b-9483163efdd1/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 2,
      "name": "Reseller Managers",
      "systemManaged": true,
      "uuid": "6d970a9e-a702-406f-808b-9483163efdd1"
    },
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "All Customer Support users",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/70c65cb0-cbe5-447c-bdce-1d00e4d08f84",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/70c65cb0-cbe5-447c-bdce-1d00e4d08f84/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 12,
      "name": "Customer Support",
      "systemManaged": true,
      "uuid": "70c65cb0-cbe5-447c-bdce-1d00e4d08f84"
    },
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "All Marketplace Managers",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/9a79c98d-8e36-49ed-837c-cc9473dee851",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/9a79c98d-8e36-49ed-837c-cc9473dee851/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 9,
      "name": "Marketplace Managers",
      "systemManaged": true,
      "uuid": "9a79c98d-8e36-49ed-837c-cc9473dee851"
    },
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "All Company Admin users",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/74f7132f-8dd9-4b3a-8014-5aac81dc2c05",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/74f7132f-8dd9-4b3a-8014-5aac81dc2c05/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 14,
      "name": "Company Admins",
      "systemManaged": true,
      "uuid": "74f7132f-8dd9-4b3a-8014-5aac81dc2c05"
    },
    {
      "companyDefault": true,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "All company users",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/5acdd82e-5cb7-4a23-b842-38d514aafcdf",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/5acdd82e-5cb7-4a23-b842-38d514aafcdf/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 88,
      "name": "Everyone",
      "systemManaged": true,
      "uuid": "5acdd82e-5cb7-4a23-b842-38d514aafcdf"
    },
    {
      "companyDefault": false,
      "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "description": "superuser group",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/56ac8abc-2b63-4b66-a648-dde419aa6c4a",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups/56ac8abc-2b63-4b66-a648-dde419aa6c4a/memberships?member=true&page=0&size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 2,
      "name": "superuser-group",
      "systemManaged": false,
      "uuid": "56ac8abc-2b63-4b66-a648-dde419aa6c4a"
    }
  ],
  "links": [
    {
      "href": "http://appdirect/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/groups?page=0&size=50&sortField=createdOn&sortOrder=DESC",
      "rel": "self"
    }
  ],
  "page": {
    "number": 0,
    "size": 50,
    "totalElements": 12,
    "totalPages": 1
  }
}

Resource links

Name Type Description
content array of CompanyGroupAccountV2
links array of Link Resource links
page PageMetadata

PagedInvitationAccountV2

{
  "content": [
    {
      "accepted": false,
      "company": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "createdOn": 1517942905000,
      "email": "mary.gonsalez3@yopmail.com",
      "externalIdentifier": "mary.gonsalez3@yopmail.com",
      "inviter": "user@appdirect.com",
      "lastModified": 1517942905000,
      "role": "DEVELOPER"
    },
    {
      "accepted": false,
      "company": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "createdOn": 1473362089000,
      "email": "C14209781@appdirect.com",
      "externalIdentifier": "C14209781@appdirect.com",
      "inviter": "superuser+1@appdirect.com",
      "lastModified": 1473362089000,
      "role": "USER"
    }
  ],
  "links": [],
  "page": {
    "number": 0,
    "size": 10,
    "totalElements": 2,
    "totalPages": 1
  }
}

Represents a paged collection of InvitationAccountV2

Name Type Description
content array of InvitationAccountV2
links array of Link Resource links
page PageMetadata

PagedLedgerLineDetailsWS

{
  "links": [
    {
      "href": "...",
      "rel": "..."
    },
    {
      "href": "...",
      "rel": "..."
    }
  ]
}

Represents a paged collection of LedgerLineDetailsWS

Name Type Description
content array of LedgerLineDetails
links array of Link Resource links
page PageMetadata

PagedProductListingWS

{
  "links": [
    {
      "href": "...",
      "rel": "..."
    },
    {
      "href": "...",
      "rel": "..."
    }
  ]
}

Resource links

Name Type Description
content array of ProductListing
links array of Link Resource links
page PageMetadata

Page

{
  "number": "0",
  "size": "20",
  "totalElements": "220",
  "totalPages": "50"
}
Name Type Description
number number
size number
totalElements number
totalPages number

PagedResources

{
  "links": [
    {
      "href": "...",
      "rel": "..."
    },
    {
      "href": "...",
      "rel": "..."
    }
  ]
}

Resource links

Name Type Description
links array of Link Resource links
page PageMetadata

PagedResourcesOfEventWS

{
  "content": [
    {},
    {}
  ],
  "links": [
    {
      "href": "...",
      "rel": "..."
    },
    {
      "href": "...",
      "rel": "..."
    }
  ],
  "page": {
    "number": 12345,
    "size": 12345,
    "totalElements": 12345,
    "totalPages": 12345
  }
}

Resource links

Name Type Description
content array of object
links array of Link Resource links
page PageMetadata

PagedSalesLead

{
  "links": [
    {
      "href": "...",
      "rel": "..."
    },
    {
      "href": "...",
      "rel": "..."
    }
  ]
}

Represents a paged collection of SalesLead

Name Type Description
content array of SalesLead
links array of Link Resource links
page PageMetadata

PagedSegment

{
  "content": [
    {
      "code": "CAN",
      "id": "9f4e5c52-5258-4193-a132-303f06e9eef1",
      "name": "Canada",
      "partner": "APPDIRECT",
      "type": "MANUAL"
    },
    {
      "code": "FRA",
      "id": "b1f5af35-ca68-431f-83b7-ef56189924ed",
      "name": "France",
      "partner": "APPDIRECT",
      "type": "MANUAL"
    },
    {
      "code": "USA",
      "id": "5ca15227-da6b-413e-a09c-f8d06ab3dcd7",
      "name": "United States",
      "partner": "APPDIRECT",
      "type": "MANUAL"
    }
  ],
  "page": {
    "number": 0,
    "size": 50,
    "totalElements": 3,
    "totalPages": 1
  }
}

Data returned from paged read of segment.

Name Type Description
content array of Segment Segment details
page PageMeta Page meta information

PagedSegmentFolderAndSegments

{
  "content": [
    {
      "id": "7e3b3bb8-1b75-408b-8cbf-561ccd910479",
      "name": "Fortune 500 Companies",
      "partner": "APPDIRECT",
      "segments": [
        {
          "code": "IOS",
          "id": "04f8d043-10f1-4b89-8c0e-0780e5a62299",
          "name": "iOS users",
          "partner": "APPDIRECT",
          "type": "MANUAL"
        }
      ]
    },
    {
      "id": "7e3b3bb8-1b75-408b-8cbf-561ccd910479",
      "name": "Fortune 100 Companies",
      "partner": "APPDIRECT",
      "segments": [
        {
          "code": "DROID",
          "id": "04f8d043-10f1-4b89-8c0e-0780e5a62299",
          "name": "Android users",
          "partner": "APPDIRECT",
          "type": "MANUAL"
        }
      ]
    }
  ],
  "page": {
    "number": 1,
    "size": 2,
    "totalElements": 10,
    "totalPages": 2
  }
}

Paged information about the segment folder and associated segments for a partner

Name Type Description
content array of SegmentFolderAndSegments Information about the segment folder and segments
page PageMeta Page meta information

PagedStagingProduct

{
  "links": [
    {
      "href": "...",
      "rel": "..."
    },
    {
      "href": "...",
      "rel": "..."
    }
  ]
}

Represents a paged collection of StagingProduct

Name Type Description
content array of StagingProduct
links array of Link Resource links
page PageMetadata

PagedSubscriptionAssignmentAccountV2

{
  "content": [
    {
      "createdOn": 1480699568720,
      "links": [
        {
          "href": "http://www.appdirect.com/api/account/v2/subscriptions/bf0e6097-af4f-489a-9cbc-8f6d20362726/assignments/6558e384-5d62-4412-bb5d-0e2ad7ae3471",
          "rel": "self"
        },
        {
          "href": "http://www.appdirect.com/api/account/v2/users/6558e384-5d62-4412-bb5d-0e2ad7ae3471",
          "rel": "user"
        }
      ],
      "lyncToPhoneVoiceConnection": null,
      "membership": {
        "company": {
          "defaultRole": "USER",
          "enabled": true,
          "links": [
            {
              "href": "http://appdirect/api/account/v2/companies/4af63313-a90d-48ff-88fe-02a550f4c90e",
              "rel": "self"
            },
            {
              "href": "http://appdirect/api/account/v2/companies/4af63313-a90d-48ff-88fe-02a550f4c90e/memberships",
              "rel": "memberships"
            }
          ],
          "name": "Company 5730658238",
          "phoneNumber": null,
          "picture": "http://www.appdirect.com/profilePics/http://cdn/company.png",
          "uuid": "4af63313-a90d-48ff-88fe-02a550f4c90e",
          "vendor": false
        },
        "enabled": true,
        "lastUsed": false,
        "links": [
          {
            "href": "http://appdirect/api/account/v2/companies/4af63313-a90d-48ff-88fe-02a550f4c90e/memberships/6558e384-5d62-4412-bb5d-0e2ad7ae3471",
            "rel": "self"
          },
          {
            "href": "http://appdirect/api/account/v2/users/6558e384-5d62-4412-bb5d-0e2ad7ae3471",
            "rel": "user"
          },
          {
            "href": "http://appdirect/api/account/v2/companies/4af63313-a90d-48ff-88fe-02a550f4c90e",
            "rel": "company"
          }
        ],
        "metadata": {
          "mosi_username": null
        },
        "mosiUser": null,
        "position": null,
        "roles": [
          "ROLE_BILLING_ADMIN",
          "ROLE_SYS_ADMIN"
        ],
        "user": {
          "activated": true,
          "allowLogin": true,
          "boostUser": null,
          "email": "barbara.johnson@company8381074022.com",
          "firstName": "Barbara",
          "lastName": "Johnson",
          "ldapId": null,
          "links": [
            {
              "href": "http://appdirect/api/account/v2/users/6558e384-5d62-4412-bb5d-0e2ad7ae3471",
              "rel": "self"
            },
            {
              "href": "http://appdirect/api/account/v2/users/6558e384-5d62-4412-bb5d-0e2ad7ae3471/memberships",
              "rel": "memberships"
            }
          ],
          "metadata": {
            "apsUid": null
          },
          "picture": null,
          "roles": [
            "ROLE_USER"
          ],
          "userName": "barbara.johnson",
          "uuid": "6558e384-5d62-4412-bb5d-0e2ad7ae3471"
        }
      },
      "status": "ACTIVE",
      "user": {
        "activated": true,
        "allowLogin": true,
        "boostUser": null,
        "email": "barbara.johnson@company8381074022.com",
        "firstName": "Barbara",
        "lastName": "Johnson",
        "ldapId": null,
        "links": [
          {
            "href": "http://www.appdirect.com/api/account/v2/users/6558e384-5d62-4412-bb5d-0e2ad7ae3471",
            "rel": "self"
          },
          {
            "href": "http://www.appdirect.com/api/account/v2/users/6558e384-5d62-4412-bb5d-0e2ad7ae3471/memberships",
            "rel": "memberships"
          }
        ],
        "metadata": {
          "apsUid": null
        },
        "picture": null,
        "roles": [
          "ROLE_USER"
        ],
        "userName": "barbara.johnson",
        "uuid": "6558e384-5d62-4412-bb5d-0e2ad7ae3471"
      },
      "uuid": "def48c3c-f043-42cc-9b2b-718986ed7c49"
    }
  ],
  "links": [],
  "page": {
    "number": 0,
    "size": 50,
    "totalElements": 1,
    "totalPages": 1
  }
}

Paged subscription assignment.

Name Type Description
content array of SubscriptionAssignmentAccount
links array of Link
page PageMetadata

PagedUserAccountV2

{
  "content": [
    {
      "activated": true,
      "allowLogin": true,
      "boostUser": null,
      "creationDate": 1398896238000,
      "currency": "USD",
      "customAttributes": [
        {
          "attributeType": "TEXT",
          "hint": "commission_hint",
          "label": "Commission_Payout_ID",
          "name": "C5125859",
          "value": "t1"
        },
        {
          "attributeType": "MULTISELECT",
          "hint": "Allows credit card payments and enables credit card fields",
          "label": "Allow Credit Card",
          "name": "allow_credit_card",
          "valueKeys": []
        },
        {
          "attributeType": "TEXT",
          "hint": "",
          "label": "C5457097",
          "name": "C5457097",
          "value": "abcd"
        }
      ],
      "email": "john.lee@company0093957321.com",
      "externalId": "b34974b2-f5d6-4326-9859-5247dc42ee60",
      "firstName": "John",
      "idpUuid": "1d37bace-f4cf-11e6-af80-22000a9513f7",
      "lastName": "Lee",
      "lastSuccessfulLogin": 1543268078000,
      "ldapId": "1",
      "links": [
        {
          "href": "http://appdirect/api/account/v2/users/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/users/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1/memberships",
          "rel": "memberships"
        }
      ],
      "locale": "en_US",
      "metadata": {
        "apsUid": null
      },
      "openId": "http://appdirect/openid/id/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1",
      "picture": "http://appdirect/profilePics/img6839249962619189663.png?32339267f9f00643fd18373adf580743",
      "roles": [
        "ROLE_USER"
      ],
      "userName": "john.lee",
      "uuid": "2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1"
    },
    {
      "activated": true,
      "allowLogin": true,
      "boostUser": null,
      "creationDate": 1498080462000,
      "currency": "USD",
      "customAttributes": [],
      "email": "jane.lee@company1151609035.com",
      "externalId": "47ac42db-162e-11e7-af80-22000a9513f7",
      "firstName": "Jane",
      "lastName": "Lee",
      "lastSuccessfulLogin": 1542820131000,
      "ldapId": null,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/users/8db1c051-73a6-4ff8-a0ce-bc1d80d0f156",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/users/8db1c051-73a6-4ff8-a0ce-bc1d80d0f156/memberships",
          "rel": "memberships"
        }
      ],
      "locale": "en_US",
      "metadata": {
        "apsUid": null
      },
      "openId": "http://appdirect/openid/id/8db1c051-73a6-4ff8-a0ce-bc1d80d0f156",
      "picture": null,
      "roles": [
        "ROLE_USER"
      ],
      "userName": "jane.lee",
      "uuid": "8db1c051-73a6-4ff8-a0ce-bc1d80d0f156"
    }
  ],
  "links": [],
  "page": {
    "number": 0,
    "size": 50,
    "totalElements": 2,
    "totalPages": 1
  }
}

A paged collection of UserAccountV2 objects

Name Type Description
content array of UserAccountV2 An array of paged users
links array of Link Resource links
page PageMetadata

PagedUserCompanyMembershipAccountV2

{
  "content": [
    {
      "company": {
        "defaultRole": "USER",
        "enabled": true,
        "links": [
          {
            "href": "http://appdirect/api/account/v2/companies/4be3ce24-a702-46b9-a789-f15ce822a9ef",
            "rel": "self"
          },
          {
            "href": "http://appdirect/api/account/v2/companies/4be3ce24-a702-46b9-a789-f15ce822a9ef/memberships",
            "rel": "memberships"
          }
        ],
        "name": "Company 5261852235",
        "phoneNumber": "9259221234",
        "picture": "http://localhost:8080/profilePics/http://cdn/company.png",
        "uuid": "4be3ce24-a702-46b9-a789-f15ce822a9ef",
        "vendor": false
      },
      "enabled": true,
      "lastUsed": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/4be3ce24-a702-46b9-a789-f15ce822a9ef/memberships/d6e7c0d2-e86a-4ea2-a6c9-c1bbeb2410f0",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/users/d6e7c0d2-e86a-4ea2-a6c9-c1bbeb2410f0",
          "rel": "user"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/4be3ce24-a702-46b9-a789-f15ce822a9ef",
          "rel": "company"
        }
      ],
      "metadata": {
        "mosi_username": "adazuretest@sdasd21321.onmicrosoft.com"
      },
      "mosiUser": {
        "username": "adazuretest@sdasd21321.onmicrosoft.com"
      },
      "position": "Business Analyst",
      "roles": [
        "ROLE_BILLING_ADMIN",
        "ROLE_SYS_ADMIN"
      ],
      "user": {
        "activated": true,
        "allowLogin": true,
        "boostUser": {
          "apsUid": "murnu8w"
        },
        "currency": null,
        "customAttributes": [
          {
            "attributeType": "TEXT",
            "hint": "commission_hint",
            "label": "Commission_Payout_ID",
            "name": "C5125859",
            "value": "t1"
          }
        ],
        "email": "john.simpson@company58330881984.com",
        "firstName": "John",
        "lastName": "Simpson",
        "ldapId": "1",
        "links": [
          {
            "href": "http://appdirect/api/account/v2/users/d6e7c0d2-e86a-4ea2-a6c9-c1bbeb2410f0",
            "rel": "self"
          },
          {
            "href": "http://appdirect/api/account/v2/users/d6e7c0d2-e86a-4ea2-a6c9-c1bbeb2410f0/memberships",
            "rel": "memberships"
          }
        ],
        "metadata": {
          "apsUid": "murnu8w"
        },
        "picture": "http://appdirect/profilePics/img2147417701652580695.png?184b58e358f087154d94329f9000b28a",
        "roles": [
          "ROLE_USER"
        ],
        "userName": "john.simpson",
        "uuid": "d6e7c0d2-e86a-4ea2-a6c9-c1bbeb2410f0"
      }
    },
    {
      "company": {
        "defaultRole": "USER",
        "enabled": true,
        "links": [
          {
            "href": "http://appdirect/api/account/v2/companies/4be3ce24-a702-46b9-a789-f15ce822a9ef",
            "rel": "self"
          },
          {
            "href": "http://appdirect/api/account/v2/companies/4be3ce24-a702-46b9-a789-f15ce822a9ef/memberships",
            "rel": "memberships"
          }
        ],
        "name": "Company 5261852235",
        "phoneNumber": "9259221234",
        "picture": "http://localhost:8080/profilePics/http://cdn/company.png",
        "uuid": "4be3ce24-a702-46b9-a789-f15ce822a9ef",
        "vendor": false
      },
      "enabled": true,
      "lastUsed": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/4be3ce24-a702-46b9-a789-f15ce822a9ef/memberships/6de203c1-a583-455a-ba95-3797edc262d0",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/users/6de203c1-a583-455a-ba95-3797edc262d0",
          "rel": "user"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/4be3ce24-a702-46b9-a789-f15ce822a9ef",
          "rel": "company"
        }
      ],
      "metadata": {
        "mosi_username": null
      },
      "mosiUser": null,
      "position": null,
      "roles": [
        "ROLE_BILLING_ADMIN",
        "ROLE_SYS_ADMIN"
      ],
      "user": {
        "activated": true,
        "allowLogin": true,
        "boostUser": null,
        "currency": null,
        "customAttributes": [],
        "email": "jude.simpson@company5833088198.com",
        "firstName": "Jude",
        "lastName": "Simpson",
        "ldapId": null,
        "links": [
          {
            "href": "http://appdirect/api/account/v2/users/6de203c1-a583-455a-ba95-3797edc262d0",
            "rel": "self"
          },
          {
            "href": "http://appdirect/api/account/v2/users/6de203c1-a583-455a-ba95-3797edc262d0/memberships",
            "rel": "memberships"
          }
        ],
        "metadata": {
          "apsUid": null
        },
        "picture": null,
        "roles": [
          "ROLE_USER"
        ],
        "userName": "jude.simpson",
        "uuid": "6de203c1-a583-455a-ba95-3797edc262d0"
      }
    }
  ],
  "links": [],
  "page": {
    "number": 0,
    "size": 50,
    "totalElements": 2,
    "totalPages": 1
  }
}

Represents a paged collection of UserCompanyMembershipAccountV2

Name Type Description
content array of UserCompanyMembershipAccountV2
links array of Link Resource links
page PageMetadata

PagedWebhooks

{
  "content": [
    {},
    {}
  ],
  "links": [
    {
      "href": "...",
      "rel": "..."
    },
    {
      "href": "...",
      "rel": "..."
    }
  ],
  "page": {
    "number": 12345,
    "size": 12345,
    "totalElements": 12345,
    "totalPages": 12345
  }
}

Resource links

Name Type Description
content array of Webhook
links array of Link Resource links
page PageMetadata

Parameter

{
  "name": "...",
  "value": "..."
}
Name Type Description
name string
value string

Party

{
  "email": "john.snow@got.com",
  "id": 12355,
  "name": "John Snow",
  "type": "CUSTOMER",
  "uuid": "7c840533-8e16-4f98-8c71-4e2544d59258"
}
Name Type Description
email string Party email
id string Party ID, if one is available for this party type
name string Party name
type string Party type
uuid string Party UUID, if one is available for this party type

PatchUserAccountV2

{
  "boostUser": {
    "apsUid": "murnu8w"
  },
  "currency": "USD",
  "externalId": "b34974b2-f5d6-4326-9859-5247dc42ee60",
  "firstName": "Jane",
  "idpUuid": "c412543-1233-6547-9809-0647dc42ee51",
  "lastName": "Lee",
  "ldapId": "1",
  "locale": "en_US",
  "roles": [
    "ROLE_CORPORATE_ADMIN"
  ]
}

Update user information

Name Type Description
boostUser BoostUser Boost integration user data
currency string Currency
externalId string External identifier of user
firstName string First name of user
idpUuid string The external identity provider's ID for the user
lastName string Last name of user
ldapId string LDAP identifier of user
locale string User locale in the standard ISO 639-1 language code + ISO 3166-1 country code format. For example: 'en_US'
roles array of string All users have ROLE_USER (end-user access). To assign the Network Manager, role use ROLE_CORPORATE_ADMIN. For company membership roles, see UserCompanyMembershipAccountV2.
username string User name.
If not provided, use the user's email address

PatchUserCompanyMembershipAccountV2

{
  "enabled": true
}

Represents partially updating a user membership to company

Name Type Description
enabled boolean Indicates whether membership is enabled

PatchUserCompanyMembershipsAccountV2

{
  "rolesToAdd": [
    "ROLE_DEVELOPER",
    "ROLE_RESELLER"
  ],
  "rolesToRemove": [
    "ROLE_CHANNEL_SUPPORT"
  ],
  "userUuid": "92a8d9f6-223d-11e8-a232-d879d2b204fc"
}

User company membership role data.

Name Type Description
rolesToAdd array of string Roles to add to this membership. One or more of the following: ROLE_CHANNEL_PRODUCT_SUPPORT (Product Support), ROLE_SALES_SUPPORT (Sales Support), ROLE_RESELLER_MANAGER (Reseller Manager), ROLE_RESELLER (Reseller), ROLE_CHANNEL_SUPPORT (Customer Support), ROLE_SYS_ADMIN (Company Admin), ROLE_BILLING_ADMIN (Billing Admin), ROLE_DEVELOPER (Developer).
rolesToRemove array of string Roles to remove from this membership. One or more of the following: ROLE_CHANNEL_ADMIN (Marketplace Manager), ROLE_CHANNEL_PRODUCT_SUPPORT (Product Support), ROLE_SALES_SUPPORT (Sales Support), ROLE_RESELLER_MANAGER (Reseller Manager), ROLE_RESELLER (Reseller), ROLE_CHANNEL_SUPPORT (Customer Support), ROLE_SYS_ADMIN (Company Admin), ROLE_BILLING_ADMIN (Billing Admin), ROLE_DEVELOPER (Developer).
userUuid string UUID of the user whose membership roles need to be modified

PayAbstractTransferMethod

{
  "partyId": "1",
  "partyType": "USER",
  "platformType": "stripe",
  "properties": [
    {
      "property1": "property1 value"
    }
  ]
}

Transfer method base fields

Name Type Description
partyId string The ID of the transfer method's party
partyType string The type of the transfer method's party (USER, CHANNEL, and so on)
platformType string The transfer platform type
properties object The transfer method properties

PayAbstractTransferPlatformConfiguration

{
  "parameters": {
    "base_url": "https://api.stripe.com/testupdate",
    "username": "secret"
  },
  "platformType": "stripe"
}

Transfer platform configuration base fields

Name Type Description
parameters object The transfer platform parameters.
platformType string The transfer platform type

PayBalance

{
  "amount": "49.99",
  "currency": "USD"
}

The balance of a transfer method

Name Type Description
amount string A monetary amount
currency string The currency of the amount, using the ISO-4217 currency code

TransferMethodRequest

{
  "partyId": "1",
  "partyType": "USER",
  "platformType": "stripe",
  "properties": {
    "account_id": "123456"
  }
}

The transfer method creation payload

Name Type Description
partyId string The ID of the transfer method's party
partyType string The type of the transfer method's party (USER, CHANNEL, and so on)
platformType string The transfer platform type
properties object The transfer method properties

TransferMethodResponse

{
  "balance": {
    "amount": "10.00",
    "currency": "USD"
  },
  "displayName": "****1234",
  "id": "619da695-42d6-4189-9cc2-cdc885a3a4f7",
  "partyId": "1",
  "partyType": "USER",
  "platformType": "stripe",
  "properties": [
    {
      "property1": "property1 value"
    }
  ]
}

A transfer method response

Name Type Description
balance PayBalance The balance of a transfer method
displayName string The transfer method display name
id string The transfer method ID
partyId string The ID of the transfer method's party
partyType string The type of the transfer method's party (USER, CHANNEL, and so on)
platformType string The transfer platform type
properties object The transfer method properties

TransferPlatformConfigurationRequest

{
  "parameters": {
    "base_url": "https://api.stripe.com/testupdate",
    "username": "secret"
  },
  "platformType": "stripe"
}

A transfer platform configuration request

Name Type Description
parameters object The transfer platform parameters.
platformType string The transfer platform type

TransferPlatformConfigurationResponse

{
  "id": "9dfabd43-a34b-46e1-bc40-7ddd92cc228a",
  "parameters": {
    "base_url": "https://api.stripe.com/testupdate",
    "username": "secret"
  },
  "platformType": "stripe"
}

A transfer platform configuration response

Name Type Description
id string Id of the transfer platform configuration
parameters object The transfer platform parameters.
platformType string The transfer platform type

PaymentIdAndType

{
  "id": 123554,
  "type": "CREDIT_CARD"
}
Name Type Description
id number Payment ID
type PaymentMethod Payment method type

PaymentInstrument

{
  "accountDisplay": "...",
  "billingAddress": {
    "city": "...",
    "companyName": "...",
    "country": "...",
    "fax": "...",
    "faxExtension": "...",
    "firstName": "...",
    "lastName": "...",
    "phone": "...",
    "phoneExtension": "...",
    "poBox": "...",
    "salutation": "...",
    "state": "...",
    "street1": "...",
    "street2": "...",
    "zip": "..."
  },
  "company": {
    "href": "...",
    "id": "..."
  },
  "createdOn": 12345,
  "creditCard": {
    "expirationMonth": 12345,
    "expirationYear": 12345,
    "name": "...",
    "number": "...",
    "securityCode": "...",
    "type": "AMEX"
  },
  "id": "...",
  "isDefault": true,
  "paymentMethod": "MANO_TEO_BILL",
  "user": {
    "href": "...",
    "id": "..."
  },
  "vatId": "..."
}
Name Type Description
accountDisplay string Account display text.
billingAddress BillingAddress Billing address.
company LinkWS Link to company information.
createdOn number Payment instrument creation date.
creditCard CreditCard Credit card information.
id string ID
isDefault boolean True if this payment instrument is the default.
paymentMethod PaymentMethod Payment method. Most often CREDIT_CARD, PAYPAL, or MANUAL. Other options are supported.
user LinkWS Link to user information.
vatId string VAT ID.

PaymentMethod

The supported payment methods

Enumeration of

PaymentPlan

{
  "allowCustomUsage": true,
  "contract": {
    "alignWithParentCycleStartDate": true,
    "autoExtensionPricingId": 12345,
    "blockContractDowngrades": true,
    "blockContractUpgrades": true,
    "blockSwitchToShorterContract": true,
    "cancellationPeriodLimit": 12345,
    "endOfContractGracePeriod": 12345,
    "gracePeriod": {
      "length": 12345,
      "unit": "..."
    },
    "minimumServiceLength": 12345,
    "terminationFee": {
      "description": "...",
      "flatFee": {},
      "percentageFee": 12345,
      "type": "..."
    }
  },
  "cost": [
    {
      "amount": {
        "AUD": 12345,
        "BRL": 12345,
        "CAD": 12345,
        "CHF": 12345,
        "CNY": 12345,
        "DKK": 12345,
        "EUR": 12345,
        "GBP": 12345,
        "GTQ": 12345,
        "INR": 12345,
        "JPY": 12345,
        "KRW": 12345,
        "MXN": 12345,
        "MYR": 12345,
        "NOK": 12345,
        "NZD": 12345,
        "PHP": 12345,
        "SAR": 12345,
        "SEK": 12345,
        "SGD": 12345,
        "USD": 12345,
        "ZAR": 12345
      },
      "blockContractDecrease": true,
      "blockContractIncrease": true,
      "blockOriginalContractDecrease": true,
      "editionPricingItemId": 12345,
      "id": 12345,
      "increment": 12345,
      "maxUnits": 12345,
      "meteredUsage": true,
      "minUnits": 12345,
      "pricePerIncrement": true,
      "pricingStrategy": "...",
      "unit": "...",
      "unitDependency": "..."
    },
    {
      "amount": {
        "AUD": 12345,
        "BRL": 12345,
        "CAD": 12345,
        "CHF": 12345,
        "CNY": 12345,
        "DKK": 12345,
        "EUR": 12345,
        "GBP": 12345,
        "GTQ": 12345,
        "INR": 12345,
        "JPY": 12345,
        "KRW": 12345,
        "MXN": 12345,
        "MYR": 12345,
        "NOK": 12345,
        "NZD": 12345,
        "PHP": 12345,
        "SAR": 12345,
        "SEK": 12345,
        "SGD": 12345,
        "USD": 12345,
        "ZAR": 12345
      },
      "blockContractDecrease": true,
      "blockContractIncrease": true,
      "blockOriginalContractDecrease": true,
      "editionPricingItemId": 12345,
      "id": 12345,
      "increment": 12345,
      "maxUnits": 12345,
      "meteredUsage": true,
      "minUnits": 12345,
      "pricePerIncrement": true,
      "pricingStrategy": "...",
      "unit": "...",
      "unitDependency": "..."
    }
  ],
  "discount": {
    "amount": {
      "AUD": 12345,
      "BRL": 12345,
      "CAD": 12345,
      "CHF": 12345,
      "CNY": 12345,
      "DKK": 12345,
      "EUR": 12345,
      "GBP": 12345,
      "GTQ": 12345,
      "INR": 12345,
      "JPY": 12345,
      "KRW": 12345,
      "MXN": 12345,
      "MYR": 12345,
      "NOK": 12345,
      "NZD": 12345,
      "PHP": 12345,
      "SAR": 12345,
      "SEK": 12345,
      "SGD": 12345,
      "USD": 12345,
      "ZAR": 12345
    },
    "availableRedemptions": 12345,
    "description": "...",
    "expirationDate": 12345,
    "numOfBillingCycles": 12345,
    "percentage": 12345,
    "pricingUnit": "INTERNATIONAL_MINUTE",
    "startDate": 12345
  },
  "frequency": "...",
  "href": "...",
  "id": 12345,
  "isPrimaryPrice": true,
  "keepBillDateOnUsageChange": true,
  "separatePrepaid": true,
  "tld": "...",
  "uuid": "..."
}

Payment plan for a product edition

Name Type Description
allowCustomUsage boolean Custom usage allowed
contract Contract Contract
cost array of PlanCost List of plan costs
discount ProductDiscountDetails Discount
frequency string Billing frequency: MONTHLY, QUARTERLY, SIX_MONTHS, YEARLY, TWO_YEARS, THREE_YEARS, DAILY
href string URL to payment plan details
id number ID
isPrimaryPrice boolean Is primary price
keepBillDateOnUsageChange boolean Keep bill date on usage change
separatePrepaid boolean Separate prepaid
tld string If plan is part of a domain reseller product, this is the tld this plan offers
uuid string Unique identifier

PaymentResult

Enumeration of

Payment

{
  "amount": 12345,
  "company": {
    "href": "...",
    "id": "..."
  },
  "currency": "INR",
  "date": 12345,
  "gatewayResponse": {
    "avs": true,
    "code": "...",
    "cvv": true,
    "message": "..."
  },
  "id": 12345,
  "links": [
    {
      "href": "...",
      "rel": "..."
    },
    {
      "href": "...",
      "rel": "..."
    }
  ],
  "method": "PAYPAL",
  "result": "GATEWAY_NOT_AVAILABLE",
  "transactionId": "...",
  "user": {
    "href": "...",
    "id": "..."
  }
}

Resource links

Name Type Description
amount number Payment amount.
company LinkWS Link to company information.
currency Currency Payment currency.
date number Payment date.
gatewayResponse GatewayResponse Gateway response
id number Payment number.
links array of Link Resource links
method PaymentMethod Payment method. Includes CREDIT_CARD, PAYPAL, and MANUAL.
result PaymentResult Payment result. May be SUCCESSFUL, FAILED , GATEWAY_NOT_AVAILABLE, or MANUAL.
transactionId string Transaction ID.
user LinkWS Link to user information.

PendingAppType

Enumeration of

PlanCost

{
  "amount": {
    "AUD": 12345,
    "BRL": 12345,
    "CAD": 12345,
    "CHF": 12345,
    "CNY": 12345,
    "DKK": 12345,
    "EUR": 12345,
    "GBP": 12345,
    "GTQ": 12345,
    "INR": 12345,
    "JPY": 12345,
    "KRW": 12345,
    "MXN": 12345,
    "MYR": 12345,
    "NOK": 12345,
    "NZD": 12345,
    "PHP": 12345,
    "SAR": 12345,
    "SEK": 12345,
    "SGD": 12345,
    "USD": 12345,
    "ZAR": 12345
  },
  "blockContractDecrease": true,
  "blockContractIncrease": true,
  "blockOriginalContractDecrease": true,
  "editionPricingItemId": 12345,
  "id": 12345,
  "increment": 12345,
  "maxUnits": 12345,
  "meteredUsage": true,
  "minUnits": 12345,
  "pricePerIncrement": true,
  "pricingStrategy": "...",
  "unit": "...",
  "unitDependency": "..."
}

Plan cost

Name Type Description
amount Price Price
blockContractDecrease boolean Block contract decrease
blockContractIncrease boolean Block contract increase
blockOriginalContractDecrease boolean Block original contract decrease
editionPricingItemId number
id number ID
increment number Increment amount
maxUnits number Max unit to buy
meteredUsage boolean Is metered usage
minUnits number Minimum unit to buy
pricePerIncrement boolean Price per increment
pricingStrategy string Pricing strategy
unit string Unit
unitDependency string Unit dependency

PlatformAttributeDefinition

{
  "createdOn": 12345,
  "hint": "...",
  "isRequired": true,
  "key": "...",
  "label": "...",
  "lastModified": 12345,
  "option": [
    {
      "createdOn": 12345,
      "label": "...",
      "lastModified": 12345,
      "order": 12345,
      "uuid": "...",
      "value": "..."
    },
    {
      "createdOn": 12345,
      "label": "...",
      "lastModified": 12345,
      "order": 12345,
      "uuid": "...",
      "value": "..."
    }
  ],
  "order": 12345,
  "type": "...",
  "uuid": "..."
}
Name Type Description
createdOn number
hint string
isRequired boolean
key string
label string
lastModified number
option array of PlatformAttributeOption
order number
type string
uuid string

PlatformAttributeOption

{
  "createdOn": 12345,
  "label": "...",
  "lastModified": 12345,
  "order": 12345,
  "uuid": "...",
  "value": "..."
}
Name Type Description
createdOn number
label string
lastModified number
order number
uuid string
value string

PlatformAttribute

{
  "applicationPlatformUuid": "...",
  "createdOn": 12345,
  "lastModified": 12345,
  "platformAttributeDefinitionUuid": "...",
  "platformAttributeOptionUuid": "...",
  "uuid": "...",
  "value": "..."
}
Name Type Description
applicationPlatformUuid string
createdOn number
lastModified number
platformAttributeDefinitionUuid string
platformAttributeOptionUuid string
uuid string
value string

Platform

{
  "attributeDefinition": [
    {
      "createdOn": 12345,
      "hint": "...",
      "isRequired": true,
      "key": "...",
      "label": "...",
      "lastModified": 12345,
      "option": [
        {
          "createdOn": 12345,
          "label": "...",
          "lastModified": 12345,
          "order": 12345,
          "uuid": "...",
          "value": "..."
        },
        {
          "createdOn": 12345,
          "label": "...",
          "lastModified": 12345,
          "order": 12345,
          "uuid": "...",
          "value": "..."
        }
      ],
      "order": 12345,
      "type": "...",
      "uuid": "..."
    },
    {
      "createdOn": 12345,
      "hint": "...",
      "isRequired": true,
      "key": "...",
      "label": "...",
      "lastModified": 12345,
      "option": [
        {
          "createdOn": 12345,
          "label": "...",
          "lastModified": 12345,
          "order": 12345,
          "uuid": "...",
          "value": "..."
        },
        {
          "createdOn": 12345,
          "label": "...",
          "lastModified": 12345,
          "order": 12345,
          "uuid": "...",
          "value": "..."
        }
      ],
      "order": 12345,
      "type": "...",
      "uuid": "..."
    }
  ],
  "createdOn": 12345,
  "description": "...",
  "iconUrl": "...",
  "isVersionSupported": true,
  "lastModified": 12345,
  "name": "...",
  "numTaggedProducts": 12345,
  "uuid": "..."
}
Name Type Description
attributeDefinition array of PlatformAttributeDefinition
createdOn number
description string
iconUrl string
isVersionSupported boolean
lastModified number
name string
numTaggedProducts number
uuid string

Position

Enumeration of

PriceRange

{
  "max": 5,
  "min": 1,
  "salePrice": "4.0000000000",
  "wholeSalePrice": null
}

Price definition for an explicit unit range.

Name Type Description
max number
min number
price number
salePrice string Regular sale price
wholesalePrice string Wholesale sale price

PriceRangeItem

{
  "max": "100",
  "min": "1"
}
Name Type Description
max string Maximum number of units for the price range
min string Minimum number of units for the price range

Price

{
  "AUD": 12345,
  "BRL": 12345,
  "CAD": 12345,
  "CHF": 12345,
  "CNY": 12345,
  "DKK": 12345,
  "EUR": 12345,
  "GBP": 12345,
  "GTQ": 12345,
  "INR": 12345,
  "JPY": 12345,
  "KRW": 12345,
  "MXN": 12345,
  "MYR": 12345,
  "NOK": 12345,
  "NZD": 12345,
  "PHP": 12345,
  "SAR": 12345,
  "SEK": 12345,
  "SGD": 12345,
  "USD": 12345,
  "ZAR": 12345
}

Price information in different currencies

Name Type Description
AUD number
BRL number
CAD number
CHF number
CNY number
DKK number
EUR number
GBP number
GTQ number
INR number
JPY number
KRW number
MXN number
MYR number
NOK number
NZD number
PHP number
SAR number
SEK number
SGD number
USD number
ZAR number

PricingDuration

Pricing duration types

Enumeration of

PricingPeriod

The pricing period. The billing frequency for the pricing plan.

Enumeration of

PricingPlan

{
  "id": "031d9ed2-3df1-44f5-876a-6b4318ba7bdb",
  "name": "Recurring Edition with Unlimited Included Users"
}
Name Type Description
id string Pricing plan ID
name string Pricing plan name

PricingPlanCosts

{
  "contractConfiguration": {
    "blockContractDowngrades": false,
    "blockContractUpgrades": false,
    "blockSwitchToShorterContract": false,
    "contractCancellationPeriodUnit": "NONE",
    "endOfContractGracePeriodUnit": "INFINITY",
    "isDefault": true,
    "keepContractDateOnPlanChange": false,
    "minimumServiceLength": 12,
    "minimumServiceLengthUnit": "MONTHLY",
    "renewalConfiguration": "AUTO_RENEW",
    "terminationFee": {
      "amount": 400,
      "description": "Termination fee!",
      "feeType": "FIXED"
    },
    "terminationFeeGracePeriodUnit": "NONE",
    "unitTerms": {}
  },
  "pricing": [
    {
      "costId": "0121502b-0bac-4927-825c-d1f6c19e79c7",
      "costType": "CONTRACT_FEE",
      "costTypeCategory": "ONE_TIME",
      "description": "Contract charge",
      "frequency": "ONE_TIME",
      "priceRanges": [],
      "pricingStrategy": "FLAT",
      "quantity": "1.0000000000",
      "salePrice": "300.0000000000",
      "totalSalePrice": "300.0000000000",
      "unit": "CONTRACT_FEE",
      "wholesalePrice": "300.0000000000"
    },
    {
      "costId": "78092def-eeb6-42dc-917e-182e38b53d16",
      "costType": "RECURRING_FLAT",
      "costTypeCategory": "RECURRING",
      "description": "Recurring monthly flat+ppu+ot with contract+ot+tf with included",
      "frequency": "MONTHLY",
      "priceRanges": [],
      "pricingStrategy": "FLAT",
      "quantity": "1.0000000000",
      "salePrice": "10.0000000000",
      "totalSalePrice": "10.0000000000",
      "wholesalePrice": "10.0000000000"
    },
    {
      "costId": "ea5b596d-950f-427b-87d0-7c82340b468b",
      "costType": "SETUP_FEE",
      "costTypeCategory": "ONE_TIME",
      "description": "Recurring monthly flat+ppu+ot with contract+ot+tf with included",
      "frequency": "ONE_TIME",
      "priceRanges": [],
      "pricingStrategy": "FLAT",
      "quantity": "1.0000000000",
      "salePrice": "100.0000000000",
      "totalSalePrice": "100.0000000000",
      "wholesalePrice": "100.0000000000"
    },
    {
      "costId": "6160b953-88f7-49ec-a90d-aef0f9ae5d17",
      "costType": "RECURRING_PER_UNIT",
      "costTypeCategory": "RECURRING",
      "description": "Per User Fee",
      "frequency": "MONTHLY",
      "priceRanges": [
        {
          "min": "0.0000000000"
        }
      ],
      "pricingStrategy": "UNIT",
      "quantity": "0.0000000000",
      "salePrice": "8.5000000000",
      "totalSalePrice": "0.0000000000",
      "unit": "USER",
      "wholesalePrice": "8.5000000000"
    },
    {
      "costType": "INCLUDED",
      "costTypeCategory": "RECURRING",
      "description": "INCLUDED",
      "frequency": "MONTHLY",
      "priceRanges": [
        {
          "max": "1.0000000000",
          "min": "1.0000000000"
        }
      ],
      "pricingStrategy": "UNIT",
      "quantity": "1.0000000000",
      "salePrice": "0.0000000000",
      "totalSalePrice": "0.0000000000",
      "unit": "USER",
      "wholesalePrice": "0.0000000000"
    }
  ],
  "pricingPlanId": "a01c46d4-8925-4719-a891-2c036e2216a1",
  "unitDefinitions": [
    {
      "allowDecimals": false,
      "increment": 1,
      "meteredUsage": false,
      "minimum": "1.0000000000",
      "pricePerIncrement": false,
      "quantity": "1.0000000000",
      "readOnly": false,
      "unit": "USER"
    }
  ]
}

Cost details of a pricing plan

Name Type Description
contractConfiguration ContractConfiguration Contract configuration
pricing array of OpportunityPricing Cost of each quantifiable unit and flat rates
pricingPlanId string Pricing plan ID
unitDefinitions array of UnitDefinition Definition of all units for an item pricing plan

PricingStrategy

Pricing strategy

Enumeration of

PricingTotals

{
  "amountDueAfterTax": "55.0000000000",
  "amountDueBeforeTax": "55.0000000000",
  "recurringTotals": [
    {
      "billingCycle": {
        "dayOfMonth": 24,
        "period": "MONTHLY"
      },
      "nextInvoiceDate": "2018-09-24",
      "totalSalePrice": "55.0000000000"
    }
  ],
  "taxSummary": [
    {
      "description": "Flat Tax",
      "taxAmount": "2.0000000000"
    }
  ]
}

Details about the taxes, subtotals, totals and recurring totals

Name Type Description
amountDueAfterTax string The amount due after taxes
amountDueBeforeTax string The amount due before taxes
recurringTotals array of QuoteVersionTotalRecurring The recurring total charges
taxSummary array of TaxDetail Details of a specific type of tax applied to a charged cost

PricingUnit

Enumeration of

Pricing

{
  "bullet": [
    {
      "content": "...",
      "tooltip": "..."
    },
    {
      "content": "...",
      "tooltip": "..."
    }
  ],
  "footnote": [
    "...",
    "..."
  ],
  "pricingSummary": "..."
}

Details for plan inclusions and foot notes

Name Type Description
bullet array of Bullet List of plan inclusion for all editions
footnote array of string List of footnotes
pricingSummary string Pricing summary

ProductDiscountDetails

{
  "amount": {
    "AUD": 12345,
    "BRL": 12345,
    "CAD": 12345,
    "CHF": 12345,
    "CNY": 12345,
    "DKK": 12345,
    "EUR": 12345,
    "GBP": 12345,
    "GTQ": 12345,
    "INR": 12345,
    "JPY": 12345,
    "KRW": 12345,
    "MXN": 12345,
    "MYR": 12345,
    "NOK": 12345,
    "NZD": 12345,
    "PHP": 12345,
    "SAR": 12345,
    "SEK": 12345,
    "SGD": 12345,
    "USD": 12345,
    "ZAR": 12345
  },
  "availableRedemptions": 12345,
  "description": "...",
  "expirationDate": 12345,
  "numOfBillingCycles": 12345,
  "percentage": 12345,
  "pricingUnit": "TIER3_STANDARD_LINE",
  "startDate": 12345
}

Discount detail on a product pricing

Name Type Description
amount Price Discount amount in different currencies
availableRedemptions number Number of time the discount can be used
description string Description
expirationDate number Expiration date of the discount
numOfBillingCycles number Number of billing cycle the discount is applicable
percentage number Discount in percentage
pricingUnit PricingUnit Pricing unit
startDate number Start date of the discount

ProductGroups

{
  "attributes": [
    {
      "attributeId": 56,
      "name": "English",
      "options": [
        {
          "attributeOptionId": 128,
          "name": "EngOpt1",
          "selected": true
        },
        {
          "attributeOptionId": 129,
          "name": "EngOpt2",
          "selected": false
        },
        {
          "attributeOptionId": 130,
          "name": "EngOpt3",
          "selected": false
        },
        {
          "attributeOptionId": 131,
          "name": "EngOpt4",
          "selected": false
        },
        {
          "attributeOptionId": 132,
          "name": "EngOpt5",
          "selected": false
        },
        {
          "attributeOptionId": 133,
          "name": "EngOpt6",
          "selected": false
        },
        {
          "attributeOptionId": 134,
          "name": "EngOpt7",
          "selected": false
        }
      ],
      "required": false
    }
  ],
  "categories": {
    "options": [
      {
        "categoryId": 0,
        "name": "Select a Category",
        "subCategories": [
          {
            "name": "Select a Sub Category",
            "subCategoryId": 0
          }
        ]
      },
      {
        "categoryId": 186,
        "name": "Numbers",
        "subCategories": [
          {
            "name": "Select a Sub Category",
            "subCategoryId": 0
          },
          {
            "name": "One",
            "subCategoryId": 113
          },
          {
            "name": "Two",
            "subCategoryId": 114
          }
        ]
      }
    ],
    "required": false,
    "selectedOptions": [
      {
        "categoryId": 0,
        "subCategoryId": 0
      },
      {
        "categoryId": 186,
        "subCategoryId": 0
      },
      {
        "categoryId": 186,
        "subCategoryId": 115
      }
    ],
    "tooltip": "Add categories to your application"
  },
  "customerGroups": [
    {
      "name": "New Customer Group",
      "options": [
        {
          "industryId": 55,
          "name": "Industry1",
          "selected": true
        },
        {
          "industryId": 56,
          "name": "Industry2",
          "selected": false
        }
      ],
      "required": true,
      "userAttributeId": 31
    }
  ],
  "merchandisingOptions": {
    "badges": {
      "options": [
        {
          "badgeId": 7,
          "imageUrl": "common_resources/attributeOptions/128/badge.png?e5dc31b07b947203ce979bd55032f960",
          "name": "EngOpt1",
          "position": 1
        },
        {
          "badgeId": 8,
          "imageUrl": "common_resources/attributeOptions/129/badge.png?e5dc31b07b947203ce979bd55032f960",
          "name": "EngOpt2",
          "position": 2
        },
        {
          "badgeId": 9,
          "imageUrl": "common_resources/attributeOptions/130/badge.png?fd55e224f0cc01dd33f6ae864002e880",
          "name": "EngOpt3"
        },
        {
          "badgeId": 10,
          "imageUrl": "common_resources/attributeOptions/null/badge.png?e5dc31b07b947203ce979bd55032f960",
          "name": "EngOpt4"
        }
      ],
      "selectedOptions": [
        7,
        8
      ]
    },
    "ribbons": {
      "options": [
        {
          "ribbonId": 0,
          "text": "Choose One"
        },
        {
          "color": "#0004FF",
          "ribbonId": 8,
          "text": "Discount",
          "textColor": "#FFFFF"
        },
        {
          "color": "#0004FF",
          "ribbonId": 7,
          "text": "Free",
          "textColor": "#FFFFF"
        },
        {
          "color": "#0004FF",
          "ribbonId": 9,
          "text": "Special",
          "textColor": "#FFFFF"
        }
      ],
      "selectedOption": 7
    }
  },
  "productLines": [
    {
      "name": "MSFT",
      "productLineId": 1,
      "selected": false
    }
  ],
  "segmentSelections": {
    "availableCompanyGroups": [
      {
        "id": "1b0cc1f0-4945-4c6a-989c-d5f350a1b9d1",
        "name": "cda",
        "segments": [
          {
            "id": "e96f1bd2-c6c7-4546-ad9c-518f5ff650a9",
            "name": "fd"
          }
        ]
      }
    ],
    "selectedSegments": [
      "e96f1bd2-c6c7-4546-ad9c-518f5ff650a9"
    ]
  }
}

Information about the tooltip, attribute, and list of categories associated to the product.

Name Type Description
attributes array of AttributeChoice Attribute options available for the product.
categories CategorySelections Information about the tooltip, attribute, and list of categories associated to the product.
customerGroups array of UserAttributeChoice Customer group options available for the product.
merchandisingOptions MerchandisingOptions Information about the badges and ribbons added to the product.
productLines array of ProductLineChoice Product line options available for the product.
segmentSelections SegmentSelection Information about segment groups and segments

ProductIds

{
  "editionId": "EDITION_CODE",
  "productId": "dfc9cefb-610b-4e49-ade8-6ae51a4d35c9"
}

A product ID and edition code

Name Type Description
editionId string The edition code
productId string The product ID

ProductInformation

{
  "appFromNetwork": false,
  "iconUrl": "https://ad-dev-dump1.s3.amazonaws.com/app_resources/157/thumbs_64/img7932941780668708927.png",
  "productName": "AUTO_WEBAPP_NEW"
}

Information about the product, such as the name, icon URL, and if it is a network product.

Name Type Description
appFromNetwork boolean Indicates whether this product is a network application.
iconUrl string Product icon URL
productName string Product name

ProductLineChoice

{
  "name": "MSFT",
  "productLineId": 1,
  "selected": false
}

Product lines are used to promote a specific developer or a specific product type. It organizes products on their own listing page which can be included as a link in the marketplace navigation.

Name Type Description
name string Name of the product line option.
productLineId integer Unique ID of the product line option.
selected boolean Indicates whether product line option is selected for the product.

ProductListing

{
  "addon": true,
  "billingFrequency": "...",
  "blurb": "...",
  "bundleUrl": [
    "...",
    "..."
  ],
  "buyable": true,
  "channelStartingPrice": {
    "free": true,
    "freeTrial": true,
    "prices": {
      "property1": {
        "duration": "THREE_YEARS",
        "price": 12345
      },
      "property2": {
        "duration": "THREE_YEARS",
        "price": 12345
      }
    }
  },
  "collectLeads": true,
  "description": "...",
  "developerName": "...",
  "discountDetails": {
    "discountedStartingPrice": "...",
    "highestFixedDiscount": {
      "AUD": 12345,
      "BRL": 12345,
      "CAD": 12345,
      "CHF": 12345,
      "CNY": 12345,
      "DKK": 12345,
      "EUR": 12345,
      "GBP": 12345,
      "GTQ": 12345,
      "INR": 12345,
      "JPY": 12345,
      "KRW": 12345,
      "MXN": 12345,
      "MYR": 12345,
      "NOK": 12345,
      "NZD": 12345,
      "PHP": 12345,
      "SAR": 12345,
      "SEK": 12345,
      "SGD": 12345,
      "USD": 12345,
      "ZAR": 12345
    },
    "highestPercentageDiscount": 12345,
    "startingPricePercentageDiscount": 12345
  },
  "downloadFileSize": 12345,
  "featured": true,
  "featuredSliderPosition": 12345,
  "free": true,
  "freeTrialOrEditionPresent": true,
  "hasLyncToPhone": true,
  "hidePricings": true,
  "href": "...",
  "iconSrcset": {
    "property1": "...",
    "property2": "..."
  },
  "iconUrl": "...",
  "id": 12345,
  "language": [
    "...",
    "..."
  ],
  "lastModified": 12345,
  "name": "...",
  "numRatings": 12345,
  "overview": "...",
  "overviewImageSrcset": {
    "property1": "...",
    "property2": "..."
  },
  "overviewImageUrl": "...",
  "popular": true,
  "popularity": 12345,
  "productRibbon": {},
  "productType": "...",
  "profileLogoSrcset": {
    "property1": "...",
    "property2": "..."
  },
  "profileLogoUrl": "...",
  "publishedOn": 12345,
  "rating": 12345,
  "referable": true,
  "showRating": true,
  "sortRank": 12345,
  "staffPick": true,
  "staffPickSliderPosition": 12345,
  "startingPrice": "...",
  "tag": [
    {
      "badge": "...",
      "description": "...",
      "id": 12345,
      "name": "...",
      "showBadge": true,
      "showOnNavigation": true,
      "tag": [
        {},
        {}
      ],
      "type": "..."
    },
    {
      "badge": "...",
      "description": "...",
      "id": 12345,
      "name": "...",
      "showBadge": true,
      "showOnNavigation": true,
      "tag": [
        {},
        {}
      ],
      "type": "..."
    }
  ],
  "url": "...",
  "uuid": "...",
  "vendorName": "..."
}

Product information used for the listing on the marketplace

Name Type Description
addon boolean Is an add-on product
billingFrequency string Billing frequency
blurb string Short description
bundleUrl array of string List of bundle URLs
buyable boolean Is buyable
channelStartingPrice ChannelStartingPrice Starting prices per currency on channel
collectLeads boolean Collect lead
description string Description
developerName string Developer name
discountDetails DiscountDetail Discount details
downloadFileSize number Download file size for downloadable product
featured boolean Is featured
featuredSliderPosition number Featured slider position
free boolean Is free
freeTrialOrEditionPresent boolean Is free trial or edition present
hasLyncToPhone boolean Has lync to phone add-on
hidePricings boolean Hide pricings
href string URL to get product detail
iconSrcset object Icon Srcset
iconUrl string Icon URL
id number ID
language array of string List of supported languages
lastModified number Last modified date
name string Name
numRatings number Number of ratings
overview string Overview
overviewImageSrcset object Overview image Srcset
overviewImageUrl string Overview image URL
popular boolean Is populare
popularity number Poplarity rank
productRibbon ProductRibbonWS
productType string Product type
profileLogoSrcset object Profile logo Srcset
profileLogoUrl string Profile logo URL
publishedOn number Publication date
rating number User-submitted total rating
referable boolean Is a referable product
showRating boolean Must show the rating
sortRank number Sort rank
staffPick boolean Is staff pick
staffPickSliderPosition number Staff pick slider position
startingPrice string Starting price
tag array of Tag List of tags
url string URL to product profile
uuid string Unique identifier
vendorName string Vendor company name

ProductRibbonWS

{
  "ribbonColor": "...",
  "text": "...",
  "textColor": "..."
}
Name Type Description
ribbonColor string
text string
textColor string

ProductType

Product type

Enumeration of

Product

{
  "_embedded": {
    "associatedAddons": [
      {
        "addonId": 1090,
        "editionId": 1416,
        "links": [
          {
            "href": "...",
            "rel": "..."
          },
          {
            "href": "...",
            "rel": "..."
          }
        ]
      },
      {
        "addonId": 1090,
        "editionId": 1404,
        "links": [
          {
            "href": "...",
            "rel": "..."
          },
          {
            "href": "...",
            "rel": "..."
          }
        ]
      }
    ]
  },
  "addon": true,
  "addonOfferings": [
    {
      "bullets": [
        {
          "content": "...",
          "tooltip": "..."
        },
        {
          "content": "...",
          "tooltip": "..."
        }
      ],
      "code": "...",
      "description": "...",
      "descriptionHtml": "...",
      "exclusive": true,
      "id": 12345,
      "name": "...",
      "paymentPlan": [
        {
          "allowCustomUsage": true,
          "contract": {},
          "cost": [
            {},
            {}
          ],
          "discount": {},
          "frequency": "...",
          "href": "...",
          "id": 12345,
          "isPrimaryPrice": true,
          "keepBillDateOnUsageChange": true,
          "separatePrepaid": true,
          "tld": "...",
          "uuid": "..."
        },
        {
          "allowCustomUsage": true,
          "contract": {},
          "cost": [
            {},
            {}
          ],
          "discount": {},
          "frequency": "...",
          "href": "...",
          "id": 12345,
          "isPrimaryPrice": true,
          "keepBillDateOnUsageChange": true,
          "separatePrepaid": true,
          "tld": "...",
          "uuid": "..."
        }
      ],
      "stacked": true,
      "status": "...",
      "uuid": "..."
    },
    {
      "bullets": [
        {
          "content": "...",
          "tooltip": "..."
        },
        {
          "content": "...",
          "tooltip": "..."
        }
      ],
      "code": "...",
      "description": "...",
      "descriptionHtml": "...",
      "exclusive": true,
      "id": 12345,
      "name": "...",
      "paymentPlan": [
        {
          "allowCustomUsage": true,
          "contract": {},
          "cost": [
            {},
            {}
          ],
          "discount": {},
          "frequency": "...",
          "href": "...",
          "id": 12345,
          "isPrimaryPrice": true,
          "keepBillDateOnUsageChange": true,
          "separatePrepaid": true,
          "tld": "...",
          "uuid": "..."
        },
        {
          "allowCustomUsage": true,
          "contract": {},
          "cost": [
            {},
            {}
          ],
          "discount": {},
          "frequency": "...",
          "href": "...",
          "id": 12345,
          "isPrimaryPrice": true,
          "keepBillDateOnUsageChange": true,
          "separatePrepaid": true,
          "tld": "...",
          "uuid": "..."
        }
      ],
      "stacked": true,
      "status": "...",
      "uuid": "..."
    }
  ],
  "autoUpgradeToPaid": true,
  "bundledPlanIds": [
    12345,
    12345
  ],
  "buyable": true,
  "changeSubscriptionAllowed": true,
  "collectLeads": true,
  "collectLeadsWithPurchaseEnabled": true,
  "customAttributes": [
    {
      "attributeKey": "...",
      "attributeType": "TEXT",
      "label": "...",
      "value": "...",
      "valueKeys": [
        "...",
        "..."
      ],
      "valueOptions": [
        {
          "optionKey": "...",
          "optionLabel": "..."
        },
        {
          "optionKey": "...",
          "optionLabel": "..."
        }
      ]
    },
    {
      "attributeKey": "...",
      "attributeType": "MULTISELECT",
      "label": "...",
      "value": "...",
      "valueKeys": [
        "...",
        "..."
      ],
      "valueOptions": [
        {
          "optionKey": "...",
          "optionLabel": "..."
        },
        {
          "optionKey": "...",
          "optionLabel": "..."
        }
      ]
    }
  ],
  "customIntegration": "...",
  "displayQuestions": true,
  "displayReviews": true,
  "downloadFileSize": 12345,
  "featuredCustomer": [
    {
      "id": 12345,
      "logoUrl": "...",
      "name": "..."
    },
    {
      "id": 12345,
      "logoUrl": "...",
      "name": "..."
    }
  ],
  "featuredMedium": [
    {
      "link": "...",
      "linkDescription": "...",
      "source": {
        "id": 12345,
        "logoUrl": "...",
        "name": "..."
      }
    },
    {
      "link": "...",
      "linkDescription": "...",
      "source": {
        "id": 12345,
        "logoUrl": "...",
        "name": "..."
      }
    }
  ],
  "features": [
    {
      "bullets": [
        {
          "abovePicture": true,
          "highlight": [
            {},
            {}
          ],
          "position": 12345,
          "title": "..."
        },
        {
          "abovePicture": true,
          "highlight": [
            {},
            {}
          ],
          "position": 12345,
          "title": "..."
        }
      ],
      "description": "...",
      "header": "...",
      "hideOnOverview": true,
      "id": 12345,
      "imageUrl": "...",
      "position": 12345,
      "slogan": "..."
    },
    {
      "bullets": [
        {
          "abovePicture": true,
          "highlight": [
            {},
            {}
          ],
          "position": 12345,
          "title": "..."
        },
        {
          "abovePicture": true,
          "highlight": [
            {},
            {}
          ],
          "position": 12345,
          "title": "..."
        }
      ],
      "description": "...",
      "header": "...",
      "hideOnOverview": true,
      "id": 12345,
      "imageUrl": "...",
      "position": 12345,
      "slogan": "..."
    }
  ],
  "free": true,
  "freeTrialOrEditionPresent": true,
  "hidePricings": true,
  "highestFixedDiscount": {
    "AUD": 12345,
    "BRL": 12345,
    "CAD": 12345,
    "CHF": 12345,
    "CNY": 12345,
    "DKK": 12345,
    "EUR": 12345,
    "GBP": 12345,
    "GTQ": 12345,
    "INR": 12345,
    "JPY": 12345,
    "KRW": 12345,
    "MXN": 12345,
    "MYR": 12345,
    "NOK": 12345,
    "NZD": 12345,
    "PHP": 12345,
    "SAR": 12345,
    "SEK": 12345,
    "SGD": 12345,
    "USD": 12345,
    "ZAR": 12345
  },
  "highestPercentageDiscount": 12345,
  "hostedLocation": "...",
  "href": "...",
  "id": 12345,
  "integrationConfiguration": {
    "productSettings": {
      "enabledForSubscriptionChange": true,
      "form": [
        {},
        {}
      ],
      "preSubmitValidationRequired": true,
      "validationUrl": "..."
    }
  },
  "language": [
    "...",
    "..."
  ],
  "lastModified": 12345,
  "linkedImportableApplicationUuid": "...",
  "links": [
    {
      "href": "...",
      "rel": "..."
    },
    {
      "href": "...",
      "rel": "..."
    }
  ],
  "listing": {
    "blurb": "...",
    "imageSrcset": {
      "property1": "...",
      "property2": "..."
    },
    "imageUrl": "...",
    "mobileAppStoreId": "...",
    "mobileBundleId": "...",
    "myAppLogoIconSrcset": {
      "property1": "...",
      "property2": "..."
    },
    "myAppLogoIconUrl": "...",
    "overview": "...",
    "profileImageSrcset": {
      "property1": "...",
      "property2": "..."
    },
    "profileImageUrl": "...",
    "rating": 12345,
    "reviewCount": 12345
  },
  "liveChatAvailable": true,
  "liveChatEnabled": true,
  "mosiConnectorType": "MOSI",
  "name": "...",
  "newSubscriptionEnabled": true,
  "numRatings": 12345,
  "oneClickPurchasable": true,
  "overview": {
    "benefit": [
      {
        "description": "...",
        "title": "..."
      },
      {
        "description": "...",
        "title": "..."
      }
    ],
    "demoUrl": "...",
    "documentationUrl": "...",
    "downloadDocumentationUrl": "...",
    "downloadFileSize": 12345,
    "imageSrcset": {
      "property1": "...",
      "property2": "..."
    },
    "imageUrl": "...",
    "splashDescription": "...",
    "splashTitle": "...",
    "systemRequirements": "...",
    "versions": {
      "entry": [
        {},
        {}
      ]
    }
  },
  "platform": [
    {
      "attribute": [
        {
          "applicationPlatformUuid": "...",
          "createdOn": 12345,
          "lastModified": 12345,
          "platformAttributeDefinitionUuid": "...",
          "platformAttributeOptionUuid": "...",
          "uuid": "...",
          "value": "..."
        },
        {
          "applicationPlatformUuid": "...",
          "createdOn": 12345,
          "lastModified": 12345,
          "platformAttributeDefinitionUuid": "...",
          "platformAttributeOptionUuid": "...",
          "uuid": "...",
          "value": "..."
        }
      ],
      "platformDefinition": {
        "attributeDefinition": [
          {},
          {}
        ],
        "createdOn": 12345,
        "description": "...",
        "iconUrl": "...",
        "isVersionSupported": true,
        "lastModified": 12345,
        "name": "...",
        "numTaggedProducts": 12345,
        "uuid": "..."
      },
      "uuid": "..."
    },
    {
      "attribute": [
        {
          "applicationPlatformUuid": "...",
          "createdOn": 12345,
          "lastModified": 12345,
          "platformAttributeDefinitionUuid": "...",
          "platformAttributeOptionUuid": "...",
          "uuid": "...",
          "value": "..."
        },
        {
          "applicationPlatformUuid": "...",
          "createdOn": 12345,
          "lastModified": 12345,
          "platformAttributeDefinitionUuid": "...",
          "platformAttributeOptionUuid": "...",
          "uuid": "...",
          "value": "..."
        }
      ],
      "platformDefinition": {
        "attributeDefinition": [
          {},
          {}
        ],
        "createdOn": 12345,
        "description": "...",
        "iconUrl": "...",
        "isVersionSupported": true,
        "lastModified": 12345,
        "name": "...",
        "numTaggedProducts": 12345,
        "uuid": "..."
      },
      "uuid": "..."
    }
  ],
  "pricing": {
    "bullets": [
      {
        "content": "...",
        "tooltip": "..."
      },
      {
        "content": "...",
        "tooltip": "..."
      }
    ],
    "edition": [
      {
        "bullets": [
          {},
          {}
        ],
        "bundleOnly": true,
        "code": "...",
        "customerContractRestricted": true,
        "customization": [
          {},
          {}
        ],
        "defaultFreeTrial": true,
        "expiredTrialGracePeriod": 12345,
        "freeTrialDuration": 12345,
        "freeTrialType": "...",
        "invisible": true,
        "item": [
          {},
          {}
        ],
        "lastModified": 12345,
        "leadGen": true,
        "name": "...",
        "plan": [
          {},
          {}
        ],
        "primary": true,
        "rank": 12345,
        "restricted": true,
        "revenueType": "...",
        "targetAudience": "...",
        "trial": {},
        "uuid": "..."
      },
      {
        "bullet": [
          {},
          {}
        ],
        "bundleOnly": true,
        "code": "...",
        "customerContractRestricted": true,
        "customization": [
          {},
          {}
        ],
        "defaultFreeTrial": true,
        "expiredTrialGracePeriod": 12345,
        "freeTrialDuration": 12345,
        "freeTrialType": "...",
        "invisible": true,
        "item": [
          {},
          {}
        ],
        "lastModified": 12345,
        "leadGen": true,
        "name": "...",
        "plan": [
          {},
          {}
        ],
        "primary": true,
        "rank": 12345,
        "restricted": true,
        "revenueType": "...",
        "targetAudience": "...",
        "trial": {},
        "uuid": "..."
      }
    ],
    "footnote": [
      "...",
      "..."
    ],
    "pricingSummary": "..."
  },
  "privacyUrl": "...",
  "productRibbon": {},
  "provider": {
    "name": "...",
    "url": "...",
    "uuid": "..."
  },
  "publishedApp": {
    "href": "...",
    "id": "..."
  },
  "publishedOn": 12345,
  "rating": 12345,
  "referUrl": "...",
  "referable": true,
  "resource": [
    {
      "description": "...",
      "id": 12345,
      "link": "...",
      "name": "...",
      "resellerAccess": true,
      "resourceType": "...",
      "scribdId": "...",
      "scribdKey": "..."
    },
    {
      "description": "...",
      "id": 12345,
      "link": "...",
      "name": "...",
      "resellerAccess": true,
      "resourceType": "...",
      "scribdId": "...",
      "scribdKey": "..."
    }
  ],
  "screenshot": [
    {
      "imageUrl": "...",
      "imageUrlSrcset": {
        "property1": "...",
        "property2": "..."
      },
      "name": "..."
    },
    {
      "imageUrl": "...",
      "imageUrlSrcset": {
        "property1": "...",
        "property2": "..."
      },
      "name": "..."
    }
  ],
  "showSelfServiceRestriction": true,
  "showThirdPartyLegalDisclosure": true,
  "startingPrice": {
    "amount": {
      "AUD": 12345,
      "BRL": 12345,
      "CAD": 12345,
      "CHF": 12345,
      "CNY": 12345,
      "DKK": 12345,
      "EUR": 12345,
      "GBP": 12345,
      "GTQ": 12345,
      "INR": 12345,
      "JPY": 12345,
      "KRW": 12345,
      "MXN": 12345,
      "MYR": 12345,
      "NOK": 12345,
      "NZD": 12345,
      "PHP": 12345,
      "SAR": 12345,
      "SEK": 12345,
      "SGD": 12345,
      "USD": 12345,
      "ZAR": 12345
    },
    "billingFrequency": "...",
    "discount": {
      "amount": {},
      "availableRedemptions": 12345,
      "description": "...",
      "expirationDate": 12345,
      "numOfBillingCycles": 12345,
      "percentage": 12345,
      "pricingUnit": "NFON_NSOFTPHONE_STANDARD_WINDOWS_OR_MOBILE",
      "startDate": 12345
    },
    "unit": "..."
  },
  "support": {
    "description": "...",
    "email": "...",
    "knowledgebaseUrl": "...",
    "phone": "..."
  },
  "tags": [
    {
      "badge": "...",
      "description": "...",
      "id": 12345,
      "name": "...",
      "showBadge": true,
      "showOnNavigation": true,
      "tag": [
        {},
        {}
      ],
      "type": "..."
    },
    {
      "badge": "...",
      "description": "...",
      "id": 12345,
      "name": "...",
      "showBadge": true,
      "showOnNavigation": true,
      "tag": [
        {},
        {}
      ],
      "type": "..."
    }
  ],
  "termsUrl": "...",
  "type": "...",
  "usageType": "...",
  "uuid": "...",
  "workingApp": {
    "href": "...",
    "id": "..."
  }
}

Product detail

Name Type Description
_embedded object This property can contain different values depending on the type of product. If the product has associated add-ons, it contains a list of the add-on products in an associatedAddons array. Add-on products are different than add-on offerings: add-on offerings appear as an array of AddonOffering in the addonOffering object. Depending on your marketplace settings, your products can support either add-on offerings or add-on products.
If the product is itself an add-on product, this property lists the editions of the associated regular product in an associatedEditions array.
addon boolean Returns true if the application is an add-on product, or false if it is a base product.
addonOffering array of AddonOffering List of the product's add-on offerings, which are different than add-on products. Add-on products appear as an array of associatedAddons in the _embedded object. Depending on your marketplace settings, your base products can support either add-on offerings or add-on products.
assignLeadsToDevelopers boolean Indicates whether the lead can be assigned to users with the Developer role
autoUpgradeToPaid boolean Is auto upgrade to paid
bundledPlanIds object Bundle plan IDs
buyable boolean Is buyable
If false, the buy button is not available
changeSubscriptionAllowed boolean Change subscription allowed
collectLeads boolean Is collect lead enabled
collectLeadsWithPurchaseEnabled boolean Collect lead with the purchase
If set to true and collectLeads = true, then a lead will be collected when an user buys the product
If set to false, the user cannot buy the product
customAttributes array of CustomAttributeLightV2 List of attached product custom attributes
customIntegration string Custom integration type, eg. MOSI, GOOGLE APPS, SENDGRID
displayQuestions boolean Display question and answers
displayReviews boolean Display reviews
downloadFileSize number Download file size for downloadable apps
featuredCustomers array of FeaturedCustomer List of featured customers
featuredMedia array of FeaturedMedium List of media sources
features array of Feature List of features
free boolean Is free
freeTrialOrEditionPresent boolean Is free trial or edition present
hidePricings boolean Hide the pricings
highestFixedDiscount Price Highest fixed discount
highestPercentageDiscount number Highest percentage discount
hostedLocation string Hosted location
href string URL to retrieve product detail
id number ID
importable boolean Indicates whether a product can be imported
integrationConfiguration IntegrationConfiguration Integration configuration information
language array of string List of supported languages
lastModified number Last modified date
linkedImportableApplicationUuid string Linked importable application unique identifier
listing ListingInfo Listing detail needed for the product listing on the marketplace
liveChatAvailable boolean Live chat available
liveChatEnabled boolean Live chat enabled
merchandisingBadges array of Array of badges for the product, including UUID, name, and URL for the associated image for each badge
mosiConnectorType OriginApi Connector use for Office product
name string Name
newSubscriptionEnabled boolean New subscription enabled
numRatings number Number of ratings
oneClickPurchasable boolean Is one-click purchase enabled
overview OverviewInfo Overview details needed for the product profile
platforms array of ApplicationPlatform List of attached Platforms
pricing MarketplacePricing Pricing information for available editions
privacyUrl string Privacy policy URL
productRibbon ProductRibbonWS
provider Provider Provider company information
publishedApp LinkWS Link to retrieve published app detail
publishedOn number Publication date in UNIX Epoch milliseconds
rating number User-submitted rating
referUrl string Redirection link to product website when user clicks the buy button
For referral apps
referable boolean Is a referrable product
resources array of Resource List of resources
screenshots array of Screenshot List of screenshots
sellerName string The name of the company that owns the catalog and the product profile being sold
showSelfServiceRestriction boolean Show self-service restriction
showThirdPartyLegalDisclosure boolean Show third-party legal Disclosure
startingPrice StartingPrice Starting price
support Support Product support information
supportedCountries array of The list of supported countries in ISO 3166 format
supportedCurrencies array of The list of supported currencies in ISO 4217 format
supportedLanguages array of The list of supported languages in ISO 639
supportsMultipleEditions boolean Indicates whether the product type can have multiple editions
tag array of Tag List of tags
termsUrl string Terms and condition URL
type string Product type
usageType string Usage type
uuid string Unique identifier
workingApp LinkWS Link to retrieve working app detail

Provider

{
  "name": "...",
  "url": "...",
  "uuid": "..."
}

Provider company: entity that operates an AppDirect-powered marketplace

Name Type Description
name string Name
url string Provider website
uuid string Unique identifier

ProvisioningConfiguration

{
  "date": "1546300800000",
  "strategy": "CUSTOM"
}

Determines when to send the service activation request to the vendor, either immediately after the opportunity is finalized (set the provisioning strategy to IMMEDIATELY) or at a future date (set the provisioning strategy to CUSTOM and set the desired date).

Name Type Description
date number Custom service activation date in UNIX Epoch milliseconds. This date is required when the provisioning strategy is CUSTOM. Do not set the date when the strategy is IMMEDIATELY.
strategy ProvisioningStrategy

ProvisioningStrategy

Enumeration of

PurchaseRestriction

{
  "appId": 12345,
  "appName": "...",
  "browsedEditionId": 12345,
  "ownedEditionId": 12345,
  "ownedEditionName": "...",
  "requiredAppEdition": [
    {
      "appId": 12345,
      "appName": "...",
      "editionId": 12345,
      "editionName": "..."
    },
    {
      "appId": 12345,
      "appName": "...",
      "editionId": 12345,
      "editionName": "..."
    }
  ],
  "restrictionType": "...",
  "upcomingSubscription": true
}

Product that a user cannot buy due to restrictions of a currently/previously owned product or because other products are required

Name Type Description
appId number Non-purchasable application ID
appName string Non-purchasable application name
browsedEditionId number Browsed edition ID
If browsedEdition is null, then restrict the entire app.
ownedEditionId number Owned edition ID
ownedEditionName string Owned edition name
requiredAppEdition array of AppEdition Editions required to purchase the browsed edition
restrictionType string The type of restriction applied. Null if the type is unknown. For example, if the account is in transition.
upcomingSubscription boolean Is upcoming subscription

QuestionAnswer

{
  "author": {
    "name": "...",
    "profilePicUrl": "...",
    "uuid": "..."
  },
  "comment": "...",
  "id": 12345,
  "lastModified": 12345,
  "official": true
}

Answer to a question on a product

Name Type Description
author Author Author
comment string Comment
id number ID
lastModified number Last modified date
official boolean Is the official answer

Question

{
  "answerCount": 12345,
  "author": {
    "name": "...",
    "profilePicUrl": "...",
    "uuid": "..."
  },
  "comment": "...",
  "id": 12345,
  "lastModified": 12345,
  "title": "..."
}

Question on a product

Name Type Description
answerCount number Number of answers
author Author Author
comment string Comment
id number ID
lastModified number Last modified date
title string Title

QuotePage

{
  "pageInfo": {
    "endCursor": "MA==",
    "hasNextPage": false,
    "hasPreviousPage": false,
    "startCursor": "MA=="
  },
  "quotes": [
    {
      "availableActions": [
        "PRINT_PDF",
        "EDIT_NAME",
        "REQUEST_CUSTOMER_APPROVAL"
      ],
      "createdBy": {
        "company": {
          "id": "d9a6d470-c69a-4403-9355-5953ddcb9efb"
        },
        "email": "jane.smith@company.com",
        "firstName": "Jane",
        "id": "d17fee11-c6ce-4f9f-8fb6-9bc55d583699",
        "lastName": "Smith"
      },
      "createdOn": 1674590164842,
      "customerUser": {
        "company": {
          "id": "d9a6d470-c69a-4403-9355-5953ddcb9efb"
        },
        "email": "jane.smith@company.com",
        "firstName": "Jane",
        "id": "d17fee11-c6ce-4f9f-8fb6-9bc55d583699",
        "lastName": "Smith"
      },
      "displayId": "Q6201242",
      "id": "e8801dc6-8c0f-4c0b-82bc-99c4ebfb5e8a",
      "name": "API quote version",
      "ownerUser": {
        "company": {
          "id": "05ba75d3-3637-4a7a-807d-f2cb66466348"
        },
        "email": "john.doe@acme.com",
        "firstName": "John",
        "id": "a6cc4e69-74e0-47f4-b36d-215693f47165",
        "lastName": "Doe"
      },
      "status": "OPEN"
    },
    {
      "availableActions": [
        "PRINT_PDF",
        "EDIT_NAME",
        "SHARE_LINK",
        "REVOKE"
      ],
      "createdBy": {
        "company": {
          "id": "d9a6d470-c69a-4403-9355-5953ddcb9efb"
        },
        "email": "jane.smith@company.com",
        "firstName": "Jane",
        "id": "d17fee11-c6ce-4f9f-8fb6-9bc55d583699",
        "lastName": "Smith"
      },
      "createdOn": 1674574349898,
      "customerUser": {
        "company": {
          "id": "d9a6d470-c69a-4403-9355-5953ddcb9efb"
        },
        "email": "jane.smith@company.com",
        "firstName": "Jane",
        "id": "d17fee11-c6ce-4f9f-8fb6-9bc55d583699",
        "lastName": "Smith"
      },
      "displayId": "Q5701241",
      "id": "757d0f09-385c-41df-9781-d6df98584953",
      "name": "API quote version",
      "ownerUser": {
        "company": {
          "id": "05ba75d3-3637-4a7a-807d-f2cb66466348"
        },
        "email": "john.doe@acme.com",
        "firstName": "John",
        "id": "a6cc4e69-74e0-47f4-b36d-215693f47165",
        "lastName": "Doe"
      },
      "status": "PENDING"
    }
  ],
  "totalCount": 2
}
Name Type Description
pageInfo PageMetadata Page information
quotes array of QuoteVersion A list of quote versions

QuoteVersion

{
  "availableActions": [
    "PRINT_PDF",
    "EDIT_NAME",
    "REQUEST_CUSTOMER_APPROVAL"
  ],
  "createdBy": {
    "company": {
      "id": "d9a6d470-c69a-4403-9355-5953ddcb9efb"
    },
    "email": "jhon.doe@appdirect.com",
    "firstName": "Jhon",
    "id": "d17fee11-c6ce-4f9f-8fb6-9bc55d583699",
    "lastName": "Doe"
  },
  "createdOn": 1674574349898,
  "currency": "USD",
  "customerUser": {
    "company": {
      "id": "d9a6d470-c69a-4403-9355-5953ddcb9efb"
    },
    "email": "jhon.doe@appdirect.com",
    "firstName": "Jhon",
    "id": "d17fee11-c6ce-4f9f-8fb6-9bc55d583699",
    "lastName": "Doe"
  },
  "displayId": "Q5701241",
  "id": "757d0f09-385c-41df-9781-d6df98584953",
  "items": [
    {
      "id": "166e0ce6-4309-4a16-ac9b-61bea7ce1cbc",
      "pricing": [
        {
          "costType": "RECURRING_FLAT",
          "description": "Gold plan",
          "quantity": "1.0000000000",
          "salePrice": "55.0000000000",
          "totalSalePrice": "55.0000000000"
        },
        {
          "costType": "INCLUDED",
          "description": "Per User Fee Included",
          "quantity": "1.0000000000",
          "salePrice": "0.0000000000",
          "totalSalePrice": "0.0000000000"
        }
      ],
      "pricingPlan": {
        "id": "19c06143-b21c-43c4-b236-eeca61512753",
        "name": "Gold plan"
      },
      "product": {
        "editionId": "b06358bc-cb63-45e6-87c7-19db9b0cf696",
        "id": "fa776d2e-cda5-4256-9a27-125a0fe3f448",
        "name": "Supported Product for Opportunity MVP"
      }
    }
  ],
  "name": "API quote version",
  "ownerUser": {
    "company": {
      "id": "05ba75d3-3637-4a7a-807d-f2cb66466348"
    },
    "email": "susan.doe@appdirect.com",
    "firstName": "Susan",
    "id": "a6cc4e69-74e0-47f4-b36d-215693f47165",
    "lastName": "Doe"
  },
  "pricingTotals": {
    "amountDueAfterTax": "55.0000000000",
    "amountDueBeforeTax": "55.0000000000",
    "recurringTotals": [
      {
        "billingCycle": {
          "dayOfMonth": 24,
          "period": "MONTHLY"
        },
        "totalSalePrice": "55.0000000000"
      }
    ],
    "taxSummary": []
  },
  "quoteSource": {
    "id": "1798fb8f-9f55-43f6-9f5e-4980467df9af",
    "type": "OPPORTUNITY"
  },
  "status": "OPEN"
}

The body of a quote version

Name Type Description
availableActions array of string The actions available for the quote version
createdBy User Details of the quote creator
createdOn number The creation date of the quote version in UNIX Epoch milliseconds
currency Currency The currency used in the quote version
customerUser User The opportunity customer
displayId string The display ID of a quote version in the format: 'Q + two_digits_random_number + five_digits_counter_value'. For example: 'Q3201230'
id string The ID of a quote version
items array of Item List of items
name string The name of the quote version
ownerUser User The opportunity owner
pricingTotals PricingTotals Details about the taxes, subtotals, totals and recurring totals
quoteSource QuoteVersionSource Details about the source of the quote version
status string The status of the quote version

QuoteVersionCreationRequest

{
  "createdBy": {
    "company": {
      "id": "d9a6d470-c69a-4403-9355-5953ddcb9efb"
    },
    "id": "d17fee11-c6ce-4f9f-8fb6-9bc55d583699"
  },
  "name": "Quote version name",
  "source": {
    "id": "1798fb8f-9f55-43f6-9f5e-4980467df9af",
    "type": "OPPORTUNITY"
  }
}
Name Type Description
createdBy User Details of the quote creator
name string The name of the quote version
source QuoteVersionSource Details about the source of the quote version

QuoteVersionError

{
  "code": "SERVICE_UNAVAILABLE",
  "message": "Unable to reach the service, please contact support@appdirect.com",
  "status": 503
}

A description of the error from the quote version API

Name Type Description
code QuoteVersionErrorCode The error code associated with the response
details array of QuoteVersionErrorDetails Additional details of the error
message string A descriptive error message for debugging
status integer HTTP status code

QuoteVersionErrorCode

The error code associated with the response

Enumeration of

QuoteVersionErrorDetails

{
  "code": "BAD_REQUEST",
  "field": "Source type",
  "message": "Source type not defined"
}

Additional error details returned after a failed quote API call

Name Type Description
code QuoteVersionErrorCode The error code associated with the response
field string The field related to the error
message string Error description

QuoteVersionSource

{
  "id": "37f56046-2cec-4bf4-a4e2-5a733dc849a9",
  "type": "OPPORTUNITY"
}
Name Type Description
id string The source ID
type QuoteVersionSourceType The source type of the quote version

QuoteVersionSourceType

The source type of the quote version

Enumeration of

QuoteVersionTotalRecurring

{
  "recurringTotals": [
    {
      "billingCycle": {
        "dayOfMonth": 28,
        "period": "MONTHLY"
      },
      "nextInvoiceDate": "2018-09-28",
      "totalSalePrice": "55.0000000000"
    }
  ]
}

Details about the recurring total charges

Name Type Description
billingCycle BillingCycle The billing cycle
nextInvoiceDate string The next invoice date in the format YYYY-MM-DD
totalSalePrice string The total sale price

ReadWritePermission

Type of company write permissions

Enumeration of

ReconciliationType

Enumeration of

RedemptionRestriction

{
  "type": "string",
  "title": "RedemptionRestriction",
  "properties": {
    "RedemptionRestriction": {
      "type": "string",
      "enum": [
        "NONE",
        "ONCE_PER_USER",
        "ONCE_PER_COMPANY"
      ]
    }
  }
}
Name Type Description
RedemptionRestriction string

RenewalConfiguration

Contract renewal configuration. Whether the contract is renewed and, if so, with what terms.

Enumeration of

ReportListing

{
  "content": [
    {
      "createdBy": "John Smith",
      "formatType": "CSV",
      "fromDate": null,
      "jobName": "channel-companies-APPDIRECT",
      "name": "All companies report",
      "ownerCompanyId": null,
      "ownerPartner": "APPDIRECT",
      "ownerType": "ROLE_CHANNEL_ADMIN",
      "params": {
        "activeStatus": "NULL",
        "developerStatus": "NULL",
        "enableStatus": "NULL",
        "marketplaceStatus": "NULL",
        "partner": "APPDIRECT"
      },
      "reportName": "channel-companies",
      "runDate": 1518656044000,
      "status": "SUCCESSFUL",
      "toDate": null,
      "uuid": "00a667b0-3504-48c4-a8dc-c384ea2fb958"
    }
  ],
  "page": {
    "number": 1,
    "size": 50,
    "totalElements": 1,
    "totalPages": 1
  }
}

A list of reports

Name Type Description
content array of Report Report run UUID
page PagedResources Resource links

ReportType

Enumeration of

Report

{
  "createdDate": 12345,
  "endDate": 12345,
  "filename": "...",
  "id": 12345,
  "reportType": "INVOICES_CSV",
  "startDate": 12345
}

Single report information for Reporting API

Name Type Description
createdDate number Report creation date
endDate number Period end time of the report
filename string Report file name
id number Report ID
reportType ReportType Report type
startDate number Period start time of the report

Reports

{
  "reports": [
    {
      "createdDate": 12345,
      "endDate": 12345,
      "filename": "...",
      "id": 12345,
      "reportType": "COMPANIES_CSV",
      "startDate": 12345
    },
    {
      "createdDate": 12345,
      "endDate": 12345,
      "filename": "...",
      "id": 12345,
      "reportType": "CUSTOMERS_CSV",
      "startDate": 12345
    }
  ],
  "totalCount": 12345
}

Reports information for reporting API

Name Type Description
reports array of Report List of reports
totalCount number Total count of reports returned by API

RequiredFieldValidationDefinitions

{
  "expression": "string",
  "maxLength": "255",
  "minLength": "2",
  "readonly": false,
  "required": true
}

Required field definitions. Used to validate field values.

Name Type Description
expression string Describes the regular expression used to validate the field value
maxLength string Maximum number of characters for the field
minLength string Minimum number of characters for the field
readonly boolean Indicates whether field is writable
required boolean Indicates whether field is mandatory

RequiredFields

{
  "editionId": "EDITION_CODE",
  "forms": [
    {
      "context": "CART_LEVEL",
      "fields": [
        {
          "fieldType": "TEXT",
          "inputCode": "FirstName",
          "inputTitle": "First name",
          "options": {
            "suffix": {
              "inputCode": "",
              "text": ""
            }
          },
          "subTitle": "",
          "tooltip": "",
          "validations": {
            "expression": "^[A-Za-z]+(((\\'|\\-|\\.(\\s)?|\\,(\\s)?|\\s)?([A-Za-z])+))*$",
            "maxLength": "255",
            "minLength": "2",
            "readonly": false,
            "required": true
          },
          "value": "John"
        },
        {
          "fieldType": "COUNTRY",
          "inputCode": "Address/ISO3Country",
          "inputTitle": "Country",
          "options": {
            "placeholder": "",
            "suffix": {
              "text": ""
            }
          },
          "subTitle": "",
          "tooltip": "",
          "validations": {
            "expression": "^[A-Za-z]{2}$",
            "maxLength": "3",
            "minLength": "2",
            "readonly": false,
            "required": true
          },
          "value": "USA"
        },
        {
          "fieldType": "TEXT",
          "inputCode": "SubDomain",
          "inputTitle": "Your primary domain name",
          "options": {
            "placeholder": "movies.entertainment.com",
            "suffix": {
              "inputCode": "",
              "text": ".thedomain.com"
            }
          },
          "subTitle": "",
          "tooltip": "Your subdomain and domain names. For example: When subdomain=movies, and domain=.entertainment.com, the subdomain value is: movies.entertainment.com",
          "validations": {
            "expression": "^([^\\W|http(s?)://][a-zA-Z]+)(\\.[a-zA-Z]+)*",
            "maxLength": "255",
            "minLength": "1",
            "readonly": false,
            "required": true
          },
          "value": ""
        }
      ],
      "isvIdentifier": "ISV",
      "subTitle": "Additional Information Subtitle",
      "title": "Additional Information"
    }
  ],
  "productId": "dfc9cefb-610b-4e49-ade8-6ae51a4d35c9"
}

Required field definitions for a specific product and edition

Name Type Description
editionId string The edition code
forms array of Form Groups of required fields. Forms are used to organize required fields into meaningful groups.
productId string The product ID

RequiredFieldsUpdate

{
  "itemIds": [
    "a11b60a8-a16a-4aaf-8696-dadb738496fa",
    "eb690c8d-1c57-497c-82bf-a4194362d954"
  ],
  "requiredFields": {
    "Address/City": [
      "Greenbow"
    ],
    "Address/ISO3Country": [
      "USA"
    ],
    "Address/Line1": [
      "Main Street 465"
    ],
    "Address/Line2": [
      ""
    ],
    "Address/PhoneNumber": [
      "5417543010"
    ],
    "Address/PostalCode": [
      "50505"
    ],
    "Address/State": [
      "AL"
    ],
    "AlternateEmail": [
      "secondary@acme.com"
    ],
    "BusinessName": [
      "Acme Corp"
    ],
    "ConsentUser/Email": [
      "john.smith@acme.com"
    ],
    "ConsentUser/FirstName": [
      "John"
    ],
    "ConsentUser/LastName": [
      "Smith"
    ],
    "ConsentUser/PhoneNumber": [
      "5417543010"
    ],
    "DateConsentConfirmed": [
      "2021-06-02T00:00:00Z"
    ],
    "FirstName": [
      "John"
    ],
    "LastName": [
      "Smith"
    ],
    "SubDomain": [
      "acme.entertainment.com"
    ],
    "UserPrincipleName": [
      "john.smith"
    ]
  }
}

One or more items from the same vendor on an opportunity; and, the required fields and identical required field values to apply to all the items in the array.

Name Type Description
itemIds array of string IDs of the items to be updated
requiredFields CustomAttribute The required fields and required field values, listed as custom attribute key-value pairs. Values must be a string array.

PaymentPlanResource

{
  "cost": [
    {
      "amount": {
        "AUD": 12345,
        "BRL": 12345,
        "CAD": 12345,
        "CHF": 12345,
        "CNY": 12345,
        "DKK": 12345,
        "EUR": 12345,
        "GBP": 12345,
        "GTQ": 12345,
        "INR": 12345,
        "JPY": 12345,
        "KRW": 12345,
        "MXN": 12345,
        "MYR": 12345,
        "NOK": 12345,
        "NZD": 12345,
        "PHP": 12345,
        "SAR": 12345,
        "SEK": 12345,
        "SGD": 12345,
        "USD": 12345,
        "ZAR": 12345
      },
      "blockContractDecrease": true,
      "blockContractIncrease": true,
      "blockOriginalContractDecrease": true,
      "editionPricingItemId": 12345,
      "id": 12345,
      "increment": 12345,
      "maxUnits": 12345,
      "meteredUsage": true,
      "minUnits": 12345,
      "pricePerIncrement": true,
      "pricingStrategy": "...",
      "unit": "...",
      "unitDependency": "..."
    },
    {
      "amount": {
        "AUD": 12345,
        "BRL": 12345,
        "CAD": 12345,
        "CHF": 12345,
        "CNY": 12345,
        "DKK": 12345,
        "EUR": 12345,
        "GBP": 12345,
        "GTQ": 12345,
        "INR": 12345,
        "JPY": 12345,
        "KRW": 12345,
        "MXN": 12345,
        "MYR": 12345,
        "NOK": 12345,
        "NZD": 12345,
        "PHP": 12345,
        "SAR": 12345,
        "SEK": 12345,
        "SGD": 12345,
        "USD": 12345,
        "ZAR": 12345
      },
      "blockContractDecrease": true,
      "blockContractIncrease": true,
      "blockOriginalContractDecrease": true,
      "editionPricingItemId": 12345,
      "id": 12345,
      "increment": 12345,
      "maxUnits": 12345,
      "meteredUsage": true,
      "minUnits": 12345,
      "pricePerIncrement": true,
      "pricingStrategy": "...",
      "unit": "...",
      "unitDependency": "..."
    }
  ],
  "href": "...",
  "links": [
    {
      "href": "...",
      "rel": "..."
    },
    {
      "href": "...",
      "rel": "..."
    }
  ]
}

Resource links

Name Type Description
cost array of PlanCost List of plan costs
href string URL to payment plan details
links array of Link Resource links

ResourceString

{
  "content": "demoempires.com",
  "links": []
}

Structure representing resource string

Name Type Description
content string Verified company domain name.
links array of Link Resource links

ResourceSupport

{
  "links": [
    {
      "href": "...",
      "rel": "..."
    },
    {
      "href": "...",
      "rel": "..."
    }
  ]
}

Resource links

Name Type Description
links array of Link Resource links

Resource

{
  "description": "...",
  "id": 12345,
  "link": "...",
  "name": "...",
  "resellerAccess": true,
  "resourceType": "...",
  "scribdId": "...",
  "scribdKey": "..."
}

Additional resources to be included in a product profile

Name Type Description
description string Description
id number The resource id
link string Link
name string Name
resellerAccess boolean Visible only to reseller users
resourceType string Resource type, eg. PDF, video, Scribd
scribdId string Scribd ID
scribdKey string Scribd key

Resources

{
  "content": [
    {},
    {}
  ],
  "links": [
    {
      "href": "...",
      "rel": "..."
    },
    {
      "href": "...",
      "rel": "..."
    }
  ]
}

Resource links

Name Type Description
content array of object
links array of Link Resource links

ResourcesUserAssignmentAccountV2

{
  "content": [
    {
      "assignmentCount": 1,
      "companyEntitlementId": 23,
      "companyEntitlementLabel": "Mock App",
      "companyEntitlementStatus": "ACTIVE",
      "createdOn": 1480699562586,
      "gridImageUrl": "http://appdirect/app_resources/9/myAppIcon/img1445094381431796823.png?466c707fefd0aba59d170d532e013f3d",
      "links": [
        {
          "href": "http://appdirect/api/marketplace/v1/products/47",
          "rel": "application"
        }
      ],
      "listImageUrl": "http://appdirect/app_resources/9/thumbs_64/img1445094381431796823.png?466c707fefd0aba59d170d532e013f3d",
      "ownerFirstName": "Susan",
      "ownerId": 40,
      "ownerLastName": "Simpson",
      "ownerUuid": "4aad1f87-a653-4031-9b64-de42c7c5fa3f",
      "productName": "MockApp208301774438095187",
      "status": "ACTIVE",
      "uuid": "4d8ab391-33b9-472f-abce-6a6bd5e4c39b"
    },
    {
      "assignmentCount": 2,
      "companyEntitlementId": 1323,
      "companyEntitlementLabel": "Sample App",
      "companyEntitlementStatus": "ACTIVE",
      "createdOn": 1481650330000,
      "gridImageUrl": "http://appdirect/app_resources/2723/myAppIcon/img4627488903781521711.png?0e3706dc6af5012131ca53ed107d0675",
      "links": [
        {
          "href": "http://appdirect/api/marketplace/v1/products/2723?country=&currency=",
          "rel": "application"
        }
      ],
      "listImageUrl": "http://appdirect/app_resources/2723/thumbs_64/img4627488903781521711.png?5eee537065a26ca7f488610144784c88\n",
      "ownerFirstName": "super",
      "ownerId": 1,
      "ownerLastName": "user",
      "ownerUuid": "2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1",
      "productName": "Sample Application2",
      "status": "ACTIVE",
      "uuid": "88ab5014-56fa-4e4e-9090-8ac6e4e2d189"
    }
  ],
  "links": []
}

Represents a collection of UserAssignmentAccountV2

Name Type Description
content array of UserAssignmentAccountV2 An array of UserAssignmentAccountV2
links array of Link Resource links

Restriction

Opportunity action restrictions

Enumeration of

RevenueModelType

Supported revenue model types

Enumeration of

ReviewComment

{
  "author": {
    "name": "...",
    "profilePicUrl": "...",
    "uuid": "..."
  },
  "comment": "...",
  "id": 12345,
  "lastModified": 12345,
  "official": true
}

Comment on a review of a product

Name Type Description
author Author Author
comment string Comment
id number ID
lastModified number Last modified date
official boolean Is an official comment

Review

{
  "author": {
    "name": "...",
    "profilePicUrl": "...",
    "uuid": "..."
  },
  "comment": "...",
  "commentCount": 12345,
  "id": 12345,
  "lastModified": 12345,
  "rating": 12345,
  "source": "...",
  "title": "..."
}

Review on a product

Name Type Description
author Author Author
comment string Comment
commentCount number Number of comment
id number ID
lastModified number Last modified date
rating number Rating
source string Source
title string Title

Role

Enumeration of

SaleRepCompany

{
  "isReseller": true,
  "isSalesSupport": false,
  "name": "Sample Reseller",
  "uuid": "36f631b9-caef-4f19-be41-e70173f17f0d"
}
Name Type Description
isReseller boolean
isSalesSupport boolean
name string
uuid string

SaleRepUser

{
  "isReseller": true,
  "isSalesSupport": false,
  "name": "Sample Reseller User",
  "uuid": "fd94512f-7fd6-4063-bb8c-bec18ba6f509"
}
Name Type Description
isReseller boolean
isSalesSupport boolean
name string
uuid string

SalesLead

{
  "additionalComment": "...",
  "anticipatedCloseDate": "...",
  "application": "...",
  "attributes": "...",
  "comment": "...",
  "creationDate": "...",
  "customer": "...",
  "customerLeadForProvider": "...",
  "customerLeadForReseller": "...",
  "customerLeadForVendor": "...",
  "edition": "...",
  "externalIdentifier": "...",
  "lastModificationDate": "...",
  "referalLead": "...",
  "reseller": "...",
  "source": "...",
  "status": "...",
  "target": "...",
  "useCaseDescription": "...",
  "uuid": "..."
}

The parameters for AbstractLead are contained in this object

Name Type Description
additionalComment string Any note that you want to add about the lead
anticipatedCloseDate number The anticipated date that the lead will be closed in UNIX Epoch milliseconds
anticipatedNumberOfSeats number The number of licenses required for the subcription
application ApplicationReseller Information about the product associated with the lead
attributes object Custom attributes for the lead
comment string Any note that you want to add about the lead
creationDate number The date the lead was created in UNIX Epoch milliseconds
customer CompanyContact Customer contact information
customerLeadForProvider boolean Indicates whether a lead is for a marketplace owner (true) or not (false)
customerLeadForReseller boolean Indicates whether a lead is for a Reseller (true) or not (false)
customerLeadForVendor boolean Indicates whether a lead is for a vendor (true) or not (false)
edition LeadEdition The information about the specific edition of the lead
externalIdentifier string An optional identifier provided by the markeplace owner
lastModificationDate number The date that the lead was last modified in UNIX Epoch milliseconds
referralLead boolean Indicates whether the lead was created by a Reseller (true) or not (false)
reseller CompanyContact Reseller contact information
source SalesLeadSource Information about the source of the lead, such as RESELLER or CUSTOMER
status SalesLeadStatus Information about the status of the lead, such as, PENDING, DENIED, ACCEPTED, ASSIGNED, LOST, WON
target SalesLeadTarget Information about the sales lead target, such as, RESELLER, PROVIDER, VENDOR
useCaseDescription string Description of what the lead customer needs
uuid string The unique identifier of either the lead or the opportunity

SalesLeadResource

{
  "additionalComment": "...",
  "anticipatedCloseDate": "...",
  "application": "...",
  "attributes": "...",
  "comment": "...",
  "creationDate": "...",
  "customer": "...",
  "customerLeadForProvider": "...",
  "customerLeadForReseller": "...",
  "customerLeadForVendor": "...",
  "edition": "...",
  "externalIdentifier": "...",
  "lastModificationDate": "...",
  "referalLead": "...",
  "reseller": "...",
  "source": "...",
  "status": "...",
  "target": "...",
  "useCaseDescription": "...",
  "uuid": "..."
}

Represents a SalesLead resource

Name Type Description
additionalComment string Any note that you want to add about the lead
anticipatedCloseDate number The anticipated date that the lead will be closed in UNIX Epoch milliseconds
anticipatedNumberOfSeats number The number of licenses required for the subcription
application ApplicationReseller Information about the product associated with the lead
attributes object Custom attributes for the lead
comment string Any note that you want to add about the lead
creationDate number The date the lead was created in UNIX Epoch milliseconds
customer CompanyContact Customer contact information
customerLeadForProvider boolean Indicates whether a lead is for a marketplace owner (true) or not (false)
customerLeadForReseller boolean Indicates whether a lead is for a Reseller (true) or not (false)
customerLeadForVendor boolean Indicates whether a lead is for a vendor (true) or not (false)
edition LeadEdition The information about the specific edition of the lead
externalIdentifier string An optional identifier provided by the markeplace owner
lastModificationDate number The date that the lead was last modified in UNIX Epoch milliseconds
links array of Link Resource links
referralLead boolean Indicates whether the lead was created by a Reseller (true) or not (false)
reseller CompanyContact Reseller contact information
source SalesLeadSource Information about the source of the lead, such as RESELLER or CUSTOMER
status SalesLeadStatus Information about the status of the lead, such as, PENDING, DENIED, ACCEPTED, ASSIGNED, LOST, WON
target SalesLeadTarget Information about the sales lead target, such as, RESELLER, PROVIDER, VENDOR
useCaseDescription string Description of what the lead customer needs
uuid string The unique identifier of either the lead or the opportunity

SalesLeadSource

Enumeration of

SalesLeadStatus

Enumeration of

SalesLeadTarget

Enumeration of

SamlRelyingParty

{
  "assertionConsumerServiceUrl": "https://www.example.com/saml/acs",
  "attributes": {
    "Email": {
      "name": "Email",
      "type": "{http://www.w3.org/2001/XMLSchema}string",
      "value": "{user.emailAddress}"
    },
    "FirstName": {
      "name": "FirstName",
      "type": "{http://www.w3.org/2001/XMLSchema}string",
      "value": "{user.firstName}"
    },
    "LastName": {
      "name": "LastName",
      "type": "{http://www.w3.org/2001/XMLSchema}string",
      "value": "{user.lastName}"
    }
  },
  "audienceUrl": "https://www.example.com",
  "certificate": {
    "defaultCertificate": true,
    "expirationDate": 1676872384000,
    "fingerprint": "6D:44:10:BF:DD:D6:B9:46:ED:CB:05:B6:96:C4:07:5E:02:C0:27:E6",
    "keySize": 2048,
    "label": "AD Cert",
    "needsRenewal": false,
    "partner": "APPDIRECT",
    "publicCertificate": "-----BEGIN CERTIFICATE-----\nMIICyDCCAbCgAwIBAgIGAWF7mAIjMA0GCSqGSIb3DQEBBQUAMCUxIzAhBgNVBAoM\nGkNPTVBBTllfRU5USVRMRU1FTlQtNzQ1NzI5MB4XDTE4MDIwODE3MjMzNVoXDTIz\nMDIwOTE3MjMzNVowJTEjMCEGA1UECgwaQ09NUEFOWV9FTlRJVExFTUVOVC03NDU3\nMjkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCQvnSC76Jwsrjw0FDO\nMzutqNLyrlww86LiEcDiaGn/Ms6cASbpQFJiA7f5BVbTHCAS4fPQnLcBoZs25OwP\n69ibm5hrJlfmZwPVU0Odqd9M/kGmV4U4EDgieH6BcF0cXwpJ8OeXLhf8N+9tr9sN\n7MvkvMgGqpjwXAwYDFZWxBf0+k6O+rO/XuCuIKtc4eD0jPIS6NfxD5DvXNGc83ro\nffgjM0HNq41jieDAhmAAnj12LoRE4V3qQwqbE3p5JBHsmjOJ2/kGoZdkorf3oSuT\njlsLooDi/NTKlWxnlIvnlNSBnlfzpZl6yQIW4j8FDe/4p02G6VMYIozTB37OM98j\n4USHAgMBAAEwDQYJKoZIhvcNAQEFBQADggEBAHrlJjQs05EykfyuvUFZUOjAiqwN\nM/1WHW8xtCA/qa7H1PJQ6B7xyJcmw/ad23ui74sycfkmCLMACP1tb0M8CJ6/rsZH\nltUy8sXSGg3fyTA9Ff8sJiMs0nCw0Wzkk+P5JGig7kPBi1W7gSFTP4tfrktp65sU\nxefLNh/axCHE2C5lxrYtwsE8ocSqNZwPDIWihcaapvdxDyr8l62F2dL3NXulLVRW\nOV4G+KGVwCCEswjTN3idyGjknBCgaiFmKMPFeZm5feUE6f2D40Z/CLrcaB1HV5/q\nMBljuA6qKsDLaABwtxvviQ18p2GYmfpXv5mLJlSNSRnzH9zQzjGsqV09x7U=\n-----END CERTIFICATE-----\n",
    "publicKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkL50gu+icLK48NBQzjM7\nrajS8q5cMPOi4hHA4mhp/zLOnAEm6UBSYgO3+QVW0xwgEuHz0Jy3AaGbNuTsD+vY\nm5uYayZX5mcD1VNDnanfTP5BpleFOBA4Inh+gXBdHF8KSfDnly4X/Dfvba/bDezL\n5LzIBqqY8FwMGAxWVsQX9PpOjvqzv17griCrXOHg9IzyEujX8Q+Q71zRnPN66H34\nIzNBzauNY4ngwIZgAJ49di6EROFd6kMKmxN6eSQR7Jozidv5BqGXZKK396Erk45b\nC6KA4vzUypVsZ5SL55TUgZ5X86WZeskCFuI/BQ3v+KdNhulTGCKM0wd+zjPfI+FE\nhwIDAQAB\n-----END PUBLIC KEY-----\n",
    "subjectDN": "O=COMPANY_ENTITLEMENT-1893",
    "uuid": "6bd1d10c-ddb8-4908-a5a7-0e918f28a2ae"
  },
  "certificateUsage": "PER_RELYING_PARTY",
  "encodeResponse": true,
  "idpIdentifier": "https://test.marketplace.com/saml/8ae5c488-9d5b-4867-a944-78b6afbb9c82",
  "loginUrl": "https://test.marketplace.com/saml/idp/login/8ae5c488-9d5b-4867-a944-78b6afbb9c82",
  "nameId": "{user.uuid}",
  "nameIdType": "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent",
  "notAfterMinutes": 5,
  "notBeforeMinutes": 5,
  "relayState": null,
  "responseParameterName": "SAMLResponse",
  "signingAlgorithm": "SHA256",
  "signingSource": "RESPONSE",
  "spLaunchUrl": "https://www.example.com/saml/login",
  "uuid": "8ae5c488-9d5b-4867-a944-78b6afbb9c82",
  "version": "2.0"
}

SAML metadata

Name Type Description
assertionConsumerServiceUrl string Assertion consumer service URL
attributes object Attributes returned in the SAML response
audienceUrl string Developer's SAML entity ID for the subscription
certificate Certificate Public signature verification certificate
certificateUsage string Certificate usage. Possible values are PER_RELYING_PARTY (unique per subscription), PER_CHANNEL (shared for all subscriptions in a marketplace), PER_ENVIRONMENT (shared for all subscriptions in all marketplaces of an AppDirect instance).
encodeResponse boolean Indicates whether response is encoded
idpIdentifier string Marketplace's SAML entity ID for the subscription
loginUrl string Marketplace's SAML authentication URL
nameId string Placeholder value sent as the NameID in SAML response
nameIdType string Format of the NameID
notAfterMinutes number SAML Offset Minutes
notBeforeMinutes number SAML Offset Minutes
relayState string Configured value to send in the RelayState parameter to Assertion Consumer Service
responseParameterName string Response parameter name
signingAlgorithm string Signing algorithm for certificate
signingSource string Signing source
spLaunchUrl string Configured Developer URL to initiate SSO
uuid string UUID
version string Version

SamlRelyingPartyAttribute

{
  "name": "user.emailAddress",
  "type": "{http://www.w3.org/2001/XMLSchema}string",
  "value": "user@company.com"
}

SAML attributes

Name Type Description
name string Attribute name
type string Attribute type
value string Attribute value

Screenshot

{
  "imageUrl": "...",
  "imageUrlSrcset": {
    "property1": "...",
    "property2": "..."
  },
  "name": "..."
}

Screenshot to be displayed in a product profile

Name Type Description
imageUrl string Image URL
imageUrlSrcset object Image URL Srcset
name string Name

Segment

{
  "id": "04f8d043-10f1-4b89-8c0e-0780e5a62299",
  "name": "iOS users",
  "partner": "APPDIRECT",
  "type": "MANUAL"
}

A characteristic shared by segment folder members

Name Type Description
code string Segment codes are unique codes that you can use for B2B integration by using the API to automatically associate companies with segments. Leave this field blank if a segment code is not required. Note that if you modify the code after you create it, your B2B integration might be affected.
id string Segment ID
name string Segment name
partner string Partner name
type string Segment type

SegmentFilterParamList

[
  {
    "fields": [
      {
        "dataType": "text",
        "key": "company.state",
        "label": "state"
      }
    ],
    "key": "company",
    "label": "company"
  }
]

List of parameters for the dynamic segment filter

Array of FilterParameter

SegmentFolder

{
  "id": "7e3b3bb8-1b75-408b-8cbf-561ccd910479",
  "name": "Fortune 500 Companies",
  "partner": "APPDIRECT"
}

Segment folder

Name Type Description
id string Segment folder ID
name string Segment folder name
partner string Partner name

SegmentFolderAndSegments

{
  "id": "7e3b3bb8-1b75-408b-8cbf-561ccd910479",
  "name": "Fortune 500 Companies",
  "partner": "APPDIRECT",
  "segments": [
    {
      "id": "04f8d043-10f1-4b89-8c0e-0780e5a62299",
      "name": "iOS users",
      "partner": "APPDIRECT",
      "type": "MANUAL"
    }
  ]
}

Segment folder and segments

Name Type Description
id string Segment folder ID
name string Segment folder name
partner string The partner
segments array of Segment Segment details

SegmentFolderRequest

{
  "name": "Fortune 500 Companies"
}

Segment folder creation request

Name Type Description
name string Segment folder name

SegmentRequest

{
  "code": "XXYU",
  "name": "Canada"
}

Data required to create a segment

Name Type Description
code string Segment code
name string Segment name

SegmentSelection

{
  "availableCompanyGroups": [
    {
      "id": "1b0cc1f0-4945-4c6a-989c-d5f350a1b9d1",
      "name": "cda",
      "segments": [
        {
          "id": "e96f1bd2-c6c7-4546-ad9c-518f5ff650a9",
          "name": "fd"
        }
      ]
    }
  ],
  "selectedSegments": [
    "e96f1bd2-c6c7-4546-ad9c-518f5ff650a9"
  ]
}

Information about segment groups and segments

Name Type Description
availableCompanyGroups array of CompanyGroups List of all available company groups and associated segments
selectedSegments array of string List of segments associated with the product

Segments

{
  "id": "04f8d043-10f1-4b89-8c0e-0780e5a62298",
  "name": "iOS users"
}

A characteristic shared by segment group members

Name Type Description
id string Segment ID
name string Segment name

SettingValidation

{
  "field": "termsOfServiceURL",
  "maxValue": 31,
  "minValue": 1,
  "numeric": true
}

Information about the validation applied to a setting.

Name Type Description
alphanumeric boolean Indicates whether setting is alphanumeric.
field string Name of the setting.
maxLength integer Maximum number of characters and digits for the setting.
maxValue integer Maximum value of the setting.
minLength integer Minimum number of characters and digits for the setting.
minValue integer Minimum value of the setting.
numeric boolean Indicates whether setting is numeric.
required boolean Indicates whether setting is required.

SkuSettings

{
  "editionPricingItems": [
    {
      "editionName": "Free Trial Edition",
      "paymentPlanId": 123,
      "skus": [
        {
          "fid1": "yyyy-yyyyyy-yyyy",
          "price": "$0.03",
          "pricingItemId": 20423,
          "sku": "A1B2C3"
        },
        {
          "fid1": "yyyy-yyyyyy-yyyy",
          "price": "$0.17",
          "pricingItemId": 20424,
          "sku": "321CBA"
        }
      ]
    }
  ],
  "validations": [
    {
      "alphanumeric": true,
      "field": "sku",
      "maxLength": 6,
      "minLength": 6,
      "required": true
    },
    {
      "field": "fid1",
      "maxLength": 25,
      "minLength": 2,
      "required": false
    }
  ]
}

Information regarding the SKUs for the product.

Name Type Description
editionPricingItems array of EditionPricingItemSku List of payment plans for an edition and related SKUs.
validations array of SettingValidation Information about the validation applied to a setting.

Sku

{
  "fid1": "yyyy-yyyyyy-yyyy",
  "price": "$0.03",
  "pricingItemId": 20423,
  "sku": "A1B2C3"
}

Information about SKUs associated with a payment plan for the edition.

Name Type Description
fid1 string Fid1 of the SKU pricing item.
price string Price of the SKU item.
pricingItemId integer Unique ID of the SKU pricing item.
sku string Description of the SKU pricing item.

SortingRank

{
  "options": [
    "Very High",
    "High",
    "Medium",
    "Low",
    "Very Low"
  ],
  "selectedOption": "Very Low"
}

The ranking of the product in numerical order. Products with a higher rank appear above those with a lower rank on the marketplace homepage and in search results.

Name Type Description
options array of string Options for the rank, which include Very High, High, Medium, Low, or Very Low.
selectedOption string Selected rank from the list of rank options.

Source

{
  "id": 12345,
  "logoUrl": "...",
  "name": "..."
}

Media source that a vendor can cite in their product marketing profile

Name Type Description
id number ID
logoUrl string Logo URL
name string Name

StagingProduct

{
  "_embedded": {
    "property1": {},
    "property2": {}
  },
  "addon": true,
  "addonOffering": [
    {
      "bullet": [
        {
          "content": "...",
          "tooltip": "..."
        },
        {
          "content": "...",
          "tooltip": "..."
        }
      ],
      "code": "...",
      "description": "...",
      "descriptionHtml": "...",
      "exclusive": true,
      "id": 12345,
      "name": "...",
      "paymentPlan": [
        {
          "allowCustomUsage": true,
          "contract": {},
          "cost": [
            {},
            {}
          ],
          "discount": {},
          "frequency": "...",
          "href": "...",
          "id": 12345,
          "isPrimaryPrice": true,
          "keepBillDateOnUsageChange": true,
          "separatePrepaid": true,
          "tld": "...",
          "uuid": "..."
        },
        {
          "allowCustomUsage": true,
          "contract": {},
          "cost": [
            {},
            {}
          ],
          "discount": {},
          "frequency": "...",
          "href": "...",
          "id": 12345,
          "isPrimaryPrice": true,
          "keepBillDateOnUsageChange": true,
          "separatePrepaid": true,
          "tld": "...",
          "uuid": "..."
        }
      ],
      "stacked": true,
      "status": "...",
      "uuid": "..."
    },
    {
      "bullet": [
        {
          "content": "...",
          "tooltip": "..."
        },
        {
          "content": "...",
          "tooltip": "..."
        }
      ],
      "code": "...",
      "description": "...",
      "descriptionHtml": "...",
      "exclusive": true,
      "id": 12345,
      "name": "...",
      "paymentPlan": [
        {
          "allowCustomUsage": true,
          "contract": {},
          "cost": [
            {},
            {}
          ],
          "discount": {},
          "frequency": "...",
          "href": "...",
          "id": 12345,
          "isPrimaryPrice": true,
          "keepBillDateOnUsageChange": true,
          "separatePrepaid": true,
          "tld": "...",
          "uuid": "..."
        },
        {
          "allowCustomUsage": true,
          "contract": {},
          "cost": [
            {},
            {}
          ],
          "discount": {},
          "frequency": "...",
          "href": "...",
          "id": 12345,
          "isPrimaryPrice": true,
          "keepBillDateOnUsageChange": true,
          "separatePrepaid": true,
          "tld": "...",
          "uuid": "..."
        }
      ],
      "stacked": true,
      "status": "...",
      "uuid": "..."
    }
  ],
  "applicationStatus": "...",
  "autoUpgradeToPaid": true,
  "bundledPlanIds": [
    12345,
    12345
  ],
  "buyable": true,
  "changeSubscriptionAllowed": true,
  "collectLeads": true,
  "collectLeadsWithPurchaseEnabled": true,
  "customAttributes": [
    {
      "attributeKey": "...",
      "attributeType": "TEXT",
      "label": "...",
      "value": "...",
      "valueKeys": [
        "...",
        "..."
      ],
      "valueOptions": [
        {
          "optionKey": "...",
          "optionLabel": "..."
        },
        {
          "optionKey": "...",
          "optionLabel": "..."
        }
      ]
    },
    {
      "attributeKey": "...",
      "attributeType": "MULTISELECT",
      "label": "...",
      "value": "...",
      "valueKeys": [
        "...",
        "..."
      ],
      "valueOptions": [
        {
          "optionKey": "...",
          "optionLabel": "..."
        },
        {
          "optionKey": "...",
          "optionLabel": "..."
        }
      ]
    }
  ],
  "customIntegration": "...",
  "displayQuestions": true,
  "displayReviews": true,
  "downloadFileSize": 12345,
  "feature": [
    {
      "bullet": [
        {
          "abovePicture": true,
          "highlight": [
            {},
            {}
          ],
          "position": 12345,
          "title": "..."
        },
        {
          "abovePicture": true,
          "highlight": [
            {},
            {}
          ],
          "position": 12345,
          "title": "..."
        }
      ],
      "description": "...",
      "header": "...",
      "hideOnOverview": true,
      "id": 12345,
      "imageUrl": "...",
      "position": 12345,
      "slogan": "..."
    },
    {
      "bullet": [
        {
          "abovePicture": true,
          "highlight": [
            {},
            {}
          ],
          "position": 12345,
          "title": "..."
        },
        {
          "abovePicture": true,
          "highlight": [
            {},
            {}
          ],
          "position": 12345,
          "title": "..."
        }
      ],
      "description": "...",
      "header": "...",
      "hideOnOverview": true,
      "id": 12345,
      "imageUrl": "...",
      "position": 12345,
      "slogan": "..."
    }
  ],
  "featuredCustomer": [
    {
      "id": 12345,
      "logoUrl": "...",
      "name": "..."
    },
    {
      "id": 12345,
      "logoUrl": "...",
      "name": "..."
    }
  ],
  "featuredMedium": [
    {
      "link": "...",
      "linkDescription": "...",
      "source": {
        "id": 12345,
        "logoUrl": "...",
        "name": "..."
      }
    },
    {
      "link": "...",
      "linkDescription": "...",
      "source": {
        "id": 12345,
        "logoUrl": "...",
        "name": "..."
      }
    }
  ],
  "free": true,
  "freeTrialOrEditionPresent": true,
  "hidePricings": true,
  "highestFixedDiscount": {
    "AUD": 12345,
    "BRL": 12345,
    "CAD": 12345,
    "CHF": 12345,
    "CNY": 12345,
    "DKK": 12345,
    "EUR": 12345,
    "GBP": 12345,
    "GTQ": 12345,
    "INR": 12345,
    "JPY": 12345,
    "KRW": 12345,
    "MXN": 12345,
    "MYR": 12345,
    "NOK": 12345,
    "NZD": 12345,
    "PHP": 12345,
    "SAR": 12345,
    "SEK": 12345,
    "SGD": 12345,
    "USD": 12345,
    "ZAR": 12345
  },
  "highestPercentageDiscount": 12345,
  "hostedLocation": "...",
  "href": "...",
  "id": 12345,
  "integrationConfiguration": {
    "domainManagementEnabled": true,
    "productSettings": {
      "enabledForSubscriptionChange": true,
      "form": [
        {},
        {}
      ],
      "preSubmitValidationRequired": true,
      "validationUrl": "..."
    }
  },
  "language": [
    "...",
    "..."
  ],
  "lastModified": 12345,
  "linkedImportableApplicationUuid": "...",
  "links": [
    {
      "href": "...",
      "rel": "..."
    },
    {
      "href": "...",
      "rel": "..."
    }
  ],
  "listing": {
    "blurb": "...",
    "imageSrcset": {
      "property1": "...",
      "property2": "..."
    },
    "imageUrl": "...",
    "mobileAppStoreId": "...",
    "mobileBundleId": "...",
    "myAppLogoIconSrcset": {
      "property1": "...",
      "property2": "..."
    },
    "myAppLogoIconUrl": "...",
    "overview": "...",
    "profileImageSrcset": {
      "property1": "...",
      "property2": "..."
    },
    "profileImageUrl": "...",
    "rating": 12345,
    "reviewCount": 12345
  },
  "liveChatAvailable": true,
  "liveChatEnabled": true,
  "mosiConnectorType": "CREST",
  "name": "...",
  "newSubscriptionEnabled": true,
  "numRatings": 12345,
  "oneClickPurchasable": true,
  "overview": {
    "benefit": [
      {
        "description": "...",
        "title": "..."
      },
      {
        "description": "...",
        "title": "..."
      }
    ],
    "demoUrl": "...",
    "documentationUrl": "...",
    "downloadDocumentationUrl": "...",
    "downloadFileSize": 12345,
    "imageSrcset": {
      "property1": "...",
      "property2": "..."
    },
    "imageUrl": "...",
    "splashDescription": "...",
    "splashTitle": "...",
    "systemRequirements": "...",
    "versions": {
      "entry": [
        {},
        {}
      ]
    }
  },
  "platform": [
    {
      "attribute": [
        {
          "applicationPlatformUuid": "...",
          "createdOn": 12345,
          "lastModified": 12345,
          "platformAttributeDefinitionUuid": "...",
          "platformAttributeOptionUuid": "...",
          "uuid": "...",
          "value": "..."
        },
        {
          "applicationPlatformUuid": "...",
          "createdOn": 12345,
          "lastModified": 12345,
          "platformAttributeDefinitionUuid": "...",
          "platformAttributeOptionUuid": "...",
          "uuid": "...",
          "value": "..."
        }
      ],
      "platformDefinition": {
        "attributeDefinition": [
          {},
          {}
        ],
        "createdOn": 12345,
        "description": "...",
        "iconUrl": "...",
        "isVersionSupported": true,
        "lastModified": 12345,
        "name": "...",
        "numTaggedProducts": 12345,
        "uuid": "..."
      },
      "uuid": "..."
    },
    {
      "attribute": [
        {
          "applicationPlatformUuid": "...",
          "createdOn": 12345,
          "lastModified": 12345,
          "platformAttributeDefinitionUuid": "...",
          "platformAttributeOptionUuid": "...",
          "uuid": "...",
          "value": "..."
        },
        {
          "applicationPlatformUuid": "...",
          "createdOn": 12345,
          "lastModified": 12345,
          "platformAttributeDefinitionUuid": "...",
          "platformAttributeOptionUuid": "...",
          "uuid": "...",
          "value": "..."
        }
      ],
      "platformDefinition": {
        "attributeDefinition": [
          {},
          {}
        ],
        "createdOn": 12345,
        "description": "...",
        "iconUrl": "...",
        "isVersionSupported": true,
        "lastModified": 12345,
        "name": "...",
        "numTaggedProducts": 12345,
        "uuid": "..."
      },
      "uuid": "..."
    }
  ],
  "pricing": {
    "bullet": [
      {
        "content": "...",
        "tooltip": "..."
      },
      {
        "content": "...",
        "tooltip": "..."
      }
    ],
    "edition": [
      {
        "bullet": [
          {},
          {}
        ],
        "bundleOnly": true,
        "code": "...",
        "customerContractRestricted": true,
        "customization": [
          {},
          {}
        ],
        "defaultFreeTrial": true,
        "expiredTrialGracePeriod": 12345,
        "freeTrialDuration": 12345,
        "freeTrialType": "...",
        "invisible": true,
        "item": [
          {},
          {}
        ],
        "lastModified": 12345,
        "leadGen": true,
        "name": "...",
        "plan": [
          {},
          {}
        ],
        "primary": true,
        "rank": 12345,
        "restricted": true,
        "revenueType": "...",
        "targetAudience": "...",
        "trial": {},
        "uuid": "..."
      },
      {
        "bullet": [
          {},
          {}
        ],
        "bundleOnly": true,
        "code": "...",
        "customerContractRestricted": true,
        "customization": [
          {},
          {}
        ],
        "defaultFreeTrial": true,
        "expiredTrialGracePeriod": 12345,
        "freeTrialDuration": 12345,
        "freeTrialType": "...",
        "invisible": true,
        "item": [
          {},
          {}
        ],
        "lastModified": 12345,
        "leadGen": true,
        "name": "...",
        "plan": [
          {},
          {}
        ],
        "primary": true,
        "rank": 12345,
        "restricted": true,
        "revenueType": "...",
        "targetAudience": "...",
        "trial": {},
        "uuid": "..."
      }
    ],
    "footnote": [
      "...",
      "..."
    ],
    "pricingSummary": "..."
  },
  "privacyUrl": "...",
  "productRibbon": {},
  "provider": {
    "name": "...",
    "url": "...",
    "uuid": "..."
  },
  "publishedApp": {
    "href": "...",
    "id": "..."
  },
  "publishedOn": 12345,
  "rating": 12345,
  "referUrl": "...",
  "referable": true,
  "resource": [
    {
      "description": "...",
      "id": 12345,
      "link": "...",
      "name": "...",
      "resellerAccess": true,
      "resourceType": "...",
      "scribdId": "...",
      "scribdKey": "..."
    },
    {
      "description": "...",
      "id": 12345,
      "link": "...",
      "name": "...",
      "resellerAccess": true,
      "resourceType": "...",
      "scribdId": "...",
      "scribdKey": "..."
    }
  ],
  "screenshot": [
    {
      "imageUrl": "...",
      "imageUrlSrcset": {
        "property1": "...",
        "property2": "..."
      },
      "name": "..."
    },
    {
      "imageUrl": "...",
      "imageUrlSrcset": {
        "property1": "...",
        "property2": "..."
      },
      "name": "..."
    }
  ],
  "showSelfServiceRestriction": true,
  "showThirdPartyLegalDisclosure": true,
  "startingPrice": {
    "amount": {
      "AUD": 12345,
      "BRL": 12345,
      "CAD": 12345,
      "CHF": 12345,
      "CNY": 12345,
      "DKK": 12345,
      "EUR": 12345,
      "GBP": 12345,
      "GTQ": 12345,
      "INR": 12345,
      "JPY": 12345,
      "KRW": 12345,
      "MXN": 12345,
      "MYR": 12345,
      "NOK": 12345,
      "NZD": 12345,
      "PHP": 12345,
      "SAR": 12345,
      "SEK": 12345,
      "SGD": 12345,
      "USD": 12345,
      "ZAR": 12345
    },
    "billingFrequency": "...",
    "discount": {
      "amount": {},
      "availableRedemptions": 12345,
      "description": "...",
      "expirationDate": 12345,
      "numOfBillingCycles": 12345,
      "percentage": 12345,
      "pricingUnit": "INTERNATIONAL_DEPARTMENT_LINE",
      "startDate": 12345
    },
    "unit": "..."
  },
  "support": {
    "description": "...",
    "email": "...",
    "knowledgebaseUrl": "...",
    "phone": "..."
  },
  "tag": [
    {
      "badge": "...",
      "description": "...",
      "id": 12345,
      "name": "...",
      "showBadge": true,
      "showOnNavigation": true,
      "tag": [
        {},
        {}
      ],
      "type": "..."
    },
    {
      "badge": "...",
      "description": "...",
      "id": 12345,
      "name": "...",
      "showBadge": true,
      "showOnNavigation": true,
      "tag": [
        {},
        {}
      ],
      "type": "..."
    }
  ],
  "termsUrl": "...",
  "type": "...",
  "usageType": "...",
  "uuid": "...",
  "vendorUUID": "...",
  "workingApp": {
    "href": "...",
    "id": "..."
  }
}

A product that is present in the staging catalog

Name Type Description
_embedded object This property can contain different values depending on the type of product. If the product has associated add-ons, it contains a list of the add-on products in an associatedAddons array. Add-on products are different than add-on offerings: add-on offerings appear as an array of AddonOffering in the addonOffering object. Depending on your marketplace settings, your products can support either add-on offerings or add-on products.
If the product is itself an add-on product, this property lists the editions of the associated regular product in an associatedEditions array.
addon boolean Returns true if the application is an add-on product, or false if it is a base product.
addonOffering array of AddonOffering List of the product's add-on offerings, which are different than add-on products. Add-on products appear as an array of associatedAddons in the _embedded object. Depending on your marketplace settings, your base products can support either add-on offerings or add-on products.
applicationStatus string Publication status of the product, populated from ApplicationStatus
assignLeadsToDevelopers boolean Indicates whether the lead can be assigned to users with the Developer role
autoUpgradeToPaid boolean Is auto upgrade to paid
bundledPlanIds object Bundle plan IDs
buyable boolean Is buyable
If false, the buy button is not available
changeSubscriptionAllowed boolean Change subscription allowed
collectLeads boolean Is collect lead enabled
collectLeadsWithPurchaseEnabled boolean Collect lead with the purchase
If set to true and collectLeads = true, then a lead will be collected when an user buys the product
If set to false, the user cannot buy the product
customAttributes array of CustomAttributeLightV2 List of attached product custom attributes
customIntegration string Custom integration type, eg. MOSI, GOOGLE APPS, SENDGRID
displayQuestions boolean Display question and answers
displayReviews boolean Display reviews
downloadFileSize number Download file size for downloadable apps
featuredCustomers array of FeaturedCustomer List of featured customers
featuredMedia array of FeaturedMedium List of media sources
features array of Feature List of features
free boolean Is free
freeTrialOrEditionPresent boolean Is free trial or edition present
hidePricings boolean Hide the pricings
highestFixedDiscount Price Highest fixed discount
highestPercentageDiscount number Highest percentage discount
hostedLocation string Hosted location
href string URL to retrieve product detail
id number ID
importable boolean Indicates whether a product can be imported
integrationConfiguration IntegrationConfiguration Integration configuration information
language array of string List of supported languages
lastModified number Last modified date
linkedImportableApplicationUuid string Linked importable application unique identifier
listing ListingInfo Listing detail needed for the product listing on the marketplace
liveChatAvailable boolean Live chat available
liveChatEnabled boolean Live chat enabled
merchandisingBadges array of Array of badges for the product, including UUID, name, and URL for the associated image for each badge
mosiConnectorType OriginApi Connector use for Office product
name string Name
newSubscriptionEnabled boolean New subscription enabled
numRatings number Number of ratings
oneClickPurchasable boolean Is one-click purchase enabled
overview OverviewInfo Overview details needed for the product profile
platforms array of ApplicationPlatform List of attached Platforms
pricing MarketplacePricing Pricing information for available editions
privacyUrl string Privacy policy URL
productRibbon ProductRibbonWS
provider Provider Provider company information
publishedApp LinkWS Link to retrieve published app detail
publishedOn number Publication date in UNIX Epoch milliseconds
rating number User-submitted rating
referUrl string Redirection link to product website when user clicks the buy button
For referral apps
referable boolean Is a referrable product
resources array of Resource List of resources
screenshots array of Screenshot List of screenshots
sellerName string The name of the company that owns the catalog and the product profile being sold
showSelfServiceRestriction boolean Show self-service restriction
showThirdPartyLegalDisclosure boolean Show third-party legal Disclosure
startingPrice StartingPrice Starting price
support Support Product support information
supportedCountries array of The list of supported countries in ISO 3166 format
supportedCurrencies array of The list of supported currencies in ISO 4217 format
supportedLanguages array of The list of supported languages in ISO 639
supportsMultipleEditions boolean Indicates whether the product type can have multiple editions
tag array of Tag List of tags
termsUrl string Terms and condition URL
type string Product type
usageType string Usage type
uuid string Unique identifier
vendorUUID string UUID of the product's vendor
workingApp LinkWS Link to retrieve working app detail

StartingPrice

{
  "amount": {
    "AUD": 12345,
    "BRL": 12345,
    "CAD": 12345,
    "CHF": 12345,
    "CNY": 12345,
    "DKK": 12345,
    "EUR": 12345,
    "GBP": 12345,
    "GTQ": 12345,
    "INR": 12345,
    "JPY": 12345,
    "KRW": 12345,
    "MXN": 12345,
    "MYR": 12345,
    "NOK": 12345,
    "NZD": 12345,
    "PHP": 12345,
    "SAR": 12345,
    "SEK": 12345,
    "SGD": 12345,
    "USD": 12345,
    "ZAR": 12345
  },
  "billingFrequency": "...",
  "discount": {
    "amount": {
      "AUD": 12345,
      "BRL": 12345,
      "CAD": 12345,
      "CHF": 12345,
      "CNY": 12345,
      "DKK": 12345,
      "EUR": 12345,
      "GBP": 12345,
      "GTQ": 12345,
      "INR": 12345,
      "JPY": 12345,
      "KRW": 12345,
      "MXN": 12345,
      "MYR": 12345,
      "NOK": 12345,
      "NZD": 12345,
      "PHP": 12345,
      "SAR": 12345,
      "SEK": 12345,
      "SGD": 12345,
      "USD": 12345,
      "ZAR": 12345
    },
    "availableRedemptions": 12345,
    "description": "...",
    "expirationDate": 12345,
    "numOfBillingCycles": 12345,
    "percentage": 12345,
    "pricingUnit": "NFON_NMEETING",
    "startDate": 12345
  },
  "unit": "..."
}

Starting price of a product

Name Type Description
amount Price Price in different currencies
billingFrequency string Billing frequency, see BillingCycleFrequency
discount ProductDiscountDetails Discount
unit string Price unit, see PricingUnit

Status

{
  "assigned": true,
  "companyEntitlementId": 12345,
  "companyEntitlementPending": true,
  "companyWide": true,
  "editionId": 12345,
  "editionName": "...",
  "freeTrialAllowed": true,
  "ownerAdmin": true,
  "ownerFullName": "...",
  "ownerUuid": "...",
  "partOfExistingBundle": true,
  "pending": true,
  "pendingAppType": "SUGGESTED",
  "purchaseRestriction": [
    {
      "appId": 12345,
      "appName": "...",
      "browsedEditionId": 12345,
      "ownedEditionId": 12345,
      "ownedEditionName": "...",
      "requiredAppEdition": [
        {
          "appId": 12345,
          "appName": "...",
          "editionId": 12345,
          "editionName": "..."
        },
        {
          "appId": 12345,
          "appName": "...",
          "editionId": 12345,
          "editionName": "..."
        }
      ],
      "restrictionType": "...",
      "upcomingSubscription": true
    },
    {
      "appId": 12345,
      "appName": "...",
      "browsedEditionId": 12345,
      "ownedEditionId": 12345,
      "ownedEditionName": "...",
      "requiredAppEdition": [
        {
          "appId": 12345,
          "appName": "...",
          "editionId": 12345,
          "editionName": "..."
        },
        {
          "appId": 12345,
          "appName": "...",
          "editionId": 12345,
          "editionName": "..."
        }
      ],
      "restrictionType": "...",
      "upcomingSubscription": true
    }
  ],
  "requested": true
}

Product status

Name Type Description
assigned boolean Is assigned
companyEntitlementId number Company entitlement ID
companyEntitlementPending boolean Is company entitlement pending
companyWide boolean Is company wide
editionId number Edition ID
editionName string Edition Name
freeTrialAllowed boolean Is free trial allowed
ownerAdmin boolean Owner admin
ownerFullName string Owner full name
ownerUuid string Owner unique identifier
partOfExistingBundle boolean Is part of existing bundle
pending boolean Is pending
pendingAppType PendingAppType Pending type
purchaseRestriction array of PurchaseRestriction List of restrictions
requested boolean Is requested

SubCategoryOption

{
  "name": "Select a Sub Category",
  "subCategoryId": 0
}

Subcategories further refine the categories to make it easier for users to find or filter the products.

Name Type Description
name string Name of the subcategory.
subCategoryId integer Unique ID of the subcategory.

SubCategory

{
  "id": 12345,
  "name": "...",
  "numTaggedProducts": 12345
}

Subcategory linked to a parent category

Name Type Description
id number The id
name string The name
numTaggedProducts number The number of products that belong to this sub category

SubscriptionAssignmentAccount

{
  "createdOn": 1504147976000,
  "externalVendorIdentifier": "11cec7b3-a99f-4b77-bc83-f3eb161b1fc4",
  "links": [
    {
      "href": "http://localhost:8080/api/account/v2/subscriptions/79c142b0-12bd-441c-ad2d-f5b3d21034be/assignments/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1",
      "rel": "self"
    },
    {
      "href": "http://localhost:8080/api/account/v2/users/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1",
      "rel": "user"
    }
  ],
  "lyncToPhoneVoiceConnection": null,
  "membership": {
    "company": {
      "customAttributes": [],
      "defaultRole": "DEVELOPER",
      "enabled": true,
      "links": [
        {
          "href": "http://localhost:8080/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
          "rel": "self"
        },
        {
          "href": "http://localhost:8080/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/memberships",
          "rel": "memberships"
        }
      ],
      "name": "Appdirect",
      "phoneNumber": "9259221234",
      "picture": null,
      "reseller": true,
      "uuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
      "vendor": true
    },
    "enabled": true,
    "lastUsed": true,
    "links": [
      {
        "href": "http://localhost:8080/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/memberships/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1",
        "rel": "self"
      },
      {
        "href": "http://localhost:8080/api/account/v2/users/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1",
        "rel": "user"
      },
      {
        "href": "http://localhost:8080/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f",
        "rel": "company"
      }
    ],
    "metadata": {
      "mosi_username": null
    },
    "mosiUser": null,
    "position": null,
    "roles": [
      "ROLE_BILLING_ADMIN",
      "ROLE_DEVELOPER",
      "ROLE_CHANNEL_SUPPORT",
      "ROLE_CHANNEL_ADMIN",
      "ROLE_CHANNEL_PRODUCT_SUPPORT",
      "ROLE_SALES_SUPPORT",
      "ROLE_RESELLER_MANAGER",
      "ROLE_RESELLER",
      "ROLE_SYS_ADMIN"
    ],
    "user": {
      "activated": true,
      "allowLogin": true,
      "boostUser": null,
      "currency": null,
      "customAttributes": [],
      "email": "superuser+1@appdirect.com",
      "firstName": "super",
      "lastName": "user",
      "ldapId": null,
      "links": [
        {
          "href": "http://localhost:8080/api/account/v2/users/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1",
          "rel": "self"
        },
        {
          "href": "http://localhost:8080/api/account/v2/users/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1/memberships",
          "rel": "memberships"
        }
      ],
      "metadata": {
        "apsUid": null
      },
      "picture": null,
      "roles": [
        "ROLE_SUPERUSER",
        "ROLE_USER",
        "ROLE_SUPER_SUPPORT"
      ],
      "userName": "superuser+1@appdirect.com",
      "uuid": "2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1"
    }
  },
  "status": "ACTIVE",
  "user": {
    "activated": true,
    "allowLogin": true,
    "boostUser": null,
    "currency": null,
    "customAttributes": [],
    "email": "superuser+1@appdirect.com",
    "firstName": "super",
    "lastName": "user",
    "ldapId": null,
    "links": [
      {
        "href": "http://localhost:8080/api/account/v2/users/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1",
        "rel": "self"
      },
      {
        "href": "http://localhost:8080/api/account/v2/users/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1/memberships",
        "rel": "memberships"
      }
    ],
    "metadata": {
      "apsUid": null
    },
    "picture": null,
    "roles": [
      "ROLE_SUPERUSER",
      "ROLE_USER",
      "ROLE_SUPER_SUPPORT"
    ],
    "userName": "superuser+1@appdirect.com",
    "uuid": "2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1"
  },
  "uuid": "42bdd7be-9807-45f5-ab97-4b345a59e89f"
}

User assignment

Name Type Description
createdOn number Creation date
externalVendorIdentifier string External vendor ID
links array of Link
membership SubscriptionUserCompanyMembership Company membership record this assignment applies to
status string Assignment status
user UserAccountV2 User record this assignment applies to
uuid string Unique identifier

SubscriptionAssociationConflictResponse

{
  "code": "ASSIGNMENT_ALREADY_EXISTS",
  "message": "Seat already assigned with status ACTIVE and ID = 00aaa0a0-0000-00aa-0a00-000a000aa0aa",
  "status": 409
}
Name Type Description
code IllegalSubscriptionAssociationTypes Invalid subscription association types
message string Code description
status number HTTP status

SubscriptionCustomAttribute

{
  "name": "test1",
  "values": [
    "value1",
    "value2"
  ]
}

A subscription custom attribute, as defined in the marketplace at Manage > Marketplace > Settings > Custom Attributes > Subscription Custom Attributes

Name Type Description
name string The key name of an existing subscription custom attribute
values array of string Values of the custom attributes. If the attribute definition is MULTISELECT, all values must be a subset of the value options defined in the marketplace. If the attribute definition is TEXT, only one value is allowed.

SubscriptionList

{
  "content": [
    {
      "activeOrder": {
        "createdOn": 1529083173000,
        "editionName": "Edition",
        "frequency": "One Time",
        "id": "1553",
        "status": "PENDING MANUAL RECOVERY",
        "totalFee": "USD350.00"
      },
      "applicationName": "AUTO_DISCOUNTS_APP",
      "company": {
        "id": "6b4bd452-895d-4098-aa56-e6046b238e0f",
        "name": "Company A"
      },
      "id": "386626c0-53e2-4515-8450-4a720bb5d029",
      "pendingEvent": "SUBSCRIPTION_CHANGE",
      "status": "ACTIVE",
      "user": {
        "firstName": "Michael",
        "id": "386626c0-53e2-4515-8450-4a720bb5d029",
        "lastName": "Jordan"
      }
    },
    {
      "activeOrder": {
        "createdOn": 1529083173000,
        "editionName": "Recurring Edition",
        "frequency": "One Time",
        "id": "3345",
        "status": "PENDING MANUAL RECOVERY",
        "totalFee": "USD350.00"
      },
      "applicationName": "AUTO_DISCOUNTS_APP",
      "company": {
        "id": "698555fc-bc65-4163-9fee-16308edec41b",
        "name": "Company B"
      },
      "id": "38e8bb4a-d737-4564-afee-e68edb00fd38",
      "pendingEvent": "SUBSCRIPTION_CHANGE",
      "status": "ACTIVE",
      "user": {
        "firstName": "Michael",
        "id": "698555fc-bc65-4163-9fee-16308edec41b",
        "lastName": "Jordan"
      }
    }
  ],
  "page": {
    "number": 1,
    "size": 10,
    "totalElements": 2,
    "totalPages": 1
  }
}
Name Type Description
content array of AppResellerSubscriptionLightWS List of subscriptions
page PageMetadata Page information

SubscriptionListing

{
  "_embedded": {
    "property1": {},
    "property2": {}
  },
  "assignmentCount": 12345,
  "bundleApplicationId": 12345,
  "company": {
    "href": "...",
    "id": "..."
  },
  "creationDate": 12345,
  "edition": {
    "href": "...",
    "id": "..."
  },
  "endDate": 12345,
  "externalAccountId": "...",
  "id": "...",
  "links": [
    {
      "href": "...",
      "rel": "..."
    },
    {
      "href": "...",
      "rel": "..."
    }
  ],
  "maxUsers": 12345,
  "order": {
    "href": "...",
    "id": "..."
  },
  "parentSubscriptionId": 12345,
  "product": {
    "href": "...",
    "id": "..."
  },
  "status": "FREE_TRIAL",
  "suspensionReason": "END_OF_CONTRACT",
  "user": {
    "href": "...",
    "id": "..."
  }
}

Resource links

Name Type Description
_embedded object
assignmentCount number Current number of users assigned.
bundleApplicationId number Bundle ID. Specify during subscription creation if you want the subscription to be part of a bundle. Retrieve a list of bundle IDs with the List all bundles request, and then specify the desired ID here. Only supported for the Create a subscription endpoint and not supported for any other endpoints.
company LinkWS Link to company information.
creationDate number Creation date for the subscription.
edition LinkWS Link to edition information.
endDate number End date for the subscription.
externalAccountId string External account ID.
id string Subscription listing ID.
links array of Link Resource links
maxUsers number Maximum number of users allowed.
order LinkWS Link to order information.
parentSubscriptionId number Parent subscription ID. (Applies to add-on products.)
product LinkWS Link to product information.
status CompanyEntitlementStatus Status of the subscription. May be INITIALIZED, FAILED, FREE_TRIAL, FREE_TRIAL_EXPIRED, ACTIVE, SUSPENDED, or CANCELLED.
suspensionReason CompanyEntitlementSuspensionReason Subscription suspension reason. May be PAYMENT_OVERDUE, END_OF_CONTRACT, UNSUCCESSFUL_PAYMENT, MANUALLY_SUSPENDED, or API
user LinkWS Link to user information.

SubscriptionMosiUser

{
  "username": "mosi.username@appdirect.com"
}

Mosi user.

Name Type Description
username string Username

SubscriptionUpdate

{
  "customAttributes": [
    {
      "name": "test1",
      "values": [
        "value1"
      ]
    },
    {
      "name": "test2",
      "values": [
        "value2",
        "value3"
      ]
    }
  ],
  "status": "SUSPENDED",
  "suspensionReasonMessage": "The customer is undergoing an internal investigation. All subscriptions are suspended."
}
Name Type Description
customAttributes array of SubscriptionCustomAttribute An array of subscription custom attributes. If specified in a PATCH request, the values will be updated or added to the subscription. The custom attributes must already be defined in the marketplace (at Manage > Marketplace > Settings > Custom Attributes > Subscription Custom Attributes).
externalId string The external ID to add or update in the subscription. Only set an external ID if required.
status string The desired subscription lifecycle status. Set to SUSPENDED to suspend an active subscription, or ACTIVE to reactivate a suspended subscription.
suspensionReasonMessage string Reason for subscription suspension. Only used, and required, when setting the status to SUSPENDED.

SubscriptionUserCompanyMembership

{
  "content": [
    {
      "company": {
        "defaultRole": "USER",
        "enabled": true,
        "links": [
          {
            "href": "http://www.appdirect.com/api/account/v2/companies/97e573e2-1d11-4df4-8071-da1006509493",
            "rel": "self"
          },
          {
            "href": "http://www.appdirect.com/api/account/v2/companies/97e573e2-1d11-4df4-8071-da1006509493/memberships",
            "rel": "memberships"
          }
        ],
        "name": "Company 1040203757",
        "phoneNumber": null,
        "picture": "http://localhost:8080/profilePics/http://cdn/company.png",
        "uuid": "97e573e2-1d11-4df4-8071-da1006509493",
        "vendor": false
      },
      "enabled": true,
      "lastUsed": false,
      "links": [
        {
          "href": "http://www.appdirect.com/api/account/v2/companies/97e573e2-1d11-4df4-8071-da1006509493/memberships/dcf7b936-c01f-4c98-b349-dae4769ff754",
          "rel": "self"
        },
        {
          "href": "http://www.appdirect.com/api/account/v2/users/dcf7b936-c01f-4c98-b349-dae4769ff754",
          "rel": "user"
        },
        {
          "href": "http://www.appdirect.com/api/account/v2/companies/97e573e2-1d11-4df4-8071-da1006509493",
          "rel": "company"
        }
      ],
      "metadata": {
        "mosi_username": null
      },
      "mosiUser": null,
      "position": null,
      "roles": [
        "ROLE_BILLING_ADMIN",
        "ROLE_SYS_ADMIN"
      ],
      "user": {
        "activated": true,
        "allowLogin": true,
        "boostUser": null,
        "email": "jane.lee@company1151609035.com",
        "firstName": "Jane",
        "lastName": "Lee",
        "ldapId": null,
        "links": [
          {
            "href": "http://www.appdirect.com/api/account/v2/users/dcf7b936-c01f-4c98-b349-dae4769ff754",
            "rel": "self"
          },
          {
            "href": "http://www.appdirect.com/api/account/v2/users/dcf7b936-c01f-4c98-b349-dae4769ff754/memberships",
            "rel": "memberships"
          }
        ],
        "metadata": {
          "apsUid": null
        },
        "picture": null,
        "roles": [
          "ROLE_USER"
        ],
        "userName": "jane.lee",
        "uuid": "dcf7b936-c01f-4c98-b349-dae4769ff754"
      }
    }
  ],
  "links": []
}

Represents a user membership to a company since a user can be a member of multiple companies (Subscription)

Name Type Description
company CompanyAccountV2 Company
enabled boolean Is this membership enabled
lastUsed boolean Is this company membership last used by user accessing the UI
links array of Link
metadata object
mosiUser SubscriptionMosiUser MOSI-specific user attributes
position string User position (also referred to as "Title" in UI User Settings
roles array of string Granted user roles for this membership
user UserAccountV2 User

Subscription

{
  "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": {
      "cancellationPeriodLimit": null,
      "endOfContractDate": 123451232,
      "endOfContractGracePeriod": null,
      "gracePeriodEndDate": null,
      "minimumServiceLength": 24,
      "renewal": null,
      "terminationFee": {
        "description": "Fee",
        "estimatedCost": 324.56,
        "percentage": 100,
        "price": null,
        "type": "PERCENTAGE"
      }
    },
    "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": "...",
        "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": "..."
    }
  },
  "user": {
    "href": "...",
    "id": "..."
  }
}
Name Type Description
assignedUsers number Number of users assigned to subscription
bundleApplicationId number Bundle ID. Specify during subscription creation if you want the subscription to be part of a bundle. Retrieve a list of bundle IDs with the List all bundles request, and then specify the desired ID here. Only supported for the Create a subscription endpoint and not supported for any other endpoints.
company LinkWS Link to company information
creationDate number Subscription creation date
edition LinkWS Link to edition information
endDate number Subscription end date
externalAccountId string External account identifier (from vendor)
externalId string External ID for a subscription. Not used to change or create a subscription. If a subscription has an external ID, the ID is included in the responses to the list subscription or read subscription APIs. To set an external ID of a subscription, use the Update subscriptions API.
id string ID
internalId string The UUID for a subscription
label string Label for a subscription
maxUsers number Maximum number of users allowed to be assigned to subscription
order Order Current order
product LinkWS Link to product information
redirectUrl string Interactive endpoint URL
status string Subscription status (Valid values are INITIALIZED, FAILED, FREE_TRIAL, FREE_TRIAL_EXPIRED, ACTIVE, SUSPENDED, or CANCELLED.)
upcomingOrder Order Upcoming order
user LinkWS Link to user information

Suffix

{
  "inputCode": "DOMAIN",
  "text": "domainsuffix.com"
}

The suffix label that appears to the right of the form field. For example, for a domain field, the suffix might be .com. Optional. The suffix can be populated by text OR the value in another form field referenced by an input code.

Name Type Description
inputCode string Unique identifier for the field. Possible values are DOMAIN, USERNAME, COUNTRY, STATE, etc.
text string The suffix value

Support

{
  "description": "...",
  "email": "...",
  "knowledgebaseUrl": "...",
  "phone": "..."
}

Support information for a product

Name Type Description
description string Support details
email string Email
knowledgebaseUrl string Knowledge base URL
phone string Phone number

SystemTileType

System tile type

Enumeration of

Tag

{
  "badge": "...",
  "description": "...",
  "id": 12345,
  "name": "...",
  "showBadge": true,
  "showOnNavigation": true,
  "tag": [
    {
      "badge": "...",
      "description": "...",
      "id": 12345,
      "name": "...",
      "showBadge": true,
      "showOnNavigation": true,
      "tag": [
        {},
        {}
      ],
      "type": "..."
    },
    {
      "badge": "...",
      "description": "...",
      "id": 12345,
      "name": "...",
      "showBadge": true,
      "showOnNavigation": true,
      "tag": [
        {},
        {}
      ],
      "type": "..."
    }
  ],
  "type": "..."
}

Represents a category, subcategory, industry, customer tag, attribute or attribute group

Name Type Description
badge string Badge image URL
description string Description
id number ID
name string Name
showBadge boolean Show badge
showOnNavigation boolean Show tag on naviagtion for filtering
tag array of Tag Children tags
type string Type

TaxDetail

{
  "description": "Flat Tax",
  "taxAmount": "2.0000000000"
}

Opportunity tax detail

Name Type Description
description string Description of the tax
taxAmount string The tax amount

TerminationFee

{
  "amount": "2",
  "feeType": "FIXED"
}

Termination fee

Name Type Description
amount number
description string
feeType FeeType Contract termination fee type

TerminationFeeGracePeriodUnit

Termination fee grace period unit. Time unit by which the terminationFeeGracePeriod is measured.

Enumeration of

TerminationFee

{
  "description": "...",
  "flatFee": {
    "AUD": 12345,
    "BRL": 12345,
    "CAD": 12345,
    "CHF": 12345,
    "CNY": 12345,
    "DKK": 12345,
    "EUR": 12345,
    "GBP": 12345,
    "GTQ": 12345,
    "INR": 12345,
    "JPY": 12345,
    "KRW": 12345,
    "MXN": 12345,
    "MYR": 12345,
    "NOK": 12345,
    "NZD": 12345,
    "PHP": 12345,
    "SAR": 12345,
    "SEK": 12345,
    "SGD": 12345,
    "USD": 12345,
    "ZAR": 12345
  },
  "percentageFee": 12345,
  "type": "..."
}

Fee incurred during a termination of a product subscription

Name Type Description
description string Description
flatFee Price Flat fee
percentageFee number Percentage fee
type string Type of termination fee: NONE, PERCENTAGE, FLAT_RATE

TotalRecurring

{
  "billingCycle": {
    "dayOfMonth": 17,
    "period": "YEARLY"
  },
  "totalSalePrice": "240.0000000000"
}

Represent recurring fee of a specfic billing cycle

Name Type Description
billingCycle BillingCycle The billing cycle
nextInvoiceDate string Date for the next invoice
totalSalePrice string The total sale price
totalWholeSalePrice string The total wholesale price

Transfer

{
  "accountPayable": 0,
  "accountReceivable": 95.99,
  "currency": "USD",
  "id": "c9c9efd0-a1ae-43af-88d6-c6add4de42da",
  "netPayable": 0,
  "netReceivable": 95.99,
  "status": "COMPLETE",
  "transferDate": 145234540,
  "transferId": 4,
  "transferRequestId": 4
}
Name Type Description
accountPayable number Account payable
accountReceivable number Account receivable
currency string The currency of the transfer, using the ISO-4217 currency code
id string The transfer ID
netPayable number Net payable
netReceivable number Net receivable
status string The status of the transfer
transferDate number The date on which the transfer was made
transferRequestId integer The transfer request ID

TransferDetails

{
  "credit": 100,
  "currency": "USD",
  "customer": "Telko Co.",
  "debit": 0,
  "id": 1,
  "product": "Cablevision"
}
Name Type Description
credit number The amount the reseller receives for the sale
currency string The currency of the detail line
customer string The customer company for whom the product was purchased
debit number The amount the reseller owes for the sale
id integer The detail ID
product string The name of the product

TransferDetailsList

{
  "content": [
    {
      "credit": 0,
      "currency": "USD",
      "customer": "Telko Co.",
      "debit": 10,
      "id": 13,
      "product": "Cablevision"
    },
    {
      "credit": 100,
      "currency": "USD",
      "customer": "Telko Co.",
      "debit": 0,
      "id": 14,
      "product": "airtel"
    },
    {
      "credit": 300,
      "currency": "USD",
      "customer": "Telko Co.",
      "debit": 0,
      "id": 15,
      "product": "Office 365 for Business"
    }
  ],
  "page": {
    "number": 1,
    "size": 3,
    "totalElements": 3,
    "totalPages": 1
  }
}
Name Type Description
content array of TransferDetails
page PageMetadata

TransferList

{
  "content": [
    {
      "accountPayable": 0,
      "accountReceivable": 95.99,
      "currency": "USD",
      "id": "7b55beda-4878-4ac9-8e65-2b84d889b705",
      "netPayable": 0,
      "netReceivable": 95.99,
      "status": "COMPLETE",
      "transferDate": 145234540,
      "transferId": 4,
      "transferRequestId": 4
    },
    {
      "accountPayable": 0,
      "accountReceivable": 95.99,
      "currency": "USD",
      "id": "bee32a9b-048c-402d-9b87-f27ff1ffaa52",
      "netPayable": 0,
      "netReceivable": 95.99,
      "status": "COMPLETE",
      "transferDate": 145234540,
      "transferId": 4,
      "transferRequestId": 4
    },
    {
      "accountPayable": 0,
      "accountReceivable": 95.99,
      "currency": "USD",
      "id": "cc7c58f8-343a-4f3c-8ade-d1b6342190ca",
      "netPayable": 0,
      "netReceivable": 95.99,
      "status": "RECONCILED",
      "transferDate": 145234540,
      "transferId": 3,
      "transferRequestId": 3
    }
  ],
  "page": {
    "number": 1,
    "size": 3,
    "totalElements": 3,
    "totalPages": 1
  }
}
Name Type Description
content array of Transfer
page PageMetadata

TransferStatus

Enumeration of

Unit

{
  "quantity": "8",
  "unit": "USER"
}

Purchase item unit

Name Type Description
quantity number Quantity
unit string Unit

UnitContractTerms

{
  "blockContractDecrease": true,
  "blockContractIncrease": false,
  "blockOriginalContractDecrease": false
}

Contract terms that restrict mid-contract quantity changes on subscriptions. unitTerms maps UnitContractTerms to a unit type (for example, user); enabled terms prevent actions for the unit type.

Name Type Description
blockContractDecrease boolean
blockContractIncrease boolean
blockOriginalContractDecrease boolean

UnitDefinition

[
  {
    "allowDecimals": false,
    "increment": 1,
    "meteredUsage": false,
    "minimum": "1.0000000000",
    "pricePerIncrement": false,
    "quantity": "1.0000000000",
    "readOnly": false,
    "unit": "USER"
  }
]

Configuration details for a unit type that is part of a pricing plan

Name Type Description
allowDecimals boolean If true, this unit can be purchased in decimal (fractional) quantities
increment number Restrict users to purchasing the unit in this number of increments. For example, require users to purchase the unit type in increments of 5.
maximum string The maximum number of units that users can buy
meteredUsage boolean If true, this unit must be configured for metered usage
minimum string The minimum number of units that users can buy
pricePerIncrement boolean If true, the price per increment is displayed. For example, if the unit has a unit price is $1 and users must purchase in increments of 5, the price appears as $5 for 5 units.
quantity string Purchase quantity
readOnly boolean If true, the user cannot set a quantity for this unit at the time of purchase
unit string Unit type name

UpdateCompanyAccountV2Request

{
  "address": {
    "city": "San Francisco",
    "country": "United Stated of America",
    "state": "California",
    "street1": "5th Ave",
    "street2": "#400",
    "zip": "32455"
  },
  "channelAdmin": false,
  "companySize": "SMALL",
  "countryCode": "US",
  "customAttributes": [
    {
      "attributeType": "TEXT",
      "hint": "US West, US Central, or US East",
      "label": "Geographic Region",
      "name": "Geographic Region",
      "value": "US"
    },
    {
      "attributeType": "MULTISELECT",
      "hint": "",
      "label": "Label Names",
      "name": "Company Details",
      "valueKeys": [
        "Option 1"
      ]
    }
  ],
  "dailyPurchaseLimit": 1000,
  "dailyPurchaseLimitExempt": false,
  "dailyPurchaseLimitOverrideAmt": 100,
  "dailyPurchaseRemainingAmt": null,
  "defaultRole": "USER",
  "emailAddress": "info@company.com",
  "enabled": true,
  "externalId": "d689b970-f3f9-42a6-a974-90e2bdadf860",
  "industry": "IT",
  "name": "Company 7078259907",
  "phoneNumber": "9259221234",
  "reseller": false,
  "thirtyDaysPurchaseLimit": 0,
  "thirtyDaysPurchaseLimitExempt": false,
  "thirtyDaysPurchaseLimitOverrideAmt": null,
  "thirtyDaysPurchaseRemainingAmt": null,
  "vendor": false,
  "website": "http://www.company.com"
}

Payload for "update company" request

Name Type Description
address CompanyAddress Company address
allowLogin boolean Indicates whether a company's users are managed users (false) or not (true). Do not change the value with this request
billingDayOfMonth integer (Optional) Use this property in company creation requests to set the billing cycle start date. The date applies to all purchases made through the specified company, and overrides the marketplace-level billing cycle date.
channelAdmin boolean Indicates whether the company has Channel Admin access
companySize CompanySizeType Company size
countryCode string Company country code defined by ISO ALPHA-2 standard
customAttributes array of CustomAttributeAccountV2 Custom attributes
dailyPurchaseLimit number Daily spend limit used as the default limit for all companies in the marketplace
dailyPurchaseLimitExempt boolean Whether company is exempt from the marketplace default daily spend limit
dailyPurchaseLimitOverrideAmt number Daily spend limit for this company (overrides marketplace default for daily company spend limit)
dailyPurchaseRemainingAmt number Remaining daily spending amount
defaultRole string The default role newly created users receive
emailAddress string Company email address
enabled boolean Indicates whether company is enabled
externalId string Company external ID
industry string Company industry sector
name string Company name
phoneNumber string Company phone number
referral boolean Indicates whether the company has Referral access
reseller boolean Indicates whether the company has Reseller access
thirtyDaysPurchaseLimit number Monthly spend limit used as the default limit for all companies in the marketplace
thirtyDaysPurchaseLimitExempt boolean Whether company is exempt from the marketplace default thirty-day spend limit
thirtyDaysPurchaseLimitOverrideAmt number Thirty-day spend limit for this company (overrides marketplace default for thirty-day company spend limit)
thirtyDaysPurchaseRemainingAmt number Remaining monthly spending amount
vendor boolean Indicates whether the company has Vendor access
website string Company website URL

UpdateCompanyGroupAccountV2

{
  "description": "Engineering",
  "name": "Engineer"
}
Name Type Description
description string Company group description.
name string Company group name.

UpdateUserAccountV2

{
  "boostUser": {
    "apsUid": "murnu8w"
  },
  "currency": "USD",
  "externalId": "b34974b2-f5d6-4326-9859-5247dc42ee60",
  "firstName": "Jane",
  "lastName": "Lee",
  "ldapId": "1",
  "locale": "en_US",
  "roles": [
    "ROLE_CORPORATE_ADMIN"
  ]
}

Update user information

Name Type Description
boostUser BoostUser Boost integration user data
currency string Currency
externalId string External identifier of user
firstName string First name of user
idpUuid string The external identity provider's ID for the user
lastName string Last name of user
ldapId string LDAP identifier of user
locale string User locale in the standard ISO 639-1 language code + ISO 3166-1 country code format. For example: 'en_US'
roles array of string All users have ROLE_USER (end-user access). To assign the Network Manager, role use ROLE_CORPORATE_ADMIN. For company membership roles, see UserCompanyMembershipAccountV2.

UpdateUserCompanyMembershipAccountV2

{
  "enabled": true,
  "roles": [
    "ROLE_BILLING_ADMIN",
    "ROLE_DEVELOPER",
    "ROLE_SYS_ADMIN"
  ]
}

Represents updating a user membership to company

Name Type Description
enabled boolean Indicates whether the membership is enabled
roles array of string Roles for this membership. One or more of the following: ROLE_CHANNEL_ADMIN (Marketplace Manager), ROLE_CHANNEL_PRODUCT_SUPPORT (Product Support), ROLE_SALES_SUPPORT (Sales Support), ROLE_RESELLER_MANAGER (Reseller Manager), ROLE_RESELLER (Reseller), ROLE_CHANNEL_SUPPORT (Customer Support), ROLE_SYS_ADMIN (Company Admin), ROLE_BILLING_ADMIN (Billing Admin), ROLE_DEVELOPER (Developer).

UsageBean

{
  "account": {
    "accountIdentifier": "...",
    "parentAccountIdentifier": "...",
    "status": "CANCELLED"
  },
  "addonInstance": {
    "id": "..."
  },
  "item": [
    {
      "customUnit": "...",
      "description": "...",
      "price": 12345,
      "quantity": 12345,
      "unit": "TIER3_STANDARD_LINE"
    },
    {
      "customUnit": "...",
      "description": "...",
      "price": 12345,
      "quantity": 12345,
      "unit": "CONTACTS_1000"
    }
  ]
}
Name Type Description
account AccountInfo Account information
addonInstance AddonInstanceInfo Add-on instance information
item array of UsageItemBean

UsageItem

{
  "description": "Details for a preconfigured or custom metered usage event.",
  "type": "object",
  "title": "UsageItem",
  "properties": {
    "attributes": {
      "description": "Additional attributes for usage.",
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "currency": {
      "description": "Currency in which the custom metered usage price (unitPrice) is reported. Required only for custom metered usage. Empty string is valid for preconfigured metered usage. Format: ISO 4217. For example: USD, EUR",
      "type": "string"
    },
    "customUnit": {
      "description": "Unit of measure for reported custom metered usage. The unit is associated with a price (unitPrice). Required for custom metered usage.",
      "type": "string"
    },
    "description": {
      "description": "Additional description about usage items.",
      "type": "string"
    },
    "eventDate": {
      "description": "Date and time the usage event was recorded by the metering system. Format: YYYY-MM-DDTHH:mm:ss.SSSZ. Required.",
      "type": "string",
      "format": "date-time"
    },
    "eventId": {
      "description": "ID for each metered usage event. When not assigned: null. Required.",
      "type": "string"
    },
    "pricingUnit": {
      "description": "Unit of measure for reported usage. Associated with a price that will be charged for the usage. Required for preconfigured metered usage.",
      "type": "string"
    },
    "quantity": {
      "description": "Total usage in the stated unit of measure (pricingUnit or customUnit). Maximum 10 decimal digits. Required.",
      "type": "string"
    },
    "unitPrice": {
      "description": "Price for each unit (customUnit) of reported custom usage. x-mimum is the minimum price allowed. Required for custom metered usage.",
      "type": "string",
      "x-minimum": 0
    }
  }
}

Details for a preconfigured or custom metered usage event.

Name Type Description
attributes object Additional attributes for usage.
currency string Currency in which the custom metered usage price (unitPrice) is reported. Required only for custom metered usage. Empty string is valid for preconfigured metered usage. Format: ISO 4217. For example: USD, EUR
customUnit string Unit of measure for reported custom metered usage. The unit is associated with a price (unitPrice). Required for custom metered usage.
description string Additional description about usage items.
eventDate string Date and time the usage event was recorded by the metering system. Format: YYYY-MM-DDTHH:mm:ss.SSSZ. Required.
eventId string ID for each metered usage event. When not assigned: null. Required.
pricingUnit string Unit of measure for reported usage. Associated with a price that will be charged for the usage. Required for preconfigured metered usage.
quantity string Total usage in the stated unit of measure (pricingUnit or customUnit). Maximum 10 decimal digits. Required.
unitPrice string Price for each unit (customUnit) of reported custom usage. x-mimum is the minimum price allowed. Required for custom metered usage.

UsageItemBean

{
  "customUnit": "...",
  "description": "...",
  "price": 12345,
  "quantity": 12345,
  "unit": "OPERATOR"
}
Name Type Description
customUnit string
description string
price number
quantity number
unit PricingUnit

UsageRequestInfo

{
  "description": "Details about the metered usage submission request and the processing status of all related metered usage events.",
  "type": "object",
  "title": "UsageRequestInfo",
  "properties": {
    "failedUsages": {
      "description": "List of metered usage events for which processing failed",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/FailedUsageInfo"
      }
    },
    "failedUsagesCount": {
      "description": "Number of usage events for which processing failed",
      "type": "integer"
    },
    "idempotencyKey": {
      "description": "Unique caller-generated identifier for the metered usage that was submitted. Ensures duplicate submissions can be identified and an error returned.",
      "type": "string"
    },
    "processedUsagesCount": {
      "description": "Number of usage events for which processing was successful",
      "type": "integer"
    },
    "requestId": {
      "description": "Unique system-assigned identifier for the API request used to submit the metered usage; returned with the Billing Usage V2 submission response.",
      "type": "string"
    },
    "status": {
      "description": "Status of the metered usage request: Failed, Successful, Processing, or Ready",
      "type": "string"
    },
    "totalUsagesCount": {
      "description": "Number of usage events submitted",
      "type": "integer"
    }
  }
}

Details about the metered usage submission request and the processing status of all related metered usage events.

Name Type Description
failedUsages array of FailedUsageInfo List of metered usage events for which processing failed
failedUsagesCount integer Number of usage events for which processing failed
idempotencyKey string Unique caller-generated identifier for the metered usage that was submitted. Ensures duplicate submissions can be identified and an error returned.
processedUsagesCount integer Number of usage events for which processing was successful
requestId string Unique system-assigned identifier for the API request used to submit the metered usage; returned with the Billing Usage V2 submission response.
status string Status of the metered usage request: Failed, Successful, Processing, or Ready
totalUsagesCount integer Number of usage events submitted

UsageType

Usage type

Enumeration of

User

{
  "company": {
    "id": "1",
    "name": "Acme Corp."
  },
  "email": "john.doe@acme.com",
  "firstName": "John",
  "id": "d781ac09-b4fe-4d57-8ba2-4640fc5b7c49",
  "lastName": "Doe"
}
Name Type Description
company Company User company
email string User email address
firstName string User first name
id string User ID
lastName string User last name

UserAccountDisonnectionResponse

{
  "app": {
    "id": "b2fc6737-3d3f-4da2-afda-f80f25b89af9"
  },
  "connection": {
    "accountName": "bob@a13a9998-e025-4751-8fee-72afdc0fe6d5@2cc88871-e942-4910-96e3-0521d7ae52f4"
  },
  "user": {
    "companyId": "2cc88871-e942-4910-96e3-0521d7ae52f4",
    "userId": "a13a9998-e025-4751-8fee-72afdc0fe6d5"
  }
}

Response after request is made to disconnect a user account from Search

Name Type Description
app ApplicationToDisconnect The application that was disconnected from Search for a user
connection DisconnectionDetails The user account (accountName) that was disconnected from Search
user UserToDisconnect The user whose application user account was disconnected from Search

UserAccountV2

{
  "activated": true,
  "allowLogin": true,
  "boostUser": {
    "apsUid": "murnu8w"
  },
  "creationDate": 1398896238000,
  "currency": "USD",
  "customAttributes": [
    {
      "attributeType": "TEXT",
      "hint": "commission_hint",
      "label": "Commission_Payout_ID",
      "name": "C5125859",
      "value": "value"
    }
  ],
  "email": "jude.doe@company8578572384.com",
  "externalId": "b34974b2-f5d6-4326-9859-5247dc42ee60",
  "firstName": "Jude",
  "idpUuid": "1d37bace-f4cf-11e6-af80-22000a9513f7",
  "lastName": "Doe",
  "lastSuccessfulLogin": 1543259363000,
  "ldapId": "1",
  "links": [
    {
      "href": "http://appdirect/api/account/v2/users/8d237de5-9710-4d55-a5cc-3e8dc918c216",
      "rel": "self"
    },
    {
      "href": "http://appdirect/api/account/v2/users/8d237de5-9710-4d55-a5cc-3e8dc918c216/memberships",
      "rel": "memberships"
    }
  ],
  "locale": "en_US",
  "metadata": {
    "apsUid": null
  },
  "openId": "http://localhost:8080/openid/id/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1",
  "picture": "http://localhost:8080/profilePics/img2147417701652580695.png?184b58e358f087154d94329f9000b28a",
  "roles": [
    "ROLE_USER"
  ],
  "username": "jude.doe",
  "uuid": "8d237de5-9710-4d55-a5cc-3e8dc918c216"
}

User information

Name Type Description
activated boolean Is this user activated
allowLogin boolean The user is able to log into a marketplace. By default allowLogin=true
boostUser BoostUser Boost integration
creationDate number User creation date in UNIX Epoch milliseconds
customAttributes array of CustomAttributeAccountV2 Custom attributes for this company
email string Email address
externalId string External identifier of user
firstName string First name
idpUuid string The external identity provider's ID for the user
lastName string Last name
lastSuccessfulLogin number User last successful login date in UNIX Epoch milliseconds
ldapId string Ldap integration
links array of Link Resource links
locale string User locale in the standard ISO 639-1 language code + ISO 3166-1 country code format. For example: 'en_US', 'fr_CA', and so on.
metadata object
openid string OpenID URL
picture string Profile picture URL
roles array of string User roles. All responses include ROLE_USER (end-user access). If the user has the Network Manager role, this array also includes ROLE_CORPORATE_ADMIN. For company membership roles, see UserCompanyMembershipAccountV2.
userId number ID
username string User name.
If not provided, use the user's email address
uuid string Unique identifier of the user assigned by the AppDirect platform

UserAppInfo

{
  "assigned": true,
  "companyEntitlementId": 12345,
  "companyEntitlementPending": true,
  "companyWide": true,
  "editionId": 12345,
  "editionName": "...",
  "editionPricingId": 12345,
  "freeTrialAllowed": true,
  "freeTrialDaysLeft": 12345,
  "ownerAdmin": true,
  "ownerFullName": "...",
  "ownerId": 12345,
  "ownerUuid": "...",
  "partOfExistingBundle": true,
  "pending": true,
  "pendingAppType": "REQUESTED",
  "requested": true
}

User application information

Name Type Description
assigned boolean Is assigned
companyEntitlementId number Company entitlement ID
companyEntitlementPending boolean Is subscription pending
companyWide boolean Is company wide
editionId number Edition ID
editionName string Edition Name
editionPricingId number Edition pricing ID
freeTrialAllowed boolean Free trial allowed
freeTrialDaysLeft number Free trial days left
ownerAdmin boolean Is owner admin
ownerFullName string Owner full name
ownerId number Owner ID
ownerUuid string Owner unique identifier
partOfExistingBundle boolean Is part of existing bundle
pending boolean Is pending
pendingAppType PendingAppType Pending app type
requested boolean Is requested

UserApplication

{
  "addon": false,
  "addonParentApplicationId": null,
  "addonParentEntitlementId": 1,
  "appLinkLocation": "http://www.nytimes.com",
  "appLinkUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "appLinkVersions": {
    "common": [
      "1.0"
    ]
  },
  "applicationId": 1,
  "applicationProfileUrl": "http://appdirect.com/apps/3281",
  "assignUrl": "http://appdirect.com/account/assign?companyEntitlementId=1",
  "assigned": false,
  "assignmentEnabled": true,
  "authenticationMethod": "SAML",
  "autoUpgradeToPaid": false,
  "baseUrl": "http://appdirect.com",
  "billableEntitlementId": 1,
  "blurb": "C24769040",
  "bundled": false,
  "bypassTermsWhenDefault": false,
  "changeSubscriptionEnabled": true,
  "companyEntitlementExternalPartnerIdentifier": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "companyEntitlementExternalVendorIdentifier": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "companyEntitlementId": 1,
  "companyEntitlementLabel": "Acme Utilities",
  "companyEntitlementMetadata": {},
  "companyEntitlementStatus": "INITIALIZED",
  "companyEntitlementSuspensionReason": "PAYMENT_OVERDUE",
  "companyEntitlementUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "companyUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "companyWide": false,
  "contractExpired": false,
  "contractExpiring": false,
  "customIntegration": "NEW_RELIC",
  "daysUntilPayment": 0,
  "description": "Description",
  "developerName": "Developer",
  "editionCode": "RECURRING",
  "editionId": 1,
  "editionName": "Recurring Edition",
  "endOfContractDate": 1504072800000,
  "free": false,
  "gridImagePath": "app_resources/244/myAppIcon/img7760809170859065004.png?9a1be8ccdab998703894391bc9488436",
  "gridImageSrcset": {
    "default": "http://localhost:8080/app_resources/244/myAppIcon/img7760809170859065004.png"
  },
  "hideAppTile": false,
  "imageBaseUrl": "http://appdirect.com",
  "imageUrl": "http://appdirect.com/app_resources/244/myAppIcon/img7760809170859065004.png?9a1be8ccdab998703894391bc9488436",
  "importableApplicationUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "imported": false,
  "importedPasswordManager": false,
  "invoiceExternallyProcessed": false,
  "invoiceStatus": "PAID",
  "keychainApplicationId": 1,
  "keychainCredentialsId": 1,
  "launchUrl": "http://appdirect.com/launch?userEntitlementId=1891",
  "legacyBundleCompanyEntitlementId": 1,
  "linkUrl": "http://appdirect.com/viewVideo/1",
  "links": [
    {
      "href": "http://appdirect.com/api/account/v2/companies/6b4bd452-895d-4098-aa56-e6046b238e0f/memberships/2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1/myapps/password-manager",
      "rel": "self"
    }
  ],
  "manageOnVendorUrl": "http://appdirect.com/launch?userEntitlementId=1891&manage=true",
  "manageUrl": "http://appdirect.com/account/apps/1891",
  "name": "Password.Manager",
  "newSubscriptionEnabled": true,
  "newUpload": false,
  "openIdConnectInitiateLoginMethod": "GET",
  "openIdLoginMethod": "GET",
  "openIdLoginUrl": "http://openid.login",
  "orderDuration": "ONE_TIME",
  "overdue": true,
  "overview": "C24769040",
  "ownerFirstName": "First",
  "ownerId": 1,
  "ownerLastName": "Last",
  "ownerUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "partner": "APPDIRECT",
  "payUrl": "http://appdirect.com/pay?userEntitlementId=12",
  "paymentDueDate": 1504072800000,
  "pending": false,
  "pendingAppId": 1,
  "pendingAppType": "REQUESTED",
  "pendingAsync": false,
  "pendingCreation": false,
  "pendingEventType": "USER_UPDATED",
  "preDisabled": false,
  "privacyUrl": "http://privacy.url.com",
  "productType": "WEB_APP",
  "publishedOn": 1504072800000,
  "purchaseOrderId": 1,
  "purchaseUrl": "http://appdirect.com/purchase/1?fromEntitlementId=12",
  "purchased": false,
  "remainingFreeTrialDays": 0,
  "requestable": false,
  "requested": false,
  "samlProviderUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "sampleApp": false,
  "shortcut": "google",
  "simple": false,
  "simpleEntitlementId": 1,
  "simpleEntitlementUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "slogan": "Turn your website Visitors into Customers",
  "ssoEnabled": true,
  "startDate": 1504072800000,
  "state": "ACTIVE",
  "subscriptionEventPending": false,
  "supportEmail": "help@support.com",
  "supportKb": "http://support.appdirect.com",
  "supportPhone": "1-800-9000",
  "systemTileType": "PASSWORD_MANAGER",
  "termsUrl": "http://terms.url.com",
  "upgradeToPaid": false,
  "usageType": "MULTI_USER",
  "useMessage": "Call the team on 0800150247",
  "useMessageTitle": "Get IT Support Now",
  "userEntitlementCreatedOn": 1504147976000,
  "userEntitlementExternalVendorIdentifier": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "userEntitlementId": 1,
  "userEntitlementMetadata": {},
  "userEntitlementStatus": "ACTIVE",
  "userEntitlementUuid": "6b4bd452-895d-4098-aa56-e6046b238e0f",
  "userUuid": "2f93cb24-f7b9-433f-875e-bb0dd9b0f1c1"
}

User's application.

Name Type Description
addon boolean Indicates whether application is an add-on.
addonParentApplicationId integer Parent application ID of addon.
addonParentEntitlementId integer Parent entitlement ID of addon.
appLinkLocation string Application's location link.
appLinkUuid string Application's link UUID.
appLinkVersions object Application's link version.
applicationId integer Application ID.
applicationProfileUrl string Application's profile URL.
assignUrl string Company entitlement URL.
assigned boolean Indicates whether application state is 'assigned'.
assignmentEnabled boolean Indicates whether assignments are enabled.
authenticationMethod AuthenticationMethod Authentication method.
autoUpgradeToPaid boolean When true, automatically upgrades free trials to paid subscriptions for all accounts that have a payment method on file.
baseUrl string Base URL of the marketplace.
billableEntitlementId integer Company entitlement ID or legacy bundle company entitlement ID.
blurb string Application caption.
bundled boolean Indicates whether application is part of a bundle.
bypassTermsWhenDefault boolean Indicates whether users can bypass terms and conditions.
changeSubscriptionEnabled boolean Indicates whether subscription can be changed.
companyEntitlementExternalPartnerIdentifier string Company entitlement external partner ID.
companyEntitlementExternalVendorIdentifier string Company entitlement external vendor ID.
companyEntitlementId integer Company entitlement ID.
companyEntitlementLabel string Company entitlement label
companyEntitlementMetadata object Company entitlement metadata.
companyEntitlementStatus CompanyEntitlementStatus
companyEntitlementSuspensionReason CompanyEntitlementSuspensionReason Suspension reason for company entitlement.
companyEntitlementUuid string Company entitlement UUID.
companyUuid string Company UUID.
companyWide boolean Indicates whether application is company wide.
contractExpired boolean Indicates whether contract is expired.
contractExpiring boolean Indicates whether contract will expire in fewer than 5 days.
customIntegration string Custom integration of application.
daysUntilPayment integer Days until next payment is due.
description string Application description.
developerName string Name of the application developer.
editionCode string Application edition code number.
editionId integer Application edition ID.
editionName string Application edition name.
endOfContractDate number End date of contract.
free boolean Indicates whether the application is free.
gridImagePath string Grid image URL path.
gridImageSrcset object Grid image source list.
hideAppTile boolean Indicates whether to hide application tile.
imageBaseUrl string Base image URL of the marketplace.
imageUrl string Application's image URL.
importableApplicationUuid string Importable application UUID.
imported boolean Indicates whether application can be imported.
importedPasswordManager boolean Indicates whether the application is the imported 'Password Manager'.
invoiceExternallyProcessed boolean Indicates whether invoice is processed externally.
invoiceStatus InvoiceStatus
keychainApplicationId integer Keychain application ID.
keychainCredentialsId integer Keychain credentials ID.
launchUrl string Application launch URL.
legacyBundleCompanyEntitlementId integer Legacy bundle company entitlement ID.
linkUrl string Video or OpenID login URL link.
links array of Link Links
manageOnVendorUrl string Application's managing vendor URL.
manageUrl string Application's managing URL.
name string Application name.
newSubscriptionEnabled boolean Indicates whether new subscriptions are enabled.
newUpload boolean Indicates whether the upload is new (that is, neither the user nor the company entitlement has a CANCELLED or FAILED status).
openIdConnectInitiateLoginMethod HTTPMethod OpenID Connect login method.
openIdLoginMethod HTTPMethod OpenID 2.0 login method.
openIdLoginUrl string OpenID 2.0 login URL.
orderDuration PricingDuration Pricing duration types
overdue boolean Indicates whether payment is due.
overview string Application overview text.
ownerFirstName string First name of the application owner.
ownerId integer ID of the application owner.
ownerLastName string Last name of the application owner.
ownerUuid string UUID of the application owner.
partner string Partner name.
payUrl string Application's pay URL.
paymentDueDate number Subscription payment due date.
pending boolean Indicates whether application state is 'pending.'
pendingAppId integer Pending application ID.
pendingAppType PendingAppType
pendingAsync boolean Indicates whether application's status is pending externally.
pendingCreation boolean Indicates whether the application's order has not been processed or is pending externally.
pendingEventType EventType
preDisabled boolean If true, indicates that application will soon be disabled, either because the company entitlement is active but the invoice is unpaid, or because it is a free trial with fewer than five days remaining.
privacyUrl string Privacy URL.
productType ProductType Product type.
publishedOn number Publication date of application in UNIX Epoch milliseconds.
purchaseOrderId integer Purchase order ID.
purchaseUrl string Application's purchase URL.
purchased boolean Indicates whether the application is purchased.
remainingFreeTrialDays integer Number of days remaining in the application's free trial period.
requestable boolean Indicates whether application can be requested.
requested boolean Indicates whether application is requested.
samlProviderUuid string SAML provider UUID.
sampleApp boolean Indicates whether application is a sample application.
shortcut string Shortcut value.
simple boolean Indicates whether application is a simple application.
simpleEntitlementId integer Simple entitlement ID.
simpleEntitlementUuid string Simple entitlement UUID.
slogan string Application slogan
ssoEnabled boolean Indicates whether single sign-on is enabled.
startDate number Start date.
state MyAppState MyApp state.
subscriptionEventPending boolean Indicates whether a subscription change is pending.
supportEmail string Support email.
supportKb string Support knowledge base URL.
supportPhone string Support phone number.
systemTileType SystemTileType System tile type.
termsUrl string Terms URL.
upgradeToPaid boolean Indicates whether the application can be upgraded to a paid version.
usageType UsageType Usage type.
useMessage string Application usage message.
useMessageTitle string Application usage message title.
userEntitlementCreatedOn number User entitlement creation date.
userEntitlementExternalVendorIdentifier string User entitlement external vendor ID.
userEntitlementId integer User entitlement ID.
userEntitlementMetadata object User entitlement metadata.
userEntitlementStatus UserEntitlementStatusLegacy
userEntitlementUuid string User entitlement UUID.
userUuid string User UUID.

UserAssignableRoleV2

{
  "name": "ROLE_SYS_ADMIN"
}

A marketplace role name. The response to Read company assignable roles contains a list of these objects.

Name Type Description
name string Marketplace role that can be assigned to the user. One of the following: ROLE_CHANNEL_ADMIN (Marketplace Manager), ROLE_CHANNEL_PRODUCT_SUPPORT (Product Support), ROLE_SALES_SUPPORT (Sales Support), ROLE_RESELLER_MANAGER (Reseller Manager), ROLE_RESELLER (Reseller), ROLE_CHANNEL_SUPPORT (Customer Support), ROLE_SYS_ADMIN (Company Admin), ROLE_BILLING_ADMIN (Billing Admin), ROLE_DEVELOPER (Developer), ROLE_USER (User).

UserAssignmentAccountV2

{
  "assignmentCount": 1,
  "companyEntitlementId": 23,
  "companyEntitlementLabel": "Mock App",
  "companyEntitlementStatus": "ACTIVE",
  "createdOn": 1480699562586,
  "gridImageUrl": "http://appdirect/app_resources/9/myAppIcon/img1445094381431796823.png?466c707fefd0aba59d170d532e013f3d",
  "links": [
    {
      "href": "http://appdirect/api/marketplace/v1/products/47",
      "rel": "application"
    }
  ],
  "listImageUrl": "http://appdirect/app_resources/9/thumbs_64/img1445094381431796823.png?466c707fefd0aba59d170d532e013f3d",
  "ownerFirstName": "Susan",
  "ownerId": 40,
  "ownerLastName": "Simpson",
  "ownerUuid": "4aad1f87-a653-4031-9b64-de42c7c5fa3f",
  "productName": "MockApp208301774438095187",
  "status": "ACTIVE",
  "uuid": "4d8ab391-33b9-472f-abce-6a6bd5e4c39b"
}

Represents a user assignment/entitlement to a company

Name Type Description
assignmentCount number Assignment count
companyEntitlementId number Company Entitlement ID
companyEntitlementLabel string Company entitlement label
companyEntitlementStatus string Company Entitlement Status
createdOn number Date created
gridImageUrl string Grid image url
links array of Link Resource links
listImageUrl string List image url
ownerFirstName string Owner first name
ownerId number Owner Unique Identifier
ownerLastName string Owner last name
ownerUuid string Owner Uuid
productName string Product name
status string Status
uuid string User assignment unique identifier

UserAssignmentWS

{
  "accountIdentifier": "200ae1d9-c5b9-4c0b-843c-45d8e74d741a",
  "assigned": true,
  "email": "test_email@yopmail.com",
  "firstName": "Test_FirstName",
  "lastName": "Test_LastName",
  "userIdentifier": "45bbf36e-5902-4eb3-9072-87d267d302d4",
  "userName": "Test_UserName"
}
Name Type Description
accountIdentifier string
assigned boolean
email string
lastName string
userIdentifier string
userName string

AppResellerUserAssociation

{
  "firstName": "Michael",
  "id": "2c061df6-4313-45e0-8709-a0ca19b0aaa3",
  "lastName": "Jordan"
}

A minimum version of a user: includes only the user ID, first name, and last name

Name Type Description
firstName string User first name
id string User ID
lastName string User last name

UserAttributeChoice

{
  "name": "New Customer Group",
  "options": [
    {
      "industryId": 55,
      "name": "Industry1",
      "selected": true
    },
    {
      "industryId": 56,
      "name": "Industry2",
      "selected": false
    }
  ],
  "required": true,
  "userAttributeId": 31
}

Customer group options available for the product.

Name Type Description
name string Name of the customer group.
options array of IndustryChoice List of industry choice options.
required boolean Indicates whether customer group is a required field in the product editor.
tooltip string Description about the customer group.
userAttributeId integer Unique ID of the customer group.

UserChecklistAccountV2

{
  "haveAssignedUsers": false,
  "haveCompletedCompanyProfile": false,
  "haveCompletedProfile": false,
  "haveInvitedUsers": false,
  "havePurchasedProduct": false,
  "links": []
}

High-level view of user setup progress

Name Type Description
haveAssignedUsers boolean Has user assigned an app to other users?
haveCompletedCompanyProfile boolean Is company profile completed?
haveCompletedProfile boolean Is user profile completed?
haveInvitedUsers boolean Has user invited users?
havePurchasedProduct boolean Has user purchased product?

UserCompanyMembershipAccountV2

{
  "content": [
    {
      "company": {
        "customAttributes": [
          {
            "attributeType": "TEXT",
            "hint": "US West, US Central, or US East",
            "label": "Geographic Region",
            "name": "Geographic Region",
            "value": "US"
          },
          {
            "attributeType": "MULTISELECT",
            "hint": "",
            "label": "Label Names",
            "name": "Company Details",
            "valueKeys": [
              "great option"
            ]
          }
        ],
        "defaultRole": "USER",
        "enabled": true,
        "links": [
          {
            "href": "http://appdirect/api/account/v2/companies/97e573e2-1d11-4df4-8071-da1006509493",
            "rel": "self"
          },
          {
            "href": "http://appdirect/api/account/v2/companies/97e573e2-1d11-4df4-8071-da1006509493/memberships",
            "rel": "memberships"
          }
        ],
        "name": "Company 1040203757",
        "phoneNumber": "9259221234",
        "picture": "http://localhost:8080/profilePics/http://cdn/company.png",
        "uuid": "97e573e2-1d11-4df4-8071-da1006509493",
        "vendor": false
      },
      "enabled": true,
      "lastUsed": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/97e573e2-1d11-4df4-8071-da1006509493/memberships/dcf7b936-c01f-4c98-b349-dae4769ff754",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/users/dcf7b936-c01f-4c98-b349-dae4769ff754",
          "rel": "user"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/97e573e2-1d11-4df4-8071-da1006509493",
          "rel": "company"
        }
      ],
      "metadata": {
        "mosi_username": "adazuretest@sdasd21321.onmicrosoft.com"
      },
      "mosiUser": {
        "username": "adazuretest@sdasd21321.onmicrosoft.com"
      },
      "position": "Business Analyst",
      "roles": [
        "ROLE_BILLING_ADMIN",
        "ROLE_SYS_ADMIN"
      ],
      "user": {
        "activated": true,
        "allowLogin": true,
        "boostUser": {
          "apsUid": "murnu8w"
        },
        "currency": null,
        "customAttributes": [
          {
            "attributeType": "TEXT",
            "hint": "commission_hint",
            "label": "Commission_Payout_ID",
            "name": "C5125859",
            "value": "value"
          }
        ],
        "email": "jane.lee@company1151609035.com",
        "firstName": "Jane",
        "lastName": "Lee",
        "ldapId": "1",
        "links": [
          {
            "href": "http://appdirect/api/account/v2/users/dcf7b936-c01f-4c98-b349-dae4769ff754",
            "rel": "self"
          },
          {
            "href": "http://appdirect/api/account/v2/users/dcf7b936-c01f-4c98-b349-dae4769ff754/memberships",
            "rel": "memberships"
          }
        ],
        "metadata": {
          "apsUid": "murnu8w"
        },
        "picture": "http://appdirect/profilePics/img2147417701652580695.png?184b58e358f087154d94329f9000b28a",
        "roles": [
          "ROLE_USER"
        ],
        "userName": "jane.lee",
        "uuid": "dcf7b936-c01f-4c98-b349-dae4769ff754"
      }
    }
  ],
  "links": []
}

Represents a user membership to a company since a user can be a member of multiple companies

Name Type Description
company CompanyAccountV2 Company
enabled boolean Is this membership enabled
lastUsed boolean Is this company membership last used by user accessing the UI
links array of Link Resource links
metadata object
mosiUser MosiUser MOSI-specific user attributes
position string User position (also referred to as "Title" in UI User Settings
roles array of string Roles for this membership. One or more of the following: ROLE_CHANNEL_ADMIN (Marketplace Manager), ROLE_CHANNEL_PRODUCT_SUPPORT (Product Support), ROLE_SALES_SUPPORT (Sales Support), ROLE_RESELLER_MANAGER (Reseller Manager), ROLE_RESELLER (Reseller), ROLE_CHANNEL_SUPPORT (Customer Support), ROLE_SYS_ADMIN (Company Admin), ROLE_BILLING_ADMIN (Billing Admin), ROLE_DEVELOPER (Developer). For user roles (not associated with membership), see UserAccountV2.
user UserAccountV2 User

UserConnection

{
  "app": {
    "id": "b2fc6737-3d3f-4da2-afda-f80f25b89af9"
  },
  "user": {
    "companyId": "2cc88871-e942-4910-96e3-0521d7ae52f4",
    "handle": "bob",
    "userId": "a13a9998-e025-4751-8fee-72afdc0fe6d5"
  }
}

Defines a user account connection for Search. A connection (accountName) associates the app (application UUID) and user information (userId, companyId, and handle). The connection is used to, for example, identify events related to the user's app account. Format: {user_handle}@{user_uuid}@{company_uuid} Note: Application UUID = Product UUID

Name Type Description
app ApplicationToConnect The app for which Search and Notification is provisioned for the user
user UserToConnect User to provision (connect to AppDirect)

UserConnectionError

{
  "code": "NOT_FOUND",
  "details": [
    "Details of error"
  ],
  "message": "User not found.",
  "moreInfo": "https://help.appdirect.com/api/appwise.html",
  "status": 404
}

Error responses when user connection changes fail

Name Type Description
code string Canonical error code
details array of string Details of the error
message string Error message
moreInfo string URL with more information about the error
status integer HTTP status code

UserConnectionResponse

{
  "accountName": "bob@a13a9998-e025-4751-8fee-72afdc0fe6d5@2cc88871-e942-4910-96e3-0521d7ae52f4"
}

Sucessful user account connection response. It provides the details about the connection (accountName): the associated app (application UUID) and user information (userId, companyId, and handle). Format: {user_handle}@{user_uuid}@{company_uuid} Note: Application UUID = Product UUID

None

UserCreationRequest

{
  "companyId": "4c00cad1-f741-0zf6-bb00-0000e73cec00",
  "createdByCompanyId": "386626c0-53e2-0000-0000-4a720bb5d000",
  "email": "user@appdirect.com",
  "externalId": "01",
  "firstName": "James",
  "lastName": "Smith"
}
Name Type Description
companyId string New user's company ID
createdByCompanyId string Reseller's company ID
email string New user's email (must be unique)
externalId string New user's external ID (must be unique)
firstName string New user's First Name
lastName string New user's Last Name

UserCreationResponse

{
  "activated": false,
  "companyId": "460fad0d-19e2-4eec-a756-59c15dc7a56a",
  "createdOn": 1461321550000,
  "email": "test4@yopmail.com",
  "firstName": "user4",
  "id": "6d375008-3b19-4cb8-bbb9-dcd9fce99432",
  "invitationRequired": false,
  "lastName": "user4",
  "memberships": [
    {
      "company": {
        "createdOn": 10242018,
        "externalId": "external11",
        "id": "460fad0d-19e2-4eec-a756-59c15dc7a56a",
        "name": "Company3",
        "phone": "50505054"
      },
      "enabled": true
    }
  ]
}
Name Type Description
activated boolean Indicates whether user is activated
companyId string Current company ID
createdOn number User creation date, in timestamp format
email string Email address
enabled boolean Indicates whether the user is enabled
firstName string First name
id string User ID
invitationRequired boolean Indicates whether the user requires an invitation
lastName string Last name
memberships array of AppResellerAccountUserCompanyMembership User company memberships

UserEntitlementStatus

Enumeration of

UserEntitlementStatusLegacy

Enumeration of

UserMatchResult

{
  "matches": "true"
}

Indicates whether the user matches a dynamic segment query

Name Type Description
matches boolean True if the user matches the dynamic segment query

UserPagedReadResponse

{
  "type": "object",
  "title": "UserPagedReadResponse",
  "properties": {
    "content": {
      "description": "List of users",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/UserCreationResponse"
      }
    },
    "page": {
      "$ref": "#/components/schemas/PageMetadata"
    }
  }
}
Name Type Description
content array of UserCreationResponse List of users
page PageMetadata

UserProductContext

{
  "assigned": true,
  "editionId": 12345,
  "freeTrialAllowed": true,
  "freeTrialDaysLeft": 12345,
  "maxUsers": 12345,
  "numAssignedUsers": 12345,
  "owner": {
    "href": "...",
    "id": "..."
  },
  "partOfExistingBundle": true,
  "paymentPlan": {
    "href": "...",
    "id": "..."
  },
  "pendingEventType": "...",
  "purchaseRestriction": [
    {
      "appId": 12345,
      "appName": "...",
      "browsedEditionId": 12345,
      "ownedEditionId": 12345,
      "ownedEditionName": "...",
      "requiredAppEdition": [
        {
          "appId": 12345,
          "appName": "...",
          "editionId": 12345,
          "editionName": "..."
        },
        {
          "appId": 12345,
          "appName": "...",
          "editionId": 12345,
          "editionName": "..."
        }
      ],
      "restrictionType": "...",
      "upcomingSubscription": true
    },
    {
      "appId": 12345,
      "appName": "...",
      "browsedEditionId": 12345,
      "ownedEditionId": 12345,
      "ownedEditionName": "...",
      "requiredAppEdition": [
        {
          "appId": 12345,
          "appName": "...",
          "editionId": 12345,
          "editionName": "..."
        },
        {
          "appId": 12345,
          "appName": "...",
          "editionId": 12345,
          "editionName": "..."
        }
      ],
      "restrictionType": "...",
      "upcomingSubscription": true
    }
  ],
  "status": "...",
  "subscription": {
    "href": "...",
    "id": "..."
  }
}
Name Type Description
assigned boolean True when the subscription has users assigned to it.
editionId number The pricing plan ID of the subscription.
freeTrialAllowed boolean True if a free trial is allowed for this edition or if the current subscription is in a free trial.
freeTrialDaysLeft number The number of days remaining in the free trial for the application.
Not present if there is no free trial for the edition, if the free trial is over, or if the free trial has been
activated to a paid subscription.
maxUsers number Maximum number of users that can be assigned to the application. Not present when unlimited.
numAssignedUsers number Number of users assigned to the subscription.
owner LinkWS Link to the subscription owner
partOfExistingBundle boolean True if this application was bought as part of a bundle.
paymentPlan LinkWS Link to the payment plan
pendingEventType string If the subscription is blocked due to communication with a third party, this field represents the latest event type that
was blocked. Can be one of:

SUBSCRIPTION_ORDER,
SUBSCRIPTION_CHANGE,
SUBSCRIPTION_CANCEL,
SUBSCRIPTION_NOTICE,
USER_ASSIGNMENT,
USER_UNASSIGNMENT,
USER_UPDATED,
ADDON_ORDER,
ADDON_CHANGE,
ADDON_CANCEL,
ADDON_BIND,
ADDON_UNBIND
purchaseRestriction array of PurchaseRestriction Products that the user cannot buy due to restrictions of a currently/previously owned product or because other products are required.
status string The subscription status for the product owned by the requested user. Can be one of:
INITIALIZED,
FAILED,
FREE_TRIAL,
FREE_TRIAL_EXPIRED,
ACTIVE,
SUSPENDED,
CANCELLED;
subscription LinkWS Link to the subscription

UserProfileAccountV2

{
  "birthday": "1999/9/9",
  "currentCity": "Current City",
  "customAttributes": [],
  "educations": [
    {
      "current": false,
      "degree": "bachelor's",
      "endYear": 2010,
      "field": "Computer Science",
      "school": "MIT",
      "startYear": 2007
    }
  ],
  "emailAddresses": [
    {
      "address": "alternate@company.com",
      "type": "WORK",
      "verified": false
    }
  ],
  "homePhone": "+1 123 123 1234",
  "hometown": "Home Town",
  "ims": [
    {
      "account": "someAccount",
      "type": "OTHER"
    },
    {
      "account": "someAccount",
      "type": "OTHER"
    },
    {
      "account": "someAccount",
      "type": "OTHER"
    }
  ],
  "links": [
    {
      "href": "http://appdirect/api/account/v2/users/48dc0e2b-995b-4013-bd3f-2946309ca0fd",
      "rel": "user"
    }
  ],
  "mobilePhone": "+1 123 ",
  "twitter": "twitter_account",
  "twoFactorAuthenticationMethod": "twoFactorAuthenticationIsGreat",
  "workExperiences": [
    {
      "current": true,
      "description": "Developer @ Appdirect",
      "employer": "Appdirect",
      "endYear": 2017,
      "position": "Manager",
      "startYear": 2011
    }
  ],
  "workPhone": "+1 123 123 1234"
}

Represents a User profile (User)

Name Type Description
birthday string Birthday date
currentCity string Current city
customAttributes array of CustomAttributeAccountV2 Custom attributes
educations array of EducationAccountV2 List of user's educational credentials
emailAddresses array of EmailAddressAccountV2 Email addresses
homePhone string Home phone number
hometown string Hometown
ims array of IM List of instant messaging accounts
links array of Link Resource links
mobilePhone string Mobile phone number
twitter string Twitter account
twoFactorAuthenticationMethod string Two factor authentication method
workExperiences array of WorkExperienceAccountV2 List of work experiences
workPhone string Work phone number

UserReadResponse

{
  "activated": false,
  "companyId": "460fad0d-19e2-4eec-a756-59c15dc7a56a",
  "createdOn": 1461321550000,
  "email": "test4@yopmail.com",
  "firstName": "user4",
  "id": "6d375008-3b19-4cb8-bbb9-dcd9fce99432",
  "invitationRequired": false,
  "lastName": "user4",
  "memberships": [
    {
      "company": {
        "createdOn": 10242018,
        "externalId": "external11",
        "id": "460fad0d-19e2-4eec-a756-59c15dc7a56a",
        "name": "Company3",
        "phone": "50505054"
      },
      "enabled": true
    }
  ]
}
Name Type Description
actions array of AppResellerUserActions Actions that the current user can perform
activated boolean Indicates whether user is activated
availableRoles array of AppResellerUserRoleWS User roles that can be assigned to the user
companyId string Current company ID
createdOn number User creation date, in timestamp format
customAttributes array of CustomAttributeLightV2 List of users
email string Email address
enabled boolean Indicates whether the user is enabled
firstName string First name
id string User ID
invitationRequired boolean Indicates whether the user requires an invitation
lastName string Last name
memberships array of AppResellerAccountUserCompanyMembership User company memberships
numActiveApps integer Number of active applications
partner string User partner
profilePic string User profile picture URL
settings array of AppResellerUserSetting List of user roles, indicating whether the current user can edit them
stats array of ApplicationSummaryStat User stats

UserRegistration

{
  "externalIdentifier": "123456456",
  "firstName": "John",
  "lastName": "Doe",
  "links": [],
  "locale": "en_US",
  "password": "Admin123",
  "title": "MS"
}

Resource links

Name Type Description
externalIdentifier string External identifier of user
firstName string First name of user
lastName string Last name of user
links array of Link Resource links
locale string Locale of user in the standard ISO 639-1 language code + ISO 3166-1 country code format. For example: 'en_US', 'fr_CA' etc
password string Password
title string Title of user

UserRoleAccountV2

{
  "name": "CHANNEL_ADMIN"
}

A marketplace role name. The response to Read assignable roles for company membership contains a list of these objects.

Name Type Description
name string Marketplace role that can be assigned to the user. One of the following: CHANNEL_ADMIN (Marketplace Manager), CHANNEL_PRODUCT_SUPPORT (Product Support), SALES_SUPPORT (Sales Support), RESELLER_MANAGER (Reseller Manager), RESELLER (Reseller), CHANNEL_SUPPORT (Customer Support), ROLE_SYS_ADMIN (Company Admin), BILLING_ADMIN (Billing Admin), DEVELOPER (Developer), USER (User).

UserSyncWS

{
  "accountIdentifier": "200ae1d9-c5b9-4c0b-843c-45d8e74d741a",
  "developerIdentifier": "f0b5c422-0400-459f-879c-ac369d924bb9",
  "email": "test_email@yopmail.com",
  "firstName": "Test_FirstName",
  "lastName": "Test_LastName",
  "operation": "ASSIGN",
  "type": "ASSIGNMENT",
  "userIdentifier": "45bbf36e-5902-4eb3-9072-87d267d302d4",
  "userName": "Test_UserName"
}
Name Type Description
accountIdentifier string Required. The Account Identifier provided when the subscription was created
developerIdentifier string Required. The company UUID of the Developer's company
email string
firstName string
lastName string
operation string Required. The operation. Options: 'ASSIGN' and 'UNASSIGN'
type string Required. It must have the value 'ASSIGNMENT'
userIdentifier string Required. The user identifier in the Developer's system
userName string

UserToConnect

{
  "companyId": "2cc88871-e942-4910-96e3-0521d7ae52f4",
  "handle": "bob",
  "userId": "a13a9998-e025-4751-8fee-72afdc0fe6d5"
}

Identify a user so they can be connected, with an app user account, to Search

Name Type Description
companyId string The user's company's UUID
handle string The user's handle in the application
userId string The user's UUID

UserToDisconnect

{
  "companyId": "2cc88871-e942-4910-96e3-0521d7ae52f4",
  "userId": "a13a9998-e025-4751-8fee-72afdc0fe6d5"
}

The user to be disconnected from Search

Name Type Description
companyId string The user's company's UUID
userId string The user's UUID

ValidationDetail

{
  "code": "REQUIRED_FIELD_VALIDATION_ERROR",
  "itemId": "eb690c8d-1c57-497c-82bf-a4194362d954",
  "message": "There are validation errors",
  "messageParameters": [
    {
      "key": "REQUIRED_FIELD_KEY",
      "value": "USERNAME"
    },
    {
      "key": "REQUIRED_FIELD_ERROR_MESSAGE",
      "value": "The username is not valid"
    }
  ]
}

Failed validation error codes and messages

Name Type Description
code string The error code, in screaming snake case. For example, PAYLOAD_VALIDATION_ERROR
itemId string Related Item ID, when the validation error is related to an item
message string Validation detail message
messageParameters array of ValidationDetailParameter Validation detail parameters

ValidationDetailParameter

{
  "key": "REQUIRED_FIELD_KEY",
  "value": "USERNAME"
}

Key value pairs for elements with failed validations and related error messages. For example, the name of a required field and the error message related to it

Name Type Description
key string Validation detail parameter key
value string Validation detail parameter value

VendorCompany

{
  "name": "Sample Vendor",
  "uuid": "3ea46469-36a7-4216-966b-5f0c61c72faa"
}
Name Type Description
name string The name of the vendor company
uuid string The unique identifier of the vendor company

Vendor

{
  "name": "Sample Vendor",
  "uuid": "3ea46469-36a7-4216-966b-5f0c61c72faa"
}
Name Type Description
name string
uuid string

VerifiedCompanyDomainAccountV2

{
  "content": [
    {
      "content": "demoempires.com",
      "links": []
    },
    {
      "content": "trialdomains.com",
      "links": []
    },
    {
      "content": "testSampleDomain.com",
      "links": []
    },
    {
      "content": "demospheres.com",
      "links": []
    },
    {
      "content": "additionaldomainstotest.com",
      "links": []
    },
    {
      "content": "demokingdoms.com",
      "links": []
    },
    {
      "content": "C4736378Domain.com",
      "links": []
    },
    {
      "content": "testkingdoms.com",
      "links": []
    },
    {
      "content": "c4736378testdomain.com",
      "links": []
    }
  ],
  "links": []
}

Structure representing VerifiedCompanyDomainAccountV2

Name Type Description
content array of ResourceString
links array of Link Resource links

Webhook

{
  "authenticationToken": "...",
  "createdOn": 12345,
  "lastModified": 12345,
  "oauth2Config": {
    "accessTokenUri": "...",
    "clientId": "...",
    "clientSecret": "...",
    "password": "...",
    "username": "..."
  },
  "partner": "...",
  "resourceActions": [
    "CHANGED",
    "CHANGED"
  ],
  "resourceType": "STAGING_PRODUCT",
  "scope": "COMPANY",
  "scopeId": "...",
  "url": "...",
  "uuid": "..."
}

Represents a Web hook object configuration to push event notifications to registered URLs when specific actions are done on a resource.

Authentication on the endpoint can be configured to: - None - Authentication token passed in the HTTP header - OAuth2

Name Type Description
authenticationToken string Authentication token to be passed in the HTTP header
createdOn number Creation date
lastModified number Last modified date
oauth2Config WebhookOAuth2Config OAuth2 config
partner string Channel of the webhook
resourceActions array of WebhookResourceAction Actions done on the resource that triggers the Webhook
resourceType WebhookResourceType The type of resource the Webhook is for
scope WebhookScope
scopeId string
url string Endpoint to call when an action is done on a resource
uuid string Unique identifier

WebhookOAuth2Config

{
  "accessTokenUri": "...",
  "clientId": "...",
  "clientSecret": "...",
  "password": "...",
  "username": "..."
}
Name Type Description
accessTokenUri string
clientId string
clientSecret string
password string
username string

WebhookResourceAction

Enumeration of

WebhookResourceType

Enumeration of

WebhookScope

Enumeration of

WorkExperienceAccountV2

{
  "current": true,
  "description": "Developer @ Appdirect",
  "employer": "Appdirect",
  "endYear": 2017,
  "position": "Manager",
  "startYear": 2011
}

Represents a work experience

Name Type Description
current boolean Currently working
description string Description
employer string Employer
endYear number Year ended
position string Position
startYear number Year started

WorkingEndpoint

{
  "disabled": true,
  "tooltip": "This endpoint was disabled by the developer.",
  "value": false
}

Information about the API endpoints availability.

Name Type Description
disabled boolean Indicates whether working endpoint flag is available for the application.
tooltip string Tool tip describing the API endpoint.
value boolean Indicates whether working endpoint is enabled for application.

XmlMappableMultiValueMap

{
  "entry": [
    {},
    {}
  ]
}
Name Type Description
entry array of object