{"openapi":"3.0.4","info":{"title":"Create portfolio","description":"Create a transaction portfolio in a particular scope.","version":"0.0.1"},"servers":[{"url":"https://fbn-prd.lusid.com/api"}],"paths":{"/api/transactionportfolios/{scope}":{"post":{"tags":["Transaction Portfolios"],"summary":"Create portfolio","description":"Create a transaction portfolio in a particular scope.","operationId":"CreatePortfolio","parameters":[{"name":"scope","in":"path","description":"The scope in which to create the transaction portfolio.","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-zA-Z0-9\\-_]+$","type":"string"}}],"requestBody":{"description":"The definition of the transaction portfolio.","content":{"application/json-patch+json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/CreateTransactionPortfolioRequest"},"example":{"displayName":"Portfolio UK","description":"Portfolio for UK market","code":"PortfolioUk","created":"2018-03-05T12:00:00.0000000+00:00","baseCurrency":"GBP","corporateActionSourceId":{"scope":"Sources","code":"Vendor1"},"accountingMethod":"Default","subHoldingKeys":[],"properties":{"Portfolio/Manager/Name":{"key":"Portfolio/Manager/Name","value":{"labelValue":"Matt Smith"},"effectiveFrom":"2018-03-05T12:00:00.0000000+00:00"},"Portfolio/Manager/Id":{"key":"Portfolio/Manager/Id","value":{"metricValue":{"value":1628483,"unit":"NoUnits"}},"effectiveFrom":"2018-03-05T12:00:00.0000000+00:00"}},"instrumentScopes":[],"amortisationMethod":"NoAmortisation","transactionTypeScope":"SomeScope","instrumentEventConfiguration":{"transactionTemplateScopes":["default"],"recipeId":{"scope":"default","code":"MyRecipeCode"}},"amortisationRuleSetId":{"scope":"default","code":"MyAmortisationRuleSet"},"taxRuleSetScope":"SomeTaxRuleSetScope","settlementConfiguration":{"stockSettlement":{"method":"Automatic","calculateInstructionToPortfolioRate":false,"calculateInLieuSettlementAmount":false,"calculateTradeDateToSettlementFxPnL":false},"cashSettlement":{"method":"Instructed","calculateInstructionToPortfolioRate":false,"calculateInLieuSettlementAmount":false,"calculateTradeDateToSettlementFxPnL":false}}}},"application/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/CreateTransactionPortfolioRequest"},"example":{"displayName":"Portfolio UK","description":"Portfolio for UK market","code":"PortfolioUk","created":"2018-03-05T12:00:00.0000000+00:00","baseCurrency":"GBP","corporateActionSourceId":{"scope":"Sources","code":"Vendor1"},"accountingMethod":"Default","subHoldingKeys":[],"properties":{"Portfolio/Manager/Name":{"key":"Portfolio/Manager/Name","value":{"labelValue":"Matt Smith"},"effectiveFrom":"2018-03-05T12:00:00.0000000+00:00"},"Portfolio/Manager/Id":{"key":"Portfolio/Manager/Id","value":{"metricValue":{"value":1628483,"unit":"NoUnits"}},"effectiveFrom":"2018-03-05T12:00:00.0000000+00:00"}},"instrumentScopes":[],"amortisationMethod":"NoAmortisation","transactionTypeScope":"SomeScope","instrumentEventConfiguration":{"transactionTemplateScopes":["default"],"recipeId":{"scope":"default","code":"MyRecipeCode"}},"amortisationRuleSetId":{"scope":"default","code":"MyAmortisationRuleSet"},"taxRuleSetScope":"SomeTaxRuleSetScope","settlementConfiguration":{"stockSettlement":{"method":"Automatic","calculateInstructionToPortfolioRate":false,"calculateInLieuSettlementAmount":false,"calculateTradeDateToSettlementFxPnL":false},"cashSettlement":{"method":"Instructed","calculateInstructionToPortfolioRate":false,"calculateInLieuSettlementAmount":false,"calculateTradeDateToSettlementFxPnL":false}}}},"text/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/CreateTransactionPortfolioRequest"},"example":{"displayName":"Portfolio UK","description":"Portfolio for UK market","code":"PortfolioUk","created":"2018-03-05T12:00:00.0000000+00:00","baseCurrency":"GBP","corporateActionSourceId":{"scope":"Sources","code":"Vendor1"},"accountingMethod":"Default","subHoldingKeys":[],"properties":{"Portfolio/Manager/Name":{"key":"Portfolio/Manager/Name","value":{"labelValue":"Matt Smith"},"effectiveFrom":"2018-03-05T12:00:00.0000000+00:00"},"Portfolio/Manager/Id":{"key":"Portfolio/Manager/Id","value":{"metricValue":{"value":1628483,"unit":"NoUnits"}},"effectiveFrom":"2018-03-05T12:00:00.0000000+00:00"}},"instrumentScopes":[],"amortisationMethod":"NoAmortisation","transactionTypeScope":"SomeScope","instrumentEventConfiguration":{"transactionTemplateScopes":["default"],"recipeId":{"scope":"default","code":"MyRecipeCode"}},"amortisationRuleSetId":{"scope":"default","code":"MyAmortisationRuleSet"},"taxRuleSetScope":"SomeTaxRuleSetScope","settlementConfiguration":{"stockSettlement":{"method":"Automatic","calculateInstructionToPortfolioRate":false,"calculateInLieuSettlementAmount":false,"calculateTradeDateToSettlementFxPnL":false},"cashSettlement":{"method":"Instructed","calculateInstructionToPortfolioRate":false,"calculateInLieuSettlementAmount":false,"calculateTradeDateToSettlementFxPnL":false}}}},"application/*+json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/CreateTransactionPortfolioRequest"},"example":{"displayName":"Portfolio UK","description":"Portfolio for UK market","code":"PortfolioUk","created":"2018-03-05T12:00:00.0000000+00:00","baseCurrency":"GBP","corporateActionSourceId":{"scope":"Sources","code":"Vendor1"},"accountingMethod":"Default","subHoldingKeys":[],"properties":{"Portfolio/Manager/Name":{"key":"Portfolio/Manager/Name","value":{"labelValue":"Matt Smith"},"effectiveFrom":"2018-03-05T12:00:00.0000000+00:00"},"Portfolio/Manager/Id":{"key":"Portfolio/Manager/Id","value":{"metricValue":{"value":1628483,"unit":"NoUnits"}},"effectiveFrom":"2018-03-05T12:00:00.0000000+00:00"}},"instrumentScopes":[],"amortisationMethod":"NoAmortisation","transactionTypeScope":"SomeScope","instrumentEventConfiguration":{"transactionTemplateScopes":["default"],"recipeId":{"scope":"default","code":"MyRecipeCode"}},"amortisationRuleSetId":{"scope":"default","code":"MyAmortisationRuleSet"},"taxRuleSetScope":"SomeTaxRuleSetScope","settlementConfiguration":{"stockSettlement":{"method":"Automatic","calculateInstructionToPortfolioRate":false,"calculateInLieuSettlementAmount":false,"calculateTradeDateToSettlementFxPnL":false},"cashSettlement":{"method":"Instructed","calculateInstructionToPortfolioRate":false,"calculateInLieuSettlementAmount":false,"calculateTradeDateToSettlementFxPnL":false}}}}},"required":true},"responses":{"201":{"description":"The newly-created transaction portfolio","content":{"application/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/Portfolio"}},"text/plain":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/Portfolio"}},"text/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/Portfolio"}}}},"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"}}}}