Swagger Lilac (1.0.0)

Download OpenAPI specification:Download

This is an example API to demonstrate features of the OpenAPI specification.

Introduction

Lilac API documentation.

API Token Authentication

The Lilac API provides an API token based authentication system. To authenticate using a valid token, include your token under the HTTP header X-API-KEY. How to Find Your Token

  1. Login Lilac dashboard https://dashboard.lilac.dev.amili.asia/
  2. Go to API Key Management

step 2.

  1. Click Create if you haven't generated your API Key yet

step 3.

  1. Copy API Key

step 4.

Channels

Everything about channels

Returns all channels from the system

Returns all channels from the system

Authorizations:
ApiKeyAuth
query Parameters
order
string
Default: "DESC"
Enum: "ASC" "DESC"
page
integer >= 1
Default: 1
take
integer [ 1 .. 1000 ]
Default: 1

The numbers of items to return.

q
string
tenantId
string

ID of the organization to get

deleted
string
Enum: "true" "false"
orderField
string
itemCount
integer

Total items

channelIds
Array of strings

Ids of the channels to get

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Projects

Everything about projects

Returns projects from the system

Returns projects from the system

Authorizations:
ApiKeyAuth
query Parameters
order
string
Default: "DESC"
Enum: "ASC" "DESC"
page
integer >= 1
Default: 1
take
integer [ 1 .. 1000 ]
Default: 1

The numbers of items to return.

q
string
tenantId
string

ID of the organization to get

deleted
string
Enum: "true" "false"
orderField
string
itemCount
integer

Total items

channelIds
Array of strings

Ids of the channels to get

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Products

Everything about products

Returns products from the system

Returns products from the system

Authorizations:
ApiKeyAuth
query Parameters
order
string
Default: "DESC"
Enum: "ASC" "DESC"
page
integer >= 1
Default: 1
take
integer [ 1 .. 1000 ]
Default: 1

The numbers of items to return.

q
string
tenantId
string

ID of the organization to get

deleted
string
Enum: "true" "false"
orderField
string
itemCount
integer

Total items

channelId
string

Id of the channel to get

productType
Array of arrays
Items Enum: "KIT" "PROBIOTIC" "BUNDLE"

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Orders

Everything about orders

Returns all orders from the system that the user has access to view

Returns all orders from the system that the user has access to view

Authorizations:
ApiKeyAuth
query Parameters
order
string
Default: "DESC"
Enum: "ASC" "DESC"
page
integer >= 1
Default: 1
take
integer [ 1 .. 1000 ]
Default: 1

The numbers of items to return.

q
string
tenantId
string

ID of the organization to get

deleted
string
Enum: "true" "false"
orderField
string
itemCount
integer

Total items

projectId
string

ID of the project to get

productType
string
Enum: "KIT" "PROBIOTIC" "BUNDLE"

productType

startDate
string <date>

startDate

endDate
string <date>

endDate

Responses

Response samples

Content type
application/json
{
  • "page": 0,
  • "take": 0,
  • "itemCount": 0,
  • "pageCount": 0,
  • "hasPreviousPage": true,
  • "hasNextPage": true,
  • "data": [
    ]
}

Add a new order

Add a new order

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
object (OrderRegisterDto)
Array of objects (OrderItemRegisterDto)

Responses

Request samples

Content type
application/json
{
  • "order": {
    },
  • "orderItems": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "userId": "string",
  • "tenantId": "string",
  • "channelId": "string",
  • "addressId": "string",
  • "projectId": "string",
  • "orderedAt": "2019-08-24",
  • "orderStatus": "CANCELLED",
  • "paymentStatus": "PAID",
  • "total": 0,
  • "trackingNumber": "string",
  • "displayId": "string",
  • "notPrintOut": true,
  • "unregisterOrder": true,
  • "unregisterEmailAddress": "string",
  • "actualBiomeOrderId": "string",
  • "discountCodes": [
    ],
  • "totalDiscounts": 0,
  • "notes": "string",
  • "isSolvedNotes": true,
  • "idTrackingSpecialOrder": "string",
  • "invoiceNo": "string",
  • "partnerName": "string",
  • "chanel": {
    },
  • "project": {
    },
  • "orderItems": [
    ]
}

Find order by Id

