api-docs v5.83.2

API Docs

Table of contents


Rating

Rating - Delete

Back to top

Delete a specific rating

DELETE /ratings/: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>"
}

Examples

Example usage:

curl "https://yourdomain.com/ratings/<rating-id>" \
  -X DELETE \
  -H "Authorization: Bearer <your-api-token>"

Success response

Success response - Success 200

Name Type Description
id string
createdAt number
createdBy string
type string Allowed values: chatapp-doctor
target string
targetType string Allowed values: accounts
text string
rating number

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{
  "id": "id-1",
  "createdAt": 1564661697125,
  "createdBy": "some-uid"
}

Rating - Find

Back to top

Get list of ratings

GET /ratings

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/ratings" \
  -X GET \
  -H "Authorization: Bearer <your-api-token>"

Success response

Success response - Success 200

Name Type Description
ratings object[]

array of rating

ratings.id string
ratings.createdAt number
ratings.createdBy string
ratings.type string Allowed values: chatapp-doctor
ratings.target string
ratings.targetType string Allowed values: accounts
ratings.text string
ratings.rating number

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
[
  {
    "id": "id-1",
    "createdAt": 1564661697125,
    "createdBy": "some-uid"
  },
  {
    "id": "id-2",
    "createdAt": 1564661697125,
    "createdBy": "some-uid"
  }
]

Rating - Get

Back to top

Get a specific rating

GET /ratings/: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>"
}

Examples

Example usage:

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

Success response

Success response - Success 200

Name Type Description
id string
createdAt number
createdBy string
type string Allowed values: chatapp-doctor
target string
targetType string Allowed values: accounts
text string
rating number

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{
  "id": "id-1",
  "createdAt": 1564661697125,
  "createdBy": "some-uid"
}

Rating - Patch

Back to top

Update rating

PATCH /ratings/: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
createdAt number optional
type string Allowed values: chatapp-doctor
target string optional
targetType string optional

required when target != null

Allowed values: accounts
text string optional
rating number

Examples

Example usage:

curl "https://yourdomain.com/ratings/<rating-id>" \
  -X PATCH \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <your-api-token>" \
  -d '{
    "text": "some text"
  }'

Parameters examples

json - Request-Example

{
  "text": "some text"
}

Success response

Success response - Success 200

Name Type Description
id string
createdAt number
createdBy string
type string Allowed values: chatapp-doctor
target string
targetType string Allowed values: accounts
text string
rating number

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{
  "id": "id-1",
  "createdAt": 1564661697125,
  "createdBy": "some-uid"
}

Rating - Post

Back to top

Create rating

POST /ratings

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
createdAt number optional
type string Allowed values: chatapp-doctor
target string optional
targetType string optional

required when target != null

Allowed values: accounts
text string optional
rating number

Examples

Example usage:

curl "https://yourdomain.com/ratings" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <your-api-token>" \
  -d '{
    "type": "chatapp-doctor",
    "rating": 100
  }'

Parameters examples

json - Request-Example

{
  "type": "chatapp-doctor",
  "rating": 100
}

Success response

Success response - Success 200

Name Type Description
id string
createdAt number
createdBy string
type string Allowed values: chatapp-doctor
target string
targetType string Allowed values: accounts
text string
rating number

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{
  "id": "id-1",
  "createdAt": 1564661697125,
  "createdBy": "some-uid"
}

results matching ""

    No results matching ""