{"openapi":"3.0.4","info":{"title":"Upsert Custodian Accounts","description":"Create or update Custodian Accounts in the Transaction Portfolios. A Custodian Account will be updated\r\nif it already exists and created if it does not.\n\nThe batch limit per request is 2,000.","version":"0.0.1"},"servers":[{"url":"https://fbn-prd.lusid.com/api"}],"paths":{"/api/transactionportfolios/{scope}/{code}/custodianaccounts":{"post":{"tags":["Transaction Portfolios"],"summary":"Upsert Custodian Accounts","description":"Create or update Custodian Accounts in the Transaction Portfolios. A Custodian Account will be updated\r\nif it already exists and created if it does not.\n\nThe batch limit per request is 2,000.","operationId":"UpsertCustodianAccounts","parameters":[{"name":"scope","in":"path","description":"The scope of the Transaction Portfolio.","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-zA-Z0-9\\-_]+$","type":"string"}},{"name":"code","in":"path","description":"The code of the Transaction Portfolio. Together with the scope this uniquely identifies\r\n            the Transaction Portfolios.","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-zA-Z0-9\\-_]+$","type":"string"}}],"requestBody":{"description":"A list of Custodian Accounts to be created or updated.","content":{"application/json-patch+json":{"schema":{"type":"array","items":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/CustodianAccountRequest"}},"example":[{"scope":"ScopeA","code":"Account1","status":"Active","accountNumber":"10003786BGBP","accountName":"Account1 Sterling","accountingMethod":"FirstInFirstOut","currency":"GBP","properties":{},"custodianIdentifier":{"idTypeScope":"ScopeA","idTypeCode":"LegalEntityCode1","code":"LegalEntityValue1"},"accountType":"Cash"},{"scope":"ScopeB","code":"Account2","status":"Active","accountNumber":"10003786BEUR","accountName":"Account2 Euro","accountingMethod":"FirstInFirstOut","currency":"EUR","properties":{},"custodianIdentifier":{"idTypeScope":"ScopeA","idTypeCode":"LegalEntityCode2","code":"LegalEntityValue2"},"accountType":"Swap"}]},"application/json":{"schema":{"type":"array","items":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/CustodianAccountRequest"}},"example":[{"scope":"ScopeA","code":"Account1","status":"Active","accountNumber":"10003786BGBP","accountName":"Account1 Sterling","accountingMethod":"FirstInFirstOut","currency":"GBP","properties":{},"custodianIdentifier":{"idTypeScope":"ScopeA","idTypeCode":"LegalEntityCode1","code":"LegalEntityValue1"},"accountType":"Cash"},{"scope":"ScopeB","code":"Account2","status":"Active","accountNumber":"10003786BEUR","accountName":"Account2 Euro","accountingMethod":"FirstInFirstOut","currency":"EUR","properties":{},"custodianIdentifier":{"idTypeScope":"ScopeA","idTypeCode":"LegalEntityCode2","code":"LegalEntityValue2"},"accountType":"Swap"}]},"text/json":{"schema":{"type":"array","items":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/CustodianAccountRequest"}},"example":[{"scope":"ScopeA","code":"Account1","status":"Active","accountNumber":"10003786BGBP","accountName":"Account1 Sterling","accountingMethod":"FirstInFirstOut","currency":"GBP","properties":{},"custodianIdentifier":{"idTypeScope":"ScopeA","idTypeCode":"LegalEntityCode1","code":"LegalEntityValue1"},"accountType":"Cash"},{"scope":"ScopeB","code":"Account2","status":"Active","accountNumber":"10003786BEUR","accountName":"Account2 Euro","accountingMethod":"FirstInFirstOut","currency":"EUR","properties":{},"custodianIdentifier":{"idTypeScope":"ScopeA","idTypeCode":"LegalEntityCode2","code":"LegalEntityValue2"},"accountType":"Swap"}]},"application/*+json":{"schema":{"type":"array","items":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/CustodianAccountRequest"}},"example":[{"scope":"ScopeA","code":"Account1","status":"Active","accountNumber":"10003786BGBP","accountName":"Account1 Sterling","accountingMethod":"FirstInFirstOut","currency":"GBP","properties":{},"custodianIdentifier":{"idTypeScope":"ScopeA","idTypeCode":"LegalEntityCode1","code":"LegalEntityValue1"},"accountType":"Cash"},{"scope":"ScopeB","code":"Account2","status":"Active","accountNumber":"10003786BEUR","accountName":"Account2 Euro","accountingMethod":"FirstInFirstOut","currency":"EUR","properties":{},"custodianIdentifier":{"idTypeScope":"ScopeA","idTypeCode":"LegalEntityCode2","code":"LegalEntityValue2"},"accountType":"Swap"}]}},"required":true},"responses":{"200":{"description":"The newly upserted custodian accounts.","content":{"application/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/CustodianAccountsUpsertResponse"}},"text/plain":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/CustodianAccountsUpsertResponse"}},"text/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/CustodianAccountsUpsertResponse"}}}},"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"}}}}