Options
All
  • Public
  • Public/Protected
  • All
Menu

@voucherify/sdk - v2.9.0

Index

Enumerations

Classes

Interfaces

Type aliases

Functions

Type aliases

ApplicableToEffect

ApplicableToEffect: "APPLY_TO_EVERY" | "APPLY_TO_CHEAPEST" | "APPLY_TO_MOST_EXPENSIVE"

CampaignsAddCertainVoucherParams

CampaignsAddCertainVoucherParams: Pick<Partial<VouchersImport>, "category" | "redemption" | "metadata" | "additional_info">

CampaignsAddCertainVoucherResponse

CampaignsAddCertainVoucherResponse: CampaignsAddVoucherResponse

CampaignsAddVoucherBody

CampaignsAddVoucherBody: Pick<Partial<VouchersImport>, "code_config" | "category" | "redemption" | "metadata" | "additional_info">

CampaignsAddVoucherResponse

CampaignsAddVoucherResponse: Pick<VouchersResponse, "code" | "object" | "campaign" | "category" | "created_at" | "type" | "discount" | "gift" | "start_date" | "expiration_date" | "publish" | "redemption" | "active" | "additional_info" | "metadata" | "assets">

CampaignsCreateCampaign

CampaignsCreateCampaign: Omit<CampaignResponse, "id" | "protected" | "vouchers_generation_status" | "validation_rules_assignments" | "object" | "created_at" | "active"> & { active?: boolean }

CampaignsCreateCampaignResponse

CampaignsCreateCampaignResponse: CampaignResponse

CampaignsGetCampaignResponse

CampaignsGetCampaignResponse: CampaignResponse

CampaignsImportVouchers

CampaignsImportVouchers: Pick<VouchersImport, "code" | "redemption" | "metadata" | "additional_info" | "active">

CampaignsUpdateCampaign

CampaignsUpdateCampaign: Pick<CampaignResponse, "start_date" | "expiration_date" | "type" | "description" | "metadata">

CampaignsUpdateCampaignResponse

CampaignsUpdateCampaignResponse: CampaignResponse

CampaignsVouchersImportResponse

CampaignsVouchersImportResponse: { async_action_id: string }

Type declaration

  • async_action_id: string

ClientSideConsentsListResponse

ClientSideConsentsListResponse: ConsentsListResponse

ClientSideCustomersCreateParams

ClientSideCustomersCreateParams: CustomersCreateBody

ClientSideCustomersCreateResponse

ClientSideCustomersCreateResponse: CustomersCreateResponse

ClientSideCustomersUpdateConsentsBody

ClientSideCustomersUpdateConsentsBody: CustomersUpdateConsentsBody

ClientSideListVouchersParams

ClientSideListVouchersParams: VouchersListParams

ClientSidePublishPreparedPayload

ClientSidePublishPreparedPayload: ClientSidePublishPayload

ClientSidePublishResponse

ClientSidePublishResponse: DistributionsPublicationsCreateResponse & { vouchers_id?: string[] }

ClientSideRedeemOrder

ClientSideRedeemOrder: Partial<Pick<OrdersCreateResponse, "id" | "source_id" | "metadata" | "amount">> & { items?: ClientSideItem[] }

ClientSideRedemptionsRedeemStackableParams

ClientSideRedemptionsRedeemStackableParams: RedemptionsRedeemStackableParams

ClientSideRedemptionsRedeemStackableResponse

ClientSideRedemptionsRedeemStackableResponse: RedemptionsRedeemStackableResponse

ClientSideTrackCustomer

ClientSideTrackCustomer: CustomerRequest

ClientSideValidationValidateStackableResponse

ClientSideValidationValidateStackableResponse: ValidationValidateStackableResponse

ClientSideValidationsValidateStackableParams

ClientSideValidationsValidateStackableParams: ValidationsValidateStackableParams

ClientSideVoucherListing

ClientSideVoucherListing: Pick<VouchersResponse, "active" | "code" | "metadata" | "assets" | "object" | "expiration_date" | "start_date" | "created_at">

Customer

Customer: CustomerRequest

CustomerId

CustomerId: { id: string; object: "customer" }

Type declaration

  • id: string
  • object: "customer"

CustomerLoyalty

CustomerLoyalty: { campaigns: Record<string, { loyalty_tier: string; points: number; referred_customers: number }>; points: number; referred_customers: number }

Type declaration

  • campaigns: Record<string, { loyalty_tier: string; points: number; referred_customers: number }>
  • points: number
  • referred_customers: number

CustomerReferrals

CustomerReferrals: { campaigns: { campaign_id: string; date: string; referrer_id: string; related_object_id: string; related_object_type: string }[]; total: number }

Type declaration

  • campaigns: { campaign_id: string; date: string; referrer_id: string; related_object_id: string; related_object_type: string }[]
  • total: number

CustomerSummary

CustomerSummary: { orders: CustomerSummaryOrders; redemptions: CustomerSummaryRedemptions }

Type declaration

CustomerSummaryOrders

CustomerSummaryOrders: { average_amount: number; last_order_amount: number; last_order_date: string; total_amount: number; total_count: number }

Type declaration

  • average_amount: number
  • last_order_amount: number
  • last_order_date: string
  • total_amount: number
  • total_count: number

CustomerSummaryRedemptions

CustomerSummaryRedemptions: { gift: { amount_to_go: number; redeemed_amount: number }; loyalty_card: { points_to_go: number; redeemed_points: number }; total_failed: number; total_redeemed: number; total_rollback_failed: number; total_rollback_succeeded: number; total_rolled_back: number; total_succeeded: number }

Type declaration

  • gift: { amount_to_go: number; redeemed_amount: number }
    • amount_to_go: number
    • redeemed_amount: number
  • loyalty_card: { points_to_go: number; redeemed_points: number }
    • points_to_go: number
    • redeemed_points: number
  • total_failed: number
  • total_redeemed: number
  • total_rollback_failed: number
  • total_rollback_succeeded: number
  • total_rolled_back: number
  • total_succeeded: number

CustomerUnconfirmed

CustomerUnconfirmed: Pick<CustomerObject, "summary" | "email" | "loyalty"> & { object: "unconfirmed_customer" }

