Skip to content

Create Activity Stream

POST
/api/activity-stream
curl --request POST \
--url https://api.wink.travel/api/activity-stream \
--header 'Content-Type: application/json' \
--header 'Wink-Version: 2.0' \
--data '{ "acl": "EVERYONE", "entityIdentifier": "", "eventDate": "", "emotion": "", "comment": "", "i18nKey": "", "attachmentId": "", "user": "" }'

Add a new activity stream entry.

Wink-Version
string
default: 2.0.0
Allowed values: 2.0
Media type application/json
object
acl
required

Who can track this stream?

string
""
Allowed values: EVERYONE AUTHENTICATED OWNER ADMIN
Example
EVERYONE
entityIdentifier
required

ID of tracked entity

string format: uuid
"" >= 1 characters
Example
booking-1
eventDate

Optional way to indicate when event occurred

string format: date-time
""
emotion

Optional emotion. The actual implementation of the emotion is down to the consumer of the stream.

string
""
Example
fire
comment

Optional comment. For when the activity was created manually by a user. If i18nKey is not populated, comment is required.

string
""
Example
I am all fired up!
i18nKey
required

Optional localized key. Key will be used to generate text on the front-end. If comment is not populated, i18n is required.

string
"" >= 1 characters
Example
ACTIVITY.UPLOADED
attachmentId

Optional attachment. For when we allow users to upload documents to the activity via Cloudinary.

string
""
Example
test.pdf
user

Optional user. Attached when an authenticated user is available in the context of the activity.

object
userIdentifier
required

User ID of authenticated person that created the stream.

string format: uuid
"" >= 1 characters
Example
user-1
name
required

Full name of user.

string
"" >= 1 characters
Example
Jane Doe
profilePictureUrl

Optional url of user’s profile picture

string
""

Created

Media type application/json
object
id

Document UUID

string
""
createdDate

Datetime this record was first created

string format: date-time
""
lastUpdate

Datetime this record was last updated

string format: date-time
""
version

Version property that shows how many times this document has been persisted. Document will not persist if the version property is less than current version property in the system. Result in an optimistic locking exception.

integer format: int64
""
acl
required

Who can track this stream?

string
""
Allowed values: EVERYONE AUTHENTICATED OWNER ADMIN
entityIdentifier
required

ID of tracked entity

string format: uuid
"" >= 1 characters
emotion

Optional emotion. The actual implementation of the emotion is down to the consumer of the stream.

string
""
comment

Optional comment. For when the activity was created manually by a user. If i18nKey is not populated, comment is required.

string
""
i18nKey
required

Localized key. Key will be used to generate text on the front-end. If comment is not populated, i18n is required.

string
"" >= 1 characters
attachmentId

Optional attachment. For when we allow users to upload documents to the activity via Cloudinary.

string
""
user

Optional user. Attached when an authenticated user is available in the context of the activity.

object
userIdentifier
required

User ID of authenticated person that created the stream.

string format: uuid
"" >= 1 characters
name
required

Full name of user.

string
"" >= 1 characters
profilePictureUrl

Optional url of user’s profile picture

string
""
Example
{
"id": "",
"createdDate": "",
"lastUpdate": "",
"version": "",
"acl": "EVERYONE",
"entityIdentifier": "",
"emotion": "",
"comment": "",
"i18nKey": "",
"attachmentId": "",
"user": ""
}

Bad Request

object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
}
}

Unauthorized

Media type */*
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties

Forbidden

Media type */*
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties

Internal Server Error

object
Example generated
{}