Test the Lab Service Manager API - LabCollector

Search Knowledge Base by Keyword

You are here:
← All Topics

Note: Since June 2017 API v1 was discontinued and all new evolutions are in API v2.

1. Available methods in LSM web service

1.1. Jobs

Method: GET
URL: http://[my_labcollector_url]/extra_modules/lsm/webservice/index.php?v=2
Optional parameters: datefrom, dateto, jobid, sampleid, assayid

1.2. Equipments

Method: GET
URL: http://[my_labcollector_url]/extra_modules/lsm/webservice/index.php?v=2&getEquipmentList=1
Optional parameters: id

1.3. Assays

Method: GET
URL: http://[my_labcollector_url]/extra_modules/lsm/webservice/index.php?v=2&getAssayList=1
Optional parameters: id

1.4. Categories NEW!

Method: GET
URL: http://[my_labcollector_url]/extra_modules/lsm/webservice/index.php?v=2&getCategoryList=1
Optional parameters: id

1.5. Requesters NEW!

Method: GET
URL: http://[my_labcollector_url]/extra_modules/lsm/webservice/index.php?v=2&getRequesterList=1
Optional parameters: id

1.6. Create requesters NEW!

Method: POST
URL: http://[my_labcollector_url]/extra_modules/lsm/webservice/index.php?v=2
Required parameter: create
Example of create:

<requesters>
<requester code='R01' name='Requester from API' taxNumber='12346789'>
<billing address='One street' city='City' state='State' country='US' zip='99999' phone='555123123' fax='555123123' contactFirstName='Jane' contactLastName='Doe' contactEmail='[email protected]' ></billing> 
<shipping address='One street' city='City' state='State' country='US' zip='99999' phone='555123123' fax='555123123' contactFirstName='Jane' contactLastName='Doe' contactEmail='[email protected]' ></shipping> 
</requester>
</requesters>

 

1.7. Create job NEW!

Method: POST
URL: http://[my_labcollector_url]/extra_modules/lsm/webservice/index.php?v=2
Required parameter: create
Example of create:

<jobs> 
<job number='XP-001' requester='1'> 
<sample name='sample01' type='1' comment='notes'> <assay id='1'></assay> 
<assay id='2'></assay> 
</sample> 
</job> 
</jobs> <br>

 

1.8. Save results

Method: POST
URL: http://[my_labcollector_url]/extra_modules/lsm/webservice/index.php?v=2
Required parameter: result
Example of result:

<assays>
<assay uniqueid="1223"><result><parameter id="34" unit="mg" value="123"/><parameter id="35" unit="ml" value="456"/>
</result>
</assay>
</assays>

2. Authentication

One HEADER parameter is mandatory:
Key: X-LC-APP-Auth
Value: The token you can view/generate in LabCollector > Admin > Others > Setup > Web services API

3. Tool

You can try to retrieve data from or send data to the API with some software app as Postman. See KB-LabCollector REST API.