CustomerWithSummaryLoyaltyReferrals

CustomerWithSummaryLoyaltyReferrals: { address: { city?: string; country?: string; line_1?: string; line_2?: string; postal_code?: string; state?: string } | null; assets?: { cockpit_url?: string }; birthdate?: string; birthday?: string; created_at: string; description?: string; email?: string; id?: string; loyalty: CustomerLoyalty; metadata?: Record<string, any>; name?: string; object: "customer"; phone?: string; referrals: CustomerReferrals; source_id?: string; summary: CustomerSummary; system_metadata: Record<string, unknown>; updated_at?: string }

Type declaration

  • address: { city?: string; country?: string; line_1?: string; line_2?: string; postal_code?: string; state?: string } | null
  • Optional assets?: { cockpit_url?: string }
    • Optional cockpit_url?: string
  • Optional birthdate?: string
  • Optional birthday?: string
  • created_at: string
  • Optional description?: string
  • Optional email?: string
  • Optional id?: string
  • loyalty: CustomerLoyalty
  • Optional metadata?: Record<string, any>
  • Optional name?: string
  • object: "customer"
  • Optional phone?: string
  • referrals: CustomerReferrals
  • Optional source_id?: string
  • summary: CustomerSummary
  • system_metadata: Record<string, unknown>
  • Optional updated_at?: string

CustomersCreateBody

CustomersCreateBody: CustomerRequest

CustomersCreateResponse

CustomersCreateResponse: CustomerObject | CustomerUnconfirmed

CustomersGetResponse

CustomersGetResponse: CustomerObject | CustomerUnconfirmed

CustomersListParams

CustomersListParams: CustomersCommonListRequest

CustomersListResponse

CustomersListResponse: CustomersCommonListResponse

CustomersScrollParams

CustomersScrollParams: CustomersCommonListRequest

CustomersScrollResponse

CustomersScrollResponse: CustomersCommonListResponse

CustomersScrollYield

CustomersScrollYield: CustomerObject

CustomersUpdateConsentsBody

CustomersUpdateConsentsBody: Record<string, boolean>

CustomersUpdateInBulkRequestBody

CustomersUpdateInBulkRequestBody: (CustomerBase & CustomerAddress & { source_id: string | null })[]

CustomersUpdateParams

CustomersUpdateParams: CustomerRequest & IdOrSourceId

CustomersUpdateResponse

CustomersUpdateResponse: CustomerObject | CustomerUnconfirmed

Discount

DiscountAmountVouchersEffectTypes

DiscountAmountVouchersEffectTypes: "APPLY_TO_ORDER" | "APPLY_TO_ITEMS" | "APPLY_TO_ITEMS_PROPORTIONALLY" | "APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY" | "APPLY_TO_ITEMS_BY_QUANTITY"

DiscountAmount_

DiscountAmount_: { aggregated_amount_limit?: number; amount_off?: number; amount_off_formula?: string; effect?: DiscountAmountVouchersEffectTypes; is_dynamic?: boolean; type: "AMOUNT" }

Type declaration

  • Optional aggregated_amount_limit?: number
  • Optional amount_off?: number
  • Optional amount_off_formula?: string
  • Optional effect?: DiscountAmountVouchersEffectTypes
  • Optional is_dynamic?: boolean
  • type: "AMOUNT"

DiscountFixedVouchersEffectTypes

DiscountFixedVouchersEffectTypes: "APPLY_TO_ORDER" | "APPLY_TO_ITEMS"

DiscountFixed_

DiscountFixed_: { effect?: DiscountFixedVouchersEffectTypes; fixed_amount?: number; fixed_amount_formula?: string; is_dynamic?: boolean; type: "FIXED" }

Type declaration

  • Optional effect?: DiscountFixedVouchersEffectTypes
  • Optional fixed_amount?: number
  • Optional fixed_amount_formula?: string
  • Optional is_dynamic?: boolean
  • type: "FIXED"

DiscountPercentVouchersEffectTypes

DiscountPercentVouchersEffectTypes: "APPLY_TO_ORDER" | "APPLY_TO_ITEMS"

DiscountPercent_

DiscountPercent_: { aggregated_amount_limit?: number; amount_limit?: number; effect?: DiscountPercentVouchersEffectTypes; is_dynamic?: boolean; percent_off?: number; percent_off_formula?: string; type: "PERCENT" }

Type declaration

  • Optional aggregated_amount_limit?: number
  • Optional amount_limit?: number
  • Optional effect?: DiscountPercentVouchersEffectTypes
  • Optional is_dynamic?: boolean
  • Optional percent_off?: number
  • Optional percent_off_formula?: string
  • type: "PERCENT"

DiscountUnitBase_

DiscountUnitBase_: { effect?: "ADD_MISSING_ITEMS" | "ADD_NEW_ITEMS"; is_dynamic?: boolean; product?: SimpleProductDiscountUnit; sku?: SimpleSkuDiscountUnit; unit_off?: number; unit_off_formula?: string; unit_type: string }

Type declaration

  • Optional effect?: "ADD_MISSING_ITEMS" | "ADD_NEW_ITEMS"
  • Optional is_dynamic?: boolean
  • Optional product?: SimpleProductDiscountUnit
  • Optional sku?: SimpleSkuDiscountUnit
  • Optional unit_off?: number
  • Optional unit_off_formula?: string
  • unit_type: string

DiscountUnitMultiple_

DiscountUnitMultiple_: { effect: "ADD_MANY_ITEMS"; type: "UNIT"; units: DiscountUnitBase_[] }

Type declaration

DiscountUnitVouchersEffectTypes

DiscountUnitVouchersEffectTypes: "ADD_MISSING_ITEMS" | "ADD_NEW_ITEMS" | "ADD_MANY_ITEMS"

DiscountUnit_

DiscountUnit_: { type: "UNIT" } & DiscountUnitBase_

DiscountVouchersEffectTypes

DiscountVouchersEffectTypes: "ADD_MISSING_ITEMS" | "ADD_NEW_ITEMS" | "ADD_MANY_ITEMS" | "APPLY_TO_ORDER" | "APPLY_TO_ITEMS" | "APPLY_TO_ITEMS_PROPORTIONALLY" | "APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY" | "APPLY_TO_ITEMS_BY_QUANTITY"

