NAV Navbar
Shell HTTP JavaScript Node.JS Python Ruby Java

AppMarket 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 AppMarket API Reference lists various APIs 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 2018-02-07 09:24:02 EST

Bundles

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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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. BundleListing

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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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.

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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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. UserAppInfo
404 Not Found Bundle application not found.

Companies

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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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

{
  "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/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
}

GET /account/v2/companies/{companyUuid}

Retrieve 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_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

Responses

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

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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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

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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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": {
        "defaultRole": "USER",
        "enabled": true,
        "links": [],
        "name": "Company 6702951797",
        "phoneNumber": "+1 123 123 1234",
        "picture": null,
        "uuid": "0fc286dc-40ae-4cd0-9f04-59687fdf39bf",
        "vendor": false
      },
      "currency": "USD",
      "domainEntitlementId": 51,
      "domainProvider": {
        "id": 131,
        "name": "MockApp6544683144966352395",
        "uuid": "fc876968-396a-40bc-824f-01b588d22ad2",
        "vendor": {
          "defaultRole": "USER",
          "enabled": true,
          "links": [],
          "name": null,
          "phoneNumber": null,
          "picture": null,
          "uuid": "cbfa2382-468b-41a6-936d-0fe965606833",
          "vendor": false
        }
      },
      "launchUrl": "http://appdirect/saml/domain/idp/init/51",
      "links": [],
      "name": "mydomain1.com",
      "owner": {
        "activated": true,
        "boostUser": null,
        "email": "lisa.lopez@company8722006945.com",
        "firstName": "Lisa",
        "lastName": "Lopez",
        "ldapId": null,
        "links": [],
        "metadata": {},
        "picture": null,
        "roles": [],
        "userId": 109,
        "userName": null,
        "uuid": "3308489f-3448-45c4-bab1-5dd4461ccadd"
      },
      "renewDate": 1480699590955,
      "source": "PURCHASED",
      "status": "ACTIVE",
      "uuid": "ec4783be-0325-49c7-b53d-8e4d9631104a"
    },
    {
      "company": {
        "defaultRole": "USER",
        "enabled": true,
        "links": [],
        "name": "Company 6702951797",
        "phoneNumber": "+1 123 123 1234",
        "picture": null,
        "uuid": "0fc286dc-40ae-4cd0-9f04-59687fdf39bf",
        "vendor": false
      },
      "currency": "USD",
      "domainEntitlementId": 51,
      "domainProvider": {
        "id": 131,
        "name": "MockApp6544683144966352395",
        "uuid": "fc876968-396a-40bc-824f-01b588d22ad2",
        "vendor": {
          "defaultRole": "USER",
          "enabled": true,
          "links": [],
          "name": null,
          "phoneNumber": null,
          "picture": null,
          "uuid": "cbfa2382-468b-41a6-936d-0fe965606833",
          "vendor": false
        }
      },
      "launchUrl": "http://appdirect/saml/domain/idp/init/51",
      "links": [],
      "name": "mydomain2.com",
      "owner": {
        "activated": true,
        "boostUser": null,
        "email": "lisa.lopez@company8722006945.com",
        "firstName": "Lisa",
        "lastName": "Lopez",
        "ldapId": null,
        "links": [],
        "metadata": {},
        "picture": null,
        "roles": [],
        "userId": 109,
        "userName": null,
        "uuid": "3308489f-3448-45c4-bab1-5dd4461ccadd"
      },
      "renewDate": 1480699590955,
      "source": "IMPORTED",
      "status": "ACTIVE",
      "uuid": "9e986b20-0c6f-4a65-9321-d31956aa3f40"
    }
  ],
  "links": []
}

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

Retrieve a marketplace company's domains.

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

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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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,
      "createdOn": 1480699596611,
      "email": "test2@email.com",
      "inviter": "barbara.lopez@company4805267304.com",
      "lastModified": 1480699596614,
      "role": "USER"
    },
    {
      "accepted": false,
      "createdOn": 1480699596599,
      "email": "test1@email.com",
      "inviter": "barbara.lopez@company4805267304.com",
      "lastModified": 1480699596605,
      "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.

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

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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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": {
        "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": null,
        "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": null
      },
      "mosiUser": {
        "username": null
      },
      "position": null,
      "roles": [
        "ROLE_BILLING_ADMIN",
        "ROLE_SYS_ADMIN"
      ],
      "user": {
        "activated": true,
        "boostUser": null,
        "email": "john.simpson@company5833088198.com",
        "firstName": "John",
        "lastName": "Simpson",
        "ldapId": null,
        "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": null
        },
        "picture": null,
        "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": null,
        "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,
        "boostUser": null,
        "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.

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request
active query boolean If specified, returns only memberships associated with users having the specified active status
enabled query boolean If specified, returns only memberships with the specified enabled status
page query integer 0 Zero-based page index
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 or company 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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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": {
    "defaultRole": "USER",
    "enabled": true,
    "links": [
      {
        "href": "http://appdirect/api/account/v2/companies/b572cec5-f8d0-494a-a6f5-779971966360",
        "rel": "self"
      },
      {
        "href": "http://appdirect/api/account/v2/companies/b572cec5-f8d0-494a-a6f5-779971966360/memberships",
        "rel": "memberships"
      }
    ],
    "name": "Company 2976535933",
    "phoneNumber": null,
    "picture": "http://localhost:8080/profilePics/http://cdn/company.png",
    "uuid": "b572cec5-f8d0-494a-a6f5-779971966360",
    "vendor": false
  },
  "enabled": true,
  "lastUsed": false,
  "links": [
    {
      "href": "http://appdirect/api/account/v2/companies/b572cec5-f8d0-494a-a6f5-779971966360/memberships/809dc549-5d38-40bd-b789-f887cfaf8c39",
      "rel": "self"
    },
    {
      "href": "http://appdirect/api/account/v2/users/809dc549-5d38-40bd-b789-f887cfaf8c39",
      "rel": "user"
    },
    {
      "href": "http://appdirect/api/account/v2/companies/b572cec5-f8d0-494a-a6f5-779971966360",
      "rel": "company"
    }
  ],
  "metadata": {
    "mosi_username": null
  },
  "mosiUser": null,
  "position": null,
  "roles": [
    "ROLE_BILLING_ADMIN",
    "ROLE_SYS_ADMIN"
  ],
  "user": {
    "activated": true,
    "boostUser": null,
    "email": "alex.simpson@company6777263589.com",
    "firstName": "Alex",
    "lastName": "Simpson",
    "ldapId": null,
    "links": [
      {
        "href": "http://appdirect/api/account/v2/users/809dc549-5d38-40bd-b789-f887cfaf8c39",
        "rel": "self"
      },
      {
        "href": "http://appdirect/api/account/v2/users/809dc549-5d38-40bd-b789-f887cfaf8c39/memberships",
        "rel": "memberships"
      }
    ],
    "metadata": {
      "apsUid": null
    },
    "picture": null,
    "roles": [
      "ROLE_USER"
    ],
    "userName": "alex.simpson",
    "uuid": "809dc549-5d38-40bd-b789-f887cfaf8c39"
  }
}

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

Retrieve a marketplace user's company membership information.

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 UserCompanyMembershipAccountV2
401 Unauthorized Unauthorized or company/user not found

List application assignments for user

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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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,
      "companyEntitlementStatus": "ACTIVE",
      "createdOn": 1480699562586,
      "gridImageUrl": null,
      "links": [
        {
          "href": "http://appdirect/api/marketplace/v1/products/47",
          "rel": "application"
        }
      ],
      "listImageUrl": null,
      "ownerFirstName": "Susan",
      "ownerId": 40,
      "ownerLastName": "Simpson",
      "ownerUuid": "4aad1f87-a653-4031-9b64-de42c7c5fa3f",
      "productName": "MockApp208301774438095187",
      "status": "ACTIVE",
      "uuid": "4d8ab391-33b9-472f-abce-6a6bd5e4c39b"
    }
  ],
  "links": []
}

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

Retrieve a marketplace user's application assignments.

Returns assignments that are not FAILED or CANCELLED.

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 UserAssignmentAccountV2
401 Unauthorized Unauthorized or 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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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.

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 or company/user not found

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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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.

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 Resources
401 Unauthorized Unauthorized
404 Not Found Company not found

Invite users to company

Example request


curl -X post \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-binary @- https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations <<EOF
[
  {
    "accepted": false,
    "email": "test1@email.com",
    "inviter": "0da75082-9aef-4d64-a41d-9fe4f46ec7e4",
    "role": "ROLE_DEVELOPER"
  },
  {
    "accepted": false,
    "email": "test2@email.com",
    "inviter": "0da75082-9aef-4d64-a41d-9fe4f46ec7e4",
    "role": "ROLE_USER"
  },
  {
    "accepted": false,
    "email": "test3@email.com",
    "inviter": "0da75082-9aef-4d64-a41d-9fe4f46ec7e4",
    "role": "ROLE_SYS_ADMIN"
  }
]
EOF

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

[
  {
    "accepted": false,
    "email": "test1@email.com",
    "inviter": "0da75082-9aef-4d64-a41d-9fe4f46ec7e4",
    "role": "ROLE_DEVELOPER"
  },
  {
    "accepted": false,
    "email": "test2@email.com",
    "inviter": "0da75082-9aef-4d64-a41d-9fe4f46ec7e4",
    "role": "ROLE_USER"
  },
  {
    "accepted": false,
    "email": "test3@email.com",
    "inviter": "0da75082-9aef-4d64-a41d-9fe4f46ec7e4",
    "role": "ROLE_SYS_ADMIN"
  }
]


var headers = {
  'Accept':'application/json',
  'Content-Type':'application/json'

};

