The LUSID API follows the REST style architecture which includes using HTTP response codes to return the status of requests.

LUSID entities that form part of the data model are modelled as resources on the API and use HTTP verbs for performing operations on them. The basic operations are described below:

  • GET - GET requests are used to retrieve resources that already exist in LUSID e.g. getting a portfolio. A successful request will return a response with a HTTP status code of 200
  • POST - POST requests are used to create or upsert resources in LUSID e.g. create a portfolio. A successful request will return a response with a HTTP status code of 201. POST requests are also to execute functions on the API e.g. aggregation. A successful request will return a response with a HTTP status code of 200.
  • PUT - PUT requests are used to update resources that already exist in LUSID. A PUT request will only update the fields specified as part of the request, any optional fields that are not specified will be removed as part of the update. This means that if you intend to update a single field you must ensure that you also supply all the fields you re not updating as part of the request. A successful request will return a response with a HTTP status code of 200.
  • DELETE - DELETE requests are used to delete resources that already exist in LUSID e.g. delete a portfolio A successful request will return a response with a HTTP status code of 200.

Handling failures

LUSID uses HTTP response codes to indicate the status of requests, below is a summary of the most common status codes returned by LUSID when requests fail.

  • 400 - Bad Request - Returned when the request contains invalid data, incorrectly formatted data or missing fields.
  • 401 - Unauthorised - The request does not contain a valid Open Id Connect token. If this is encountered you may need to reauthenticate with Okta.
  • 403 - Forbidden - You do not have access to the requested resource, you may not have the required permissions to complete the request and you should consult your entitlements manager for LUSID.
  • 404 - Not Found - The requested resource does not exists

Responses using the LUSID SDK

The LUSID SDKs can be used to interact with the LUSID API and are provided in C#Java and Python. Successful calls to SDK methods will return a result as described by

Unsuccessful calls to the LUSID API will throw an ApiException which will contain the HTTP status code and an ErrorResponse. The ErrorResponse will contain:

  • status - The HTTP status code
  • code - LUSID code indicating the type of error, for more details see the table below
  • message - Summary of the error
  • detailedMessage - Detailed description of the error
  • items - If the request contained multiple resources, the items will list each of the items that failed along with the details of why