Returns a single order

Authorizations:
ApiKeyAuth
path Parameters
orderId
required
string

Id of order to return

Responses

Response samples

Content type
application/json
[
  • {
    }
]

The Order Dto

id
string
userId
string
tenantId
string
channelId
string
addressId
string
projectId
string
orderedAt
string <date>
orderStatus
string
Enum: "CANCELLED" "PENDING" "CONFIRMED" "DELIVERING" "DELIVERED" "RETURNED" "REFUNDED"
paymentStatus
string
Enum: "PAID" "UNPAID" "REFUNDED"
total
integer
trackingNumber
string
displayId
string
notPrintOut
boolean
unregisterOrder
boolean
unregisterEmailAddress
string
actualBiomeOrderId
string
Array of objects (DiscountCode)
totalDiscounts
integer
notes
string
isSolvedNotes
boolean
idTrackingSpecialOrder
string
invoiceNo
string
partnerName
string
object (ChannelDto)
object (ProjectDto)
Array of objects (OrderItemDto)
{
  • "id": "string",
  • "userId": "string",
  • "tenantId": "string",
  • "channelId": "string",
  • "addressId": "string",
  • "projectId": "string",
  • "orderedAt": "2019-08-24",
  • "orderStatus": "CANCELLED",
  • "paymentStatus": "PAID",
  • "total": 0,
  • "trackingNumber": "string",
  • "displayId": "string",
  • "notPrintOut": true,
  • "unregisterOrder": true,
  • "unregisterEmailAddress": "string",
  • "actualBiomeOrderId": "string",
  • "discountCodes": [
    ],
  • "totalDiscounts": 0,
  • "notes": "string",
  • "isSolvedNotes": true,
  • "idTrackingSpecialOrder": "string",
  • "invoiceNo": "string",
  • "partnerName": "string",
  • "chanel": {
    },
  • "project": {
    },
  • "orderItems": [
    ]
}

The Order Pagination Dto

page
integer
take
integer
itemCount
integer
pageCount
integer
hasPreviousPage
boolean
hasNextPage
boolean
Array of objects (OrderModel)
{
  • "page": 0,
  • "take": 0,
  • "itemCount": 0,
  • "pageCount": 0,
  • "hasPreviousPage": true,
  • "hasNextPage": true,
  • "data": [
    ]
}

The DiscountCode Dto

code
string
amount
string
type
string
{
  • "code": "string",
  • "amount": "string",
  • "type": "string"
}

The Channel Dto

id
string
name
string
autoGenerateKit
boolean
autoCreateOrderFromQualtrics
boolean
sendBMEEmail
boolean
sendPartnerEmail
boolean
timeline
string
Enum: "AMD" "BME" "RESEARCH" "FMT" "FFH"
showAddressSection
boolean
object (IWorkflowValue)
{
  • "id": "string",
  • "name": "string",
  • "autoGenerateKit": true,
  • "autoCreateOrderFromQualtrics": true,
  • "sendBMEEmail": true,
  • "sendPartnerEmail": true,
  • "timeline": "AMD",
  • "showAddressSection": true,
  • "defaultWorkflowValue": {
    }
}

The IWorkflowValue Dto

sampleType
Array of arrays
Items Enum: "STOOL" "URINE" "SALIVA" "ZYMO" "ETHANOL" "CALPROTEIN" "RAW" "INVITRO"
ffq
boolean
reibursement
boolean
report
Array of arrays
Items Enum: "NONE" "ASV" "PDF" "SCORE_TABLE" "TAXA_TABLE" "DISEASE_RISK"
collectionMedium
Array of arrays
Items Enum: "ZYMO" "ETHANOL" "INVITRO" "RAW"
{
  • "sampleType": "STOOL",
  • "ffq": true,
  • "reibursement": true,
  • "report": "NONE",
  • "collectionMedium": "ZYMO"
}

The Project Dto