$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations',
  method: 'post',
  dataType: 'json',
  data: [
  {
    "accepted": false,
    "email": "test1@email.com",
    "inviter": "0da75082-9aef-4d64-a41d-9fe4f46ec7e4",
    "role": "ROLE_DEVELOPER"
  },
  {
    "accepted": false,
    "email": "test2@email.com",
    "inviter": "0da75082-9aef-4d64-a41d-9fe4f46ec7e4",
    "role": "ROLE_USER"
  },
  {
    "accepted": false,
    "email": "test3@email.com",
    "inviter": "0da75082-9aef-4d64-a41d-9fe4f46ec7e4",
    "role": "ROLE_SYS_ADMIN"
  }
],

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})
const request = require('node-fetch');
const inputBody = '[
  {
    "accepted": false,
    "email": "test1@email.com",
    "inviter": "0da75082-9aef-4d64-a41d-9fe4f46ec7e4",
    "role": "ROLE_DEVELOPER"
  },
  {
    "accepted": false,
    "email": "test2@email.com",
    "inviter": "0da75082-9aef-4d64-a41d-9fe4f46ec7e4",
    "role": "ROLE_USER"
  },
  {
    "accepted": false,
    "email": "test3@email.com",
    "inviter": "0da75082-9aef-4d64-a41d-9fe4f46ec7e4",
    "role": "ROLE_SYS_ADMIN"
  }
]';
const headers = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

result = RestClient.post 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations',
payload=[
  {
    "accepted": false,
    "email": "test1@email.com",
    "inviter": "0da75082-9aef-4d64-a41d-9fe4f46ec7e4",
    "role": "ROLE_DEVELOPER"
  },
  {
    "accepted": false,
    "email": "test2@email.com",
    "inviter": "0da75082-9aef-4d64-a41d-9fe4f46ec7e4",
    "role": "ROLE_USER"
  },
  {
    "accepted": false,
    "email": "test3@email.com",
    "inviter": "0da75082-9aef-4d64-a41d-9fe4f46ec7e4",
    "role": "ROLE_SYS_ADMIN"
  }
]
params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations',
json=[
  {
    "accepted": false,
    "email": "test1@email.com",
    "inviter": "0da75082-9aef-4d64-a41d-9fe4f46ec7e4",
    "role": "ROLE_DEVELOPER"
  },
  {
    "accepted": false,
    "email": "test2@email.com",
    "inviter": "0da75082-9aef-4d64-a41d-9fe4f46ec7e4",
    "role": "ROLE_USER"
  },
  {
    "accepted": false,
    "email": "test3@email.com",
    "inviter": "0da75082-9aef-4d64-a41d-9fe4f46ec7e4",
    "role": "ROLE_SYS_ADMIN"
  }
]
params={
},
headers = headers)

print r.json()
URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
String inputBody = "[" +
  "{" +
    "\"accepted\": false," +
    "\"email\": \"test1@email.com\"," +
    "\"inviter\": \"0da75082-9aef-4d64-a41d-9fe4f46ec7e4\"," +
    "\"role\": \"ROLE_DEVELOPER\"" +
  "}," +
  "{" +
    "\"accepted\": false," +
    "\"email\": \"test2@email.com\"," +
    "\"inviter\": \"0da75082-9aef-4d64-a41d-9fe4f46ec7e4\"," +
    "\"role\": \"ROLE_USER\"" +
  "}," +
  "{" +
    "\"accepted\": false," +
    "\"email\": \"test3@email.com\"," +
    "\"inviter\": \"0da75082-9aef-4d64-a41d-9fe4f46ec7e4\"," +
    "\"role\": \"ROLE_SYS_ADMIN\"" +
  "}" +
"]";

OutputStream os = conn.getOutputStream();
os.write(inputBody.getBytes("UTF-8"));
os.close();

int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new 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

Invite multiple users to a marketplace company using list of Invitation resources

Parameters

Parameter Type Data Type Default Description
*companyUuid path string Unique identifier of company in the API request
api.usesExternalIds query boolean false If "true", specified companyUuid is used as company external Id.
inviterUuid query string Unique identifier of inviter (marketplace user) in the API request

Body Parameters

List of invitation resources.

Array of InvitationAccountV2:

Property Type Description
accepted boolean Accepted invitation
createdOn number Date created
email string Email the invitation was submitted to
externalIdentifier string
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'

Responses

Status Meaning Description Definition
200 OK Success BulkInviteResponse
401 Unauthorized Unauthorized
404 Not Found Company or inviter not found

Create company membership

Example request


curl -X post \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-binary @- https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships <<EOF
{
  "company": {
    "defaultRole": "DEVELOPER",
    "enabled": true,
    "links": [],
    "name": "Company 1985511337",
    "phoneNumber": "+1 123 123 1234",
    "picture": "http://cdn/company_logo.png",
    "uuid": "90c7091e-9bf8-4887-b4e4-d416e1e2df71",
    "vendor": false
  },
  "enabled": true,
  "lastUsed": false,
  "links": [],
  "metadata": {},
  "mosiUser": {
    "username": null
  },
  "position": "Manager",
  "roles": [],
  "user": {
    "activated": true,
    "boostUser": {
      "apsUid": null
    },
    "email": "mary.gonsalez@company3157614232.com",
    "firstName": "Mary",
    "lastName": "Gonsalez",
    "ldapId": "mary.gonsalez",
    "links": [],
    "metadata": {
      "mosiUsername": "mary.gonsalezMosi"
    },
    "picture": "http://cdn/my_picture.png",
    "roles": [
      "DEVELOPER"
    ],
    "userId": 81,
    "userName": "mary.gonsalez",
    "uuid": "f0cc2a85-49c4-4f8a-8320-61cbdcadc3d3"
  }
}
EOF

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

{
  "company": {
    "defaultRole": "DEVELOPER",
    "enabled": true,
    "links": [],
    "name": "Company 1985511337",
    "phoneNumber": "+1 123 123 1234",
    "picture": "http://cdn/company_logo.png",
    "uuid": "90c7091e-9bf8-4887-b4e4-d416e1e2df71",
    "vendor": false
  },
  "enabled": true,
  "lastUsed": false,
  "links": [],
  "metadata": {},
  "mosiUser": {
    "username": null
  },
  "position": "Manager",
  "roles": [],
  "user": {
    "activated": true,
    "boostUser": {
      "apsUid": null
    },
    "email": "mary.gonsalez@company3157614232.com",
    "firstName": "Mary",
    "lastName": "Gonsalez",
    "ldapId": "mary.gonsalez",
    "links": [],
    "metadata": {
      "mosiUsername": "mary.gonsalezMosi"
    },
    "picture": "http://cdn/my_picture.png",
    "roles": [
      "DEVELOPER"
    ],
    "userId": 81,
    "userName": "mary.gonsalez",
    "uuid": "f0cc2a85-49c4-4f8a-8320-61cbdcadc3d3"
  }
}


var headers = {
  'Accept':'application/json',
  'Content-Type':'application/json'

};

$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships',
  method: 'post',
  dataType: 'json',
  data: {
  "company": {
    "defaultRole": "DEVELOPER",
    "enabled": true,
    "links": [],
    "name": "Company 1985511337",
    "phoneNumber": "+1 123 123 1234",
    "picture": "http://cdn/company_logo.png",
    "uuid": "90c7091e-9bf8-4887-b4e4-d416e1e2df71",
    "vendor": false
  },
  "enabled": true,
  "lastUsed": false,
  "links": [],
  "metadata": {},
  "mosiUser": {
    "username": null
  },
  "position": "Manager",
  "roles": [],
  "user": {
    "activated": true,
    "boostUser": {
      "apsUid": null
    },
    "email": "mary.gonsalez@company3157614232.com",
    "firstName": "Mary",
    "lastName": "Gonsalez",
    "ldapId": "mary.gonsalez",
    "links": [],
    "metadata": {
      "mosiUsername": "mary.gonsalezMosi"
    },
    "picture": "http://cdn/my_picture.png",
    "roles": [
      "DEVELOPER"
    ],
    "userId": 81,
    "userName": "mary.gonsalez",
    "uuid": "f0cc2a85-49c4-4f8a-8320-61cbdcadc3d3"
  }
},

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})
const request = require('node-fetch');
const inputBody = '{
  "company": {
    "defaultRole": "DEVELOPER",
    "enabled": true,
    "links": [],
    "name": "Company 1985511337",
    "phoneNumber": "+1 123 123 1234",
    "picture": "http://cdn/company_logo.png",
    "uuid": "90c7091e-9bf8-4887-b4e4-d416e1e2df71",
    "vendor": false
  },
  "enabled": true,
  "lastUsed": false,
  "links": [],
  "metadata": {},
  "mosiUser": {
    "username": null
  },
  "position": "Manager",
  "roles": [],
  "user": {
    "activated": true,
    "boostUser": {
      "apsUid": null
    },
    "email": "mary.gonsalez@company3157614232.com",
    "firstName": "Mary",
    "lastName": "Gonsalez",
    "ldapId": "mary.gonsalez",
    "links": [],
    "metadata": {
      "mosiUsername": "mary.gonsalezMosi"
    },
    "picture": "http://cdn/my_picture.png",
    "roles": [
      "DEVELOPER"
    ],
    "userId": 81,
    "userName": "mary.gonsalez",
    "uuid": "f0cc2a85-49c4-4f8a-8320-61cbdcadc3d3"
  }
}';
const headers = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

