Mason Tiered Discounts API
The Tiered Discounts API from Mason — 4 operation(s) for tiered discounts.
The Tiered Discounts API from Mason — 4 operation(s) for tiered discounts.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/mason-tiered-discounts-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Mason Discounts Tiered Discounts API
version: 0.1.0
description: Mason (getmason.io / ModeMagic) discounts API — harvested verbatim from the provider's ReadMe-hosted OpenAPI definition at getmason.dev.
servers:
- url: https://api.getmason.io
tags:
- name: Tiered Discounts
paths:
/api/v1/scrooge/tiered-discounts:
put:
tags:
- Tiered Discounts
summary: Create Tiered Discounts
operationId: create_tiered_discounts_api_v1_scrooge_tiered_discounts_put
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TieredDiscountPayload'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/scrooge/discounts/bulk:
put:
tags:
- Tiered Discounts
summary: Create Bulk Discounts
description: 'Create multiple bulk discounts, including tiered and BxGy discounts.
- **store**: The identifier for the store where discounts are applied.
- **discount_info**: A list of discount objects, which can be of various types including:
- TieredDiscountModel
- BxGyDiscountModel
- TimedDiscountModel
- CustomBxGyDiscountModel
**Example Request Body:**
```json
{
"store": "store_name",
"discount_info": [
{
"type": "TIERED",
"value": [
{
"min_cart_value": 50.0,
"min_quantity": 2,
"type": "PERCENTAGE",
"value": 10.0,
"buy": [{"id": "product_id", "variants": ["variant_id"]}],
"label": "10% off on orders over $50",
"uid": "unique_discount_id_1"
},
{
"min_cart_value": 100.0,
"min_quantity": 2,
"type": "PERCENTAGE",
"value": 20.0,
"buy": [{"id": "product_id", "variants": ["variant_id"]}],
"label": "20% off on orders over $100",
"uid": "unique_discount_id_2"
}
],
"applies_to": {
"collections": ["collection_id_1"]
}
}
],
"discount_ids_map": {
"unique_discount_id_1": "discount_id_1"
},
"collection_ids": ["collection_id_2"]
}
```
**Example Response:**
```json
{
"status": "success",
"data": {
"discount_ids_map": {
"unique_discount_id_1": "discount_id_1",
"unique_discount_id_2": "discount_id_2"
},
"collection_ids": ["collection_id_2"]
}
}
```
**Responses:**
- **200**: Successful creation of bulk discounts.
- **400**: Invalid store or payload.
- **500**: Internal server error.'
operationId: create_bulk_discounts_api_v1_scrooge_discounts_bulk_put
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/BulkDiscountPayload'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: object
title: Response Create Bulk Discounts Api V1 Scrooge Discounts Bulk Put
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/scrooge/discounts/bulk/delete:
put:
tags:
- Tiered Discounts
summary: Cleanup Tiered Discounts
operationId: cleanup_tiered_discounts_api_v1_scrooge_discounts_bulk_delete_put
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteTieredDiscountPayload'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/scrooge/tiered-discounts/delete:
put:
tags:
- Tiered Discounts
summary: Cleanup Tiered Discounts
operationId: cleanup_tiered_discounts_api_v1_scrooge_tiered_discounts_delete_put
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteTieredDiscountPayload'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
TieredDiscountModel:
properties:
type:
type: string
enum:
- tiered
const: tiered
title: Type
description: The type of discount, must be 'TIERED'.
value:
items:
$ref: '#/components/schemas/DiscountValue'
type: array
title: Value
description: A list of discount values associated with this tiered discount.
applies_to:
anyOf:
- $ref: '#/components/schemas/DiscountAppliesTo'
- type: 'null'
description: Optional. Specifies the collections this discount applies to.
type: object
required:
- type
- value
title: TieredDiscountModel
CustomBxGyDiscountModel:
properties:
type:
type: string
enum:
- custom_bxgy_order
const: custom_bxgy_order
title: Type
description: The type of discount, must be 'CUSTOM_BXGY_ORDER_DISCOUNT'.
label:
type: string
title: Label
description: A label for the discount.
buys:
allOf:
- $ref: '#/components/schemas/models__custom_bxgy_discount_model__BuyItems'
description: Details of what the customer buys.
gets:
allOf:
- $ref: '#/components/schemas/models__custom_bxgy_discount_model__CustomerGets'
description: Details of what the customer gets.
type: object
required:
- type
- label
- buys
- gets
title: CustomBxGyDiscountModel
models__custom_bxgy_discount_model__CustomerGets:
properties:
value:
allOf:
- $ref: '#/components/schemas/models__custom_bxgy_discount_model__GetValue'
description: The value of the discount for the items the customer gets.
type: object
required:
- value
title: CustomerGets
DiscountValue:
properties:
min_cart_value:
anyOf:
- type: number
- type: 'null'
title: Min Cart Value
min_quantity:
anyOf:
- type: integer
- type: 'null'
title: Min Quantity
type:
type: string
title: Type
value:
anyOf:
- type: number
- items:
$ref: '#/components/schemas/FreebieBuyGet'
type: array
title: Value
buy:
anyOf:
- items:
$ref: '#/components/schemas/FreebieBuyGet'
type: array
- type: 'null'
title: Buy
label:
anyOf:
- type: string
- type: 'null'
title: Label
uid:
type: string
title: Uid
type: object
required:
- type
- value
- uid
title: DiscountValue
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
type: object
required:
- loc
- msg
- type
title: ValidationError
BulkDiscountPayload:
properties:
store:
type: string
title: Store
discount_info:
items:
anyOf:
- $ref: '#/components/schemas/TieredDiscountModel'
- $ref: '#/components/schemas/BxGyDiscountModel'
- $ref: '#/components/schemas/TimedDiscountModel'
- $ref: '#/components/schemas/CustomBxGyDiscountModel'
type: array
title: Discount Info
discount_ids_map:
type: object
title: Discount Ids Map
collection_ids:
items: {}
type: array
title: Collection Ids
type: object
required:
- store
- discount_info
- discount_ids_map
- collection_ids
title: BulkDiscountPayload
Product:
properties:
id:
type: string
title: Id
description: The unique identifier for the product.
variants:
items:
type: string
type: array
title: Variants
description: A list of variant IDs associated with the product.
type: object
required:
- id
- variants
title: Product
models__bxgy_discount_model__GetValue:
properties:
quantity:
type: integer
title: Quantity
description: The quantity of items the customer gets.
type:
type: string
title: Type
description: The type of discount, either 'PERCENTAGE' or 'FIXED_AMOUNT'.
value:
anyOf:
- type: string
- type: number
title: Value
description: The value of the discount, can be a string or a float.
type: object
required:
- quantity
- type
- value
title: GetValue
models__bxgy_discount_model__BuyItems:
properties:
products:
items:
$ref: '#/components/schemas/Product'
type: array
title: Products
description: A list of products that can be bought.
collections:
items:
$ref: '#/components/schemas/Collection'
type: array
title: Collections
description: A list of collections that can be bought.
type: object
title: BuyItems
models__bxgy_discount_model__CustomerGets:
properties:
items:
allOf:
- $ref: '#/components/schemas/models__bxgy_discount_model__BuyItems'
description: Items that the customer gets.
value:
allOf:
- $ref: '#/components/schemas/models__bxgy_discount_model__GetValue'
description: The value of the discount for the items the customer gets.
type: object
required:
- items
- value
title: CustomerGets
models__custom_bxgy_discount_model__GetValue:
properties:
type:
type: string
enum:
- percentage
- fixed_amount
title: Type
description: The type of discount, either 'PERCENTAGE' or 'FIXED_AMOUNT'.
value:
anyOf:
- type: string
- type: number
title: Value
description: The value of the discount, can be a string or a float.
type: object
required:
- type
- value
title: GetValue
DeleteTieredDiscountPayload:
properties:
store:
type: string
title: Store
access_token:
type: string
title: Access Token
discount_ids_map:
type: object
title: Discount Ids Map
collection_ids:
items: {}
type: array
title: Collection Ids
applies_to_collection_ids:
items: {}
type: array
title: Applies To Collection Ids
type: object
required:
- store
- discount_ids_map
- collection_ids
- applies_to_collection_ids
title: DeleteTieredDiscountPayload
TieredDiscountPayload:
properties:
store:
type: string
title: Store
access_token:
type: string
title: Access Token
discount_info:
type: object
title: Discount Info
discount_ids_map:
type: object
title: Discount Ids Map
collection_ids:
items: {}
type: array
title: Collection Ids
type: object
required:
- store
- discount_info
- discount_ids_map
- collection_ids
title: TieredDiscountPayload
DiscountAppliesTo:
properties:
collections:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Collections
type: object
title: DiscountAppliesTo
BuyCollection:
properties:
id:
type: string
title: Id
description: The unique identifier for the collection being bought.
quantity:
anyOf:
- type: integer
- type: 'null'
title: Quantity
description: The quantity of the collection being bought.
default: 1
type: object
required:
- id
title: BuyCollection
Collection:
properties:
id:
type: string
title: Id
description: The unique identifier for the collection.
type: object
required:
- id
title: Collection
FreebieBuyGet:
properties:
id:
type: string
title: Id
variants:
items:
type: string
type: array
title: Variants
type: object
required:
- id
- variants
title: FreebieBuyGet
CustomerBuys:
properties:
items:
allOf:
- $ref: '#/components/schemas/models__bxgy_discount_model__BuyItems'
description: Items that the customer buys.
type: object
required:
- items
title: CustomerBuys
BxGyDiscountModel:
properties:
type:
type: string
title: Type
description: The type of discount, must start with 'BXGY'.
label:
type: string
title: Label
description: A label for the discount.
min_cart_value:
anyOf:
- type: number
- type: 'null'
title: Min Cart Value
description: Minimum cart value required to apply the discount.
min_quantity_value:
anyOf:
- type: integer
- type: 'null'
title: Min Quantity Value
description: Minimum quantity required to apply the discount.
buys:
allOf:
- $ref: '#/components/schemas/CustomerBuys'
description: Details of what the customer buys.
gets:
allOf:
- $ref: '#/components/schemas/models__bxgy_discount_model__CustomerGets'
description: Details of what the customer gets.
type: object
required:
- type
- label
- buys
- gets
title: BxGyDiscountModel
TimedDiscountModel:
properties:
uid:
anyOf:
- type: string
- type: 'null'
title: Uid
description: Unique identifier for the discount.
type:
type: string
enum:
- timed_discount
const: timed_discount
title: Type
description: The type of discount, must be 'TIMED_DISCOUNT'.
label:
type: string
title: Label
description: A label for the discount.
start_time:
anyOf:
- type: string
- type: 'null'
title: Start Time
description: The start time of the discount in ISO format.
end_time:
anyOf:
- type: string
- type: 'null'
title: End Time
description: The end time of the discount in ISO format.
type: object
required:
- type
- label
title: TimedDiscountModel
models__custom_bxgy_discount_model__BuyItems:
properties:
collections:
items:
$ref: '#/components/schemas/BuyCollection'
type: array
title: Collections
description: A list of collections that can be bought.
type: object
title: BuyItems