Data sync

account/poll

URL: https://fleep.io/api/account/poll

Handles long poll server side by storing connection information into connection table by the token.

Input:

event_horizon       bigint = 0      - latest event client has seen
wait                boolean = True  - Set to False if you want to get latest events
                                      but not stay waiting if there isn't any
poll_flags          text[] = null   - Can be used to fine tune polls
                                      according to client needs.
                                      skip_hidden - skip hidden conversations
                                      during initial sync.
                                      skip_rest - skip other conversations and start polling events
                                      used for limiting number of conversations loaded into client cache

Output:

event_horizon       bigint          - event horizon for next poll
stream              list            - ConvInfo, ContactInfo, MessageInfo, ActivityInfo, HookInfo
sync_progress       float           - indicates progess of sync from 0.0 to 1.0
static_version      text            - javascript version. Client should reload when changes
sync_cursor         text            - cursor that can be used to fetch next conversations

ConvInfo:

LabelInfo:

MessageInfo:

LockInfo:

ContactInfo:

FileInfo:

PreviewInfo:

ActivityInfo:

HookInfo:

RequestInfo:

TeamInfo:

SMTPInfo:
SMTPInfo
UploadInfo:
UploadInfo
BillingInfo:
BillingInfo
TransactionInfo
TransactionInfo
InvoiceInfo
InvoiceInfo

account/sync

URL: https://fleep.io/api/account/sync

Use it to initialize some information using token..

Output:

event_horizon       bigint          - no point to read historic events either
                                      server must return good enough guess so
                                      that contacts and conversations will be
                                      in good enough order
email               text            - account's email
display_name        text            - account's display name
account_id          text            - Account ID
mk_account_status   text            - See Classificators
is_in_org           boolean
is_org_admin        boolean

account/sync_conversations

URL: https://fleep.io/api/account/sync_conversations

Get next or previous batch of conversations

Input:

conversation_ids    text[]              - list of conversation id's to sync
mk_init_mode        text = 'ic_tiny'    - ic_header - header only
                                          ic_tiny - for minimal
                                          ic_full - ready for display

Output:

stream              list            - list of stream records needed to display the conversations

label/sync_conversations

URL: https://fleep.io/api/label/sync_conversations

Get next or previous batch of conversations

Input:

label_id            text                - label to be synced
sync_cursor         text = null         - cursor received from server with previous sync call
mk_init_mode        text = 'ic_tiny'    - ic_header - header only
                                          ic_tiny - for minimal
                                          ic_full - ready for display

Output:

stream              list            - list of stream records needed to display the conversations

Table Of Contents

Previous topic

Account management

Next topic

Conversation management