DiscountVouchersTypes

DiscountVouchersTypes: "AMOUNT" | "PERCENT" | "UNIT" | "FIXED"

EarningRule

EarningRule: EarningRuleBase & { active: boolean; updated_at: string | null; validation_rule_id: string | null }

EarningRuleEvent

EarningRuleEvent: "order.paid" | "customer.segment.entered" | "custom_event" | "customer.loyalty.tier.upgraded" | "customer.loyalty.tier.downgraded" | "customer.loyalty.tier.prolonged" | "customer.loyalty.tier.joined" | "customer.loyalty.tier.left"

EarningRuleProportional

EarningRuleProportionalOrder

EarningRuleProportionalOrderItems

Export

ExportCustomerFields

ExportCustomerFields: "name" | "id" | "description" | "email" | "source_id" | "created_at" | "address_city" | "address_state" | "address_line_1" | "address_line_2" | "address_country" | "address_postal_code" | "redemptions_total_redeemed" | "redemptions_total_failed" | "redemptions_total_succeeded" | "redemptions_total_rolled_back" | "redemptions_total_rollback_failed" | "redemptions_total_rollback_succeeded" | "orders_total_amount" | "orders_total_count" | "orders_average_amount" | "orders_last_order_amount" | "orders_last_order_date" | "loyalty_points" | "loyalty_referred_customers" | "updated_at" | "phone" | "birthday" | "metadata" | "birthdate"

ExportCustomerFilters

ExportCustomerFilters: { junction?: Junction } & Partial<Record<ExportCustomerFields, FieldConditions>>

ExportCustomerOrder

ExportCustomerOrder: ExportCustomerFields | "-name" | "-id" | "-description" | "-email" | "-source_id" | "-created_at" | "-address_city" | "-address_state" | "-address_line_1" | "-address_line_2" | "-address_country" | "-address_postal_code" | "-redemptions_total_redeemed" | "-redemptions_total_failed" | "-redemptions_total_succeeded" | "-redemptions_total_rolled_back" | "-redemptions_total_rollback_failed" | "-redemptions_total_rollback_succeeded" | "-orders_total_amount" | "-orders_total_count" | "-orders_average_amount" | "-orders_last_order_amount" | "-orders_last_order_date" | "-loyalty_points" | "-loyalty_referred_customers" | "-updated_at" | "-phone" | "-birthday" | "-metadata" | "-birthdate"

ExportOrderFields

ExportOrderFields: "id" | "source_id" | "created_at" | "updated_at" | "status" | "amount" | "discount_amount" | "items_discount_amount" | "total_discount_amount" | "total_amount" | "customer_id" | "referrer_id" | "metadata"

ExportOrderFilters

ExportOrderFilters: { junction?: Junction } & Partial<Record<ExportOrderFields, FieldConditions>>

ExportOrderOrder

ExportOrderOrder: ExportOrderFields | "-id" | "-source_id" | "-created_at" | "-updated_at" | "-status" | "-amount" | "-discount_amount" | "-items_discount_amount" | "-total_discount_amount" | "-total_amount" | "-customer_id" | "-referrer_id" | "-metadata"

ExportPointsExpirationFields

ExportPointsExpirationFields: "id" | "campaign_id" | "voucher_id" | "points" | "status" | "expires_at"

ExportPointsExpirationFilters

ExportPointsExpirationFilters: { junction?: Junction } & Partial<Record<ExportPointsExpirationFields, FieldConditions>>

ExportPointsExpirationOrder

ExportPointsExpirationOrder: ExportPointsExpirationFields | "-id" | "-campaign_id" | "-voucher_id" | "-points" | "-status" | "-expires_at"

ExportPublicationFields

ExportPublicationFields: "voucher_code" | "customer_id" | "customer_source_id" | "date" | "channel" | "campaign" | "is_winner" | "metadata"

ExportPublicationFilters

ExportPublicationFilters: { junction?: Junction } & Partial<Record<ExportPublicationFields, FieldConditions>>

ExportPublicationOrder

ExportPublicationOrder: ExportPublicationFields | "-voucher_code" | "-customer_id" | "-customer_source_id" | "-date" | "-channel" | "-campaign" | "-is_winner" | "-metadata"

ExportRedemptionFields

ExportRedemptionFields: "id" | "object" | "date" | "voucher_code" | "campaign" | "promotion_tier_id" | "customer_id" | "customer_source_id" | "customer_name" | "tracking_id" | "order_amount" | "gift_amount" | "loyalty_points" | "result" | "failure_code" | "failure_message" | "metadata"

ExportRedemptionFilters

ExportRedemptionFilters: { junction?: Junction } & Partial<Record<ExportRedemptionFields, FieldConditions>>

ExportRedemptionOrder

ExportRedemptionOrder: ExportRedemptionFields | "-id" | "-object" | "-date" | "-voucher_code" | "-campaign" | "-promotion_tier_id" | "-customer_id" | "-customer_source_id" | "-customer_name" | "-tracking_id" | "-order_amount" | "-gift_amount" | "-loyalty_points" | "-result" | "-failure_code" | "-failure_message" | "-metadata"

ExportVoucherFields

ExportVoucherFields: "code" | "voucher_type" | "value" | "discount_type" | "campaign" | "category" | "start_date" | "expiration_date" | "gift_balance" | "loyalty_balance" | "redemption_quantity" | "redemption_count" | "active" | "qr_code" | "bar_code" | "metadata" | "id" | "is_referral_code" | "created_at" | "updated_at" | "validity_timeframe_interval" | "validity_timeframe_duration" | "validity_day_of_week" | "discount_amount_limit" | "campaign_id" | "additional_info" | "customer_id" | "discount_unit_type" | "discount_unit_effect" | "customer_source_id"

ExportVoucherFilters

ExportVoucherFilters: { junction?: Junction } & Partial<Record<ExportVoucherFields, FieldConditions>>

ExportVoucherOrder

