{"openapi":"3.0.4","info":{"title":"Create Transaction Template","description":"Create a transaction template for a particular instrument event type in a scope.","version":"0.0.1"},"servers":[{"url":"https://fbn-prd.lusid.com/api"}],"paths":{"/api/instrumenteventtypes/{instrumentEventType}/transactiontemplates/{instrumentType}/{scope}":{"post":{"tags":["Instrument Event Types"],"summary":"Create Transaction Template","description":"Create a transaction template for a particular instrument event type in a scope.","operationId":"CreateTransactionTemplate","parameters":[{"name":"instrumentEventType","in":"path","description":"The type of instrument events that the template is applied to. Available values: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent, SwapCashFlowEvent, SwapPrincipalEvent, CreditPremiumCashFlowEvent, CdsCreditEvent, CdxCreditEvent, MbsCouponEvent, MbsPrincipalEvent, BonusIssueEvent, MbsPrincipalWriteOffEvent, MbsInterestDeferralEvent, MbsInterestShortfallEvent, TenderEvent, CallOnIntermediateSecuritiesEvent, IntermediateSecuritiesDistributionEvent, OptionExercisePhysicalEvent, OptionExerciseCashEvent, ProtectionPayoutCashFlowEvent, TermDepositInterestEvent, TermDepositPrincipalEvent, EarlyRedemptionEvent, FutureMarkToMarketEvent, AdjustGlobalCommitmentEvent, ContractInitialisationEvent, DrawdownEvent, LoanInterestRepaymentEvent, UpdateDepositAmountEvent, LoanPrincipalRepaymentEvent, DepositInterestPaymentEvent, DepositCloseEvent, LoanFacilityContractRolloverEvent, RepurchaseOfferEvent, RepoPartialClosureEvent, RepoCashFlowEvent, FlexibleRepoInterestPaymentEvent, FlexibleRepoCashFlowEvent, FlexibleRepoCollateralEvent, ConversionEvent, FlexibleRepoPartialClosureEvent, FlexibleRepoFullClosureEvent, CapletFloorletCashFlowEvent, EarlyCloseOutEvent, DepositRollEvent, ConsentEvent, DrawingEvent, CapitalGainsDistributionEvent, ExchangeOfferEvent, DutchAuctionEvent, WorthlessEvent, PutRedemptionEvent, LoanFacilityDelayedCompensationPaymentEvent, InterestPaymentEvent, PriorityIssueEvent.","required":true,"schema":{"type":"string"}},{"name":"instrumentType","in":"path","description":"The instrument type of the transaction template. The combination of the instrument\r\n            event type, instrument type and scope uniquely identifies a transaction template. Available values: QuotedSecurity, InterestRateSwap, FxForward, Future, ExoticInstrument, FxOption, CreditDefaultSwap, InterestRateSwaption, Bond, EquityOption, FixedLeg, FloatingLeg, BespokeCashFlowsLeg, Unknown, TermDeposit, ContractForDifference, EquitySwap, CashPerpetual, CapFloor, CashSettled, CdsIndex, Basket, FundingLeg, FxSwap, ForwardRateAgreement, SimpleInstrument, Repo, Equity, ExchangeTradedOption, ReferenceInstrument, ComplexBond, InflationLinkedBond, InflationSwap, SimpleCashFlowLoan, TotalReturnSwap, InflationLeg, FundShareClass, FlexibleLoan, UnsettledCash, Cash, MasteredInstrument, LoanFacility, FlexibleDeposit, FlexibleRepo.","required":true,"schema":{"type":"string"}},{"name":"scope","in":"path","description":"The scope in which the template lies.","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-zA-Z0-9\\-_]+$","type":"string"}}],"requestBody":{"description":"A request defining a new transaction template to be created.","content":{"application/json-patch+json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/TransactionTemplateRequest"},"example":{"description":"User-created template for overriding the default bond coupon template.","componentTransactions":[{"displayName":"Bond Income Override","transactionFieldMap":{"transactionId":"{{instrumentEventId}}-{{holdingId}}","type":"BondCoupon","source":"MyTransactionTypeSource","instrument":"{{instrument}}","transactionDate":"{{BondCouponEvent.exDate}}","settlementDate":"{{BondCouponEvent.paymentDate}}","units":"{{eligibleBalance}}","transactionPrice":{"price":"{{BondCouponEvent.couponPerUnit}}","type":"CashFlowPerUnit"},"transactionCurrency":"{{BondCouponEvent.currency}}","exchangeRate":"1","totalConsideration":{"currency":"{{BondCouponEvent.currency}}","amount":"{{BondCouponEvent.couponAmount}}"}},"transactionPropertyMap":[{"propertyKey":"Transaction/MyScope/MyCurrencyProperty","value":"{{BondCouponEvent.currency}}"}],"preserveTaxLotStructure":false}]}},"application/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/TransactionTemplateRequest"},"example":{"description":"User-created template for overriding the default bond coupon template.","componentTransactions":[{"displayName":"Bond Income Override","transactionFieldMap":{"transactionId":"{{instrumentEventId}}-{{holdingId}}","type":"BondCoupon","source":"MyTransactionTypeSource","instrument":"{{instrument}}","transactionDate":"{{BondCouponEvent.exDate}}","settlementDate":"{{BondCouponEvent.paymentDate}}","units":"{{eligibleBalance}}","transactionPrice":{"price":"{{BondCouponEvent.couponPerUnit}}","type":"CashFlowPerUnit"},"transactionCurrency":"{{BondCouponEvent.currency}}","exchangeRate":"1","totalConsideration":{"currency":"{{BondCouponEvent.currency}}","amount":"{{BondCouponEvent.couponAmount}}"}},"transactionPropertyMap":[{"propertyKey":"Transaction/MyScope/MyCurrencyProperty","value":"{{BondCouponEvent.currency}}"}],"preserveTaxLotStructure":false}]}},"text/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/TransactionTemplateRequest"},"example":{"description":"User-created template for overriding the default bond coupon template.","componentTransactions":[{"displayName":"Bond Income Override","transactionFieldMap":{"transactionId":"{{instrumentEventId}}-{{holdingId}}","type":"BondCoupon","source":"MyTransactionTypeSource","instrument":"{{instrument}}","transactionDate":"{{BondCouponEvent.exDate}}","settlementDate":"{{BondCouponEvent.paymentDate}}","units":"{{eligibleBalance}}","transactionPrice":{"price":"{{BondCouponEvent.couponPerUnit}}","type":"CashFlowPerUnit"},"transactionCurrency":"{{BondCouponEvent.currency}}","exchangeRate":"1","totalConsideration":{"currency":"{{BondCouponEvent.currency}}","amount":"{{BondCouponEvent.couponAmount}}"}},"transactionPropertyMap":[{"propertyKey":"Transaction/MyScope/MyCurrencyProperty","value":"{{BondCouponEvent.currency}}"}],"preserveTaxLotStructure":false}]}},"application/*+json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/TransactionTemplateRequest"},"example":{"description":"User-created template for overriding the default bond coupon template.","componentTransactions":[{"displayName":"Bond Income Override","transactionFieldMap":{"transactionId":"{{instrumentEventId}}-{{holdingId}}","type":"BondCoupon","source":"MyTransactionTypeSource","instrument":"{{instrument}}","transactionDate":"{{BondCouponEvent.exDate}}","settlementDate":"{{BondCouponEvent.paymentDate}}","units":"{{eligibleBalance}}","transactionPrice":{"price":"{{BondCouponEvent.couponPerUnit}}","type":"CashFlowPerUnit"},"transactionCurrency":"{{BondCouponEvent.currency}}","exchangeRate":"1","totalConsideration":{"currency":"{{BondCouponEvent.currency}}","amount":"{{BondCouponEvent.couponAmount}}"}},"transactionPropertyMap":[{"propertyKey":"Transaction/MyScope/MyCurrencyProperty","value":"{{BondCouponEvent.currency}}"}],"preserveTaxLotStructure":false}]}}},"required":true},"responses":{"201":{"description":"The response of the transaction template that was created.","content":{"application/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/TransactionTemplate"}},"text/plain":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/TransactionTemplate"}},"text/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/TransactionTemplate"}}}},"400":{"description":"The details of the input related failure","content":{"application/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/LusidValidationProblemDetails"}},"text/plain":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/LusidValidationProblemDetails"}},"text/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/LusidValidationProblemDetails"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/LusidProblemDetails"}}}}},"security":[{"BearerAuth":[]}],"x-fbn-apistatus":"Stable"}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}}}}