id
string
name
string
channelId
string
displayId
string
clinicCode
string
addressId
string
principalInvestigatorName
string
qualtricsSurveyId
Array of strings
object (IWorkflowValue)
externalResearchProjectId
string
surveyCollectionId
string
amiliPIC
string
isPartnerEmailD2D31Trigger
boolean
isPartnerEmailD4Trigger
boolean
organizationName
string
tenantId
string
collaborator
string
Enum: "RESEARCH" "LAB" "CLINIC" "BUSINESS"
externalSampleType
string
Enum: "STOOL" "DNA" "FASTQ"
externalSpeciesType
string
Enum: "HUMAN" "ANIMAL" "BACTERIA"
externalTissueNucleicAcidType
string
Value: "GENOMIC_DNA"
externalTissueOrgan
string
Enum: "STOOL" "SALIVA"
externalElutionBuffer
string
Enum: "DDH2O" "TE_BUFFER" "RNA_FREE_OR_DEPC" "PURE_ETHANOL"
externalPipeline
string
Enum: "V2_5" "V3_0"
externalOutputType
Array of arrays
Items Enum: "NONE" "ASV" "PDF" "SCORE_TABLE" "TAXA_TABLE" "DISEASE_RISK"
pdfTemplateName
string
externalSequencingTypeId
string
externalHaveSentB1
boolean
externalHaveSentB2
boolean
externalEmail
string
inputMLPrefix
string
Enum: "KIT_ID" "ANALYSIS_ID" "EXTERNAL_ID"
outputMLPrefix
string
Enum: "KIT_ID" "ANALYSIS_ID" "EXTERNAL_ID"
prefix
string
{
  • "id": "string",
  • "name": "string",
  • "channelId": "string",
  • "displayId": "string",
  • "clinicCode": "string",
  • "addressId": "string",
  • "principalInvestigatorName": "string",
  • "qualtricsSurveyId": [
    ],
  • "workflow": {
    },
  • "externalResearchProjectId": "string",
  • "surveyCollectionId": "string",
  • "amiliPIC": "string",
  • "isPartnerEmailD2D31Trigger": true,
  • "isPartnerEmailD4Trigger": true,
  • "organizationName": "string",
  • "tenantId": "string",
  • "collaborator": "RESEARCH",
  • "externalSampleType": "STOOL",
  • "externalSpeciesType": "HUMAN",
  • "externalTissueNucleicAcidType": "GENOMIC_DNA",
  • "externalTissueOrgan": "STOOL",
  • "externalElutionBuffer": "DDH2O",
  • "externalPipeline": "V2_5",
  • "externalOutputType": "NONE",
  • "pdfTemplateName": "string",
  • "externalSequencingTypeId": "string",
  • "externalHaveSentB1": true,
  • "externalHaveSentB2": true,
  • "externalEmail": "string",
  • "inputMLPrefix": "KIT_ID",
  • "outputMLPrefix": "KIT_ID",
  • "prefix": "string"
}

The OrderItem Dto

id
string
orderId
string
productId
string
quantity
integer
price
integer
object (MetadataOrderItem)
kitSerials
Array of strings
object (DiscountAllocation)
object (ProductDto)
{
  • "id": "string",
  • "orderId": "string",
  • "productId": "string",
  • "quantity": 0,
  • "price": 0,
  • "metadata": {
    },
  • "kitSerials": [
    ],
  • "discountAllocations": {
    },
  • "product": {
    }
}

The MetadataOrderItem Dto

customMessageFee
integer
customMessage
string
Array of objects (ExternalMetadata)
{
  • "customMessageFee": 0,
  • "customMessage": "string",
  • "externalMetadata": [
    ]
}

The ExternalMetadata Dto

externalId
string
volume
integer
concentration
integer
{
  • "externalId": "string",
  • "volume": 0,
  • "concentration": 0
}

The DiscountAllocation Dto

amount
string
discount_application_index
integer
{
  • "amount": "string",
  • "discount_application_index": 0
}

The Product Dto

id
string
name
string
description
string
stock
integer
price
integer
active
boolean
image
string
displayId
string
productType
string
Enum: "KIT" "PROBIOTIC" "BUNDLE"
tenantId
string
channelId
string
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "stock": 0,
  • "price": 0,
  • "active": true,
  • "image": "string",
  • "displayId": "string",
  • "productType": "KIT",
  • "tenantId": "string",
  • "channelId": "string"
}

The Kit Dto

