{"openapi":"3.0.4","info":{"title":"Upsert structured result data","description":"Create or update one or more structured result data items in a particular scope. An item is updated if it already exists\r\nand created if it does not.\r\n            \r\nIn the request, each data item must be keyed by a unique correlation ID. This ID is ephemeral and not stored by LUSID.\r\nIt serves only to easily identify each data item in the response.\r\n            \r\nThe response returns both the collection of successfully created or updated data items, as well as those that failed.\r\nFor each failure, a reason is provided.\r\n            \r\nIt is important to check the failed set for any unsuccessful results.","version":"0.0.1"},"servers":[{"url":"https://fbn-prd.lusid.com/api"}],"paths":{"/api/unitresults/{scope}":{"post":{"tags":["Structured Result Data"],"summary":"Upsert structured result data","description":"Create or update one or more structured result data items in a particular scope. An item is updated if it already exists\r\nand created if it does not.\r\n            \r\nIn the request, each data item must be keyed by a unique correlation ID. This ID is ephemeral and not stored by LUSID.\r\nIt serves only to easily identify each data item in the response.\r\n            \r\nThe response returns both the collection of successfully created or updated data items, as well as those that failed.\r\nFor each failure, a reason is provided.\r\n            \r\nIt is important to check the failed set for any unsuccessful results.","operationId":"UpsertStructuredResultData","parameters":[{"name":"scope","in":"path","description":"The scope in which to create or update data items.","required":true,"schema":{"maxLength":64,"minLength":1,"pattern":"^[a-zA-Z0-9\\-_]+$","type":"string"}}],"requestBody":{"description":"The set of data items to create or update, keyed by a unique, ephemeral correlation ID.","content":{"application/json-patch+json":{"schema":{"type":"object","additionalProperties":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/UpsertStructuredResultDataRequest"}},"example":{"first-item":{"id":{"source":"Client","code":"MyCustomDocument","effectiveAt":"2020-01-01T00:00:00.0000000+00:00","resultType":"UnitResult/Custom"},"data":{"documentFormat":"Csv","version":"1.0.0","name":"my document identifier","document":"luid,pv,pv-ccy,instrument-name\nLUID_11111111,1,GBP,instr1\nLUID_22222222,2,USD,instr2","dataMapKey":{"version":"1.0.0","code":"dataMapCode"}}},"second-item":{"id":{"source":"Client","code":"MyUploadedRiskResults-1","effectiveAt":"2018-03-05T00:00:00.0000000+00:00","resultType":"Risk"},"data":{"documentFormat":"Xml","version":"1.0.0","name":"free text identifier of document 1","document":"<xml>data</xml>"}},"third-item":{"id":{"source":"Client","code":"MyUploadedRiskResults-2","effectiveAt":"2018-03-05T00:00:00.0000000+00:00","resultType":"Risk"},"data":{"documentFormat":"Json","version":"1.0.0","name":"free text identifier of document 2","document":"{ \"some\":\"valid json\"}"}}}},"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/UpsertStructuredResultDataRequest"}},"example":{"first-item":{"id":{"source":"Client","code":"MyCustomDocument","effectiveAt":"2020-01-01T00:00:00.0000000+00:00","resultType":"UnitResult/Custom"},"data":{"documentFormat":"Csv","version":"1.0.0","name":"my document identifier","document":"luid,pv,pv-ccy,instrument-name\nLUID_11111111,1,GBP,instr1\nLUID_22222222,2,USD,instr2","dataMapKey":{"version":"1.0.0","code":"dataMapCode"}}},"second-item":{"id":{"source":"Client","code":"MyUploadedRiskResults-1","effectiveAt":"2018-03-05T00:00:00.0000000+00:00","resultType":"Risk"},"data":{"documentFormat":"Xml","version":"1.0.0","name":"free text identifier of document 1","document":"<xml>data</xml>"}},"third-item":{"id":{"source":"Client","code":"MyUploadedRiskResults-2","effectiveAt":"2018-03-05T00:00:00.0000000+00:00","resultType":"Risk"},"data":{"documentFormat":"Json","version":"1.0.0","name":"free text identifier of document 2","document":"{ \"some\":\"valid json\"}"}}}},"text/json":{"schema":{"type":"object","additionalProperties":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/UpsertStructuredResultDataRequest"}},"example":{"first-item":{"id":{"source":"Client","code":"MyCustomDocument","effectiveAt":"2020-01-01T00:00:00.0000000+00:00","resultType":"UnitResult/Custom"},"data":{"documentFormat":"Csv","version":"1.0.0","name":"my document identifier","document":"luid,pv,pv-ccy,instrument-name\nLUID_11111111,1,GBP,instr1\nLUID_22222222,2,USD,instr2","dataMapKey":{"version":"1.0.0","code":"dataMapCode"}}},"second-item":{"id":{"source":"Client","code":"MyUploadedRiskResults-1","effectiveAt":"2018-03-05T00:00:00.0000000+00:00","resultType":"Risk"},"data":{"documentFormat":"Xml","version":"1.0.0","name":"free text identifier of document 1","document":"<xml>data</xml>"}},"third-item":{"id":{"source":"Client","code":"MyUploadedRiskResults-2","effectiveAt":"2018-03-05T00:00:00.0000000+00:00","resultType":"Risk"},"data":{"documentFormat":"Json","version":"1.0.0","name":"free text identifier of document 2","document":"{ \"some\":\"valid json\"}"}}}},"application/*+json":{"schema":{"type":"object","additionalProperties":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/UpsertStructuredResultDataRequest"}},"example":{"first-item":{"id":{"source":"Client","code":"MyCustomDocument","effectiveAt":"2020-01-01T00:00:00.0000000+00:00","resultType":"UnitResult/Custom"},"data":{"documentFormat":"Csv","version":"1.0.0","name":"my document identifier","document":"luid,pv,pv-ccy,instrument-name\nLUID_11111111,1,GBP,instr1\nLUID_22222222,2,USD,instr2","dataMapKey":{"version":"1.0.0","code":"dataMapCode"}}},"second-item":{"id":{"source":"Client","code":"MyUploadedRiskResults-1","effectiveAt":"2018-03-05T00:00:00.0000000+00:00","resultType":"Risk"},"data":{"documentFormat":"Xml","version":"1.0.0","name":"free text identifier of document 1","document":"<xml>data</xml>"}},"third-item":{"id":{"source":"Client","code":"MyUploadedRiskResults-2","effectiveAt":"2018-03-05T00:00:00.0000000+00:00","resultType":"Risk"},"data":{"documentFormat":"Json","version":"1.0.0","name":"free text identifier of document 2","document":"{ \"some\":\"valid json\"}"}}}}},"required":true},"responses":{"200":{"description":"The successfully created or updated data items along with any failures.","content":{"application/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/UpsertStructuredDataResponse"}},"text/plain":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/UpsertStructuredDataResponse"}},"text/json":{"schema":{"$ref":"/docs/api/lusid/schemas.json#/components/schemas/UpsertStructuredDataResponse"}}}},"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"}}}}