result = RestClient.post 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships',
payload={
  "company": {
    "defaultRole": "DEVELOPER",
    "enabled": true,
    "links": [],
    "name": "Company 1985511337",
    "phoneNumber": "+1 123 123 1234",
    "picture": "http://cdn/company_logo.png",
    "uuid": "90c7091e-9bf8-4887-b4e4-d416e1e2df71",
    "vendor": false
  },
  "enabled": true,
  "lastUsed": false,
  "links": [],
  "metadata": {},
  "mosiUser": {
    "username": null
  },
  "position": "Manager",
  "roles": [],
  "user": {
    "activated": true,
    "boostUser": {
      "apsUid": null
    },
    "email": "mary.gonsalez@company3157614232.com",
    "firstName": "Mary",
    "lastName": "Gonsalez",
    "ldapId": "mary.gonsalez",
    "links": [],
    "metadata": {
      "mosiUsername": "mary.gonsalezMosi"
    },
    "picture": "http://cdn/my_picture.png",
    "roles": [
      "DEVELOPER"
    ],
    "userId": 81,
    "userName": "mary.gonsalez",
    "uuid": "f0cc2a85-49c4-4f8a-8320-61cbdcadc3d3"
  }
}
params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships',
json={
  "company": {
    "defaultRole": "DEVELOPER",
    "enabled": true,
    "links": [],
    "name": "Company 1985511337",
    "phoneNumber": "+1 123 123 1234",
    "picture": "http://cdn/company_logo.png",
    "uuid": "90c7091e-9bf8-4887-b4e4-d416e1e2df71",
    "vendor": false
  },
  "enabled": true,
  "lastUsed": false,
  "links": [],
  "metadata": {},
  "mosiUser": {
    "username": null
  },
  "position": "Manager",
  "roles": [],
  "user": {
    "activated": true,
    "boostUser": {
      "apsUid": null
    },
    "email": "mary.gonsalez@company3157614232.com",
    "firstName": "Mary",
    "lastName": "Gonsalez",
    "ldapId": "mary.gonsalez",
    "links": [],
    "metadata": {
      "mosiUsername": "mary.gonsalezMosi"
    },
    "picture": "http://cdn/my_picture.png",
    "roles": [
      "DEVELOPER"
    ],
    "userId": 81,
    "userName": "mary.gonsalez",
    "uuid": "f0cc2a85-49c4-4f8a-8320-61cbdcadc3d3"
  }
}
params={
},
headers = headers)

print r.json()
URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
String inputBody = "{" +
  "\"company\": {" +
    "\"defaultRole\": \"DEVELOPER\"," +
    "\"enabled\": true," +
    "\"links\": []," +
    "\"name\": \"Company 1985511337\"," +
    "\"phoneNumber\": \"+1 123 123 1234\"," +
    "\"picture\": \"http://cdn/company_logo.png\"," +
    "\"uuid\": \"90c7091e-9bf8-4887-b4e4-d416e1e2df71\"," +
    "\"vendor\": false" +
  "}," +
  "\"enabled\": true," +
  "\"lastUsed\": false," +
  "\"links\": []," +
  "\"metadata\": {}," +
  "\"mosiUser\": {" +
    "\"username\": null" +
  "}," +
  "\"position\": \"Manager\"," +
  "\"roles\": []," +
  "\"user\": {" +
    "\"activated\": true," +
    "\"boostUser\": {" +
      "\"apsUid\": null" +
    "}," +
    "\"email\": \"mary.gonsalez@company3157614232.com\"," +
    "\"firstName\": \"Mary\"," +
    "\"lastName\": \"Gonsalez\"," +
    "\"ldapId\": \"mary.gonsalez\"," +
    "\"links\": []," +
    "\"metadata\": {" +
      "\"mosiUsername\": \"mary.gonsalezMosi\"" +
    "}," +
    "\"picture\": \"http://cdn/my_picture.png\"," +
    "\"roles\": [" +
      "\"DEVELOPER\"" +
    "]," +
    "\"userId\": 81," +
    "\"userName\": \"mary.gonsalez\"," +
    "\"uuid\": \"f0cc2a85-49c4-4f8a-8320-61cbdcadc3d3\"" +
  "}" +
"}";

OutputStream os = conn.getOutputStream();
os.write(inputBody.getBytes("UTF-8"));
os.close();

int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new 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

Add a user as a member of a marketplace company.

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

If no user exists with the given email address (and also depending on channel configuration), a user may be created.

This causes an invitation to be sent to the user.

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 PARTNER authority/scope is used to make the API request.

Body Parameters

User company membership data

UserCompanyMembershipAccountV2 object:

Property 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 object 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

Responses

Status Meaning Description Definition
201 Created Success UserCompanyMembershipAccountV2
401 Unauthorized Unauthorized or company not found

Create a company user

Example request


curl -X post \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-binary @- https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/active <<EOF
{
  "links": [],
  "recipientEmails": [
    "guy.smith@company9411805586.com"
  ],
  "temporaryPassword": "temporaryPassword",
  "user": {
    "activated": true,
    "boostUser": {
      "apsUid": "ba24bc3f-6ada-44c7-8bd8-a217cbe4a323"
    },
    "email": "guy.smith@company9411805586.com",
    "firstName": "Guy",
    "lastName": "Smith",
    "ldapId": "guy.smith",
    "links": [],
    "metadata": {
      "mosiUsername": "guy.smithMosi"
    },
    "picture": "http://cdn/my_picture.png",
    "roles": [
      "ROLE_DEVELOPER"
    ],
    "userName": "guy.smith",
    "uuid": null
  }
}
EOF

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

{
  "links": [],
  "recipientEmails": [
    "guy.smith@company9411805586.com"
  ],
  "temporaryPassword": "temporaryPassword",
  "user": {
    "activated": true,
    "boostUser": {
      "apsUid": "ba24bc3f-6ada-44c7-8bd8-a217cbe4a323"
    },
    "email": "guy.smith@company9411805586.com",
    "firstName": "Guy",
    "lastName": "Smith",
    "ldapId": "guy.smith",
    "links": [],
    "metadata": {
      "mosiUsername": "guy.smithMosi"
    },
    "picture": "http://cdn/my_picture.png",
    "roles": [
      "ROLE_DEVELOPER"
    ],
    "userName": "guy.smith",
    "uuid": null
  }
}


var headers = {
  'Accept':'application/json',
  'Content-Type':'application/json'

};

$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/active',
  method: 'post',
  dataType: 'json',
  data: {
  "links": [],
  "recipientEmails": [
    "guy.smith@company9411805586.com"
  ],
  "temporaryPassword": "temporaryPassword",
  "user": {
    "activated": true,
    "boostUser": {
      "apsUid": "ba24bc3f-6ada-44c7-8bd8-a217cbe4a323"
    },
    "email": "guy.smith@company9411805586.com",
    "firstName": "Guy",
    "lastName": "Smith",
    "ldapId": "guy.smith",
    "links": [],
    "metadata": {
      "mosiUsername": "guy.smithMosi"
    },
    "picture": "http://cdn/my_picture.png",
    "roles": [
      "ROLE_DEVELOPER"
    ],
    "userName": "guy.smith",
    "uuid": null
  }
},

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})
const request = require('node-fetch');
const inputBody = '{
  "links": [],
  "recipientEmails": [
    "guy.smith@company9411805586.com"
  ],
  "temporaryPassword": "temporaryPassword",
  "user": {
    "activated": true,
    "boostUser": {
      "apsUid": "ba24bc3f-6ada-44c7-8bd8-a217cbe4a323"
    },
    "email": "guy.smith@company9411805586.com",
    "firstName": "Guy",
    "lastName": "Smith",
    "ldapId": "guy.smith",
    "links": [],
    "metadata": {
      "mosiUsername": "guy.smithMosi"
    },
    "picture": "http://cdn/my_picture.png",
    "roles": [
      "ROLE_DEVELOPER"
    ],
    "userName": "guy.smith",
    "uuid": null
  }
}';
const headers = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

result = RestClient.post 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/active',
payload={
  "links": [],
  "recipientEmails": [
    "guy.smith@company9411805586.com"
  ],
  "temporaryPassword": "temporaryPassword",
  "user": {
    "activated": true,
    "boostUser": {
      "apsUid": "ba24bc3f-6ada-44c7-8bd8-a217cbe4a323"
    },
    "email": "guy.smith@company9411805586.com",
    "firstName": "Guy",
    "lastName": "Smith",
    "ldapId": "guy.smith",
    "links": [],
    "metadata": {
      "mosiUsername": "guy.smithMosi"
    },
    "picture": "http://cdn/my_picture.png",
    "roles": [
      "ROLE_DEVELOPER"
    ],
    "userName": "guy.smith",
    "uuid": null
  }
}
params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/active',
json={
  "links": [],
  "recipientEmails": [
    "guy.smith@company9411805586.com"
  ],
  "temporaryPassword": "temporaryPassword",
  "user": {
    "activated": true,
    "boostUser": {
      "apsUid": "ba24bc3f-6ada-44c7-8bd8-a217cbe4a323"
    },
    "email": "guy.smith@company9411805586.com",
    "firstName": "Guy",
    "lastName": "Smith",
    "ldapId": "guy.smith",
    "links": [],
    "metadata": {
      "mosiUsername": "guy.smithMosi"
    },
    "picture": "http://cdn/my_picture.png",
    "roles": [
      "ROLE_DEVELOPER"
    ],
    "userName": "guy.smith",
    "uuid": null
  }
}
params={
},
headers = headers)

