Moments

The moment object

Attribute

Type

Description

id

uuid

The unique identifier for the moment.

status

string

The moment status. active

cancelled

claimed

created

expired

failed

invited

paid

pending

processing

rejected

settled

type

string

The moment type. payment request pool

transaction

object_id

uuid

The unique identifier of the object which the moment refers to.

title

string

The title of the moment.

note

string

A message accompanying the object which the moment refers to.

amount

float

The amount of the moment. This can either be the full amount or partial amount.

total_amount

float

The full amount of the moment.

currency

string

Three-letter ISO-4217 code.

amount_indicator

AmountIndicator

Determines whether to render the amount as positive, negative or neutral color.

image

Image

An optional moment image or a group photo of the participants.

participation

Participation

Participation information for the moment.

is_owner

boolean

Whether the current user is the owner of (i.e. initiated) the moment.

is_open

boolean

Open or closed.

is_read

boolean

Read or unread.

read_at

time

The time when the moment was opened and read. Nil if unread.

created_at

time

The time when the moment was created.

updated_at

time

The time when the moment was updated.

Example

{
"id": "ad2636c3-82fe-4c45-af2d-d6324b2e618f",
"status": "active",
"type": "payment",
"object_id": "c5d8701e-05cf-4b15-52bf-1cf76c3d84f2",
"title": "Payment request",
"note": "Message from user",
"amount": 10.0,
"total_amount": 20.0,
"currency": "EUR",
"amount_indicator": {
"id": 2,
"title": "positive",
},
"image": {
"id": "75cc21be-fe47-4702-74bc-07b84beed5fb",
"url": "https://{imagehost}/ui/moments/ad2636c3-82fe-4c45-af2d-d6324b2e618f.jpg",
"full_screen_url": "https://{imagehost}/full/moments/ad2636c3-82fe-4c45-af2d-d6324b2e618f.jpg",
"thumbnail_url": "https://{imagehost}/thumbnail/moments/ad2636c3-82fe-4c45-af2d-d6324b2e618f.jpg",
"created_at": "2017-09-04T12:26:43.403883Z",
"updated_at": "2017-09-04T12:26:43.403883Z"
},
"participation": {
"count": {
"invited": 0,
"paid": 2,
"pending": 2,
"rejected": 1,
"total": 5
},
"first_names": ["Arnar", "Oskar", "Jon"]
},
"is_owner": true,
"is_open": true,
"is_read": false,
"read_at": "2015-09-04T12:26:43.48788Z",
"created_at": "2015-09-04T12:26:43.35539Z",
"updated_at": "2015-09-04T12:26:43.48788Z"
}

The amount indicator object

Attribute

Type

Description

id

int

The unique identifier for the amount indicator.

title

string

The code for the amount indicator.

Available values

ID

Title

1

neutral

2

positive

3

negative

Get a list of moments

Get a list of all moments.

Request
Response
Request

GET /v1/moments

Query Parameters

Name

Type

Description

page

int

Item pagination.

limit

int

Number of items to return per page.

sort

string

Sort the results by created_at, updated_at.

filter

string

Filter the results.

Filtering

Attribute

Type

Operators

Values

open

boolean

eq

true, false

search

string

eq

Any text

status

string

eq, neq

active, cancelled, claimed, created, expired, failed, invited, paid, pending, processing, rejected, settled

type

string

eq, neq

payment, pool, request, transaction

Response

200 OK

Returns a list of moment objects.

Get a moment

Get a single moment by ID.

Request
Response
Request

GET /v1/moments/{id}

Response

200 OK

Returns a moment object.