id
string
profileId
string
b2dProfileName
string
object
orderItemId
string
projectId
string
serial
string
analysisId
string
activated
boolean
activatedAt
string <date>
sampleReceivedAt
string <date>
status
string
Enum: "UNACTIVATED" "SENT_OUT" "ACTIVATED" "KIT_RECEIVED" "DNA_EXTRACTED" "SEQUENCING" "UNDER_SUPPORT" "COMPLETED" "FFQ_SURVEY_COMPLETED" "ALIQUOTED"
isUnassigned
boolean
isSurveyFinished
boolean
kronaReportReady
boolean
b2cScoreReady
boolean
abunScoreReady
boolean
top10BacteriaReportReady
boolean
kitSendOut
boolean
kitSendOutAt
string <date>
completedAt
string <date>
kitReceivedAt
string <date>
notes
string
internalSurveyResultId
string
isFfqSurveyCompletion
string
labId
string
pdfPublish
boolean
pdfPath
string
qualtricsResponseId
string
surveyStartAt
string <date>
isAliquoted
boolean
externalId
string
pdfQC
string
Enum: "SUCCESS" "FAILED"
reportStatus
string
Enum: "UNDER_SUPPORT" "PUBLISHED" "UNPUBLISHED"
tenantId
string
{
  • "id": "string",
  • "profileId": "string",
  • "b2dProfileName": "string",
  • "b2dProfileNameData": {
    },
  • "orderItemId": "string",
  • "projectId": "string",
  • "serial": "string",
  • "analysisId": "string",
  • "activated": true,
  • "activatedAt": "2019-08-24",
  • "sampleReceivedAt": "2019-08-24",
  • "status": "UNACTIVATED",
  • "isUnassigned": true,
  • "isSurveyFinished": true,
  • "kronaReportReady": true,
  • "b2cScoreReady": true,
  • "abunScoreReady": true,
  • "top10BacteriaReportReady": true,
  • "kitSendOut": true,
  • "kitSendOutAt": "2019-08-24",
  • "completedAt": "2019-08-24",
  • "kitReceivedAt": "2019-08-24",
  • "notes": "string",
  • "internalSurveyResultId": "string",
  • "isFfqSurveyCompletion": "string",
  • "labId": "string",
  • "pdfPublish": true,
  • "pdfPath": "string",
  • "qualtricsResponseId": "string",
  • "surveyStartAt": "2019-08-24",
  • "isAliquoted": true,
  • "externalId": "string",
  • "pdfQC": "SUCCESS",
  • "reportStatus": "UNDER_SUPPORT",
  • "tenantId": "string"
}

The OrderCreate Dto

object (OrderRegisterDto)
Array of objects (OrderItemRegisterDto)
{
  • "order": {
    },
  • "orderItems": [
    ]
}

The OrderRegister Dto

partnerName
string
invoiceNo
string
addressId
integer
projectId
required
string
channelId
required
string
notes
string
{
  • "partnerName": "string",
  • "invoiceNo": "string",
  • "addressId": 0,
  • "projectId": "string",
  • "channelId": "string",
  • "notes": "string"
}

The OrderItemRegister Dto

productId
required
string
price
required
integer
quantity
required
integer
object (MetadataOrderItem)
kitSerials
required
Array of strings
{
  • "productId": "string",
  • "price": 0,
  • "quantity": 0,
  • "metadata": {
    },
  • "kitSerials": [
    ]
}

The CustomError Dto

message
string
errorCode
string
statusCode
integer
error
string
{
  • "message": "string",
  • "errorCode": "string",
  • "statusCode": 0,
  • "error": "string"
}

The Project Pagination Dto

page
integer
take
integer
itemCount
integer
pageCount
integer
hasPreviousPage
boolean
hasNextPage
boolean
Array of objects (ProjectDto)
{
  • "page": 0,
  • "take": 0,
  • "itemCount": 0,
  • "pageCount": 0,
  • "hasPreviousPage": true,
  • "hasNextPage": true,
  • "datas": [
    ]
}

The Product Pagination Dto

page
integer
take
integer
itemCount
integer
pageCount
integer
hasPreviousPage
boolean
hasNextPage
boolean
Array of objects (ProductDto)
{
  • "page": 0,
  • "take": 0,
  • "itemCount": 0,
  • "pageCount": 0,
  • "hasPreviousPage": true,
  • "hasNextPage": true,
  • "datas": [
    ]
}