print r.json()
URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/active");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
String inputBody = "{" +
  "\"links\": []," +
  "\"recipientEmails\": [" +
    "\"guy.smith@company9411805586.com\"" +
  "]," +
  "\"temporaryPassword\": \"temporaryPassword\"," +
  "\"user\": {" +
    "\"activated\": true," +
    "\"boostUser\": {" +
      "\"apsUid\": \"ba24bc3f-6ada-44c7-8bd8-a217cbe4a323\"" +
    "}," +
    "\"email\": \"guy.smith@company9411805586.com\"," +
    "\"firstName\": \"Guy\"," +
    "\"lastName\": \"Smith\"," +
    "\"ldapId\": \"guy.smith\"," +
    "\"links\": []," +
    "\"metadata\": {" +
      "\"mosiUsername\": \"guy.smithMosi\"" +
    "}," +
    "\"picture\": \"http://cdn/my_picture.png\"," +
    "\"roles\": [" +
      "\"ROLE_DEVELOPER\"" +
    "]," +
    "\"userName\": \"guy.smith\"," +
    "\"uuid\": null" +
  "}" +
"}";

OutputStream os = conn.getOutputStream();
os.write(inputBody.getBytes("UTF-8"));
os.close();

int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new 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/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": null,
    "picture": "http://localhost:8080/profilePics/http://cdn/company.png",
    "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,
    "boostUser": null,
    "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 to 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.

Parameters

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

Body Parameters

User creation data

UserCreationAccountV2 object:

Property Type Description
links array of Link
recipientEmails array of string List of emails where the user invitation is sent
temporaryPassword string Initial temporary password
user UserAccountV2 User data

Responses

Status Meaning Description Definition
200 OK Success UserCompanyMembershipAccountV2
401 Unauthorized Unauthorized
404 Not Found Company 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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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).

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 or company/user/application not found
404 Not Found Application not found
409 Conflict Already purchased

Update company membership

Example request


curl -X put \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-binary @- https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid} <<EOF
{
  "company": {
    "defaultRole": "DEVELOPER",
    "enabled": true,
    "links": [],
    "name": "Company 6626140542",
    "phoneNumber": "+1 123 123 1234",
    "picture": "http://cdn/company_logo.png",
    "uuid": "a96fea76-7a91-4e0a-9402-081649291767",
    "vendor": false
  },
  "enabled": true,
  "lastUsed": false,
  "links": [],
  "metadata": {},
  "mosiUser": {
    "username": null
  },
  "position": "Manager",
  "roles": [],
  "user": {
    "activated": true,
    "boostUser": {
      "apsUid": null
    },
    "email": "john.lopez@company6454233099.com",
    "firstName": "John",
    "lastName": "Lopez",
    "ldapId": "john.lopez",
    "links": [],
    "metadata": {
      "mosiUsername": "john.lopezMosi"
    },
    "picture": "http://cdn/my_picture.png",
    "roles": [
      "DEVELOPER"
    ],
    "userId": 94,
    "userName": "john.lopez",
    "uuid": "b1ea13d3-9b13-443e-9d7d-276cfca9276b"
  }
}
EOF

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

{
  "company": {
    "defaultRole": "DEVELOPER",
    "enabled": true,
    "links": [],
    "name": "Company 6626140542",
    "phoneNumber": "+1 123 123 1234",
    "picture": "http://cdn/company_logo.png",
    "uuid": "a96fea76-7a91-4e0a-9402-081649291767",
    "vendor": false
  },
  "enabled": true,
  "lastUsed": false,
  "links": [],
  "metadata": {},
  "mosiUser": {
    "username": null
  },
  "position": "Manager",
  "roles": [],
  "user": {
    "activated": true,
    "boostUser": {
      "apsUid": null
    },
    "email": "john.lopez@company6454233099.com",
    "firstName": "John",
    "lastName": "Lopez",
    "ldapId": "john.lopez",
    "links": [],
    "metadata": {
      "mosiUsername": "john.lopezMosi"
    },
    "picture": "http://cdn/my_picture.png",
    "roles": [
      "DEVELOPER"
    ],
    "userId": 94,
    "userName": "john.lopez",
    "uuid": "b1ea13d3-9b13-443e-9d7d-276cfca9276b"
  }
}


var headers = {
  'Accept':'application/json',
  'Content-Type':'application/json'

};

$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}',
  method: 'put',
  dataType: 'json',
  data: {
  "company": {
    "defaultRole": "DEVELOPER",
    "enabled": true,
    "links": [],
    "name": "Company 6626140542",
    "phoneNumber": "+1 123 123 1234",
    "picture": "http://cdn/company_logo.png",
    "uuid": "a96fea76-7a91-4e0a-9402-081649291767",
    "vendor": false
  },
  "enabled": true,
  "lastUsed": false,
  "links": [],
  "metadata": {},
  "mosiUser": {
    "username": null
  },
  "position": "Manager",
  "roles": [],
  "user": {
    "activated": true,
    "boostUser": {
      "apsUid": null
    },
    "email": "john.lopez@company6454233099.com",
    "firstName": "John",
    "lastName": "Lopez",
    "ldapId": "john.lopez",
    "links": [],
    "metadata": {
      "mosiUsername": "john.lopezMosi"
    },
    "picture": "http://cdn/my_picture.png",
    "roles": [
      "DEVELOPER"
    ],
    "userId": 94,
    "userName": "john.lopez",
    "uuid": "b1ea13d3-9b13-443e-9d7d-276cfca9276b"
  }
},

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})
const request = require('node-fetch');
const inputBody = '{
  "company": {
    "defaultRole": "DEVELOPER",
    "enabled": true,
    "links": [],
    "name": "Company 6626140542",
    "phoneNumber": "+1 123 123 1234",
    "picture": "http://cdn/company_logo.png",
    "uuid": "a96fea76-7a91-4e0a-9402-081649291767",
    "vendor": false
  },
  "enabled": true,
  "lastUsed": false,
  "links": [],
  "metadata": {},
  "mosiUser": {
    "username": null
  },
  "position": "Manager",
  "roles": [],
  "user": {
    "activated": true,
    "boostUser": {
      "apsUid": null
    },
    "email": "john.lopez@company6454233099.com",
    "firstName": "John",
    "lastName": "Lopez",
    "ldapId": "john.lopez",
    "links": [],
    "metadata": {
      "mosiUsername": "john.lopezMosi"
    },
    "picture": "http://cdn/my_picture.png",
    "roles": [
      "DEVELOPER"
    ],
    "userId": 94,
    "userName": "john.lopez",
    "uuid": "b1ea13d3-9b13-443e-9d7d-276cfca9276b"
  }
}';
const headers = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

result = RestClient.put 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}',
payload={
  "company": {
    "defaultRole": "DEVELOPER",
    "enabled": true,
    "links": [],
    "name": "Company 6626140542",
    "phoneNumber": "+1 123 123 1234",
    "picture": "http://cdn/company_logo.png",
    "uuid": "a96fea76-7a91-4e0a-9402-081649291767",
    "vendor": false
  },
  "enabled": true,
  "lastUsed": false,
  "links": [],
  "metadata": {},
  "mosiUser": {
    "username": null
  },
  "position": "Manager",
  "roles": [],
  "user": {
    "activated": true,
    "boostUser": {
      "apsUid": null
    },
    "email": "john.lopez@company6454233099.com",
    "firstName": "John",
    "lastName": "Lopez",
    "ldapId": "john.lopez",
    "links": [],
    "metadata": {
      "mosiUsername": "john.lopezMosi"
    },
    "picture": "http://cdn/my_picture.png",
    "roles": [
      "DEVELOPER"
    ],
    "userId": 94,
    "userName": "john.lopez",
    "uuid": "b1ea13d3-9b13-443e-9d7d-276cfca9276b"
  }
}
params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}',
json={
  "company": {
    "defaultRole": "DEVELOPER",
    "enabled": true,
    "links": [],
    "name": "Company 6626140542",
    "phoneNumber": "+1 123 123 1234",
    "picture": "http://cdn/company_logo.png",
    "uuid": "a96fea76-7a91-4e0a-9402-081649291767",
    "vendor": false
  },
  "enabled": true,
  "lastUsed": false,
  "links": [],
  "metadata": {},
  "mosiUser": {
    "username": null
  },
  "position": "Manager",
  "roles": [],
  "user": {
    "activated": true,
    "boostUser": {
      "apsUid": null
    },
    "email": "john.lopez@company6454233099.com",
    "firstName": "John",
    "lastName": "Lopez",
    "ldapId": "john.lopez",
    "links": [],
    "metadata": {
      "mosiUsername": "john.lopezMosi"
    },
    "picture": "http://cdn/my_picture.png",
    "roles": [
      "DEVELOPER"
    ],
    "userId": 94,
    "userName": "john.lopez",
    "uuid": "b1ea13d3-9b13-443e-9d7d-276cfca9276b"
  }
}
params={
},
headers = headers)

print r.json()
URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
String inputBody = "{" +
  "\"company\": {" +
    "\"defaultRole\": \"DEVELOPER\"," +
    "\"enabled\": true," +
    "\"links\": []," +
    "\"name\": \"Company 6626140542\"," +
    "\"phoneNumber\": \"+1 123 123 1234\"," +
    "\"picture\": \"http://cdn/company_logo.png\"," +
    "\"uuid\": \"a96fea76-7a91-4e0a-9402-081649291767\"," +
    "\"vendor\": false" +
  "}," +
  "\"enabled\": true," +
  "\"lastUsed\": false," +
  "\"links\": []," +
  "\"metadata\": {}," +
  "\"mosiUser\": {" +
    "\"username\": null" +
  "}," +
  "\"position\": \"Manager\"," +
  "\"roles\": []," +
  "\"user\": {" +
    "\"activated\": true," +
    "\"boostUser\": {" +
      "\"apsUid\": null" +
    "}," +
    "\"email\": \"john.lopez@company6454233099.com\"," +
    "\"firstName\": \"John\"," +
    "\"lastName\": \"Lopez\"," +
    "\"ldapId\": \"john.lopez\"," +
    "\"links\": []," +
    "\"metadata\": {" +
      "\"mosiUsername\": \"john.lopezMosi\"" +
    "}," +
    "\"picture\": \"http://cdn/my_picture.png\"," +
    "\"roles\": [" +
      "\"DEVELOPER\"" +
    "]," +
    "\"userId\": 94," +
    "\"userName\": \"john.lopez\"," +
    "\"uuid\": \"b1ea13d3-9b13-443e-9d7d-276cfca9276b\"" +
  "}" +
