---
# System prepended metadata

title: 'Items to approve:'

---

# Items to approve:

## Update route GET /invitations
```
Type: Public
GET /invitations?includedFields=workspace,channels
Response: { 
    data: {
        invitationId: Number,
        ..., 
        workspace: {
            name: String,
            workspaceId: Number,
            workspaceStatusId: Number
        },
        channels: { name: String, channelId: Number } []
    }
}
```

## Update route GET /sessions/:sessionId

System function id: 605

was:
Host: core service
Path: /sessions/:sessionId
Query params:
 * languageCode


now:
Host: core service
Path: /messages
Query params:
 * languageCode
 * sessionId
 * ~~isLocalized~~

## Create new route GET /sessions/:sessionId

System function id: 607

Host: admin service
Path: /sessions/:sessionId
Query params:
 * includedFields
     * platformConnectors

Response: 
```
{
    data: {
        sessionId: Number,
        ...,
        platformConectors: {
            facebookMessenger: { pageName: String, pageId: String }[],
            twilioSMS: { phoneNumber: String }[]
        }
    }
}
```

facebookMessenger => will be getted from platforms collection field: systemName  -- yes

In case if session was not found response:
```
{ data: {} }
```

GET /sessions?entityId=25
response: 200 { data: [] }

GET /sessions/25
yes -> response: 400 { errorCode: 2, message: 'Document by field sessionId was not found by value 25' }
response: 200 { data: {} }



## Update route GET /platforms

System function id: 540

Host: admin service
Path: /platforms
Query params:
 * [new] platformTypeIds?
      > Response will be return list of platforms who have all providedplatformTypes

Response: 
```
{
    data: {
        platformId: Number,
        name: String,
        logo: String,
        icon: String,
        systemName: String,
        reportColor: String,
        parentId: Number,
        endSessionMessage: String,
        userApp: { icon: String },
        workerUrl: String,
        takeoverEligible: Boolean,
        platformTypeIds: Number[]
    }[]
}
```

## Collection platformTypes

Possible values

| id | name | platforms
| -- | ---- | ---------
| 0  | standard | all platforms
| 1  | universal | Facebook Messenger(3), Twilio SMS(1)
| 2  | external | Facebook Messenger(3), Twilio SMS(1), Rake Live Chat(2), Rake Direct(5)
| 3  | TODO: 3rd party system external platforms invite posibile | Facebook Messenger(3), Twilio SMS(1)