ExportVoucherOrder: ExportVoucherFields | "-code" | "-voucher_type" | "-value" | "-discount_type" | "-campaign" | "-category" | "-start_date" | "-expiration_date" | "-gift_balance" | "-loyalty_balance" | "-redemption_quantity" | "-redemption_count" | "-active" | "-qr_code" | "-bar_code" | "-metadata" | "-id" | "-is_referral_code" | "-created_at" | "-updated_at" | "-validity_timeframe_interval" | "-validity_timeframe_duration" | "-validity_day_of_week" | "-discount_amount_limit" | "-campaign_id" | "-additional_info" | "-customer_id" | "-discount_unit_type" | "-discount_unit_effect" | "-customer_source_id"

ExportVoucherTransactionsFields

ExportVoucherTransactionsFields: "id" | "campaign_id" | "voucher_id" | "type" | "source_id" | "reason" | "source" | "balance" | "amount" | "related_transaction_id" | "created_at" | "details"

ExportVoucherTransactionsFilters

ExportVoucherTransactionsFilters: { junction?: Junction } & Partial<Record<ExportVoucherTransactionsFields, FieldConditions>>

ExportVoucherTransactionsOrder

ExportVoucherTransactionsOrder: ExportVoucherTransactionsFields | "-id" | "-campaign_id" | "-voucher_id" | "-type" | "-source_id" | "-reason" | "-source" | "-balance" | "-amount" | "-related_transaction_id" | "-created_at" | "-details"

ExportsGetResponse

ExportsGetResponse: ExportsCreateResponse

FieldConditions

FieldConditions: { conditions?: Partial<Record<FiltersCondition, unknown>> }

Type declaration

FiltersCondition

FiltersCondition: "$in" | "$not_in" | "$is" | "$is_days_ago" | "$is_days_in_future" | "$is_not" | "$has_value" | "$is_unknown" | "$contains" | "$not_contain" | "$starts_with" | "$ends_with" | "$more_than" | "$less_than" | "$more_than_ago" | "$less_than_ago" | "$more_than_future" | "$less_than_future" | "$more_than_equal" | "$less_than_equal" | "$after" | "$before" | "$count" | "$count_less" | "$count_more"

GiftCardTransaction

GiftCardTransactionDetails

InapplicableTo

InapplicableTo: ApplicableTo

InapplicableToResultList

InapplicableToResultList: { data: InapplicableTo[]; data_ref: string; object: "list"; total: number }

Type declaration

  • data: InapplicableTo[]
  • data_ref: string
  • object: "list"
  • total: number

Junction

Junction: "and" | "AND" | "or" | "OR"

LoyaltiesCreateEarningRuleResponse

LoyaltiesCreateEarningRuleResponse: LoyaltiesEarningRulesResponse

LoyaltiesCreateMemberResponse

LoyaltiesCreateMemberResponse: LoyaltiesVoucherResponse

LoyaltiesCreateTiersRequestBody

LoyaltiesCreateTiersRequestBody: (LoyaltyTierBase & { metadata?: Record<string, unknown> })[]

LoyaltiesCreateTiersResponseBody

LoyaltiesCreateTiersResponseBody: LoyaltyTier[]

LoyaltiesDisableEarningRulesResponseBody

LoyaltiesDisableEarningRulesResponseBody: EarningRuleBase & { active: false; updated_at: string | null }

LoyaltiesEnableEarningRulesResponseBody

LoyaltiesEnableEarningRulesResponseBody: EarningRuleBase & { active: true; updated_at: string | null }

LoyaltiesExportCardTransactionsRequestBody

LoyaltiesExportCardTransactionsRequestBody: VouchersExportTransactionsRequestBody

LoyaltiesExportCardTransactionsResponseBody

LoyaltiesExportCardTransactionsResponseBody: VouchersExportTransactionsResponseBody

LoyaltiesGetCampaignResponse

LoyaltiesGetCampaignResponse: LoyaltiesCreateCampaignResponse

LoyaltiesGetEarningRuleResponseBody

LoyaltiesGetEarningRuleResponseBody: EarningRule

LoyaltiesGetMemberResponse

LoyaltiesGetMemberResponse: LoyaltiesCreateMemberResponse

LoyaltiesGetRewardAssignmentResponseBody

LoyaltiesGetRewardAssignmentResponseBody: RewardAssignment

LoyaltiesGetRewardDetailsResponseBody

LoyaltiesGetRewardDetailsResponseBody: Reward

LoyaltiesGetTierResponseBody

LoyaltiesGetTierResponseBody: LoyaltyTier

LoyaltiesListLoyaltyTierEarningRulesResponseBody

LoyaltiesListLoyaltyTierEarningRulesResponseBody: { data: EarningRule[]; data_ref: "data"; object: "list"; total: number }

Type declaration

  • data: EarningRule[]
  • data_ref: "data"
  • object: "list"
  • total: number

LoyaltiesListMemberActivityParams

LoyaltiesListMemberActivityParams: { limit?: number; order?: "created_at" | "-created_at"; starting_after_id?: string }

Type declaration

  • Optional limit?: number
  • Optional order?: "created_at" | "-created_at"
  • Optional starting_after_id?: string

LoyaltiesListMemberActivityResponse

LoyaltiesListMemberActivityResponse: { data: { created_at: string; data: any; group_id: string; id: string; type: string }[]; data_ref: "data"; has_more: boolean; more_starting_after?: string; object: "list" }

Type declaration

  • data: { created_at: string; data: any; group_id: string; id: string; type: string }[]
  • data_ref: "data"
  • has_more: boolean
  • Optional more_starting_after?: string
  • object: "list"

LoyaltiesTransferPointsRequestBody

LoyaltiesTransferPointsRequestBody: LoyaltiesTransferPoints[]

LoyaltiesTransferPointsResponseBody

LoyaltiesTransferPointsResponseBody: { active: boolean; additional_info: string | null; campaign: string; campaign_id: string; categories: Category[]; category: string | null; category_id: string | null; code: string; created_at: string; expiration_date: string | null; holder_id?: string; id: string; is_referral_code: boolean; loyalty_card: { balance: number; next_expiration_date?: string; next_expiration_points?: number; points: number }; metadata: Record<string, unknown>; publish?: { count?: number; entries?: string[]; object: "list"; url?: string }; redemption?: { object?: "list"; quantity: number | null; redeemed_points?: number; redeemed_quantity?: number; redemption_entries?: string[]; url?: string }; start_date: string | null; type: "LOYALTY_CARD"; updated_at?: string; validity_day_of_week: number[] | null; validity_timeframe: { duration?: string; interval?: string } | null }