"}";

OutputStream os = conn.getOutputStream();
os.write(inputBody.getBytes("UTF-8"));
os.close();

int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new 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/a96fea76-7a91-4e0a-9402-081649291767",
        "rel": "self"
      },
      {
        "href": "http://appdirect/api/account/v2/companies/a96fea76-7a91-4e0a-9402-081649291767/memberships",
        "rel": "memberships"
      }
    ],
    "name": "Company 6626140542",
    "phoneNumber": null,
    "picture": "http://localhost:8080/profilePics/http://cdn/company.png",
    "uuid": "a96fea76-7a91-4e0a-9402-081649291767",
    "vendor": false
  },
  "enabled": true,
  "lastUsed": false,
  "links": [
    {
      "href": "http://appdirect/api/account/v2/companies/a96fea76-7a91-4e0a-9402-081649291767/memberships/b1ea13d3-9b13-443e-9d7d-276cfca9276b",
      "rel": "self"
    },
    {
      "href": "http://appdirect/api/account/v2/users/b1ea13d3-9b13-443e-9d7d-276cfca9276b",
      "rel": "user"
    },
    {
      "href": "http://appdirect/api/account/v2/companies/a96fea76-7a91-4e0a-9402-081649291767",
      "rel": "company"
    }
  ],
  "metadata": {
    "mosi_username": null
  },
  "mosiUser": null,
  "position": null,
  "roles": [],
  "user": {
    "activated": true,
    "boostUser": null,
    "email": "john.lopez@company6454233099.com",
    "firstName": "John",
    "lastName": "Lopez",
    "ldapId": null,
    "links": [
      {
        "href": "http://appdirect/api/account/v2/users/b1ea13d3-9b13-443e-9d7d-276cfca9276b",
        "rel": "self"
      },
      {
        "href": "http://appdirect/api/account/v2/users/b1ea13d3-9b13-443e-9d7d-276cfca9276b/memberships",
        "rel": "memberships"
      }
    ],
    "metadata": {
      "apsUid": null
    },
    "picture": null,
    "roles": [
      "ROLE_USER"
    ],
    "userName": "john.lopez",
    "uuid": "b1ea13d3-9b13-443e-9d7d-276cfca9276b"
  }
}

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: Billing Admin, Sys Admin (i.e. Company Admin), Developer. This also enables/disables the membership based on provided user company membership data.

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

UserCompanyMembershipAccountV2 object:

Property 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 object 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

Responses

Status Meaning Description Definition
200 OK Success UserCompanyMembershipAccountV2
401 Unauthorized Unauthorized or company/user not found

Enable/Disable company membership

Example request


curl -X patch \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-binary @- https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid} <<EOF
{
  "enabled": true
}
EOF

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

{
  "enabled": true
}


var headers = {
  'Accept':'application/json',
  'Content-Type':'application/json'

};

$.ajax({
  url: 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}',
  method: 'patch',
  dataType: 'json',
  data: {
  "enabled": true
},

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})
const request = require('node-fetch');
const inputBody = '{
  "enabled": true
}';
const headers = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

r = requests.patch('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}',
json={
  "enabled": true
}
params={
},
headers = headers)

print r.json()
URL obj = new URL("https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/memberships/{userUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
String inputBody = "{" +
  "\"enabled\": true" +
"}";

OutputStream os = conn.getOutputStream();
os.write(inputBody.getBytes("UTF-8"));
os.close();

int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new 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/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": null,
    "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,
    "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.

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

UserCompanyMembershipAccountV2 object:

Property 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 object 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

Responses

Status Meaning Description Definition
200 OK Success UserCompanyMembershipAccountV2
401 Unauthorized Unauthorized or company/user 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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

result = RestClient.delete 'https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations/{email}',

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/account/v2/companies/{companyUuid}/invitations/{email}',

params={
},
headers = headers)

print r.json()
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.

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

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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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.

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 or company/user not found

Configuring Webhooks

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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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\u0026size=10\u0026sortField=DATE\u0026sortOrder=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\u0026size=10\u0026sortField=DATE\u0026sortOrder=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

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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

result = RestClient.get 'https://{marketplaceURL}/api/channel/v1/webhooks/{webhookUuid}',

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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

Create a webhook

This call creates a new webhook on your marketplace.

Example request


curl -X post \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-binary @- https://{marketplaceURL}/api/channel/v1/webhooks <<EOF
{
  "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"
}
EOF

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

{
  "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"
}


var headers = {
  'Accept':'application/json',
  'Content-Type':'application/json'

};

$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/webhooks',
  method: 'post',
  dataType: 'json',
  data: {
  "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"
},

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})
const request = require('node-fetch');
const inputBody = '{
  "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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

result = RestClient.post 'https://{marketplaceURL}/api/channel/v1/webhooks',
payload={
  "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"
}
params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/channel/v1/webhooks',
json={
  "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"
}
params={
},
headers = headers)

print r.json()
URL obj = new URL("https://{marketplaceURL}/api/channel/v1/webhooks");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
String inputBody = "{" +
  "\"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\"" +
"}";

OutputStream os = conn.getOutputStream();
os.write(inputBody.getBytes("UTF-8"));
os.close();

int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new 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": 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.

Update a webhook

This call updates a webhook on your marketplace.

Example request


curl -X put \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-binary @- https://{marketplaceURL}/api/channel/v1/webhooks/{webhookUuid} <<EOF
{
  "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"
}
EOF

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

{
  "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"
}


var headers = {
  'Accept':'application/json',
  'Content-Type':'application/json'

};

$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/webhooks/{webhookUuid}',
  method: 'put',
  dataType: 'json',
  data: {
  "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"
},

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})
const request = require('node-fetch');
const inputBody = '{
  "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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

result = RestClient.put 'https://{marketplaceURL}/api/channel/v1/webhooks/{webhookUuid}',
payload={
  "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"
}
params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/channel/v1/webhooks/{webhookUuid}',
json={
  "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"
}
params={
},
headers = headers)

print r.json()
URL obj = new URL("https://{marketplaceURL}/api/channel/v1/webhooks/{webhookUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
String inputBody = "{" +
  "\"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\"" +
"}";

OutputStream os = conn.getOutputStream();
os.write(inputBody.getBytes("UTF-8"));
os.close();

int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new 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": 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

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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

result = RestClient.delete 'https://{marketplaceURL}/api/channel/v1/webhooks/{webhookUuid}',

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/channel/v1/webhooks/{webhookUuid}',

params={
},
headers = headers)

print r.json()
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.

Currency Exchange Rate

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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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

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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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

Create new Currency Exchange Rate

Example request


curl -X post \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-binary @- https://{marketplaceURL}/api/channel/v1/exchangeRates <<EOF
{
  "baseCurrency": "USD",
  "counterCurrency": "CAD",
  "rate": 0.2
}
EOF

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

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


var headers = {
  'Accept':'application/json',
  'Content-Type':'application/json'

};

$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/exchangeRates',
  method: 'post',
  dataType: 'json',
  data: {
  "baseCurrency": "USD",
  "counterCurrency": "CAD",
  "rate": 0.2
},

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})
const request = require('node-fetch');
const inputBody = '{
  "baseCurrency": "USD",
  "counterCurrency": "CAD",
  "rate": 0.2
}';
const headers = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

result = RestClient.post 'https://{marketplaceURL}/api/channel/v1/exchangeRates',
payload={
  "baseCurrency": "USD",
  "counterCurrency": "CAD",
  "rate": 0.2
}
params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/channel/v1/exchangeRates',
json={
  "baseCurrency": "USD",
  "counterCurrency": "CAD",
  "rate": 0.2
}
params={
},
headers = headers)

print r.json()
URL obj = new URL("https://{marketplaceURL}/api/channel/v1/exchangeRates");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
String inputBody = "{" +
  "\"baseCurrency\": \"USD\"," +
  "\"counterCurrency\": \"CAD\"," +
  "\"rate\": 0.2" +
"}";

OutputStream os = conn.getOutputStream();
os.write(inputBody.getBytes("UTF-8"));
os.close();

int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new 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
}

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

Deactivate a Currency Exchange Rate

Example request


curl -X patch \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-binary @- https://{marketplaceURL}/api/channel/v1/exchangeRates/{currencyExchangeRateUuid} <<EOF
{
  "active": false
}
EOF

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

{
  "active": false
}


var headers = {
  'Accept':'application/json',
  'Content-Type':'application/json'

};

$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/exchangeRates/{currencyExchangeRateUuid}',
  method: 'patch',
  dataType: 'json',
  data: {
  "active": false
},

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})
const request = require('node-fetch');
const inputBody = '{
  "active": false
}';
const headers = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

r = requests.patch('https://{marketplaceURL}/api/channel/v1/exchangeRates/{currencyExchangeRateUuid}',
json={
  "active": false
}
params={
},
headers = headers)

print r.json()
URL obj = new URL("https://{marketplaceURL}/api/channel/v1/exchangeRates/{currencyExchangeRateUuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
String inputBody = "{" +
  "\"active\": false" +
"}";

OutputStream os = conn.getOutputStream();
os.write(inputBody.getBytes("UTF-8"));
os.close();

int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new 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
}

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

CurrencyExchangeRateActive object:

Property Type Description
active boolean Currency Exchange Rates can be only deactivated. Allowed value: false.

