Test the LSM API - LabCollector

Search Knowledge Base by Keyword

Test the LSM API

You are here:
← All Topics

1. Available methods in LSM web service

Note: URL works with http and https


1.1. Jobs

 

1.2. Equipment

 

1.3. Assays

 

1.4. Categories 

 

1.5. Sample Types

 

1.6. Parameters

1.7. Requesters 

 

1.8. Create requesters 

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.9. Create job

Example of create:

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

 

1.10. Save results

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>

 

1.11. Invoices

 

1.12. Upload files

 

1.13. Link sample to module

 

1.14. Update sample status
  • Method: PUT
  • URL: http://[my_labcollector_url]/extra_modules/lsm/webservice/index.php?v=2
  • Required parameters: sampleid (identifier of sample), shipmentstatus (Use 0 for Submitted, 1 for In transit, 2 for Received, 3 for Returned)
  • Response: OK 200

 

      1.15. Update sample

  • Method: PUT
  • URL: http://[my_labcollector_url]/extra_modules/lsm/webservice/index.php?v=2
  • Parameters REQUIRED: sampleid (identifier of sample) or samplename
  • Parameters OPTIONAL: shipmentstatus    name     type    batch
    * Note: sampleid supports multiple ids separated by a comma.
    ** Note: shipmentstatus supports the following numbers or labels: 0|Submitted, 1|In transit, 2|Received, 3|Returned

 

      1.16. Start a batch

  • Method: PUT
  • URL: http://[my_labcollector_url]/extra_modules/lsm/webservice/index.php?v=2
  • Parameters REQUIRED:   batch (batch name)      startedby (user id valid in LSM (or 1 for super admin)
  • Parameters OPTIONAL:   startedon

 

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 software apps such as Postman. See KB-Testing LabCollector REST API.

4. Screenshots

4.1. GET

 

4.2. POST

 

Related topics: