api-docs v5.116.0

API Docs

Table of contents


Medicine

Medicine - Delete

Back to top

Delete a specific medicine. Can only delete user's own medicines

DELETE /medicines/:id

Headers - Header

Name Type Description
Authorization string

key to place the API token to using the grant 'Bearer'

Header examples

Authorization-Example

{
  "Authorization": "Bearer <your-api-token>"
}

Parameters - Parameter

Name Type Description
id string

uid of medicine

Examples

Example usage:

curl "https://yourdomain.com/medicines/<medicine-uid>" \
  -X DELETE \
  -H "Authorization: Bearer <your-api-token>"

Success response

Success response - Success 200

Name Type Description
id String
genericName String
brandName String
hasLinkedVariants Boolean

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{
  "id": "medicine-1-uid",
  "genericName": "Medicine 1",
  "brandName": "Medicine 1 Brandname"
}

Medicine - Find

Back to top

Fetch the list of medicines registered in the database

GET /medicines

Headers - Header

Name Type Description
Authorization string

key to place the API token to using the grant 'Bearer'

Header examples

Authorization-Example

{
  "Authorization": "Bearer <your-api-token>"
}

Examples

Example usage:

curl "https://yourdomain.com/medicines" \
  -X GET \
  -H "Authorization: Bearer <your-api-token>"

Success response

Success response - Success 200

Name Type Description
medicines Object[]

array of medicine profiles

medicines.id String
medicines.genericName String
medicines.brandName String
medicines.hasLinkedVariants Boolean

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
[
  {
    "id": "medicine-1-uid",
    "genericName": "Medicine 1",
    "brandName": "Medicine 1 Brandname"
  },
  {
    "id": "medicine-2-uid",
    "genericName": "Medicine 2",
    "brandName": "Medicine 2 Brandname"
  },
]

Medicine - Get

Back to top

Get a specific medicine

GET /medicines/:id

Headers - Header

Name Type Description
Authorization string

key to place the API token to using the grant 'Bearer'

Header examples

Authorization-Example

{
  "Authorization": "Bearer <your-api-token>"
}

Parameters - Parameter

Name Type Description
id string

uid of medicine

Examples

Example usage:

curl "https://yourdomain.com/medicines/<medicine-uid>" \
  -X GET \
  -H "Authorization: Bearer <your-api-token>"

Success response

Success response - Success 200

Name Type Description
id String
genericName String
brandName String
hasLinkedVariants Boolean

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{
  "id": "medicine-1-uid",
  "genericName": "Medicine 1",
  "brandName": "Medicine 1 Brandname"
}

Medicine - Post

Back to top

Create/Register an medicine

POST /medicines

Headers - Header

Name Type Description
Authorization string

key to place the API token to using the grant 'Bearer'

Header examples

Authorization-Example

{
  "Authorization": "Bearer <your-api-token>"
}

Parameters - Parameter

Name Type Description
genericName string
brandName string
formulations Object[]
formulations.formulation String
formulations.classification String
formulations.form String

Examples

Example usage:

curl "https://yourdomain.com/medicines" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <your-api-token>" \
  -d '{
    "genericName": "Medicine 2",
     "brandName": "Medicine 2 Brandname",
    "formulations": [{
      "formulation": "some fomulation"
    }]
  }'

Parameters examples

json - Request-Example

{
  "genericName": "Medicine 2",
   "brandName": "Medicine 2 Brandname",
  "formulations": [{
    "formulation": "some fomulation"
  }]
}

Success response

Success response - Success 200

Name Type Description
id String
genericName String
brandName String
hasLinkedVariants Boolean

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{
  "id": "medicine-1-uid",
  "genericName": "Medicine 1",
  "brandName": "Medicine 1 Brandname"
}

results matching ""

    No results matching ""