Type declaration

  • active: boolean
  • additional_info: string | null
  • campaign: string
  • campaign_id: string
  • categories: Category[]
  • category: string | null
  • category_id: string | null
  • code: string
  • created_at: string
  • expiration_date: string | null
  • Optional holder_id?: string
  • id: string
  • is_referral_code: boolean
  • loyalty_card: { balance: number; next_expiration_date?: string; next_expiration_points?: number; points: number }
    • balance: number
    • Optional next_expiration_date?: string
    • Optional next_expiration_points?: number
    • points: number
  • metadata: Record<string, unknown>
  • Optional publish?: { count?: number; entries?: string[]; object: "list"; url?: string }
    • Optional count?: number
    • Optional entries?: string[]
    • object: "list"
    • Optional url?: string
  • Optional redemption?: { object?: "list"; quantity: number | null; redeemed_points?: number; redeemed_quantity?: number; redemption_entries?: string[]; url?: string }
    • Optional object?: "list"
    • quantity: number | null
    • Optional redeemed_points?: number
    • Optional redeemed_quantity?: number
    • Optional redemption_entries?: string[]
    • Optional url?: string
  • start_date: string | null
  • type: "LOYALTY_CARD"
  • Optional updated_at?: string
  • validity_day_of_week: number[] | null
  • validity_timeframe: { duration?: string; interval?: string } | null

LoyaltiesUpdateCampaignResponse

LoyaltiesUpdateCampaignResponse: LoyaltiesCreateCampaignResponse

LoyaltiesUpdateEarningRuleResponse

LoyaltiesUpdateEarningRuleResponse: LoyaltiesEarningRulesResponse

LoyaltiesUpdateRewardAssignmentResponse

LoyaltiesUpdateRewardAssignmentResponse: LoyaltiesCreateRewardAssignmentResponse

LoyaltyCardTransactionsFields

LoyaltyCardTransactionsFields: "id" | "campaign_id" | "voucher_id" | "type" | "source_id" | "reason" | "source" | "balance" | "amount" | "related_transaction_id" | "created_at" | "details"

LoyaltyCardTransactionsType

LoyaltyCardTransactionsType: "POINTS_ACCRUAL" | "POINTS_CANCELLATION" | "POINTS_REDEMPTION" | "POINTS_REFUND" | "POINTS_ADDITION" | "POINTS_REMOVAL" | "POINTS_EXPIRATION" | "POINTS_TRANSFER_IN" | "POINTS_TRANSFER_OUT"

LoyaltyTier

LoyaltyTier: LoyaltyTierBase & { campaign_id: string; config: { points: { from?: number; to?: number } }; created_at: string; expiration?: { campaign_id: string; created_at: string; customer_id: string; expiration_date?: string; start_date?: string; tier_id: string; updated_at?: string }; id: string; metadata: Record<string, unknown> | null; object: "loyalty_tier"; updated_at?: string | null }

LoyaltyTierRewardItemParameters

Order

Order: { amount?: number; customer?: Customer; customer_id?: string; discount_amount?: number; id?: string; initial_amount?: number; items?: OrderItem[]; metadata?: Record<string, any>; referrer?: Referrer; referrer_id?: string; source_id?: string; status?: "CREATED" | "PAID" | "CANCELED" | "FULFILLED" }

Type declaration

  • Optional amount?: number
  • Optional customer?: Customer
  • Optional customer_id?: string
  • Optional discount_amount?: number
  • Optional id?: string
  • Optional initial_amount?: number
  • Optional items?: OrderItem[]
  • Optional metadata?: Record<string, any>
  • Optional referrer?: Referrer
  • Optional referrer_id?: string
  • Optional source_id?: string
  • Optional status?: "CREATED" | "PAID" | "CANCELED" | "FULFILLED"

OrderCalculated

OrderCalculated: { amount?: number; applied_discount_amount?: number; created_at?: string; customer?: CustomerId | CustomerWithSummaryLoyaltyReferrals; customer_id: string | null; discount_amount?: number; id?: string; initial_amount?: number; items?: OrderItemCalculated[]; items_applied_discount_amount?: number; items_discount_amount?: number; metadata: Record<string, unknown>; object: "order"; redemptions?: Record<string, OrderRedemptions>; referrer?: ReferrerId | ReferrerWithSummaryLoyaltyReferrals; referrer_id: string | null; source_id?: string | null; status?: "CREATED" | "PAID" | "CANCELED" | "FULFILLED"; total_amount?: number; total_applied_discount_amount?: number; total_discount_amount?: number; updated_at?: string | null }

Type declaration

  • Optional amount?: number
  • Optional applied_discount_amount?: number
  • Optional created_at?: string
  • Optional customer?: CustomerId | CustomerWithSummaryLoyaltyReferrals
  • customer_id: string | null
  • Optional discount_amount?: number
  • Optional id?: string
  • Optional initial_amount?: number
  • Optional items?: OrderItemCalculated[]
  • Optional items_applied_discount_amount?: number
  • Optional items_discount_amount?: number
  • metadata: Record<string, unknown>
  • object: "order"
  • Optional redemptions?: Record<string, OrderRedemptions>
  • Optional referrer?: ReferrerId | ReferrerWithSummaryLoyaltyReferrals
  • referrer_id: string | null
  • Optional source_id?: string | null
  • Optional status?: "CREATED" | "PAID" | "CANCELED" | "FULFILLED"
  • Optional total_amount?: number
  • Optional total_applied_discount_amount?: number
  • Optional total_discount_amount?: number
  • Optional updated_at?: string | null

OrderItem

OrderItem: { amount?: number; discount_amount?: number; discount_quantity?: number; initial_amount?: number; initial_quantity?: number; metadata?: Record<string, any>; price?: number; product?: { id?: string; metadata?: Record<string, any>; name?: string; override?: boolean; price?: number; source_id?: string }; product_id?: string; quantity?: number; related_object?: "product" | "sku"; sku?: { id?: string; override?: boolean; price?: number; sku?: string; source_id?: string }; sku_id?: string; source_id?: string }

