{"openapi":"3.0.4","info":{"title":"Create a tax rule set.","description":"Creates a tax rule set definition at the given effective time.\r\nThe user must be entitled to read any properties specified in each rule.","version":"0.0.1"},"servers":[{"url":"https://fbn-prd.lusid.com/api"}],"paths":{"/api/tax/rulesets":{"post":{"tags":["Tax Rule Sets"],"summary":"Create a tax rule set.","description":"Creates a tax rule set definition at the given effective time.\r\nThe user must be entitled to read any properties specified in each rule.","operationId":"CreateTaxRuleSet","parameters":[{"name":"effectiveAt","in":"query","description":"The effective datetime or cut label at which the rule set will take effect.\r\nDefaults to the current LUSID system datetime if not specified.","schema":{"type":"string","format":"dateorcutlabel"}}],"requestBody":{"description":"The contents of the rule set.","content":{"application/json-patch+json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/CreateTaxRuleSetRequest"},"example":{"id":{"scope":"RuleSetScope","code":"RuleSetName"},"displayName":"Rule set display name","description":"Rule set description","outputPropertyKey":"Transaction/default/TaxAmount","rules":[{"name":"UKTaxRule","description":"Rule for the UK tax rate","rate":0.25,"matchCriteria":[{"propertyKey":"Instrument/myScope/market","value":"GB","criterionType":"PropertyValueEquals"},{"propertyKey":"Portfolio/myScope/taxDomicile","value":"GB","criterionType":"PropertyValueEquals"}]}]}},"application/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/CreateTaxRuleSetRequest"},"example":{"id":{"scope":"RuleSetScope","code":"RuleSetName"},"displayName":"Rule set display name","description":"Rule set description","outputPropertyKey":"Transaction/default/TaxAmount","rules":[{"name":"UKTaxRule","description":"Rule for the UK tax rate","rate":0.25,"matchCriteria":[{"propertyKey":"Instrument/myScope/market","value":"GB","criterionType":"PropertyValueEquals"},{"propertyKey":"Portfolio/myScope/taxDomicile","value":"GB","criterionType":"PropertyValueEquals"}]}]}},"text/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/CreateTaxRuleSetRequest"},"example":{"id":{"scope":"RuleSetScope","code":"RuleSetName"},"displayName":"Rule set display name","description":"Rule set description","outputPropertyKey":"Transaction/default/TaxAmount","rules":[{"name":"UKTaxRule","description":"Rule for the UK tax rate","rate":0.25,"matchCriteria":[{"propertyKey":"Instrument/myScope/market","value":"GB","criterionType":"PropertyValueEquals"},{"propertyKey":"Portfolio/myScope/taxDomicile","value":"GB","criterionType":"PropertyValueEquals"}]}]}},"application/*+json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/CreateTaxRuleSetRequest"},"example":{"id":{"scope":"RuleSetScope","code":"RuleSetName"},"displayName":"Rule set display name","description":"Rule set description","outputPropertyKey":"Transaction/default/TaxAmount","rules":[{"name":"UKTaxRule","description":"Rule for the UK tax rate","rate":0.25,"matchCriteria":[{"propertyKey":"Instrument/myScope/market","value":"GB","criterionType":"PropertyValueEquals"},{"propertyKey":"Portfolio/myScope/taxDomicile","value":"GB","criterionType":"PropertyValueEquals"}]}]}}},"required":true},"responses":{"200":{"description":"Create a rule set for tax calculations.","content":{"application/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/TaxRuleSet"},"example":{"id":{"scope":"RuleSetScope","code":"RuleSetName"},"displayName":"Rule set display name","description":"Rule set description","outputPropertyKey":"Transaction/default/TaxAmount","rules":[{"name":"UKTaxRule","description":"Rule for the UK tax rate","rate":0.25,"matchCriteria":[{"propertyKey":"Instrument/myScope/market","value":"GB","criterionType":"PropertyValueEquals"},{"propertyKey":"Portfolio/myScope/taxDomicile","value":"GB","criterionType":"PropertyValueEquals"}]}],"version":{"effectiveFrom":"2019-01-01T12:00:00.0000000+00:00","asAtDate":"2019-01-01T12:00:00.0100000+00:00"}}},"text/plain":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/TaxRuleSet"},"example":{"id":{"scope":"RuleSetScope","code":"RuleSetName"},"displayName":"Rule set display name","description":"Rule set description","outputPropertyKey":"Transaction/default/TaxAmount","rules":[{"name":"UKTaxRule","description":"Rule for the UK tax rate","rate":0.25,"matchCriteria":[{"propertyKey":"Instrument/myScope/market","value":"GB","criterionType":"PropertyValueEquals"},{"propertyKey":"Portfolio/myScope/taxDomicile","value":"GB","criterionType":"PropertyValueEquals"}]}],"version":{"effectiveFrom":"2019-01-01T12:00:00.0000000+00:00","asAtDate":"2019-01-01T12:00:00.0100000+00:00"}}},"text/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/TaxRuleSet"},"example":{"id":{"scope":"RuleSetScope","code":"RuleSetName"},"displayName":"Rule set display name","description":"Rule set description","outputPropertyKey":"Transaction/default/TaxAmount","rules":[{"name":"UKTaxRule","description":"Rule for the UK tax rate","rate":0.25,"matchCriteria":[{"propertyKey":"Instrument/myScope/market","value":"GB","criterionType":"PropertyValueEquals"},{"propertyKey":"Portfolio/myScope/taxDomicile","value":"GB","criterionType":"PropertyValueEquals"}]}],"version":{"effectiveFrom":"2019-01-01T12:00:00.0000000+00:00","asAtDate":"2019-01-01T12:00:00.0100000+00:00"}}}}},"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":"Experimental"}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}}}}