Solvimon promotionCodes API
The promotionCodes API from Solvimon — 7 operation(s) for promotioncodes.
The promotionCodes API from Solvimon — 7 operation(s) for promotioncodes.
openapi: 3.1.0
info:
title: Configuration alertRules promotionCodes API
version: 1.0.0
servers:
- url: https://test.api.solvimon.com
description: The TEST environment for our API
- url: https://api.solvimon.com
description: The live environment for our API
tags:
- name: promotionCodes
paths:
/v{version}/promotion-codes:
get:
operationId: getPromotionCodes
summary: Get promotion codes
description: Requires the PROMOTION_CODE.VIEW permission.
tags:
- promotionCodes
parameters:
- name: version
in: path
description: version
required: true
schema:
type: string
default: '1'
- name: coupon_id
in: query
description: Filter by coupon id.
required: false
schema:
type: string
- name: statuses[]
in: query
description: Filter by promotion code status.
required: false
schema:
type: array
items:
type: string
- name: expand[]
in: query
description: The id fields of the resources that are going to be expanded.
required: false
schema:
type: array
items:
type: string
- name: limit
in: query
description: The amount of records shown in the list.
required: false
schema:
type: integer
- name: page
in: query
description: The page which is going to be shown.
required: false
schema:
type: integer
- name: order_by
in: query
description: The parameter by which the response is ordered.
required: false
schema:
type: string
- name: order_direction
in: query
description: The order direction by which the response is ordered.
required: false
schema:
type: string
- name: X-API-KEY
in: header
required: true
schema:
type: string
- name: x-platform-id
in: header
description: Platform ID.
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PromotionCodeResponseWrapper'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
post:
operationId: postPromotionCodes
summary: Create a promotion code
description: Requires the PROMOTION_CODE.CREATE permission.
tags:
- promotionCodes
parameters:
- name: version
in: path
description: version
required: true
schema:
type: string
default: '1'
- name: X-API-KEY
in: header
required: true
schema:
type: string
- name: x-platform-id
in: header
description: Platform ID.
required: false
schema:
type: string
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/PromotionCode'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PromotionCodeCreateRequest'
/v{version}/promotion-codes/{resourceIdOrReference}:
get:
operationId: getPromotionCodesByResourceIdOrReference
summary: Get a promotion code
description: Requires the PROMOTION_CODE.VIEW permission.
tags:
- promotionCodes
parameters:
- name: version
in: path
description: version
required: true
schema:
type: string
default: '1'
- name: resourceIdOrReference
in: path
description: The ID or reference of the resource.
required: true
schema:
type: string
default: ''
- name: expand[]
in: query
description: The id fields of the resources that are going to be expanded.
required: false
schema:
type: array
items:
type: string
- name: X-API-KEY
in: header
required: true
schema:
type: string
- name: x-platform-id
in: header
description: Platform ID.
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PromotionCode'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/v{version}/promotion-codes/{resourceIdOrReference}/redemptions:
get:
operationId: getPromotionCodesByResourceIdOrReferenceRedemptions
summary: Get a list of promotion code redemptions
description: Requires the PROMOTION_CODE.VIEW permission.
tags:
- promotionCodes
parameters:
- name: version
in: path
description: version
required: true
schema:
type: string
default: '1'
- name: resourceIdOrReference
in: path
description: The id of the promotion code or the code itself.
required: true
schema:
type: string
default: ''
- name: customer_id
in: query
description: Filter by customer id.
required: false
schema:
type: string
- name: pricing_plan_subscription_id
in: query
description: Filter by pricing plan subscription id.
required: false
schema:
type: string
- name: limit
in: query
description: The amount of records shown in the list.
required: false
schema:
type: integer
- name: page
in: query
description: The page which is going to be shown.
required: false
schema:
type: integer
- name: order_by
in: query
description: The parameter by which the response is ordered.
required: false
schema:
type: string
- name: order_direction
in: query
description: The order direction by which the response is ordered.
required: false
schema:
type: string
- name: expand[]
in: query
description: The id fields of the resources that are going to be expanded.
required: false
schema:
type: array
items:
type: string
- name: X-API-KEY
in: header
required: true
schema:
type: string
- name: x-platform-id
in: header
description: Platform ID.
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CouponRedemptionResponseWrapper'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/v{version}/promotion-codes/{resourceIdOrReference}/activate:
post:
operationId: postPromotionCodesByResourceIdOrReferenceActivate
summary: Activate a promotion code
tags:
- promotionCodes
parameters:
- name: version
in: path
description: version
required: true
schema:
type: string
default: '1'
- name: resourceIdOrReference
in: path
description: The ID or reference of the resource.
required: true
schema:
type: string
default: ''
- name: X-API-KEY
in: header
required: true
schema:
type: string
- name: x-platform-id
in: header
description: Platform ID.
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PromotionCode'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/v{version}/promotion-codes/{resourceIdOrReference}/deactivate:
post:
operationId: postPromotionCodesByResourceIdOrReferenceDeactivate
summary: Deactivate a promotion code
tags:
- promotionCodes
parameters:
- name: version
in: path
description: version
required: true
schema:
type: string
default: '1'
- name: resourceIdOrReference
in: path
description: The ID or reference of the resource.
required: true
schema:
type: string
default: ''
- name: X-API-KEY
in: header
required: true
schema:
type: string
- name: x-platform-id
in: header
description: Platform ID.
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PromotionCode'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/v{version}/promotion-codes/{resourceIdOrReference}/deprecate:
post:
operationId: postPromotionCodesByResourceIdOrReferenceDeprecate
summary: Deprecate a promotion code
tags:
- promotionCodes
parameters:
- name: version
in: path
description: version
required: true
schema:
type: string
default: '1'
- name: resourceIdOrReference
in: path
description: The ID or reference of the resource.
required: true
schema:
type: string
default: ''
- name: X-API-KEY
in: header
required: true
schema:
type: string
- name: x-platform-id
in: header
description: Platform ID.
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PromotionCode'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/v{version}/promotion-codes/{resourceIdOrReference}/archive:
post:
operationId: postPromotionCodesByResourceIdOrReferenceArchive
summary: Archive a promotion code
tags:
- promotionCodes
parameters:
- name: version
in: path
description: version
required: true
schema:
type: string
default: '1'
- name: resourceIdOrReference
in: path
description: The ID or reference of the resource.
required: true
schema:
type: string
default: ''
- name: X-API-KEY
in: header
required: true
schema:
type: string
- name: x-platform-id
in: header
description: Platform ID.
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PromotionCode'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
components:
schemas:
EInvoicingMapping:
type: object
properties:
target:
type: string
description: The target field for a UBL Invoice
source:
type:
- string
- 'null'
description: The source field from a Solvimon Invoice
description:
type:
- string
- 'null'
description: Optional description for the mapping
title: EInvoicingMapping
TaxIdValidationValid:
type: string
enum:
- VALID
- NOT_VALID
- UNKNOWN
title: TaxIdValidationValid
PromotionCodeResponseWrapper:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/PromotionCode'
limit:
type:
- integer
- 'null'
page:
type:
- integer
- 'null'
total_number_of_pages:
type:
- integer
- 'null'
links:
$ref: '#/components/schemas/PaginationLinks'
required:
- data
- links
title: PromotionCodeResponseWrapper
TaxIdValidation:
type: object
properties:
id:
type: string
validation_date:
type: string
source:
type: string
valid:
$ref: '#/components/schemas/TaxIdValidationValid'
message:
type:
- string
- 'null'
title: TaxIdValidation
AppliedCoupon:
type: object
properties:
id:
type: string
coupon_name:
type:
- string
- 'null'
promotion_code_resource_id:
type:
- string
- 'null'
promotion_code:
type:
- string
- 'null'
discount:
oneOf:
- $ref: '#/components/schemas/Discount'
- type: 'null'
title: AppliedCoupon
PricingItemConfigPricingType:
type: string
enum:
- FLAT
- FLAT_TOP_UP
- TIERED
- TIERED_TOP_UP
- TOP_TIERED
- STAIR_STEP
- STAIR_STEP_TOP_UP
- FIXED
- PASS_THROUGH
- NONE
title: PricingItemConfigPricingType
ConfiguredMeterValueIncludedVolume:
type: object
properties:
pricing_item_config_id:
type: string
description: Resource ID of type PRICING_ITEM_CONFIG
number:
type:
- string
- 'null'
amount:
$ref: '#/components/schemas/Amount'
start_at:
type:
- string
- 'null'
format: date-time
end_at:
type:
- string
- 'null'
format: date-time
reset_type:
type:
- string
- 'null'
title: ConfiguredMeterValueIncludedVolume
WalletTypeCreditCreditsGrant:
type: object
properties:
credit_type_id:
type: string
description: The credit type for wallets of wallet type.
title: WalletTypeCreditCreditsGrant
PricingPlanVersionSelectorType:
type: string
enum:
- LATEST
- VERSION
description: The type of the selector to determine pricing plan version (by default LATEST).
title: PricingPlanVersionSelectorType
MeterPropertyConditionComparator:
type: string
enum:
- EQUALS
- NOT_EQUALS
- IN
- NOT_IN
- GREATER_THAN
- GREATER_THAN_OR_EQUALS
- LESS_THAN
- LESS_THAN_OR_EQUALS
- EMPTY
- NOT_EMPTY
- CONTAINS
- NOT_CONTAINS
title: MeterPropertyConditionComparator
LinkedIntegration:
type: object
properties:
id:
type: string
link_details:
type: array
items:
$ref: '#/components/schemas/LinkDetail'
title: LinkedIntegration
AdyenPaymentGatewayIntegrationOwnership:
type: string
enum:
- PLATFORM
- SYSTEM
title: AdyenPaymentGatewayIntegrationOwnership
IntegrationDetails:
type: object
properties:
id:
type:
- string
- 'null'
reference:
type:
- string
- 'null'
payment_gateway_variant:
$ref: '#/components/schemas/IntegrationDetailsPaymentGatewayVariant'
adyen:
$ref: '#/components/schemas/AdyenIntegrationDetails'
stripe:
$ref: '#/components/schemas/StripeIntegrationDetails'
title: IntegrationDetails
WalletTypeCreditAmountGrantTaxCategory:
type: string
enum:
- STANDARD
- NO_TAX
- EXEMPT
description: The tax category to for what the wallet can be applied to.
title: WalletTypeCreditAmountGrantTaxCategory
BankAccountType:
type: string
enum:
- IBAN
- BIC_AND_ACCOUNT_NUMBER
- ACCOUNT_NUMBER_AND_BIC
- US_BANK_ACCOUNT
- US_LOCAL
- UK_LOCAL
- BR_LOCAL
- AR_LOCAL
- MX_LOCAL
description: Determines what fields should be present in the bank account node.
title: BankAccountType
PaymentGatewayPaymentAcceptor:
type: object
properties:
integration_id:
type: string
description: Resource ID of type INTEGRATION
integration:
oneOf:
- $ref: '#/components/schemas/Integration'
- type: 'null'
store_payment_method:
type:
- boolean
- 'null'
auto_charge_payment_method:
type:
- boolean
- 'null'
collection_type:
$ref: '#/components/schemas/PaymentGatewayPaymentAcceptorCollectionType'
link:
$ref: '#/components/schemas/PaymentGatewayPaymentAcceptorLink'
adyen:
$ref: '#/components/schemas/PaymentGatewayPaymentAcceptorAdyen'
title: PaymentGatewayPaymentAcceptor
PaymentAcceptorCustomRedirect:
type: object
properties:
url:
type:
- string
- 'null'
title: PaymentAcceptorCustomRedirect
MeterStatus:
type: string
enum:
- DRAFT
- ACTIVE
- ARCHIVED
- DEPRECATED
description: The status of the meter indicating the activity of the meter and the ability to update properties.
title: MeterStatus
PricingPlanSubscriptionSelectorRuleType:
type: string
enum:
- EQUALS
- NOT_EQUALS
- IN
- NOT_IN
- GREATER_THAN
- GREATER_THAN_OR_EQUALS
- LESS_THAN
- LESS_THAN_OR_EQUALS
- EMPTY
- NOT_EMPTY
- CONTAINS
- NOT_CONTAINS
title: PricingPlanSubscriptionSelectorRuleType
Integration:
type: object
properties:
object_type:
type:
- string
- 'null'
id:
type:
- string
- 'null'
reference:
type: string
description: A custom reference assigned to the integration.
name:
type: string
description: A custom name assigned to the integration.
description:
type: string
status:
oneOf:
- $ref: '#/components/schemas/IntegrationStatus'
- type: 'null'
description: The status of the integration.
message:
type:
- string
- 'null'
description: The message associated with the status of the integration.
type:
$ref: '#/components/schemas/IntegrationType'
description: The type of integration.
authentication:
$ref: '#/components/schemas/AuthenticationSettings'
description: The authentication information used for the integration
payment_gateway:
$ref: '#/components/schemas/PaymentGatewayIntegration'
e_invoicing:
$ref: '#/components/schemas/EInvoicingIntegration'
description: Integration to do eInvoicing
data_export:
$ref: '#/components/schemas/DataExportIntegration'
tax_calculation:
$ref: '#/components/schemas/TaxCalculationIntegration'
description: Integration to calculate tax
linked_resources_configurations:
type: array
items:
$ref: '#/components/schemas/IntegrationLinkedResourceConfiguration'
description: Details from the resources configurations from Solvimon linked to external integration system
email_provider:
$ref: '#/components/schemas/EmailProviderIntegration'
description: Email provider integration settings. Applicable when the integration type is EMAIL_PROVIDER.
title: Integration
PricingItemConfigWalletGrant:
type: object
properties:
wallet_type_id:
type: string
description: Resource ID of type WALLET_TYPE
wallet_type:
oneOf:
- $ref: '#/components/schemas/WalletType'
- type: 'null'
amount_grant:
$ref: '#/components/schemas/PricingItemConfigWalletGrantAmountGrant'
credits_grant:
$ref: '#/components/schemas/PricingItemConfigWalletGrantCreditsGrant'
expiry_policy:
$ref: '#/components/schemas/PricingItemConfigWalletGrantExpiryPolicy'
title: PricingItemConfigWalletGrant
PricingPlanSubscriptionSelectorDataField:
type: string
enum:
- BILLING_ENTITY_REGISTERED_ADDRESS_COUNTRY
- PRICING_PLAN_REFERENCE
title: PricingPlanSubscriptionSelectorDataField
PricingItemBillingPeriodConfig:
type: object
properties:
billing_period:
$ref: '#/components/schemas/Period'
configs:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/PricingItemConfig'
title: PricingItemBillingPeriodConfig
PricingPlanSchedule:
type: object
properties:
object_type:
type:
- string
- 'null'
id:
type:
- string
- 'null'
type:
oneOf:
- $ref: '#/components/schemas/PricingPlanScheduleType'
- type: 'null'
description: The type of the pricing plan schedule.
pricing_plan_subscription_id:
type: string
description: Resource ID of type PRICING_PLAN_SUBSCRIPTION
pricing_plan_id:
type:
- string
- 'null'
description: The resource ID of the pricing plan.
pricing_plan_version_id:
type:
- string
- 'null'
description: The resource ID of the pricing plan version.
pricing_plan_version_selector:
$ref: '#/components/schemas/PricingPlanVersionSelector'
description: Instead of the pricing_plan_version_id, during creation, a selector can be submitted to determine the pricing plan version.
start_at:
type: string
format: date-time
end_at:
type:
- string
- 'null'
format: date-time
pricing_currency:
oneOf:
- $ref: '#/components/schemas/PricingPlanSchedulePricingCurrency'
- type: 'null'
description: The default alphabetic currency code representing the type of currency used for the pricing.
billing_period:
$ref: '#/components/schemas/Period'
entitlements:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/Entitlement'
discount:
$ref: '#/components/schemas/Discount'
markup:
$ref: '#/components/schemas/Markup'
commitment:
$ref: '#/components/schemas/Commitment'
promotion_codes:
type:
- array
- 'null'
items:
type: string
coupon_ids:
type:
- array
- 'null'
items:
type: string
coupon_discount:
oneOf:
- $ref: '#/components/schemas/Discount'
- type: 'null'
coupons:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/AppliedCoupon'
seats_values:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/ConfiguredMeterValue'
included_volumes:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/ConfiguredMeterValueIncludedVolume'
enabled_pricings:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/EnabledPricing'
override_pricings:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/Pricing'
pricing_categories:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/PricingCategory'
description: Pricing defined directly on this schedule, in addition to (or instead of) a linked pricing plan version / rate-card.
combined_pricing_plan_version:
oneOf:
- $ref: '#/components/schemas/PricingPlanVersion'
- type: 'null'
realign_invoice_date_to_pricing_plan_schedule_start_at:
type:
- boolean
- 'null'
created_at:
type:
- string
- 'null'
title: PricingPlanSchedule
PricingPlanVersionSelector:
type: object
properties:
pricing_plan_id:
type:
- string
- 'null'
description: The ID of the pricing plan.
pricing_plan_reference:
type:
- string
- 'null'
description: Or the reference of the pricing plan.
type:
oneOf:
- $ref: '#/components/schemas/PricingPlanVersionSelectorType'
- type: 'null'
description: The type of the selector to determine pricing plan version (by default LATEST).
version:
type:
- integer
- 'null'
description: The specific version of the pricing plan version, in case of type VERSION
title: PricingPlanVersionSelector
EInvoiceFileFormat:
type: object
properties:
type:
type:
- string
- 'null'
description: The format of the eInvoice that can be downloaded
description:
type:
- string
- 'null'
title: EInvoiceFileFormat
ProductStatus:
type: string
enum:
- DRAFT
- ACTIVE
- ARCHIVED
- DEPRECATED
description: The status of the product.
title: ProductStatus
WalletTypeStatus:
type: string
enum:
- DRAFT
- ACTIVE
- INACTIVE
- DEPRECATED
- ARCHIVED
title: WalletTypeStatus
BigQuery:
type: object
properties:
project_id:
type: string
dataset_id:
type: string
dataset_location:
type: string
gcs_bucket_name:
type: string
gcs_hmac_key_access_id:
type: string
gcs_hmac_key_secret:
type: string
title: BigQuery
PricingItemConfigConditionsConfigsItems:
type: object
properties: {}
title: PricingItemConfigConditionsConfigsItems
TaxRegistration:
type: object
properties:
id:
type:
- string
- 'null'
description: The id of this tax registration
description:
type:
- string
- 'null'
description: The description of this tax regist
# --- truncated at 32 KB (170 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/solvimon/refs/heads/main/openapi/solvimon-promotioncodes-api-openapi.yml