Skip to content

Get comments

/comments

Target audience: Developers

Get comments

Introduction

This endpoint returns comments for an account.

URI

Environment URI
Stage https://payway-api.stage.adeprimo.se/external/api/v1/accounts/comments
Production https://backend.worldoftulo.com/external/api/v1/accounts/comments

Required scope

/external/account/r

Parameters

Name Required Type Description
id Optional String The id of the account to get information about.
Size range: ..24
Allowed values: "/^[a-f\d]{24}$/i"
email Optional String The email of the account to get information about. Must be URL-encoded.
Size range: ..1024
Allowed values:
"/\A[\w+-.]+@[a-z\d-]+(.[a-z]+)*.[a-z]+\z/i"

Curl Example

Email

curl --request GET \
  --url https://payway-api.stage.adeprimo.se/external/api/v1/accounts/comments?email=test%40example.com \
  --header 'accept: application/json' \
  --header 'authorization: Bearer <token>'

Response

Example response

HTTP 200
{
  "items": [
    {
      "id": "5ea16b1295cfebff3e3ae0c0",
      "type": "comment",
      "message": "Testkommentar",
      "producer": "payway@adeprimo.se",
      "created_at": "2020-04-23 12:16:50 +0200",
      "updated_at": "2020-04-23 12:16:50 +0200"
    },
    {
      "id": "5cd55c2e95cfeb42159a53ff",
      "type": "comment",
      "message": "Testar 123",
      "producer": "payway@adeprimo.se",
      "created_at": "2019-05-10 13:10:38 +0200",
      "updated_at": "2019-05-10 13:10:38 +0200"
    }
  ]
}

Errors

Example error response

HTTP 400 Bad Request
{
  "code": "invalid_parameter",
  "field": "email",
  "message": "Parameter must match format /\A[\w+\-.]+@[a-z\d\-]+(\.[a-z]+)*\.[a-z]+\z/i"
}

HTTP 400 Bad Request

Name Type Description
unknown_parameter Object One or more of the fields in the posted json was not recognized

HTTP 404 Not Found

Name Type Description
not_found Object The account could not be found

HTTP 500 Internal Server Error

Name Type Description
internal_server_error Object Something unexpected happened server side