OpenAPI Specification
openapi: 3.0.1
info:
contact:
email: support@suger.io
name: Suger Support
url: https://www.suger.io/support
description: CRUD operations on a set of resources, including organizations, products, offers, entitlements, usage record groups for meterting, etc.
title: Suger API Offer API
version: '1.0'
servers:
- url: https://api.suger.cloud
tags:
- description: Access to Offer resources
name: Offer
paths:
/org/{orgId}/draftOffer:
post:
description: Create a new draft offer or update the existing draft offer. When updating draft offer, the offer.ID is required.
operationId: CreateOrUpdateDraftOffer
parameters:
- description: Organization ID
explode: false
in: path
name: orgId
required: true
schema:
type: string
style: simple
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/WorkloadOffer'
description: the draft offer to create
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/WorkloadOffer'
description: OK
'400':
content:
application/json:
schema:
type: string
description: Bad request error
'405':
content:
application/json:
schema:
type: string
description: Method not allowed
'500':
content:
application/json:
schema:
type: string
description: Internal error
security:
- APIKeyAuth: []
summary: Create Or Update Draft Offer
tags:
- Offer
x-codegen-request-body-name: data
/org/{orgId}/offer:
get:
description: List offers under the given organization with pagination and optional filter.
operationId: ListOffers
parameters:
- description: Organization ID
explode: false
in: path
name: orgId
required: true
schema:
type: string
style: simple
- description: filter by offer status
explode: true
in: query
name: status
required: false
schema:
type: string
style: form
- description: filter by partner
explode: true
in: query
name: partner
required: false
schema:
type: string
style: form
- description: filter by offerType
explode: true
in: query
name: offerType
required: false
schema:
type: string
style: form
- description: filter by productId
explode: true
in: query
name: productId
required: false
schema:
type: string
style: form
- description: filter by buyerId
explode: true
in: query
name: buyerId
required: false
schema:
type: string
style: form
- description: filter by hubspotDealId
explode: true
in: query
name: hubspotDealId
required: false
schema:
type: string
style: form
- description: filter by contactId
explode: true
in: query
name: contactId
required: false
schema:
type: string
style: form
- description: List pagination size, default 1000, max value is 1000
explode: true
in: query
name: limit
required: false
schema:
type: integer
style: form
- description: List pagination offset, default 0
explode: true
in: query
name: offset
required: false
schema:
type: integer
style: form
responses:
'200':
content:
application/json:
schema:
items:
$ref: '#/components/schemas/WorkloadOffer'
type: array
description: OK
'400':
content:
application/json:
schema:
type: string
description: Bad request error
'405':
content:
application/json:
schema:
type: string
description: Method not allowed
'500':
content:
application/json:
schema:
type: string
description: Internal server error
security:
- APIKeyAuth: []
summary: List Offers
tags:
- Offer
post:
description: Create a private offer under the given organization.
operationId: CreateOffer
parameters:
- description: Organization ID
explode: false
in: path
name: orgId
required: true
schema:
type: string
style: simple
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/WorkloadOffer'
description: Offer to create
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/WorkloadOffer'
description: OK
'400':
content:
application/json:
schema:
type: string
description: Bad request error
'405':
content:
application/json:
schema:
type: string
description: Method not allowed
'500':
content:
application/json:
schema:
type: string
description: Internal server error
security:
- APIKeyAuth: []
summary: Create Offer
tags:
- Offer
x-codegen-request-body-name: data
/org/{orgId}/offer/{offerId}:
delete:
description: The offer is soft deleted (marked as DELETED status) in Suger service. Only the offer with status = "DRAFT", "CREATE_FAILED", "EXPIRED" or "CANCELLED" is allowed to be deleted.
operationId: DeleteOffer
parameters:
- description: Organization ID
explode: false
in: path
name: orgId
required: true
schema:
type: string
style: simple
- description: Offer ID
explode: false
in: path
name: offerId
required: true
schema:
type: string
style: simple
responses:
'200':
content:
application/json:
schema:
type: string
description: Empty string if deletion is successful
'400':
content:
application/json:
schema:
type: string
description: Bad request error
'404':
content:
application/json:
schema:
type: string
description: Not found error
'500':
content:
application/json:
schema:
type: string
description: Internal error
security:
- APIKeyAuth: []
summary: Delete Offer
tags:
- Offer
get:
description: Get the offer by the given offer ID.
operationId: GetOffer
parameters:
- description: Organization ID
explode: false
in: path
name: orgId
required: true
schema:
type: string
style: simple
- description: Offer ID
explode: false
in: path
name: offerId
required: true
schema:
type: string
style: simple
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/WorkloadOffer'
description: the Offer Object
'400':
content:
application/json:
schema:
type: string
description: Bad request error
'404':
content:
application/json:
schema:
type: string
description: Not found
'405':
content:
application/json:
schema:
type: string
description: Method not allowed
'500':
content:
application/json:
schema:
type: string
description: Internal error
security:
- APIKeyAuth: []
summary: Get Offer
tags:
- Offer
/org/{orgId}/offer/{offerId}/cancel:
post:
description: Only the offer with status = "PENDING_ACCEPTANCE", "PENDING_CANCEL", "ACTIVE" or "USED" is allowed to cancel.
operationId: CancelOffer
parameters:
- description: Organization ID
explode: false
in: path
name: orgId
required: true
schema:
type: string
style: simple
- description: Offer ID
explode: false
in: path
name: offerId
required: true
schema:
type: string
style: simple
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/WorkloadOffer'
description: OK
'400':
content:
application/json:
schema:
type: string
description: Bad request error
'405':
content:
application/json:
schema:
type: string
description: Method not allowed
'500':
content:
application/json:
schema:
type: string
description: Internal error
security:
- APIKeyAuth: []
summary: Cancel Offer
tags:
- Offer
/org/{orgId}/offer/{offerId}/eula:
get:
description: Get the EULA file of the given offer ID.
operationId: GetOfferEula
parameters:
- description: Organization ID
explode: false
in: path
name: orgId
required: true
schema:
type: string
style: simple
- description: Offer ID
explode: false
in: path
name: offerId
required: true
schema:
type: string
style: simple
- description: response format in JSON or string
explode: true
in: query
name: format
required: false
schema:
type: string
style: form
responses:
'200':
content:
application/json:
schema:
type: string
description: AWS S3 signed URL with 30 minutes expiry time
'400':
content:
application/json:
schema:
type: string
description: Bad request error
'405':
content:
application/json:
schema:
type: string
description: Method not allowed
'500':
content:
application/json:
schema:
type: string
description: Internal error
security:
- APIKeyAuth: []
summary: Get Offer EULA
tags:
- Offer
/org/{orgId}/offer/{offerId}/extendExpiryDate:
post:
description: Only the offer with status = "PENDING_ACCEPTANCE", "EXPIRED" or "ACCEPTED" is allowed to extend expiry date.
operationId: ExtendPrivateOfferExpiryDate
parameters:
- description: Organization ID
explode: false
in: path
name: orgId
required: true
schema:
type: string
style: simple
- description: Offer ID
explode: false
in: path
name: offerId
required: true
schema:
type: string
style: simple
- description: new expiry date in YYYY-MM-DD format
explode: true
in: query
name: newExpiryDate
required: true
schema:
type: string
style: form
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/WorkloadOffer'
description: OK
'400':
content:
application/json:
schema:
type: string
description: Bad request error
'404':
content:
application/json:
schema:
type: string
description: Not found
'500':
content:
application/json:
schema:
type: string
description: Internal error
security:
- APIKeyAuth: []
summary: Extend Offer Expiry Date
tags:
- Offer
/org/{orgId}/offer/{offerId}/metaInfo:
patch:
description: Update the meta info of the given offer.
operationId: UpdateOfferMetaInfo
parameters:
- description: Organization ID
explode: false
in: path
name: orgId
required: true
schema:
type: string
style: simple
- description: Offer ID
explode: false
in: path
name: offerId
required: true
schema:
type: string
style: simple
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/WorkloadMetaInfo'
description: Offer meta info to update
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/WorkloadMetaInfo'
description: OK
'400':
content:
application/json:
schema:
type: string
description: Bad request error
'405':
content:
application/json:
schema:
type: string
description: Method not allowed
'500':
content:
application/json:
schema:
type: string
description: Internal error
security:
- APIKeyAuth: []
summary: Update Offer Meta Info
tags:
- Offer
x-codegen-request-body-name: data
/org/{orgId}/offer/{offerId}/notifyContacts:
post:
description: Send offer notifications to the given contact ids. If contactIDs is empty, send notifications to all contacts of the offer.
operationId: SendOfferNotifications
parameters:
- description: Organization ID
explode: false
in: path
name: orgId
required: true
schema:
type: string
style: simple
- description: Offer ID
explode: false
in: path
name: offerId
required: true
schema:
type: string
style: simple
requestBody:
content:
application/json:
schema:
items:
type: string
type: array
description: List of Contact IDs, if emoty or nil, send notifications to all contacts of the offer
required: false
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/NotificationEvent'
description: NotificationEvent object
'400':
content:
application/json:
schema:
type: string
description: Bad request error
'405':
content:
application/json:
schema:
type: string
description: Method not allowed
'500':
content:
application/json:
schema:
type: string
description: Internal error
security:
- APIKeyAuth: []
summary: Notify Offer Contacts
tags:
- Offer
x-codegen-request-body-name: contactIDs
/org/{orgId}/offer/{offerId}/resellerEula:
get:
description: Get the Reseller EULA file of the given offer ID.
operationId: GetOfferResellerEula
parameters:
- description: Organization ID
explode: false
in: path
name: orgId
required: true
schema:
type: string
style: simple
- description: Offer ID
explode: false
in: path
name: offerId
required: true
schema:
type: string
style: simple
responses:
'200':
content:
application/json:
schema:
type: string
description: AWS S3 signed URL with 30 minutes expiry time
'400':
content:
application/json:
schema:
type: string
description: Bad request error
'405':
content:
application/json:
schema:
type: string
description: Method not allowed
'500':
content:
application/json:
schema:
type: string
description: Internal error
security:
- APIKeyAuth: []
summary: Get Offer Reseller EULA
tags:
- Offer
/org/{orgId}/offerExternalId/{offerExternalId}:
get:
description: Get the offer by the given offer external ID.
operationId: GetOfferByExternalId
parameters:
- description: Organization ID
explode: false
in: path
name: orgId
required: true
schema:
type: string
style: simple
- description: Offer External ID
explode: false
in: path
name: offerExternalId
required: true
schema:
type: string
style: simple
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/WorkloadOffer'
description: the Offer Object
'400':
content:
application/json:
schema:
type: string
description: Bad request error
'404':
content:
application/json:
schema:
type: string
description: Not found
'405':
content:
application/json:
schema:
type: string
description: Method not allowed
'500':
content:
application/json:
schema:
type: string
description: Internal error
security:
- APIKeyAuth: []
summary: Get Offer By External ID
tags:
- Offer
components:
schemas:
GcpMarketplaceResellerPrivateOfferPlanInstallmentTemplate:
example:
priceModelTemplate:
baseOffer: baseOffer
commitment:
commitmentAmountPerPeriodTemplate:
decimalAmountConstraint:
minAmount:
nanos: 9
units: units
defaultAmount:
nanos: 9
units: units
maxAmount:
nanos: 9
units: units
currencyCode: currencyCode
period:
unit: MONTHLY_PERIOD
count: 9
discountTemplate:
discountPercentage:
minAmount:
nanos: 9
units: units
defaultAmount:
nanos: 9
units: units
maxAmount:
nanos: 9
units: units
discountEconomics: discountEconomics
hideDiscountPercentage: true
discountedPrice:
nanos: 1
units: units
currencyCode: currencyCode
consumption: overage
payg:
period:
unit: MONTHLY_PERIOD
count: 9
discountTemplate:
discountPercentage:
minAmount:
nanos: 9
units: units
defaultAmount:
nanos: 9
units: units
maxAmount:
nanos: 9
units: units
discountEconomics: discountEconomics
hideDiscountPercentage: true
discountedPrice:
nanos: 1
units: units
currencyCode: currencyCode
skuDiscountTemplates:
- '{}'
- '{}'
skuRepresentation:
skuList:
skus:
- skus
- skus
skus: skus
skuGroupList: '{}'
subscription: fixedPrice
fixedPrice:
period:
unit: MONTHLY_PERIOD
count: 9
discountTemplate:
discountPercentage:
minAmount:
nanos: 9
units: units
defaultAmount:
nanos: 9
units: units
maxAmount:
nanos: 9
units: units
discountEconomics: discountEconomics
hideDiscountPercentage: true
discountedPrice:
nanos: 1
units: units
currencyCode: currencyCode
overage:
discountTemplate:
discountPercentage:
minAmount:
nanos: 9
units: units
defaultAmount:
nanos: 9
units: units
maxAmount:
nanos: 9
units: units
discountEconomics: discountEconomics
hideDiscountPercentage: true
discountedPrice:
nanos: 1
units: units
currencyCode: currencyCode
skuDiscountTemplates:
- '{}'
- '{}'
skuRepresentation:
skuList:
skus:
- skus
- skus
skus: skus
skuGroupList: '{}'
startTime: 2000-01-23 04:56:07+00:00
properties:
priceModelTemplate:
$ref: '#/components/schemas/GcpMarketplaceResellerPrivateOfferPlanPriceModelTemplate'
startTime:
format: date-time
type: string
type: object
SnowflakeMarketplaceOffer:
properties:
access_end_time:
type: string
access_start_date_preference:
type: string
access_start_time:
type: string
additional_information:
type: string
comment:
type: string
contract_duration_months:
type: integer
contract_type:
type: string
contract_value:
type: string
discount:
type: number
display_name:
type: string
expiration_time:
type: string
invoice_start_date_preference:
description: 'invoice start date preference: FIRST_DAY_NEXT_MONTH, OFFER_ACCEPTED_DATE'
type: string
invoice_start_time:
type: string
is_default:
type: boolean
name:
type: string
payment_terms:
$ref: '#/components/schemas/SnowflakeMarketplaceOfferPaymentTerms'
pricing_plan_name:
type: string
state:
type: string
state_updated_on:
type: string
target_consumer:
type: string
terms_of_service:
allOf:
- $ref: '#/components/schemas/SnowflakeMarketplaceOfferTermsOfService'
description: 'terms of service: {"type":"DEFAULT"}'
type: object
updated_on:
type: string
type: object
AzureIncludedBaseQuantity:
example:
quantity: 1.2315135367772556
isInfinite: true
recurringUnit: Monthly
properties:
isInfinite:
type: boolean
quantity:
type: number
recurringUnit:
enum:
- Monthly
- Annual
type: string
type: object
GcpMarketplacePurchaseChannel:
properties:
marketplace:
type: boolean
reseller:
type: boolean
type: object
GcpMarketplaceResellerInfo:
example:
billingAccountOrgDisplayName: billingAccountOrgDisplayName
resellerPrivateOfferPlanScope: resellerPrivateOfferPlanScope
partnerAccountName: partnerAccountName
notesToReseller: notesToReseller
resellerContactName: resellerContactName
resellOfferTemplateId: resellOfferTemplateId
billingAccountId: billingAccountId
billingAccountType: billingAccountType
billingAccountNickname: billingAccountNickname
resellerContactEmail: resellerContactEmail
resellerPrivateOfferPlanId: resellerPrivateOfferPlanId
subBillingAccount: subBillingAccount
properties:
billingAccountId:
type: string
billingAccountNickname:
type: string
billingAccountOrgDisplayName:
type: string
billingAccountType:
type: string
notesToReseller:
type: string
partnerAccountName:
description: In the format of ""organizations/{GcpOrganizationID}/partnerAccounts/{partnerAccountID}"
type: string
resellOfferTemplateId:
type: string
resellerContactEmail:
type: string
resellerContactName:
type: string
resellerPrivateOfferPlanId:
type: string
resellerPrivateOfferPlanScope:
type: string
subBillingAccount:
description: In the format of "billingAccounts/..."
type: string
type: object
SnowflakeMarketplacePlanInstallment:
example:
installment_amount: 4.652396432933246
installment_number: 8.969578798196912
properties:
installment_amount:
type: number
installment_number:
type: number
type: object
AzureProductVariantTrial:
example:
duration: 9
dateTimeRange:
endAt:
dateTimeInUtc: dateTimeInUtc
localizePerMarket: true
startAt:
dateTimeInUtc: dateTimeInUtc
localizePerMarket: true
type: NoTrial
durationType: Minute
properties:
dateTimeRange:
$ref: '#/components/schemas/AzureLocalizedTimeRange'
duration:
type: integer
durationType:
enum:
- Minute
- Days
- Months
type: string
type:
enum:
- NoTrial
- TimedAccess
- TimedUsage
- Unlimited
type: string
type: object
PriceModelBulk:
properties:
bulkAmount:
description: A currency amount to rate usage by
type: number
bulkSize:
description: 'An integer amount to represent package size. For example, 1000 here would divide
usage by 1000 before multiplying by package_amount in rating'
type: integer
type: object
AwsMarketplaceCppoOpportunityTerm:
properties:
CurrencyCode:
type: string
Documents:
items:
$ref: '#/components/schemas/AwsMarketplaceCatalogLegalTermDocument'
type: array
Duration:
description: ISO 8601 duration format. For example, "P12M" represents 12 months.
type: string
Grants:
items:
$ref: '#/components/schemas/AwsMarketplaceCppoOpportunityUpfrontPriceGrant'
type: array
Id:
type: string
MaximumAgreementStartDate:
type: string
PositiveTargeting:
$ref: '#/components/schemas/AwsMarketplaceCppoOpportunityPositiveTargeting'
Price:
description: For ResaleFixedUpfrontPricingTerm
type: string
RateCards:
items:
$ref: '#/components/schemas/AwsMarketplaceCatalogPricingTermRateCard'
type: array
Schedule:
description: For ResalePaymentScheduleTerm
items:
$ref: '#/components/schemas/AwsMarketplaceCppoOpportunityPaymentSchedule'
type: array
Type:
$ref: '#/components/schemas/AwsMarketplaceCppoOpportunityTermType'
type: object
AzureMarketState:
example:
marketCode: marketCode
state: Disabled
properties:
marketCode:
description: ISO Country Code
type: string
state:
enum:
- Disabled
- Enabled
- StopSelling
- Terminated
type: string
type: object
NotificationEventAction:
enum:
- ''
- ABNORMAL_ALERT
- ACCEPT
- ADD
- APPROVE
- CANCEL
- CLOSE
- CREATE
- DELETE
- ARCHIVE
- DISBURSE
- END_SOON
- EXPIRE
- EXPIRE_SOON
- MERGE
- METER
- NEW_CLIENT_SIGNUP
- NOTIFY
- NOTIFY_CONTACTS
- OPEN_EMAIL
- PENDING_CANCEL
- PENDING_ACCEPTANCE
- REINSTATE
- REJECT
- REOPEN
- CHARGE
- REFUND
- ISSUE
- SIGN
- ROTATE_SECRET
- SUSPEND
- TEST
- UPDATE
- ACE_ENGAGEMENT_SCORE_UPDATE
- ACE_SALES_REP_UPDATE
- ACE_CUSTOMER_EMAIL_UPDATE
- AZURE_STATUS_UPDATE
- SUBMIT_APPROVAL_REQUEST
- REVIEW_APPROVAL_REQUEST
- COMPLETE
- FAIL
- WEBHOOK
- MARKETPLACE_CONTACT_EMAIL_UPDATE
type: string
x-enum-comments:
NotificationEventAction_ADD: Add user to organization
x-enum-varnames:
- NotificationEventAction_UNKNOWN
- NotificationEventAction_ABNORMAL_ALERT
- NotificationEventAction_ACCEPT
- NotificationEventAction_ADD
- NotificationEventAction_APPROVE
- NotificationEventAction_CANCEL
- NotificationEventAction_CLOSE
- NotificationEventAction_CREATE
- NotificationEventAction_DELETE
- NotificationEventAction_ARCHIVE
- NotificationEventAction_DISBURSE
- NotificationEventAction_END_SOON
- NotificationEventAction_EXPIRE
- NotificationEventAction_EXPIRE_SOON
- NotificationEventAction_MERGE
- NotificationEventAction_METER
- NotificationEventAction_NEW_CLIENT_SIGNUP
- NotificationEventAction_NOTIFY
- NotificationEventAction_NOTIFY_CONTACTS
- NotificationEventAction_OPEN_EMAIL
- NotificationEventAction_PENDING_CANCEL
- NotificationEventAction_PENDING_ACCEPTANCE
- NotificationEventAction_REINSTATE
- NotificationEventAction_REJECT
- NotificationEventAction_REOPEN
- NotificationEventAction_CHARGE
- NotificationEventAction_REFUND
- NotificationEventAction_ISSUE
- NotificationEventAction_SIGN
- NotificationEventAction_ROTATE_SECRET
- NotificationEventAction_SUSPEND
- NotificationEventAction_TEST
- NotificationEventAction_UPDATE
- NotificationEventAction_ACE_ENGAGEMENT_SCORE_UPDATE
- NotificationEventAction_ACE_SALES_REP_UPDATE
- NotificationEventAction_ACE_CUSTOMER_EMAIL_UPDATE
- NotificationEventAction_AZURE_STATUS_UPDATE
- NotificationEventAction_SUBMIT_APPROVAL_REQUEST
- NotificationEventAction_REVIEW_APPROVAL_REQUEST
- NotificationEventAction_COMPLETE
- NotificationEventAction_FAIL
- NotificationEventAction_WEBHOOK
- NotificationEventAction_MARKETPLACE_CONTACT_EMAIL_UPDATE
GcpMarketplacePrivateOfferInstallmentTimeline:
properties:
installments:
items:
$ref: '#/components/schemas/GcpMarketplacePrivateOfferInstallment'
type: array
type: obje
# --- truncated at 32 KB (286 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/suger/refs/heads/main/openapi/suger-offer-api-openapi.yml