Type declaration

  • Optional amount?: number
  • Optional discount_amount?: number
  • Optional discount_quantity?: number
  • Optional initial_amount?: number
  • Optional initial_quantity?: number
  • Optional metadata?: Record<string, any>
  • Optional price?: number
  • Optional product?: { id?: string; metadata?: Record<string, any>; name?: string; override?: boolean; price?: number; source_id?: string }
    • Optional id?: string
    • Optional metadata?: Record<string, any>
    • Optional name?: string
    • Optional override?: boolean
    • Optional price?: number
    • Optional source_id?: string
  • Optional product_id?: string
  • Optional quantity?: number
  • Optional related_object?: "product" | "sku"
  • Optional sku?: { id?: string; override?: boolean; price?: number; sku?: string; source_id?: string }
    • Optional id?: string
    • Optional override?: boolean
    • Optional price?: number
    • Optional sku?: string
    • Optional source_id?: string
  • Optional sku_id?: string
  • Optional source_id?: string

OrderItemCalculated

OrderItemCalculated: { amount?: number; discount_amount?: number; discount_quantity?: number; initial_amount?: number; initial_quantity?: number; metadata?: Record<string, any>; object: "order_item"; price?: number; product?: { id?: string; metadata?: Record<string, any>; name?: string; override?: boolean; price?: number; source_id?: string }; product_id?: string; quantity?: number; related_object?: "product" | "sku"; sku?: { id?: string; override?: boolean; price?: number; sku?: string; source_id?: string }; sku_id?: string; source_id?: string; subtotal_amount?: number; total_applied_discount_amount?: number }

Type declaration

  • Optional amount?: number
  • Optional discount_amount?: number
  • Optional discount_quantity?: number
  • Optional initial_amount?: number
  • Optional initial_quantity?: number
  • Optional metadata?: Record<string, any>
  • object: "order_item"
  • Optional price?: number
  • Optional product?: { id?: string; metadata?: Record<string, any>; name?: string; override?: boolean; price?: number; source_id?: string }
    • Optional id?: string
    • Optional metadata?: Record<string, any>
    • Optional name?: string
    • Optional override?: boolean
    • Optional price?: number
    • Optional source_id?: string
  • Optional product_id?: string
  • Optional quantity?: number
  • Optional related_object?: "product" | "sku"
  • Optional sku?: { id?: string; override?: boolean; price?: number; sku?: string; source_id?: string }
    • Optional id?: string
    • Optional override?: boolean
    • Optional price?: number
    • Optional sku?: string
    • Optional source_id?: string
  • Optional sku_id?: string
  • Optional source_id?: string
  • Optional subtotal_amount?: number
  • Optional total_applied_discount_amount?: number

OrderRedemptions

OrderRedemptions: { date?: string; related_object_id?: string; related_object_parent_id?: string; related_object_type?: string; rollback_date?: string; rollback_id?: string; rollback_stacked?: string[]; stacked?: string[] }

Type declaration

  • Optional date?: string
  • Optional related_object_id?: string
  • Optional related_object_parent_id?: string
  • Optional related_object_type?: string
  • Optional rollback_date?: string
  • Optional rollback_id?: string
  • Optional rollback_stacked?: string[]
  • Optional stacked?: string[]

OrdersGetResponse

OrdersGetResponse: OrdersCreateResponse

OrdersUpdateResponse

OrdersUpdateResponse: OrdersGetResponse

PointsExpirationTypes

PointsExpirationTypes: "PROGRAM_RULES" | "CUSTOM_DATE" | "NON_EXPIRING"

ProductsBulkUpdate

ProductsBulkUpdate: ProductsCreate[]

ProductsBulkUpdateMetadataResponse

ProductsBulkUpdateMetadataResponse: { async_action_id: string }

Type declaration

  • async_action_id: string

ProductsBulkUpdateResponse

ProductsBulkUpdateResponse: { async_action_id: string }

Type declaration

  • async_action_id: string

ProductsGetResponse

ProductsGetSkuResponse

ProductsGetSkuResponse: ProductsCreateSkuResponse

ProductsUpdate

ProductsUpdate: { attributes?: string[]; id?: string; image_url?: string; metadata?: Record<string, any>; name?: string; price?: number; source_id?: string }

Type declaration

  • Optional attributes?: string[]
  • Optional id?: string
  • Optional image_url?: string
  • Optional metadata?: Record<string, any>
  • Optional name?: string
  • Optional price?: number
  • Optional source_id?: string

ProductsUpdateResponse

ProductsUpdateResponse: ProductsCreateResponse

ProductsUpdateSku

ProductsUpdateSku: ProductsCreateSku & { id?: string; source_id?: string }

ProductsUpdateSkuResponse

ProductsUpdateSkuResponse: ProductsGetSkuResponse

PromotionTierGetResponse

PromotionTierGetResponse: PromotionTier

PromotionTierRedeemDetails

PromotionTierRedeemDetails: PromotionTier & { summary: { orders: { total_amount: number; total_discount_amount: number }; redemptions: { total_redeemed: number } } }

PromotionTiersCreateResponse

PromotionTiersCreateResponse: PromotionTier

PromotionTiersListResponse

PromotionTiersListResponse: PromotionTiersListAllResponse

PromotionTiersUpdateParams

PromotionTiersUpdateParams: PromotionTiersCreateParams & { id: string }

PromotionTiersUpdateResponse

PromotionTiersUpdateResponse: PromotionTier

QualificationsCheckEligibilityRequestBody

QualificationsCheckEligibilityRequestBody: { customer?: CustomerRequest; metadata?: Record<string, any>; mode?: "BASIC" | "ADVANCED"; options?: { expand?: ("redeemable" | "category" | "validation_rules")[]; filters?: { junction?: Junction } & Partial<Record<QualificationsFiltersFields, QualificationsFieldConditions>>; limit?: number; sorting_rule?: "BEST_DEAL" | "LEAST_DEAL" | "DEFAULT"; starting_after?: string }; order?: Order; scenario?: "ALL" | "CUSTOMER_WALLET" | "AUDIENCE_ONLY" | "PRODUCTS" | "PRODUCTS_DISCOUNT" | "PROMOTION_STACKS" | "PRODUCTS_BY_CUSTOMER" | "PRODUCTS_DISCOUNT_BY_CUSTOMER"; tracking_id?: string }