Responses

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

Customer Notifications

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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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. NotificationTemplateDefinition

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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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. NotificationCommonElementDefinition

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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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

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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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,\u003cbr/\u003eCongratulations! You have a new {PARTNER_STORE_LABEL} account ready to be activated.\u003cbr/\u003eYour account has been created with the username {USER_EMAIL}\u003cbr/\u003eTo activate your account please use the following link:\u003cbr/\u003e{ACTIVATION_URL}\u003cbr/\u003e\u003cbr/\u003eIf you have any questions, our Support Team is standing by. You can\u003cbr/\u003eemail us at {SUPPORT_EMAIL}, call us at {SUPPORT_PHONE},\u003cbr/\u003eor start a chat with us on the website at {SUPPORT_URL}.\u003cbr/\u003e\n\u003cbr/\u003eThank you!\u003cbr/\u003eYour 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
*type path string Email template type
directSales query boolean false Get the developer email template

Responses

Status Meaning Description Definition
200 OK Email template read. NotificationEmailTemplateWS
404 Not Found Customized email template or default email 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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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 NotificationTemplateParameter

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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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
*type path string Sms template type
directSales query boolean false Get the developer sms tempalte

Responses

Status Meaning Description Definition
200 OK SMS template read. NotificationSmsTemplateWS
404 Not Found Customized SMS template or default SMS template not found.

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 \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-binary @- https://{marketplaceURL}/api/notification/v1/templates/common/email <<EOF
{
  "content": "This is a test.",
  "enabled": true,
  "locale": "en_US",
  "partner": "APPDIRECT",
  "type": "UNSUBSCRIBE"
}
EOF

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

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


var headers = {
  'Accept':'application/json',
  'Content-Type':'application/json'

};

$.ajax({
  url: 'https://{marketplaceURL}/api/notification/v1/templates/common/email',
  method: 'post',
  dataType: 'json',
  data: {
  "content": "This is a test.",
  "enabled": true,
  "locale": "en_US",
  "partner": "APPDIRECT",
  "type": "UNSUBSCRIBE"
},

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})
const request = require('node-fetch');
const inputBody = '{
  "content": "This is a test.",
  "enabled": true,
  "locale": "en_US",
  "partner": "APPDIRECT",
  "type": "UNSUBSCRIBE"
}';
const headers = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

result = RestClient.post 'https://{marketplaceURL}/api/notification/v1/templates/common/email',
payload={
  "content": "This is a test.",
  "enabled": true,
  "locale": "en_US",
  "partner": "APPDIRECT",
  "type": "UNSUBSCRIBE"
}
params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/notification/v1/templates/common/email',
json={
  "content": "This is a test.",
  "enabled": true,
  "locale": "en_US",
  "partner": "APPDIRECT",
  "type": "UNSUBSCRIBE"
}
params={
},
headers = headers)

print r.json()
URL obj = new URL("https://{marketplaceURL}/api/notification/v1/templates/common/email");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
String inputBody = "{" +
  "\"content\": \"This is a test.\"," +
  "\"enabled\": true," +
  "\"locale\": \"en_US\"," +
  "\"partner\": \"APPDIRECT\"," +
  "\"type\": \"UNSUBSCRIBE\"" +
"}";

OutputStream os = conn.getOutputStream();
os.write(inputBody.getBytes("UTF-8"));
os.close();

int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new 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": 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 \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-binary @- https://{marketplaceURL}/api/notification/v1/templates/email <<EOF
{
  "content": "This is a test.",
  "directSales": false,
  "enabled": true,
  "fallbackEmailTemplateId": 1,
  "locale": "en_US",
  "partner": "APPDIRECT",
  "subject": "Test email",
  "type": "ACCOUNT_ACTIVATION"
}
EOF

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

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


var headers = {
  'Accept':'application/json',
  'Content-Type':'application/json'

};

$.ajax({
  url: 'https://{marketplaceURL}/api/notification/v1/templates/email',
  method: 'post',
  dataType: 'json',
  data: {
  "content": "This is a test.",
  "directSales": false,
  "enabled": true,
  "fallbackEmailTemplateId": 1,
  "locale": "en_US",
  "partner": "APPDIRECT",
  "subject": "Test email",
  "type": "ACCOUNT_ACTIVATION"
},

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})
const request = require('node-fetch');
const inputBody = '{
  "content": "This is a test.",
  "directSales": false,
  "enabled": true,
  "fallbackEmailTemplateId": 1,
  "locale": "en_US",
  "partner": "APPDIRECT",
  "subject": "Test email",
  "type": "ACCOUNT_ACTIVATION"
}';
const headers = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

result = RestClient.post 'https://{marketplaceURL}/api/notification/v1/templates/email',
payload={
  "content": "This is a test.",
  "directSales": false,
  "enabled": true,
  "fallbackEmailTemplateId": 1,
  "locale": "en_US",
  "partner": "APPDIRECT",
  "subject": "Test email",
  "type": "ACCOUNT_ACTIVATION"
}
params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/notification/v1/templates/email',
json={
  "content": "This is a test.",
  "directSales": false,
  "enabled": true,
  "fallbackEmailTemplateId": 1,
  "locale": "en_US",
  "partner": "APPDIRECT",
  "subject": "Test email",
  "type": "ACCOUNT_ACTIVATION"
}
params={
},
headers = headers)

print r.json()
URL obj = new URL("https://{marketplaceURL}/api/notification/v1/templates/email");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
String inputBody = "{" +
  "\"content\": \"This is a test.\"," +
  "\"directSales\": false," +
  "\"enabled\": true," +
  "\"fallbackEmailTemplateId\": 1," +
  "\"locale\": \"en_US\"," +
  "\"partner\": \"APPDIRECT\"," +
  "\"subject\": \"Test email\"," +
  "\"type\": \"ACCOUNT_ACTIVATION\"" +
"}";

OutputStream os = conn.getOutputStream();
os.write(inputBody.getBytes("UTF-8"));
os.close();

int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new 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.",
  "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 \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-binary @- https://{marketplaceURL}/api/notification/v1/templates/sms <<EOF
{
  "content": "This is a test.",
  "directSales": false,
  "enabled": true,
  "locale": "en_US",
  "type": "ACCOUNT_ACTIVATION"
}
EOF

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

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


var headers = {
  'Accept':'application/json',
  'Content-Type':'application/json'

};

$.ajax({
  url: 'https://{marketplaceURL}/api/notification/v1/templates/sms',
  method: 'post',
  dataType: 'json',
  data: {
  "content": "This is a test.",
  "directSales": false,
  "enabled": true,
  "locale": "en_US",
  "type": "ACCOUNT_ACTIVATION"
},

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})
const request = require('node-fetch');
const inputBody = '{
  "content": "This is a test.",
  "directSales": false,
  "enabled": true,
  "locale": "en_US",
  "type": "ACCOUNT_ACTIVATION"
}';
const headers = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

result = RestClient.post 'https://{marketplaceURL}/api/notification/v1/templates/sms',
payload={
  "content": "This is a test.",
  "directSales": false,
  "enabled": true,
  "locale": "en_US",
  "type": "ACCOUNT_ACTIVATION"
}
params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/notification/v1/templates/sms',
json={
  "content": "This is a test.",
  "directSales": false,
  "enabled": true,
  "locale": "en_US",
  "type": "ACCOUNT_ACTIVATION"
}
params={
},
headers = headers)

print r.json()
URL obj = new URL("https://{marketplaceURL}/api/notification/v1/templates/sms");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
String inputBody = "{" +
  "\"content\": \"This is a test.\"," +
  "\"directSales\": false," +
  "\"enabled\": true," +
  "\"locale\": \"en_US\"," +
  "\"type\": \"ACCOUNT_ACTIVATION\"" +
"}";

OutputStream os = conn.getOutputStream();
os.write(inputBody.getBytes("UTF-8"));
os.close();

int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new 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.",
  "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.

Discounts

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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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

Headers:
  X-Total-Count: 1
[
  {
    "applicationId": null,
    "applicationName": null,
    "autoApply": true,
    "basePartnerSharePercentage": null,
    "billingCycles": null,
    "code": null,
    "createdOn": 1480969138028,
    "description": "SOMEDESCRIPTION",
    "editionId": null,
    "expirationDate": null,
    "id": 4,
    "industryId": null,
    "maxRedemptions": null,
    "maxUnits": 0,
    "minUnits": 0,
    "partnerSharePercentage": null,
    "paymentPlanId": null,
    "percentage": 70,
    "price": null,
    "redemptionRestriction": "NONE",
    "redemptions": 0,
    "resellerCompanyId": null,
    "retainable": false,
    "startDate": null,
    "type": "PERCENTAGE",
    "unit": "USER",
    "vendorSharePercentage": null
  }
]

GET /channel/v1/discounts

List all available discounts. The parameters may optionally be used to filter the discounts read.

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
RESELLER_COMPANY
START_DATE
CREATED_ON Sort field. Default value is created on 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 Discount
404 Not Found Not Found

Retrieve a discount

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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

result = RestClient.get 'https://{marketplaceURL}/api/channel/v1/discounts/{discountId}',

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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,
  "autoApply": true,
  "basePartnerSharePercentage": null,
  "billingCycles": null,
  "code": null,
  "createdOn": 1480969138028,
  "description": "SOMEDESCRIPTION",
  "editionId": null,
  "expirationDate": null,
  "id": 4,
  "industryId": null,
  "maxRedemptions": null,
  "maxUnits": 0,
  "minUnits": 0,
  "partnerSharePercentage": null,
  "paymentPlanId": null,
  "percentage": 70,
  "price": null,
  "redemptionRestriction": "NONE",
  "redemptions": 0,
  "resellerCompanyId": null,
  "retainable": false,
  "startDate": null,
  "type": "PERCENTAGE",
  "unit": "USER",
  "vendorSharePercentage": null
}

