{"openapi":"3.0.4","info":{"title":"Upsert Allocations","description":"Upsert; update existing allocations with given ids, or create new allocations otherwise.","version":"0.0.1"},"servers":[{"url":"https://fbn-prd.lusid.com/api"}],"paths":{"/api/allocations":{"post":{"tags":["Allocations"],"summary":"Upsert Allocations","description":"Upsert; update existing allocations with given ids, or create new allocations otherwise.","operationId":"UpsertAllocations","parameters":[{"name":"verificationAsAt","in":"query","description":"An optional verification asAt; individual upserts will fail if an existing entity has been updated between the verification asAt and time of upsert.","schema":{"type":"string","format":"date-time"},"x-nullable":true},{"name":"retryWithoutChangedEntities","in":"query","description":"Optionally choose to keep retrying upsert for remaining entities if some are being updated concurrently. If set to true, any entities that have\r\n            changed since the verificationAsAt will be dropped from the set of allocations to upsert and the upsert will be retried. The response will only contain the allocations in the original request\r\n            that have been successfully upserted.","schema":{"type":"boolean","default":false},"x-nullable":true}],"requestBody":{"description":"The collection of allocation requests.","content":{"application/json-patch+json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/AllocationSetRequest"},"example":{"allocationRequests":[{"properties":{"Allocation/MyScope/SomeAllocationProperty":{"key":"Allocation/MyScope/SomeAllocationProperty","value":{"labelValue":"XYZ000034567"}}},"instrumentIdentifiers":{"Instrument/default/Currency":"GBP"},"quantity":100,"portfolioId":{"scope":"MyScope","code":"UKEquity"},"allocatedOrderId":{"scope":"MyScope","code":"ORD00000123"},"id":{"scope":"MyScope","code":"ALLOC00000123"},"placementIds":[{"scope":"MyScope","code":"SomePlacement"}],"state":"New","side":"Buy","type":"Limit","settlementDate":"2006-04-14T00:00:00.0000000+00:00","date":"2006-04-11T00:00:00.0000000+00:00","price":{"amount":12413.33,"currency":"USD"},"settlementCurrency":"USD","settlementCurrencyFxRate":1,"counterparty":"SomeCounterparty","executionIds":[{"scope":"MyScope","code":"EXEC00000123"}]}]}},"application/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/AllocationSetRequest"},"example":{"allocationRequests":[{"properties":{"Allocation/MyScope/SomeAllocationProperty":{"key":"Allocation/MyScope/SomeAllocationProperty","value":{"labelValue":"XYZ000034567"}}},"instrumentIdentifiers":{"Instrument/default/Currency":"GBP"},"quantity":100,"portfolioId":{"scope":"MyScope","code":"UKEquity"},"allocatedOrderId":{"scope":"MyScope","code":"ORD00000123"},"id":{"scope":"MyScope","code":"ALLOC00000123"},"placementIds":[{"scope":"MyScope","code":"SomePlacement"}],"state":"New","side":"Buy","type":"Limit","settlementDate":"2006-04-14T00:00:00.0000000+00:00","date":"2006-04-11T00:00:00.0000000+00:00","price":{"amount":12413.33,"currency":"USD"},"settlementCurrency":"USD","settlementCurrencyFxRate":1,"counterparty":"SomeCounterparty","executionIds":[{"scope":"MyScope","code":"EXEC00000123"}]}]}},"text/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/AllocationSetRequest"},"example":{"allocationRequests":[{"properties":{"Allocation/MyScope/SomeAllocationProperty":{"key":"Allocation/MyScope/SomeAllocationProperty","value":{"labelValue":"XYZ000034567"}}},"instrumentIdentifiers":{"Instrument/default/Currency":"GBP"},"quantity":100,"portfolioId":{"scope":"MyScope","code":"UKEquity"},"allocatedOrderId":{"scope":"MyScope","code":"ORD00000123"},"id":{"scope":"MyScope","code":"ALLOC00000123"},"placementIds":[{"scope":"MyScope","code":"SomePlacement"}],"state":"New","side":"Buy","type":"Limit","settlementDate":"2006-04-14T00:00:00.0000000+00:00","date":"2006-04-11T00:00:00.0000000+00:00","price":{"amount":12413.33,"currency":"USD"},"settlementCurrency":"USD","settlementCurrencyFxRate":1,"counterparty":"SomeCounterparty","executionIds":[{"scope":"MyScope","code":"EXEC00000123"}]}]}},"application/*+json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/AllocationSetRequest"},"example":{"allocationRequests":[{"properties":{"Allocation/MyScope/SomeAllocationProperty":{"key":"Allocation/MyScope/SomeAllocationProperty","value":{"labelValue":"XYZ000034567"}}},"instrumentIdentifiers":{"Instrument/default/Currency":"GBP"},"quantity":100,"portfolioId":{"scope":"MyScope","code":"UKEquity"},"allocatedOrderId":{"scope":"MyScope","code":"ORD00000123"},"id":{"scope":"MyScope","code":"ALLOC00000123"},"placementIds":[{"scope":"MyScope","code":"SomePlacement"}],"state":"New","side":"Buy","type":"Limit","settlementDate":"2006-04-14T00:00:00.0000000+00:00","date":"2006-04-11T00:00:00.0000000+00:00","price":{"amount":12413.33,"currency":"USD"},"settlementCurrency":"USD","settlementCurrencyFxRate":1,"counterparty":"SomeCounterparty","executionIds":[{"scope":"MyScope","code":"EXEC00000123"}]}]}}},"required":true},"responses":{"200":{"description":"A collection of allocations.","content":{"application/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/ResourceListOfAllocation"},"example":{"values":[{"id":{"scope":"MyScope","code":"ALLOC00000123"},"allocatedOrderId":{"scope":"MyScope","code":"ORD00000123"},"portfolioId":{"scope":"MyScope","code":"testPortfolio"},"quantity":100,"instrumentIdentifiers":{"Instrument/default/Currency":"GBP"},"version":{"effectiveFrom":"2018-03-05T10:10:10.0000000+00:00","asAtDate":"2018-03-05T10:10:10.0000000+00:00","asAtCreated":"2018-03-05T10:10:10.0000000+00:00","userIdCreated":"AllocationUser1","requestIdCreated":"AllocationRequestId1","reasonCreated":"","asAtModified":"2018-03-08T10:10:10.0000000+00:00","userIdModified":"AllocationUser2","requestIdModified":"AllocationRequestId2","reasonModified":"","asAtVersionNumber":2,"entityUniqueId":"67cd5403-60d3-4744-8455-c4522a3886cb"},"properties":{"Allocation/MyScope/SomeAllocationProperty":{"key":"Allocation/MyScope/SomeAllocationProperty","value":{"labelValue":"XYZ000034567"}}},"lusidInstrumentId":"customInstrumentId","placementIds":[{"scope":"MyScope","code":"PLAC00000123"}],"state":"New","side":"Buy","type":"Limit","settlementDate":"2006-04-14T00:00:00.0000000+00:00","date":"2006-04-11T00:00:00.0000000+00:00","price":{"amount":12413.33,"currency":"USD"},"settlementCurrency":"USD","settlementCurrencyFxRate":1,"counterparty":"SomeCounterparty","executionIds":[{"scope":"MyScope","code":"EXEC00000123"}]}],"links":[]}},"text/plain":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/ResourceListOfAllocation"},"example":{"values":[{"id":{"scope":"MyScope","code":"ALLOC00000123"},"allocatedOrderId":{"scope":"MyScope","code":"ORD00000123"},"portfolioId":{"scope":"MyScope","code":"testPortfolio"},"quantity":100,"instrumentIdentifiers":{"Instrument/default/Currency":"GBP"},"version":{"effectiveFrom":"2018-03-05T10:10:10.0000000+00:00","asAtDate":"2018-03-05T10:10:10.0000000+00:00","asAtCreated":"2018-03-05T10:10:10.0000000+00:00","userIdCreated":"AllocationUser1","requestIdCreated":"AllocationRequestId1","reasonCreated":"","asAtModified":"2018-03-08T10:10:10.0000000+00:00","userIdModified":"AllocationUser2","requestIdModified":"AllocationRequestId2","reasonModified":"","asAtVersionNumber":2,"entityUniqueId":"67cd5403-60d3-4744-8455-c4522a3886cb"},"properties":{"Allocation/MyScope/SomeAllocationProperty":{"key":"Allocation/MyScope/SomeAllocationProperty","value":{"labelValue":"XYZ000034567"}}},"lusidInstrumentId":"customInstrumentId","placementIds":[{"scope":"MyScope","code":"PLAC00000123"}],"state":"New","side":"Buy","type":"Limit","settlementDate":"2006-04-14T00:00:00.0000000+00:00","date":"2006-04-11T00:00:00.0000000+00:00","price":{"amount":12413.33,"currency":"USD"},"settlementCurrency":"USD","settlementCurrencyFxRate":1,"counterparty":"SomeCounterparty","executionIds":[{"scope":"MyScope","code":"EXEC00000123"}]}],"links":[]}},"text/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/ResourceListOfAllocation"},"example":{"values":[{"id":{"scope":"MyScope","code":"ALLOC00000123"},"allocatedOrderId":{"scope":"MyScope","code":"ORD00000123"},"portfolioId":{"scope":"MyScope","code":"testPortfolio"},"quantity":100,"instrumentIdentifiers":{"Instrument/default/Currency":"GBP"},"version":{"effectiveFrom":"2018-03-05T10:10:10.0000000+00:00","asAtDate":"2018-03-05T10:10:10.0000000+00:00","asAtCreated":"2018-03-05T10:10:10.0000000+00:00","userIdCreated":"AllocationUser1","requestIdCreated":"AllocationRequestId1","reasonCreated":"","asAtModified":"2018-03-08T10:10:10.0000000+00:00","userIdModified":"AllocationUser2","requestIdModified":"AllocationRequestId2","reasonModified":"","asAtVersionNumber":2,"entityUniqueId":"67cd5403-60d3-4744-8455-c4522a3886cb"},"properties":{"Allocation/MyScope/SomeAllocationProperty":{"key":"Allocation/MyScope/SomeAllocationProperty","value":{"labelValue":"XYZ000034567"}}},"lusidInstrumentId":"customInstrumentId","placementIds":[{"scope":"MyScope","code":"PLAC00000123"}],"state":"New","side":"Buy","type":"Limit","settlementDate":"2006-04-14T00:00:00.0000000+00:00","date":"2006-04-11T00:00:00.0000000+00:00","price":{"amount":12413.33,"currency":"USD"},"settlementCurrency":"USD","settlementCurrencyFxRate":1,"counterparty":"SomeCounterparty","executionIds":[{"scope":"MyScope","code":"EXEC00000123"}]}],"links":[]}}}},"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"}}}}