{"openapi":"3.0.4","info":{"title":"Upsert Accounts","description":"Create or update accounts in the Chart of Accounts. An account will be updated\r\nif it already exists and created if it does not.\n\nThe maximum number of accounts that this method can upsert per request is 2,000.","version":"0.0.1"},"servers":[{"url":"https://fbn-prd.lusid.com/api"}],"paths":{"/api/chartofaccounts/{scope}/{code}/accounts":{"post":{"tags":["Chart Of Accounts"],"summary":"Upsert Accounts","description":"Create or update accounts in the Chart of Accounts. An account will be updated\r\nif it already exists and created if it does not.\n\nThe maximum number of accounts that this method can upsert per request is 2,000.","operationId":"UpsertAccounts","parameters":[{"name":"scope","in":"path","description":"The scope of the Chart of Accounts.","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-zA-Z0-9\\-_]+$","type":"string"}},{"name":"code","in":"path","description":"The code of the Chart of Accounts. Together with the scope this uniquely identifies\r\n            the Chart of Accounts.","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-zA-Z0-9\\-_]+$","type":"string"}}],"requestBody":{"description":"A list of accounts to be created or updated.","content":{"application/json-patch+json":{"schema":{"type":"array","items":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/Account"}},"example":[{"code":"001456","description":"Cash","type":"Asset","status":"Active","control":"Manual","properties":{}},{"code":"123653","description":"Dividends","type":"Revenue","status":"Inactive","control":"System","properties":{}}]},"application/json":{"schema":{"type":"array","items":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/Account"}},"example":[{"code":"001456","description":"Cash","type":"Asset","status":"Active","control":"Manual","properties":{}},{"code":"123653","description":"Dividends","type":"Revenue","status":"Inactive","control":"System","properties":{}}]},"text/json":{"schema":{"type":"array","items":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/Account"}},"example":[{"code":"001456","description":"Cash","type":"Asset","status":"Active","control":"Manual","properties":{}},{"code":"123653","description":"Dividends","type":"Revenue","status":"Inactive","control":"System","properties":{}}]},"application/*+json":{"schema":{"type":"array","items":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/Account"}},"example":[{"code":"001456","description":"Cash","type":"Asset","status":"Active","control":"Manual","properties":{}},{"code":"123653","description":"Dividends","type":"Revenue","status":"Inactive","control":"System","properties":{}}]}},"required":true},"responses":{"200":{"description":"The newly upserted Accounts.","content":{"application/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/AccountsUpsertResponse"}},"text/plain":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/AccountsUpsertResponse"}},"text/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/AccountsUpsertResponse"}}}},"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"}}}}