GET /channel/v1/discounts/{discountId}

Retrieve the discount for the given discount ID.

Parameters

Parameter Type Data Type Default Description
*discountId path integer Discount ID

Responses

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

Create a discount

Example request


curl -X post \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-binary @- https://{marketplaceURL}/api/channel/v1/discounts <<EOF
{
  "applicationId": null,
  "applicationName": null,
  "autoApply": true,
  "basePartnerSharePercentage": 25,
  "billingCycles": null,
  "code": null,
  "createdOn": null,
  "description": "SOMEDESCRIPTION",
  "editionId": null,
  "expirationDate": null,
  "id": null,
  "industryId": null,
  "maxRedemptions": null,
  "maxUnits": 0,
  "minUnits": 0,
  "partnerSharePercentage": 25,
  "paymentPlanId": null,
  "percentage": 70,
  "price": null,
  "redemptionRestriction": "NONE",
  "redemptions": 0,
  "resellerCompanyId": null,
  "retainable": false,
  "startDate": null,
  "type": "PERCENTAGE",
  "unit": "USER",
  "vendorSharePercentage": 50
}
EOF

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

{
  "applicationId": null,
  "applicationName": null,
  "autoApply": true,
  "basePartnerSharePercentage": 25,
  "billingCycles": null,
  "code": null,
  "createdOn": null,
  "description": "SOMEDESCRIPTION",
  "editionId": null,
  "expirationDate": null,
  "id": null,
  "industryId": null,
  "maxRedemptions": null,
  "maxUnits": 0,
  "minUnits": 0,
  "partnerSharePercentage": 25,
  "paymentPlanId": null,
  "percentage": 70,
  "price": null,
  "redemptionRestriction": "NONE",
  "redemptions": 0,
  "resellerCompanyId": null,
  "retainable": false,
  "startDate": null,
  "type": "PERCENTAGE",
  "unit": "USER",
  "vendorSharePercentage": 50
}


var headers = {
  'Accept':'application/json',
  'Content-Type':'application/json'

};

$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/discounts',
  method: 'post',
  dataType: 'json',
  data: {
  "applicationId": null,
  "applicationName": null,
  "autoApply": true,
  "basePartnerSharePercentage": 25,
  "billingCycles": null,
  "code": null,
  "createdOn": null,
  "description": "SOMEDESCRIPTION",
  "editionId": null,
  "expirationDate": null,
  "id": null,
  "industryId": null,
  "maxRedemptions": null,
  "maxUnits": 0,
  "minUnits": 0,
  "partnerSharePercentage": 25,
  "paymentPlanId": null,
  "percentage": 70,
  "price": null,
  "redemptionRestriction": "NONE",
  "redemptions": 0,
  "resellerCompanyId": null,
  "retainable": false,
  "startDate": null,
  "type": "PERCENTAGE",
  "unit": "USER",
  "vendorSharePercentage": 50
},

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})
const request = require('node-fetch');
const inputBody = '{
  "applicationId": null,
  "applicationName": null,
  "autoApply": true,
  "basePartnerSharePercentage": 25,
  "billingCycles": null,
  "code": null,
  "createdOn": null,
  "description": "SOMEDESCRIPTION",
  "editionId": null,
  "expirationDate": null,
  "id": null,
  "industryId": null,
  "maxRedemptions": null,
  "maxUnits": 0,
  "minUnits": 0,
  "partnerSharePercentage": 25,
  "paymentPlanId": null,
  "percentage": 70,
  "price": null,
  "redemptionRestriction": "NONE",
  "redemptions": 0,
  "resellerCompanyId": null,
  "retainable": false,
  "startDate": null,
  "type": "PERCENTAGE",
  "unit": "USER",
  "vendorSharePercentage": 50
}';
const headers = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

result = RestClient.post 'https://{marketplaceURL}/api/channel/v1/discounts',
payload={
  "applicationId": null,
  "applicationName": null,
  "autoApply": true,
  "basePartnerSharePercentage": 25,
  "billingCycles": null,
  "code": null,
  "createdOn": null,
  "description": "SOMEDESCRIPTION",
  "editionId": null,
  "expirationDate": null,
  "id": null,
  "industryId": null,
  "maxRedemptions": null,
  "maxUnits": 0,
  "minUnits": 0,
  "partnerSharePercentage": 25,
  "paymentPlanId": null,
  "percentage": 70,
  "price": null,
  "redemptionRestriction": "NONE",
  "redemptions": 0,
  "resellerCompanyId": null,
  "retainable": false,
  "startDate": null,
  "type": "PERCENTAGE",
  "unit": "USER",
  "vendorSharePercentage": 50
}
params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/channel/v1/discounts',
json={
  "applicationId": null,
  "applicationName": null,
  "autoApply": true,
  "basePartnerSharePercentage": 25,
  "billingCycles": null,
  "code": null,
  "createdOn": null,
  "description": "SOMEDESCRIPTION",
  "editionId": null,
  "expirationDate": null,
  "id": null,
  "industryId": null,
  "maxRedemptions": null,
  "maxUnits": 0,
  "minUnits": 0,
  "partnerSharePercentage": 25,
  "paymentPlanId": null,
  "percentage": 70,
  "price": null,
  "redemptionRestriction": "NONE",
  "redemptions": 0,
  "resellerCompanyId": null,
  "retainable": false,
  "startDate": null,
  "type": "PERCENTAGE",
  "unit": "USER",
  "vendorSharePercentage": 50
}
params={
},
headers = headers)

print r.json()
URL obj = new URL("https://{marketplaceURL}/api/channel/v1/discounts");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
String inputBody = "{" +
  "\"applicationId\": null," +
  "\"applicationName\": null," +
  "\"autoApply\": true," +
  "\"basePartnerSharePercentage\": 25," +
  "\"billingCycles\": null," +
  "\"code\": null," +
  "\"createdOn\": null," +
  "\"description\": \"SOMEDESCRIPTION\"," +
  "\"editionId\": null," +
  "\"expirationDate\": null," +
  "\"id\": null," +
  "\"industryId\": null," +
  "\"maxRedemptions\": null," +
  "\"maxUnits\": 0," +
  "\"minUnits\": 0," +
  "\"partnerSharePercentage\": 25," +
  "\"paymentPlanId\": null," +
  "\"percentage\": 70," +
  "\"price\": null," +
  "\"redemptionRestriction\": \"NONE\"," +
  "\"redemptions\": 0," +
  "\"resellerCompanyId\": null," +
  "\"retainable\": false," +
  "\"startDate\": null," +
  "\"type\": \"PERCENTAGE\"," +
  "\"unit\": \"USER\"," +
  "\"vendorSharePercentage\": 50" +
"}";

OutputStream os = conn.getOutputStream();
os.write(inputBody.getBytes("UTF-8"));
os.close();

int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new 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,
  "autoApply": true,
  "basePartnerSharePercentage": 25,
  "billingCycles": null,
  "code": null,
  "createdOn": 1480969136160,
  "description": "SOMEDESCRIPTION",
  "editionId": null,
  "expirationDate": null,
  "id": 1,
  "industryId": null,
  "maxRedemptions": null,
  "maxUnits": 0,
  "minUnits": 0,
  "partnerSharePercentage": 25,
  "paymentPlanId": null,
  "percentage": 70,
  "price": null,
  "redemptionRestriction": "NONE",
  "redemptions": 0,
  "resellerCompanyId": null,
  "retainable": false,
  "startDate": null,
  "type": "PERCENTAGE",
  "unit": "USER",
  "vendorSharePercentage": 50
}

POST /channel/v1/discounts

Create a discount given the provided data.

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.
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.
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.
percentage number Percentage discount if discount is of PERCENTAGE type.
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.
resellerCompanyId string Reseller company ID.
retainable boolean True if the discount is retainable. Default value is false.
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. Default value is USER.
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

Update a discount

Example request


curl -X put \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-binary @- https://{marketplaceURL}/api/channel/v1/discounts/{discountId} <<EOF
{
  "applicationId": null,
  "applicationName": null,
  "autoApply": true,
  "basePartnerSharePercentage": 25,
  "billingCycles": null,
  "code": null,
  "createdOn": null,
  "description": "SOMEDESCRIPTION",
  "editionId": null,
  "expirationDate": null,
  "id": null,
  "industryId": null,
  "maxRedemptions": null,
  "maxUnits": 0,
  "minUnits": 0,
  "partnerSharePercentage": 25,
  "paymentPlanId": null,
  "percentage": 50,
  "price": null,
  "redemptionRestriction": "NONE",
  "redemptions": 0,
  "resellerCompanyId": null,
  "retainable": false,
  "startDate": null,
  "type": "PERCENTAGE",
  "unit": "USER",
  "vendorSharePercentage": 50
}
EOF

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

{
  "applicationId": null,
  "applicationName": null,
  "autoApply": true,
  "basePartnerSharePercentage": 25,
  "billingCycles": null,
  "code": null,
  "createdOn": null,
  "description": "SOMEDESCRIPTION",
  "editionId": null,
  "expirationDate": null,
  "id": null,
  "industryId": null,
  "maxRedemptions": null,
  "maxUnits": 0,
  "minUnits": 0,
  "partnerSharePercentage": 25,
  "paymentPlanId": null,
  "percentage": 50,
  "price": null,
  "redemptionRestriction": "NONE",
  "redemptions": 0,
  "resellerCompanyId": null,
  "retainable": false,
  "startDate": null,
  "type": "PERCENTAGE",
  "unit": "USER",
  "vendorSharePercentage": 50
}


var headers = {
  'Accept':'application/json',
  'Content-Type':'application/json'

};