Code Name Description
-10 Server Configuration Error  
-1 Unknown error An unexpected error was encountered on our side.
102 Version Not Found  
103 Api Rate Limit Violation  
104 Instrument Not Found  
105 Property Not Found  
106 Portfolio Recursion Depth  
108 Group Not Found  
109 Portfolio Not Found  
110 Property Schema Not Found  
111 Portfolio Ancestry Not Found  
112 Portfolio With Id Already Exists  
113 Orphaned Portfolio  
119 Missing Base Claims  
121 Property Not Defined  
122 Cannot Delete System Property  
123 Cannot Modify Immutable Property Field  
124 Property Already Exists  
125 Invalid Property Life Time  
126 Property Constraint Style Excludes Properties  
127 Cannot Modify Default Data Type  
128 Group Already Exists  
129 No Such Data Type  
130 Undefined Value For Data Type  
131 Unsupported Value Type Defined On Data Type  
132 Validation Error  
133 Loop Detected In Group Hierarchy  
134 Undefined Acceptable Values  
135 Sub Group Already Exists  
138 Price Source Not Found  
139 Analytic Store Not Found  
141 Analytic Store Already Exists  
143 Client Instrument Already Exists  
144 Duplicate In Parameter Set  
147 Results Not Found  
148 Order Field Not In Result Set  
149 Operation Failed  
150 Elastic Search Error  
151 Invalid Parameter Value  
153 Command Processing Failure  
154 Entity State Construction Failure  
155 Entity Timeline Does Not Exist  
156 Concurrency Conflict Failure  
157 Invalid Request  
158 Event Publish Unknown  
159 Event Query Failure  
160 Blob Did Not Exist  
162 Sub System Request Failure  
163 Sub System Configuration Failure  
165 Failed To Delete  
166 Upsert Client Instrument Failure  
167 Illegal As At Interval  
168 Illegal Bitemporal Query  
169 Invalid Alternate Id  
170 Cannot Add Source Portfolio Property Explicitly  
171 Entity Already Exists In Group  
173 Entity With Id Already Exists  
174 Derived Portfolio Details Do Not Exist  
176 Portfolio With Name Already Exists  
177 Invalid Transactions  
178 Reference Portfolio Not Found  
179 Duplicate Id  
180 Command Retrieval Failure  
181 Data Filter Application Failure  
182 Search Failed  
183 Movements Engine Configuration Key Failure  
184 Fx Rate Source Not Found  
185 Accrual Source Not Found  
186 Access Denied  
187 Invalid Identity Token  
188 Invalid Request Headers  
189 Price Not Found  
190 Invalid Sub Holding Keys Provided  
191 Duplicate Sub Holding Keys Provided  
192 Cut Definition Not Found  
193 Cut Definition Invalid  
194 Time Variant Property Deletion Date Unspecified  
195 Perpetual Property Deletion Date Specified  
196 Time Variant Property Upsert Date Unspecified  
197 Perpetual Property Upsert Date Specified  
200 Invalid Unit For Data Type  
201 Invalid Type For Data Type  
202 Invalid Value For Data Type  
203 Unit Not Defined For Data Type  
204 Units Not Supported On Data Type  
205 Cannot Specify Units On Data Type  
206 Unit Schema Inconsistent With Data Type  
207 Unit Definition Not Specified  
208 Duplicate Unit Definitions Specified  
209 Invalid Units Definition  
210 Invalid Instrument Identifier Unit  
211 Holdings Adjustment Does Not Exist  
212 Could Not Build Excel Url  
213 Could Not Get Excel Version  
214 Instrument By Code Not Found  
215 Entity Schema Does Not Exist  
216 Feature Not Supported On Portfolio Type  
217 Quote Not Found  
218 Invalid Quote Identifier  
219 Invalid Metric For Data Type  
220 Invalid Instrument Definition  
221 Instrument Upsert Failure  
222 Reference Portfolio Request Not Supported  
223 Transaction Portfolio Request Not Supported  
224 Invalid Property Value Assignment  
230 Transaction Type Not Found  
231 Transaction Type Duplication  
232 Portfolio Does Not Exist At Given Date  
233 Query Parser Failure  
234 Duplicate Constituent  
235 Unresolved Instrument Constituent  
236 Unresolved Instrument In Transition  
237 Missing Side Definitions  
299 Invalid Recipe  
300 Missing Recipe  
301 Dependencies  
304 Portfolio Preprocess Failure  
310 Valuation Engine Failure  
311 Task Factory Failure  
312 Task Evaluation Failure  
313 Task Generation Failure  
314 Engine Configuration Failure  
315 Model Specification Failure  
320 Market Data Key Failure  
321 Market Resolver Failure  
322 Market Data Failure  
330 Curve Failure  
331 Volatility Surface Failure  
332 Volatility Cube Failure  
350 Instrument Failure  
351 Cash Flows Failure  
352 Reference Data Failure  
360 Aggregation Failure  
361 Aggregation Measure Failure  
370 Result Retrieval Failure  
371 Result Processing Failure  
372 Vendor Result Processing Failure  
373 Vendor Result Mapping Failure  
374 Vendor Library Unauthorised  
375 Vendor Connectivity Error  
376 Vendor Interface Error  
377 Vendor Pricing Failure  
378 Vendor Translation Failure  
379 Vendor Key Mapping Failure  
380 Vendor Reflection Failure  
390 Attempt To Upsert Duplicate Quotes  
391 Corporate Action Source Does Not Exist  
392 Corporate Action Source Already Exists  
393 Instrument Identifier Already In Use  
394 Properties Not Found  
395 Batch Operation Aborted  
400 Invalid Iso4217 Currency Code  
401 Cannot Assign Instrument Identifier To Currency  
402 Cannot Assign Currency Identifier To Non Currency  
403 Currency Instrument Cannot Be Deleted  
404 Currency Instrument Cannot Have Economic Definition  
405 Currency Instrument Cannot Have Lookthrough Portfolio  
406 Cannot Create Currency Instrument With Multiple Identifiers  
407 Specified Currency Is Undefined  
410 Index Does Not Exist  
411 Sort Field Does Not Exist  
413 Negative Pagination Parameters  
414 Invalid Search Syntax  
415 Filter Execution Timeout  
420 Side Definition Inconsistent  
450 Invalid Quote Access Metadata Rule  
451 Access Metadata Not Found  
452 Invalid Access Metadata Identifier  
460 Standard Resource Not Found  
461 Standard Resource Conflict  
462 Calendar Not Found  
463 Date In A Calendar Not Found  
464 Invalid Date Source Data  
465 Invalid Timezone  
601 Person Identifier Already In Use  
602 Person Not Found  
603 Cannot Set Identifier  
617 Invalid Recipe Specification In Request  
618 Inline Recipe Deserialisation Failure  
619 Identifier Types Not Set For Entity  
620 Cannot Delete All Client Defined Identifiers  
650 The Order requested was not found.  
654 The Allocation requested was not found.  
655 Cannot build the fx forward target with the given holdings.  
656 Group does not contain expected entities.  
667 Relation definition already exists  
673 Missing entitlements for entities in Group  
674 Next Best Action not found  
676 Relation definition not defined  
677 Invalid entity identifier for relation  
681 Sorting by specified field not supported One or more of the provided fields to order by were either invalid or not supported.
682 Too many fields to sort by The number of fields to sort the data by exceeds the number allowed by the endpoint
684 Sequence Not Found  
685 Sequence Already Exists  
686 Non-cycling sequence has been exhausted  
687 Legal Entity Identifier Already In Use  
688 Legal Entity Not Found  
689 The supplied pagination token is invalid  
690 Property Type Is Not Supported  
691 Multiple Tax-lots For Currency Type Is Not Supported  
692 This endpoint does not support impersonation  
693 Entity type is not supported for Relationship  
694 Relationship Validation Failure  
695 Relationship Not Found  
697 Derived Property Formula No Longer Valid  
698 Story is not available