🚧

Only available in API versions 2024-10 and later

Marketplace developers can grant app subscription discounts to attract and retain users. These can be managed, created, and deleted through both the Developer Center and the platform API.

Queries

Querying marketplace_app_discounts will return metadata about a specific app discount. This method accepts one argument and returns an array.

You can only query marketplace_app_discounts at the root, so it can't be nested in another query.

This query will only work for app collaborators and will fail if you do not have the correct permissions.

query {
  marketplace_app_discounts (input: {limit:1, app_id: 123456) {
    account_slug
    discount
    valid_until  	
  }
}
let query = "query { marketplace_app_discounts (input: { limit:1, app_id:123456 } ) { account_slug discount valid_until } }";

fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YOUR_API_KEY_HERE'
   },
   body: JSON.stringify({
     query : query
   })
  })
   .then(res => res.json())
   .then(res => console.log(JSON.stringify(res, null, 2)));

Arguments

You can use the following argument(s) to reduce the number of results returned in your marketplace_app_discounts query.

ArgumentDescriptionSupported fields
input MarketplaceAppDiscountsInput!The inputs used to limit the number of results returned.app_id ID!
limit Int
page Int

Fields

You can use the following field(s) to specify what information your marketplace_app_discounts query will return. Please note that some fields will have their own arguments.

FieldDescriptionEnum values
account_id ID!The account's unique identifier.
account_slug String!The account's slug.
app_plan_ids [String!]!The app plan ID.
created_at String!The discount's creation date.
discount Int!The discount's percentage.
is_recurring Boolean!Returns true if the discount is recurring.
period DiscountPeriodThe discount's period. If it returns null, the discount applies to both yearly and monthly plans.MONTHLY, YEARLY
valid_until String!The date the discount is valid until.

Mutations

Grant a discount

The grant_marketplace_app_discount mutation will grant a discount for a new marketplace app subscription. You can also specify what fields to query back when you run the mutation.

mutation {
  grant_marketplace_app_discount (
    input: {
      account_slug: "Test", 
      app_plan_ids: ["Basic"], 
      app_id: 123456, 
      days_valid: 30, 
      discount: 10, 
      is_recurring: false, 
      period: MONTHLY
    }) {
    granted_discount {
        account_slug
      	discount
    }
  }
}
let query = 'mutation { grant_marketplace_app_discount ( input: { account_slug: "Test", app_plan_ids: ["Basic"], app_id: 123456, days_valid: 30, discount: 10, is_recurring: false, period: monthly }) { granted_discount { account_slug discount } } }';

fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YOUR_API_KEY_HERE'
   },
   body: JSON.stringify({
     'query' : query
   })
  })
   .then(res => res.json())
   .then(res => console.log(JSON.stringify(res, null, 2)));

Arguments

You can use the following argument(s) to specify which discount to grant.

ArgumentDescriptionSupported fields
input GrantMarketplaceAppDiscountInput!The inputs used to specify which discount to grant. account_slug String!
app_id ID!
app_plan_ids [String!]!
days_valid Int!
discount Int!
is_recurring Boolean!
period DiscountPeriod

Fields

You can query back the following field(s) to retrieve data about the granted discount.

FieldDescriptionSupported fields
granted_discount GrantMarketplaceAppDiscount!The granted discount's metadata.account_slug String!
app_id ID!
app_plan_ids [String!]!
days_valid Int!
discount Int!
is_recurring Boolean!
period DiscountPeriod

Delete a discount

The delete_marketplace_app_discount mutation will delete an existing discount for a marketplace app subscription. You can specify what fields to query back when you run the mutation.

mutation {
  delete_marketplace_app_discount (
    input: {
      account_slug: "Test", 
      app_id: 123456
    }) {
    deleted_discount {
      account_slug
      app_id
    }
  }
}
let query = 'mutation { delete_marketplace_app_discount ( input: { account_slug: "Test", app_id: 123456 }) { deleted_discount { account_slug app_id } } }';

fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YOUR_API_KEY_HERE'
   },
   body: JSON.stringify({
     'query' : query
   })
  })
   .then(res => res.json())
   .then(res => console.log(JSON.stringify(res, null, 2)));

Arguments

You can use the following argument(s) to specify which discount to delete.

ArgumentDescriptionSupported fields
input DeleteMarketplaceAppDiscountInput!The details account_slug String!
app_id ID!

Fields

You can query back the following field(s) to retrieve data about the deleted discount.

FieldDescriptionSupported fields
deleted_discount DeleteMarketplaceAppDiscount!The deleted discount's metadata.account_slug String!
app_id ID!