$.ajax({
  url: 'https://{marketplaceURL}/api/channel/v1/discounts/{discountId}',
  method: 'put',
  dataType: 'json',
  data: {
  "applicationId": null,
  "applicationName": null,
  "autoApply": true,
  "basePartnerSharePercentage": 25,
  "billingCycles": null,
  "code": null,
  "createdOn": null,
  "description": "SOMEDESCRIPTION",
  "editionId": null,
  "expirationDate": null,
  "id": null,
  "industryId": null,
  "maxRedemptions": null,
  "maxUnits": 0,
  "minUnits": 0,
  "partnerSharePercentage": 25,
  "paymentPlanId": null,
  "percentage": 50,
  "price": null,
  "redemptionRestriction": "NONE",
  "redemptions": 0,
  "resellerCompanyId": null,
  "retainable": false,
  "startDate": null,
  "type": "PERCENTAGE",
  "unit": "USER",
  "vendorSharePercentage": 50
},

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})
const request = require('node-fetch');
const inputBody = '{
  "applicationId": null,
  "applicationName": null,
  "autoApply": true,
  "basePartnerSharePercentage": 25,
  "billingCycles": null,
  "code": null,
  "createdOn": null,
  "description": "SOMEDESCRIPTION",
  "editionId": null,
  "expirationDate": null,
  "id": null,
  "industryId": null,
  "maxRedemptions": null,
  "maxUnits": 0,
  "minUnits": 0,
  "partnerSharePercentage": 25,
  "paymentPlanId": null,
  "percentage": 50,
  "price": null,
  "redemptionRestriction": "NONE",
  "redemptions": 0,
  "resellerCompanyId": null,
  "retainable": false,
  "startDate": null,
  "type": "PERCENTAGE",
  "unit": "USER",
  "vendorSharePercentage": 50
}';
const headers = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

result = RestClient.put 'https://{marketplaceURL}/api/channel/v1/discounts/{discountId}',
payload={
  "applicationId": null,
  "applicationName": null,
  "autoApply": true,
  "basePartnerSharePercentage": 25,
  "billingCycles": null,
  "code": null,
  "createdOn": null,
  "description": "SOMEDESCRIPTION",
  "editionId": null,
  "expirationDate": null,
  "id": null,
  "industryId": null,
  "maxRedemptions": null,
  "maxUnits": 0,
  "minUnits": 0,
  "partnerSharePercentage": 25,
  "paymentPlanId": null,
  "percentage": 50,
  "price": null,
  "redemptionRestriction": "NONE",
  "redemptions": 0,
  "resellerCompanyId": null,
  "retainable": false,
  "startDate": null,
  "type": "PERCENTAGE",
  "unit": "USER",
  "vendorSharePercentage": 50
}
params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

r = requests.put('https://{marketplaceURL}/api/channel/v1/discounts/{discountId}',
json={
  "applicationId": null,
  "applicationName": null,
  "autoApply": true,
  "basePartnerSharePercentage": 25,
  "billingCycles": null,
  "code": null,
  "createdOn": null,
  "description": "SOMEDESCRIPTION",
  "editionId": null,
  "expirationDate": null,
  "id": null,
  "industryId": null,
  "maxRedemptions": null,
  "maxUnits": 0,
  "minUnits": 0,
  "partnerSharePercentage": 25,
  "paymentPlanId": null,
  "percentage": 50,
  "price": null,
  "redemptionRestriction": "NONE",
  "redemptions": 0,
  "resellerCompanyId": null,
  "retainable": false,
  "startDate": null,
  "type": "PERCENTAGE",
  "unit": "USER",
  "vendorSharePercentage": 50
}
params={
},
headers = headers)

print r.json()
URL obj = new URL("https://{marketplaceURL}/api/channel/v1/discounts/{discountId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
String inputBody = "{" +
  "\"applicationId\": null," +
  "\"applicationName\": null," +
  "\"autoApply\": true," +
  "\"basePartnerSharePercentage\": 25," +
  "\"billingCycles\": null," +
  "\"code\": null," +
  "\"createdOn\": null," +
  "\"description\": \"SOMEDESCRIPTION\"," +
  "\"editionId\": null," +
  "\"expirationDate\": null," +
  "\"id\": null," +
  "\"industryId\": null," +
  "\"maxRedemptions\": null," +
  "\"maxUnits\": 0," +
  "\"minUnits\": 0," +
  "\"partnerSharePercentage\": 25," +
  "\"paymentPlanId\": null," +
  "\"percentage\": 50," +
  "\"price\": null," +
  "\"redemptionRestriction\": \"NONE\"," +
  "\"redemptions\": 0," +
  "\"resellerCompanyId\": null," +
  "\"retainable\": false," +
  "\"startDate\": null," +
  "\"type\": \"PERCENTAGE\"," +
  "\"unit\": \"USER\"," +
  "\"vendorSharePercentage\": 50" +
"}";

OutputStream os = conn.getOutputStream();
os.write(inputBody.getBytes("UTF-8"));
os.close();

int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new 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,
  "autoApply": true,
  "basePartnerSharePercentage": 25,
  "billingCycles": null,
  "code": null,
  "createdOn": null,
  "description": "SOMEDESCRIPTION",
  "editionId": null,
  "expirationDate": null,
  "id": 5,
  "industryId": null,
  "maxRedemptions": null,
  "maxUnits": 0,
  "minUnits": 0,
  "partnerSharePercentage": 25,
  "paymentPlanId": null,
  "percentage": 50,
  "price": null,
  "redemptionRestriction": "NONE",
  "redemptions": 0,
  "resellerCompanyId": null,
  "retainable": false,
  "startDate": null,
  "type": "PERCENTAGE",
  "unit": "USER",
  "vendorSharePercentage": 50
}

PUT /channel/v1/discounts/{discountId}

Update the given discount using the provided data.

Parameters

Parameter Type Data Type Default Description
*discountId path integer Discount ID

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.
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.
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.
percentage number Percentage discount if discount is of PERCENTAGE type.
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.
resellerCompanyId string Reseller company ID.
retainable boolean True if the discount is retainable. Default value is false.
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. Default value is USER.
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

Delete a discount

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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

result = RestClient.delete 'https://{marketplaceURL}/api/channel/v1/discounts/{discountId}',

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/channel/v1/discounts/{discountId}',

params={
},
headers = headers)

print r.json()
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}

Delete the discount for the given discount ID.

Parameters

Parameter Type Data Type Default Description
*discountId path integer Discount ID

Responses

Status Meaning Description Definition
204 No Content No Content
404 Not Found 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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

result = RestClient.get 'https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/editions/{editionId}',

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

r = requests.get('https://{marketplaceURL}/api/marketplace/v1/products/{applicationId}/editions/{editionId}',

params={
},
headers = headers)

print r.json()
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

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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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

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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

result = RestClient.get 'https://{marketplaceURL}/api/channel/v1/events/{eventId}',

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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.

Groups

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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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": "f46d25a9-fac6-49e1-a6ce-aa8133248168",
      "description": "read-all-test-desc",
      "externallyManaged": false,
      "links": [
        {
          "href": "http://appdirect/api/account/v2/companies/f46d25a9-fac6-49e1-a6ce-aa8133248168/groups/e9ccec71-cd8c-4952-84ad-da26431cfb50",
          "rel": "self"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/f46d25a9-fac6-49e1-a6ce-aa8133248168",
          "rel": "company"
        },
        {
          "href": "http://appdirect/api/account/v2/companies/f46d25a9-fac6-49e1-a6ce-aa8133248168/groups/e9ccec71-cd8c-4952-84ad-da26431cfb50/memberships?member=true\u0026page=0\u0026size=50",
          "rel": "memberships"
        }
      ],
      "memberCount": 1,
      "name": "read-all-test-name",
      "uuid": "e9ccec71-cd8c-4952-84ad-da26431cfb50"
    }
  ],
  "links": [
    {
      "href": "http://appdirect/api/account/v2/companies/f46d25a9-fac6-49e1-a6ce-aa8133248168/groups?searchText=read-all-test-name\u0026page=0\u0026size=50\u0026sortField=createdOn\u0026sortOrder=DESC",
      "rel": "self"
    }
  ],
  "page": {
    "number": 0,
    "size": 50,
    "totalElements": 1,
    "totalPages": 1
  }
}

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

Retrieve a marketplace company's user groups.

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
sortOrder query string of enum:
ASC
DESC
DESC Ordering type

Responses

Status Meaning Description Definition
200 OK Success PagedCompanyGroupAccountV2
401 Unauthorized Unauthorized

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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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\u0026page=0\u0026size=50",
      "rel": "memberships"
    }
  ],
  "memberCount": 1,
  "name": "read-test-name",
  "uuid": "74a8e9c1-0e64-4009-b529-671ae9188e70"
}

GET /account/v2/companies/{companyUuid}/groups/{groupUuid}

Retrieve a marketplace company's user group.

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

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 = {
  'Accept':'application/json',
  'Content-Type':'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 = {
  'Accept':'application/json',
  'Content-Type':'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);
});
require 'rest-client'
require 'json'

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

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

params: {
},
headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json',
  'Content-Type': 'application/json'
}

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

params={
},
headers = headers)

print r.json()
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/b89da6d2-c34a-4f2a-95bb-98725569fe72",
            "rel": "self"
          },
          {
            "href": "http://appdirect/api/account/v2/companies/b89da6d2-c34a-4f2a-95bb-98725569fe72/memberships",
            "rel": "memberships"
          }
        ],
        "name": "Appdirect",
        "phoneNumber": null,
        "picture": null,
        "uuid": "b89da6d2-c34a-4f2a-95bb-98725569fe72",
        "vendor": <