Type declaration

  • Optional customer?: CustomerRequest
  • Optional metadata?: Record<string, any>
  • Optional mode?: "BASIC" | "ADVANCED"
  • Optional options?: { expand?: ("redeemable" | "category" | "validation_rules")[]; filters?: { junction?: Junction } & Partial<Record<QualificationsFiltersFields, QualificationsFieldConditions>>; limit?: number; sorting_rule?: "BEST_DEAL" | "LEAST_DEAL" | "DEFAULT"; starting_after?: string }
  • Optional order?: Order
  • Optional scenario?: "ALL" | "CUSTOMER_WALLET" | "AUDIENCE_ONLY" | "PRODUCTS" | "PRODUCTS_DISCOUNT" | "PROMOTION_STACKS" | "PRODUCTS_BY_CUSTOMER" | "PRODUCTS_DISCOUNT_BY_CUSTOMER"
  • Optional tracking_id?: string

QualificationsCheckEligibilityResponseBody

QualificationsCheckEligibilityResponseBody: { order?: OrderCalculated; redeemables: QualificationsRedeemableList; stacking_rules: QualificationsStackingRules; tracking_id?: string }

Type declaration

QualificationsFieldConditions

QualificationsFieldConditions: { conditions?: Partial<Record<QualificationsFiltersCondition, any>> }

Type declaration

QualificationsFiltersCondition

QualificationsFiltersCondition: "$in" | "$not_in" | "$is" | "$is_not" | "$has_value" | "$is_unknown"

QualificationsFiltersFields

QualificationsFiltersFields: "category_id" | "campaign_id" | "resource_id" | "resource_type" | "voucher_type" | "code"

QualificationsRedeemable

QualificationsRedeemable: QualificationsRedeemableBase & { redeemables?: QualificationsRedeemableBase[] }

QualificationsRedeemableBase

QualificationsRedeemableBase: { applicable_to: ApplicableToResultList; banner?: string; campaign_id?: string; campaign_name?: string; categories: Category[]; created_at: string; id: string; inapplicable_to: InapplicableToResultList; metadata: Record<string, unknown> | null; name?: string; object: "campaign" | "promotion_tier" | "promotion_stack" | "voucher"; order?: OrderCalculated; result: RedeemableResult; validation_rule_id?: string; validation_rules_assignments?: ValidationRulesAssignmentsList }

Type declaration

QualificationsRedeemableList

QualificationsRedeemableList: { data: QualificationsRedeemable[]; data_ref: "data"; has_more: boolean; more_starting_after?: string; object: "list"; total: number }

Type declaration

  • data: QualificationsRedeemable[]
  • data_ref: "data"
  • has_more: boolean
  • Optional more_starting_after?: string
  • object: "list"
  • total: number

QualificationsStackingRules

QualificationsStackingRules: { applicable_exclusive_redeemables_limit: number; applicable_redeemables_limit: number; exclusive_categories: string[]; joint_categories: string[]; redeemables_limit: number }

Type declaration

  • applicable_exclusive_redeemables_limit: number
  • applicable_redeemables_limit: number
  • exclusive_categories: string[]
  • joint_categories: string[]
  • redeemables_limit: number

RedeemableResult

RedeemableResult: { discount?: Discount; error?: Error; gift?: { balance: number; credits: number }; loyalty_card?: { balance?: number; exchange_ratio?: number; points?: number; points_ratio?: number; transfers?: LoyaltiesTransferPoints[] } }

Type declaration

  • Optional discount?: Discount
  • Optional error?: Error
  • Optional gift?: { balance: number; credits: number }
    • balance: number
    • credits: number
  • Optional loyalty_card?: { balance?: number; exchange_ratio?: number; points?: number; points_ratio?: number; transfers?: LoyaltiesTransferPoints[] }
    • Optional balance?: number
    • Optional exchange_ratio?: number
    • Optional points?: number
    • Optional points_ratio?: number
    • Optional transfers?: LoyaltiesTransferPoints[]

RedemptionsRedeemStackableOrderResponse

RedemptionsRedeemStackableOrderResponse: OrdersCreateResponse & { redemptions?: Record<string, { date: string; related_object_id: string; related_object_type: "redemption"; rollback_date?: string; rollback_id?: string; rollback_stacked?: string[]; stacked: string[] }> }

RedemptionsRedeemStackableRedemptionResult

RedemptionsRedeemStackableRedemptionResult: RedemptionsRedeemResponse & { redemption: string }

Referrer

Referrer: CustomerRequest

ReferrerId

ReferrerId: CustomerId

ReferrerWithSummaryLoyaltyReferrals

ReferrerWithSummaryLoyaltyReferrals: CustomerWithSummaryLoyaltyReferrals

Reward

Reward: { attributes?: { description?: string; image_url?: string }; created_at: string; id: string; name?: string; object: "reward"; redeemed?: string; stock?: string; updated_at?: string } & RewardType

RewardAssignment

RewardType

RewardsCreate

RewardsCreate: Rewards & RewardsType

RewardsCreateAssignmentRequestBody

RewardsCreateAssignmentResponse

RewardsCreateAssignmentResponse: RewardsAssignmentObject

RewardsCreateAssignmentResponseBody

RewardsCreateAssignmentResponseBody: RewardAssignment

RewardsCreateResponse

RewardsCreateResponse: RewardsResponse & RewardsTypeResponse

RewardsGetAssignmentResponseBody

RewardsGetAssignmentResponseBody: RewardAssignment

RewardsGetResponse

RewardsGetResponse: RewardsResponse & RewardsTypeResponse

RewardsType

RewardsType: RewardsTypeCampaign | RewardsTypeCoin | RewardsTypeMaterial

RewardsTypeResponse

RewardsTypeResponse: Required<RewardsTypeCampaignResponse> | Required<RewardsTypeCoin> | Required<RewardsTypeMaterial>

