Webhook notification payloads
Webhook notifications are JSON objects, which the AppDirect platform sends to the specified endpoint through HTTP POST requests. The payload contain several important elements:
-
The
resource
object, whosetype
identifies the affected resource, for exampleUSER
,CATALOG_PRODUCT
, and so on. -
The
resourceAction
, which identifies the action, eitherADDED
,CHANGED
, orREMOVED
(Deleted). TheresourceAction
appears near the end of the notification. -
For Added or Changed actions, the
resource
object contains acontent
object.-
The information contained in the
content
object depends on the resourcetype
. For example, thecontent
for aUSER
resource type includes information about the user, such as name, email address, and so on; thecontent
for aCATALOG_PRODUCT
resource type includes the product name, the marketplace it belongs to, discounts, and so on. Webhook subscribers must be aware of the resource type to properly interpret thecontent
. -
The
content
is identical to retrieving the data using HTTP GET on the link of theresource.url
element.
-
-
For Deleted actions, the
resource
object does not contain acontent
object.
The following sections describe these elements in detail.
The webhook object
{
"uuid":"429afed8-7e29-4434-90e0-127083b025c1",
"timestamp":1487230205455,
"resource":{},
"resourceAction":"REMOVED"
}
Key | Type | Description |
---|---|---|
uuid | string | A unique identifier for the webhook. |
timestamp | number | The time that the event occurred, in UNIX epoch milliseconds. |
resource | object | The complete resource object. See "The resource object" below. |
resourceAction | string | The action that happened to the resource, either ADDED, CHANGED, or REMOVED. |
The resource object
{
"resource": {
"type": "SUBSCRIPTION",
"uuid": "1234",
"url": "https: //example.appdirect.com/api/billing/v1/subscriptions/1234",
"content": {}
}
}
Key | Type | Description |
---|---|---|
type | string | The name of the resource. |
uuid | string | A unique identifier for the resource. |
url | string | The location of the resource. |
content | object | A representation of the resource. See "The content object" below. |
The content object
The information included in the content
object depends on the
resource, and correspond to information included in various
API responses. Many of the objects are defined in the API reference
documentation. See the following links for information on the respective
resource content
payloads:
Resource | Payload definition |
---|---|
DISCOUNT | Discount definition |
ORDER | Order definition1 |
PAYMENT_INSTRUMENT | PaymentInstrument definition |
PLATFORM | Platform definition |
SUBSCRIPTION | Subscription definition2 |
2. The Subscription webhook also includes some additional fields. See the Subscription webhook payload topic.
The following sections provide examples of the remaining resource content payloads, and links to individual topics describing them.
APP_ASSIGNMENT
For a full discussion of this webhook, see the App Assignment webhook payload.
{
"status": "ACTIVE",
"userUuid": "caf3dbc2-f301-4ff7-b5d1-50a47f2fc2ab",
"companyUuid": "3ea46469-36a7-4216-966b-5f0c61c72faa",
"subscriptionUuid": "21f34ac6-6b23-4acb-b76c-a59b58576517",
"externalVendorIdentifier": "1f26a9a3-cb4d-41d9-810b-be2843fc5bf6",
"links": [
{
"rel": "self",
"href": "https://www.example.com/api/account/v2/subscriptions/assignments/8d124343-887e-429e-b284-9b8c41c710a4"
}
]
}
CATALOG PRODUCT
This webhook payload provides information about the vendor and about how the product is presented in the Production Catalog. It does not include the product definition itself.
For a full discussion of this webhook, see the Catalog Product webhook payload.
{
"application": {
"id": 370272,
"name": "MyReferralProduct",
"vendor": {
"uuid": "a983f015-c5d7-4238-9e8d-10205dff08b7",
"companyId": null,
"name": "Saasifaction",
"enabled": true,
"allowLogin": true,
"selfServeLead": false,
"address": null,
"companySize": null,
"customAttributes": null,
"creationDate": null,
"industry": null,
"salesAgent": null,
"emailAddress": null,
"idpUuid": null,
"website": null,
"picture": null,
"vendor": true,
"reseller": false,
"channelAdmin": false,
"referral": false,
"externalId": null,
"phoneNumber": "(514) 555-4321",
"defaultRole": null,
"countryCode": null,
"status": null,
"thirtyDaysPurchaseLimit": null,
"thirtyDaysPurchaseLimitExempt": false,
"thirtyDaysPurchaseLimitOverrideAmt": null,
"thirtyDaysPurchaseRemainingAmt": null,
"dailyPurchaseLimit": null,
"dailyPurchaseLimitExempt": false,
"dailyPurchaseLimitOverrideAmt": null,
"dailyPurchaseRemainingAmt": null,
"importAppsEnabled": false,
"onlyAdminsCanBuy": false,
"useCompanyBillingAddress": false,
"links": []
}
},
"featured": false,
"popular": false,
"staffPick": false,
"discountAvailable": false,
"displayReviews": true,
"displayQuestions": true,
"opinion": 5,
"taxCodes": {},
"hidePricings": false,
"collectLeads": false,
"collectLeadsWithPurchaseEnabled": false,
"assignLeadsToDevelopers": true,
"liveChatEnabled": false,
"newSubscriptionEnabled": true,
"ssoEnabled": true,
"changeSubscriptionEnabled": true,
"assignmentEnabled": true,
"highestFixedDiscount": {},
"discountedStartingPrices": {}
}
COMPANY
The identifier used for the company may be a universally unique identifier, or it may be an identifier that is used for this company on an external system. This is determined by your marketplace settings. For more information, contact your AppDirect technical representative.
For a full discussion of this webhook, see the Company webhook payload.
{
"id": "15b61d83-604d-42a2-b44b-f4bd6268282f",
"name": "Acme",
"enabled": true,
"contact": {
"phoneNumber": null,
"ims": null,
"homePhone": null,
"mobilePhone": null,
"address": {
"street1": "123 Main St.",
"street2": "",
"city": "Springfield",
"state": "AL",
"zip": "34510",
"country": "US"
}
},
"size": "MEDIUM",
"status": "ACTIVE",
"attributes": null,
"creationDate": 1535481607000,
"industry": null,
"salesAgent": null,
"website": "www.example.com",
"emailAddress": null,
"dealer": null,
"uuid": "15b61d83-604d-42a2-b44b-f4bd6268282f",
"externalId": null,
"countryCode": "US",
"permissions": [
"RESELLER"
],
"defaultIdpUuid": null,
"domains": null
}
INVOICE
For a full discussion of this webhook, see the Invoice webhook payload.
{
"id": "149201525",
"uuid": "69baef3c-57de-4846-becf-5d74489d68e7",
"locale": null,
"localized": null,
"invoiceNumber": "156339872",
"billingRelationshipOwnerInvoiceNumber": "10254",
"partner": "ORIGOINC",
"status": "PAID",
"currency": "USD",
"invoiceDate": "2022-11-23",
"paymentTerms": {
"dueDate": "2022-11-30"
},
"seller": null,
"customer": {
"userRef": "b70be240-3170-420f-b1ae-28dc1830e99c",
"companyRef": "6e383f61-108e-42cb-8796-bae7ec8342a4"
},
"lines": [
{
"id": "239375342",
"description": "AppWise - Free - Monthly Fee Period from 11/23/22 to 12/23/22",
"quantity": "1.0000000000",
"unitPrice": "0.0000000000",
"total": "0.0000000000",
"buyer": {
"userRef": "b70be240-3170-420f-b1ae-28dc1830e99c",
"companyRef": "6e383f61-108e-42cb-8796-bae7ec8342a4"
},
"provider": {
"userRef": null,
"companyRef": "9c4410ab-527c-4b48-b19c-f804d379b51d"
},
"period": {
"start": "2022-11-23",
"end": "2022-12-23"
},
"cost": {
"type": "RECURRING_FLAT",
"typeCategory": "RECURRING",
"unit": null,
"strategy": "FREE",
"credit": false,
"percentage": false
},
"subscriptionRef": "5651319",
"orderRef": "111299442",
"productRef": "42937",
"editionRef": "83472",
"pricingPlanRef": "100382",
"discountRef": null
}
],
"amountDue": "0.0000000000",
"amountPaid": "0.0000000000",
"subtotal": "0.0000000000",
"totalTax": "0.0000000000",
"carriedBalance": "0.0000000000",
"creditNote": false,
"total": "0.0000000000",
"taxReport": {
"id": "cd3b5c10-8374-4ca2-8374-34a3204c9b9b",
"transactionId": "11a86b22-5326-4b1a-8904-04c80256f143",
"tenant": "ORIGOINC",
"invoiceNumber": "156339872",
"consumer": {
"userRef": "b70be240-3170-420f-b1ae-28dc1830e99c",
"companyRef": "6e383f61-108e-42cb-8796-bae7ec8342a4",
"address": {
"streetLine1": "50 Grove St.",
"streetLine2": null,
"city": "Somerville",
"region": "MA",
"country": "US",
"postalCode": "02114"
},
"companyTaxExemptionReasonCode": null
},
"strategy": "FLAT",
"currency": "USD",
"chargedAmount": "0E-10",
"totalTaxAmount": "0E-10",
"details": {
"238338209": [
{
"taxType": {
"id": "1",
"name": "Flat Tax",
"rate": "0.0825000000",
"strategy": "FLAT"
},
"taxableAmount": "0.0000000000",
"taxAmount": "0.0000000000",
"taxCode": null,
"metadata": null
}
]
},
"summary": [
{
"taxType": {
"id": "1",
"name": "Flat Tax",
"rate": "0.0825000000",
"strategy": "FLAT"
},
"taxableAmount": "0.0000000000",
"taxAmount": "0.0000000000"
}
],
"metadata": null
},
"taxSummary": [
{
"taxType": {
"id": "Sales Tax",
"name": "Sales Tax",
"rate": "0.0000000000"
},
"taxableAmount": "0.0000000000",
"taxAmount": "0.0000000000"
}
],
"refundInvoice": false,
"refundedInvoice": null,
"delegatedToInvoice": null,
"carriedInvoices": [],
"users": {},
"companies": {},
"marketplaces": {},
"subscriptions": {
"5651319": {
"id": "5651319",
"uuid": "5d2a452f-596e-41f0-966e-a3f73d9f0434",
"startDate": "2020-03-23"
}
},
"orders": {
"111299442": {
"id": "111299442",
"createdOn": "2020-03-23",
"type": "PRE_PAID",
"subscriptionType": "NEW"
}
},
"products": {},
"editions": {},
"pricingPlans": {
"100382": {
"id": "100382",
"uuid": "21534fba-fb72-4aee-9c9f-6cbca7d7c36d",
"period": "MONTHLY"
}
},
"discounts": {},
"costTypes": {},
"costPeriods": {},
"costUnits": {}
}
},
}
LEAD
{
"id": "ef6d3163-8382-4bfe-9a55-d9d3574c7865",
"partner": "APPDIRECT",
"leadType": "MANUAL",
"status": "SUBMITTED",
"customer": {
"company": {
"name": "MyCompany"
},
"contact": {
"firstName": "John",
"lastName": "Smith",
"email": "johnsmith@yahoo.com",
"phone": ""
}
},
"createdOn": {
"epochSecond": 1537302931,
"nano": 0
},
"lastModified": {
"epochSecond": 1537302934,
"nano": 0
},
"creator": {
"role": "CHANNEL_ADMIN"
},
"customAttributes": {},
"referrer": {
"participantType": "CHANNEL",
"partner": "APPDIRECT"
},
"recipient": {
"participantType": "CHANNEL",
"partner": "APPDIRECT"
}
}
MEMBERSHIP
For a full discussion of this webhook, see the Membership webhook payload.
{
"id": "caccf02d-857b-4952-bb33-1b63a15cf1a5",
"openId": "https://www.example.com/openid/id/caccf02d-857b-4952-bb33-1b63a15cf1a5",
"email": "johndoe@example.com",
"username": "johndoe@example.com",
"firstName": "John",
"lastName": "Doe",
"language": "en",
"locale": "en-US",
"password": null,
"profilePic": null,
"deleted": false,
"status": "ACTIVE",
"contact": {
"phoneNumber": null,
"ims": null,
"homePhone": null,
"mobilePhone": null,
"address": {}
},
"registrationCode": null,
"creationDate": 1535481607000,
"lastSuccessfulLogin": 1535482408000,
"title": null,
"activationUrl": null,
"internalId": "caccf02d-857b-4952-bb33-1b63a15cf1a5",
"externalId": null,
"idpUuid": null,
"customAttributes": {},
"roles": [
"USER",
"SYS_ADMIN",
"BILLING_ADMIN"
],
"enabled": true
}
QUOTE
{
"uuid": "676e2c8f-61f2-4b9b-b8d7-d0991221b071",
"application": {
"id": 215610,
"name": "OfficeMax",
"vendor": {
"uuid": "3ea46469-36a7-4216-966b-5f0c61c72faa",
"name": "AcmeMarket Co.",
"enabled": true,
"address": null,
"companySize": null,
"customAttributes": null,
"creationDate": null,
"industry": null,
"salesAgent": null,
"emailAddress": null,
"website": null,
"picture": null,
"vendor": true,
"reseller": false,
"channelAdmin": false,
"externalId": null,
"phoneNumber": null,
"defaultRole": null,
"countryCode": null,
"status": null,
"links": []
}
},
"edition": {
"id": 395502,
"uuid": "e8a249c9-d889-4cff-a89e-01a514f76559",
"rank": 1,
"name": "Recurring Edition",
"primary": true,
"trial": {
"length": 0,
"unit": "DAY"
},
"expiredTrialGracePeriod": null,
"bundleOnly": false,
"targetAudience": null,
"code": "RECURRING",
"defaultFreeTrial": false,
"invisible": false,
"leadGen": false,
"lastModified": 1520456660000,
"revenueType": "RECURRING",
"restricted": false,
"freeTrialDuration": 0,
"freeTrialType": "DAY",
"customerContractRestricted": false,
"privacyUrl": null,
"termsUrl": null,
"plans": [
{
"href": "https://www.example.com/api/marketplace/v1/products/215610/editions/395502/paymentPlans/465870",
"id": 465870,
"uuid": "4b53cc3e-2b2b-41ce-bdd3-afe39d930ab5",
"frequency": "MONTHLY",
"contract": null,
"allowCustomUsage": false,
"keepBillDateOnUsageChange": false,
"separatePrepaid": false,
"isPrimaryPrice": false,
"costs": [
{
"id": 1453158,
"editionPricingItemId": 640222,
"unit": "NOT_APPLICABLE",
"unitDependency": null,
"minUnits": 0,
"maxUnits": null,
"meteredUsage": false,
"increment": 1,
"pricePerIncrement": false,
"blockContractDecrease": false,
"blockContractIncrease": false,
"blockOriginalContractDecrease": false,
"amount": {
"CAD": 11,
"EUR": 12,
"GBP": 13,
"USD": 10
},
"pricingStrategy": "UNIT"
}
],
"discount": null,
"primaryPrice": false
}
],
"bullets": [],
"items": [
{
"unit": "USER",
"amount": 1,
"unlimited": false
}
],
"customizations": []
},
"creator": {
"uuid": "fac7cf29-84fb-48f7-8890-545d309474f7",
"email": "johnjackson@example.com",
"userName": null,
"firstName": "John",
"lastName": "Jackson",
"picture": null,
"activated": false,
"ldapId": null,
"boostUser": null,
"roles": [],
"currency": null,
"customAttributes": null,
"metadata": {},
"links": []
},
"creatorCompany": {
"uuid": "3ea46469-36a7-4216-966b-5f0c61c72faa",
"name": "AcmeMarket Co.",
"enabled": true,
"address": null,
"companySize": null,
"customAttributes": null,
"creationDate": null,
"industry": null,
"salesAgent": null,
"emailAddress": null,
"website": null,
"picture": null,
"vendor": false,
"reseller": false,
"channelAdmin": false,
"externalId": null,
"phoneNumber": null,
"defaultRole": null,
"countryCode": null,
"status": null,
"links": []
},
"customer": {
"uuid": "fac7cf29-84fb-48f7-8890-545d309474f7",
"email": "davejones@somecompany.com",
"userName": null,
"firstName": "Dave",
"lastName": "Jones",
"picture": null,
"activated": false,
"ldapId": null,
"boostUser": null,
"roles": [],
"currency": null,
"customAttributes": null,
"metadata": {},
"links": []
},
"customerCompany": {
"uuid": "3ea46469-36a7-4216-966b-5f0c61c72faa",
"name": "SomeCompany",
"enabled": true,
"address": null,
"companySize": null,
"customAttributes": null,
"creationDate": null,
"industry": null,
"salesAgent": null,
"emailAddress": null,
"website": null,
"picture": null,
"vendor": false,
"reseller": false,
"channelAdmin": false,
"externalId": null,
"phoneNumber": null,
"defaultRole": null,
"countryCode": null,
"status": null,
"links": []
},
"createdOn": 1537302276000,
"lastModified": 1537302276000,
"status": "PENDING_PURCHASE",
"creationMethod": "USER",
"creationRole": "USER",
"orderCardId": 999126,
"friendlyId": "N4RFGG",
"activeResellerRequestedPrices": [],
"links": [
{
"rel": "self",
"href": "https://www.example.com/api/billing/v1/quotes/676e2c8f-61f2-4b9b-b8d7-d0991221b071"
}
]
}
RESELLER_REGISTRANT
{
"uuid": "f2caace2-0452-4fab-aea2-9e658769c58d",
"status": "PENDING",
"reseller": {
"company": {
"name": "AcmeReseller",
"street1": "123 Main St.",
"street2": "",
"city": "Sometown",
"state": "AL",
"zip": "12310",
"country": "US"
},
"contact": {
"firstName": "Jack",
"lastName": "Jones",
"email": "jajo@yahoo.com",
"phone": "+1 333-444-5555"
}
},
"website": "www.example.com",
"manageLeadsRequested": false,
"manageOpportunitiesRequested": false,
"createCompaniesGranted": false,
"manageLeadsGranted": false,
"manageOpportunitiesGranted": false,
"createdOn": "2018-09-18T20:31:17.329Z",
"comment": null,
"attributes": {},
"links": [
{
"rel": "self",
"href": "https://www.example.com/api/prm/v1/registrants/f2caace2-0452-4fab-aea2-9e658769c58d"
}
]
}
STAGING PRODUCT
The main part of the this webhook payload matches the REST API Product definition for the product.
For a full discussion of this webhook, see the Staging Product webhook payload.
{
{
"href": "https://saasifaction.byappdirect.com/api/marketplace/v1/products/373617",
"uuid": "8b1602a4-dead-46b4-a949-aecd7c1b2d65",
"productRefId": "e60993a8-8359-4e64-b70f-7f1d59d4964a",
"publishedApp": {
"id": "388065",
"href": "https://saasifaction.byappdirect.com/api/marketplace/v1/products/388065"
},
"workingApp": null,
"name": "Acme Product",
"type": "WEB_APP",
"provider": {
"uuid": "a983f015-c5d7-4238-9e8d-10205dff08b7",
"name": "My Company",
"url": "mycompany.com"
},
"listing": {
"myAppLogoIconUrl": "https://d3bql97l1ytoxn.cloudfront.net/app_resources/373617/myAppIcon/image1307230991768455090.png",
"imageUrl": "https://d3bql97l1ytoxn.cloudfront.net/app_resources/373617/thumbs_64/image4496979354328137470.png",
"profileImageUrl": "https://d3bql97l1ytoxn.cloudfront.net/app_resources/373617/thumbs_112/image1278383726885079291.png",
[......................]
[...many more fields...]
[......................]
"supportedLanguages": [
"en-US"
],
"mosiConnectorType": null,
"platforms": [],
"customAttributes": [],
"productRibbon": null,
"merchandisingBadges": [],
"supportedCountries": [],
"supportedCurrencies": [],
"applicationStatus": "LAUNCHED",
"vendorUUID": "a983f015-c5d7-4238-9e8d-10205dff08b7",
"links": [],
"id": 373617
}
},
}
USER
The identifier used for the user may be a universally unique identifier, or it may be an identifier that is used for this user on an external system. This is determined by your marketplace settings. For more information, contact your AppDirect technical representative
For a full discussion of this webhook, see the User webhook payload.
{
"id": "4ef60b96-6180-4d82-8080-6f59ff51e2d3",
"openId": "https://www.example.com/openid/id/4ef60b96-6180-4d82-8080-6f59ff51e2d3",
"email": "davesmith@example.com",
"username": "davesmith@example.com",
"firstName": "Dave",
"lastName": "Smith",
"language": "en",
"locale": "en-US",
"password": null,
"profilePic": null,
"deleted": false,
"status": "ACTIVE",
"contact": {
"phoneNumber": null,
"ims": null,
"homePhone": null,
"mobilePhone": null,
"address": null
},
"registrationCode": null,
"creationDate": 1537990617000,
"lastSuccessfulLogin": 1537990617000,
"title": null,
"activationUrl": null,
"internalId": "4ef60b96-6180-4d82-8080-6f59ff51e2d3",
"externalId": null,
"idpUuid": null,
"customAttributes": {},
"memberships": [
{
"enabled": true,
"company": {
"id": "3ea46469-36a7-4216-966b-5f0c61c72faa",
"name": "AcmeMarket Co.",
"enabled": true,
"contact": null,
"size": "ENTERPRISE",
"status": "ACTIVE",
"attributes": null,
"creationDate": 1488380838000,
"industry": null,
"salesAgent": null,
"website": "appdirect.com",
"emailAddress": null,
"dealer": null,
"uuid": "3ea46469-36a7-4216-966b-5f0c61c72faa",
"externalId": null,
"countryCode": "US",
"permissions": [
"SALES_SUPPORT",
"DEVELOPER",
"CHANNEL_ADMIN"
],
"defaultIdpUuid": null,
"domains": null
},
"roles": [
"USER",
"SALES_SUPPORT"
],
"metadata": {
"employeeId": null
}
}
],
"resellerUserCompanyAssociations": [],
"salesAgent": null
}
Was this page helpful?
Tell us more…
Help us improve our content. Responses are anonymous.
Thanks
We appreciate your feedback!