RewardsUpdate

RewardsUpdate: Omit<RewardsCreate, "type"> & { id: string }

RewardsUpdateAssignment

RewardsUpdateAssignment: RewardsCreateAssignment & { id: string }

RewardsUpdateAssignmentResponse

RewardsUpdateAssignmentResponse: RewardsAssignmentObject

RewardsUpdateAssignmentResponseBody

RewardsUpdateAssignmentResponseBody: RewardAssignment

RewardsUpdateResponse

RewardsUpdateResponse: RewardsCreateResponse

SegmentsGetResponse

SegmentsGetResponse: SegmentsCreateResponse

SimpleRollback

SimpleRollback: Pick<RedemptionsRollbackResponse, "id" | "object" | "date" | "customer_id" | "tracking_id" | "redemption" | "result" | "customer"> & { gift?: { amount: number }; loyalty_card?: { points: number }; related_object_type: "voucher"; voucher: { campaign?: string; campaign_id?: string; code: string; id: string; object: "voucher" } }

StackableRedeemableInapplicableResponse

StackableRedeemableInapplicableResponse: { categories?: Category[]; id: string; metadata?: Record<string, unknown>; object: "voucher" | "promotion_tier"; result: { details?: { key?: string; message?: string }; error?: ValidationError }; status: "INAPPLICABLE" }

Type declaration

  • Optional categories?: Category[]
  • id: string
  • Optional metadata?: Record<string, unknown>
  • object: "voucher" | "promotion_tier"
  • result: { details?: { key?: string; message?: string }; error?: ValidationError }
    • Optional details?: { key?: string; message?: string }
      • Optional key?: string
      • Optional message?: string
    • Optional error?: ValidationError
  • status: "INAPPLICABLE"

StackableRedeemableObject

StackableRedeemableObject: "promotion_stack" | "promotion_tier" | "voucher"

StackableRedeemableResponseStatus

StackableRedeemableResponseStatus: "APPLICABLE" | "INAPPLICABLE" | "SKIPPED"

StackableRedeemableSkippedResponse

StackableRedeemableSkippedResponse: { categories?: Category[]; id: string; metadata?: Record<string, unknown>; object: "voucher" | "promotion_tier"; result: { details?: { key?: string; message?: string } }; status: "SKIPPED" }

Type declaration

  • Optional categories?: Category[]
  • id: string
  • Optional metadata?: Record<string, unknown>
  • object: "voucher" | "promotion_tier"
  • result: { details?: { key?: string; message?: string } }
    • Optional details?: { key?: string; message?: string }
      • Optional key?: string
      • Optional message?: string
  • status: "SKIPPED"

ValidationRulesAssignmentsList

ValidationRulesAssignmentsList: ValidationRulesListResponse

ValidationRulesGetResponse

ValidationRulesGetResponse: ValidationRulesCreateResponse & { assignments_count?: string }

ValidationRulesUpdate

ValidationRulesUpdate: Partial<ValidationRulesCreate> & { id: string }

ValidationRulesUpdateResponse

ValidationRulesUpdateResponse: ValidationRulesCreateResponse

ValidationSessionTTLUnit

ValidationSessionTTLUnit: "DAYS" | "HOURS" | "MICROSECONDS" | "MILLISECONDS" | "MINUTES" | "NANOSECONDS" | "SECONDS"

ValidationSessionType

ValidationSessionType: "LOCK"

ValidationsStackingRules

ValidationsStackingRules: { applicable_exclusive_redeemables_limit: number; applicable_exclusive_redeemables_per_category_limit?: number; applicable_redeemables_limit: number; applicable_redeemables_per_category_limit?: number; exclusive_categories: string[]; joint_categories: string[]; redeemables_application_mode: "ALL" | "PARTIAL"; redeemables_limit: number; redeemables_sorting_rule: "CATEGORY_HIERARCHY" | "REQUESTED_ORDER" }

Type declaration

  • applicable_exclusive_redeemables_limit: number
  • Optional applicable_exclusive_redeemables_per_category_limit?: number
  • applicable_redeemables_limit: number
  • Optional applicable_redeemables_per_category_limit?: number
  • exclusive_categories: string[]
  • joint_categories: string[]
  • redeemables_application_mode: "ALL" | "PARTIAL"
  • redeemables_limit: number
  • redeemables_sorting_rule: "CATEGORY_HIERARCHY" | "REQUESTED_ORDER"

ValidationsValidateCode

ValidationsValidateCode: PromotionsValidateParams

ValidationsValidateContext

ValidationsValidateContext: ValidationsValidateVoucherParams

VoucherTransaction

VoucherTransactionsExportFields

VoucherTransactionsExportFields: "id" | "campaign_id" | "voucher_id" | "type" | "source_id" | "reason" | "source" | "balance" | "amount" | "related_transaction_id" | "created_at" | "details"

VoucherType

VoucherType: "GIFT_VOUCHER" | "DISCOUNT_VOUCHER" | "LOYALTY_CARD" | "LUCKY_DRAW"

VouchersBulkUpdate

VouchersBulkUpdate: VouchersBulkUpdateObject[]

VouchersBulkUpdateMetadataResponse

VouchersBulkUpdateMetadataResponse: { async_action_id: string }

Type declaration

  • async_action_id: string

VouchersBulkUpdateResponse

VouchersBulkUpdateResponse: { async_action_id: string }

Type declaration

  • async_action_id: string

VouchersCreate

VouchersCreate: VouchersCreateParameters & Pick<VouchersResponse, "type" | "discount" | "gift" | "category" | "additional_info" | "start_date" | "expiration_date" | "metadata">

VouchersCreateResponse

VouchersCreateResponse: Omit<VouchersResponse, "validation_rules_assignments">

VouchersDisableResponse

VouchersDisableResponse: VouchersResponse

VouchersEnableResponse

VouchersEnableResponse: VouchersResponse

VouchersGetResponse

VouchersGetResponse: VouchersResponse

VouchersImportResponse

VouchersImportResponse: { async_action_id: string }

Type declaration

  • async_action_id: string

VouchersUpdateResponse

VouchersUpdateResponse: VouchersResponse

Functions

VoucherifyClientSide

VoucherifyServerSide