Events

API for sending notifications to the client via SMS


Parameters

Name In Type Required Description
body body InboundEvent true ‘none’

Request body - instance of InboundEvent

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
  "event": {
    "appointment": {
      "attachment": [
        {
          "isRef": true,
          "referredType": "defaultSms",
          "smsBody": "Hola, ¿Cómo ha ido la instalación de tu fibra? Puedes darnos tu opinión y descargar el parte de instalación aquí...",
          "smsSender": "MasMovil",
          "tenant": 2
        }
      ],
      "category": "installation",
      "contactMedium": [
        {
          "characteristic": {
            "phoneNumber": "626666666",
            "type": "mobile"
          },
          "mediumType": "phoneNumber",
          "preferred": true
        }
      ],
      "dateTimeEnd": "2023-10-02T11:00:00Z",
      "dateTimeStart": "2023-10-02T09:00:00Z",
      "formerDateTimeEnd": "2023-09-28T11:00:00Z",
      "formerDateTimeStart": "2023-09-28T09:00:00Z",
      "id": "MYSIM_6872429",
      "status": "reminded"
    }
  },
  "eventId": "00001",
  "eventTime": "2023-10-02T11:30:16Z",
  "eventType": "AppointmentStateChangeEventNotification"
}
Name Type Required Description
event object true Event information to send
» appointment object true Appointment information
»» attachment [Attachment] true Message body
»» category string true Appointment category type
»» contactMedium [ContactMediumEvent] true Contact information
»» dateTimeEnd string true End date
»» dateTimeStart string true Start date
»» formerDateTimeEnd string false Previous end date
»» formerDateTimeStart string true Previous start date
»» id string true Appointment identifier
»» status string true Appointment status
eventId string true Event identifier
eventTime string true Event date
eventType string true Event type

Request example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41

curl -X POST https://appointments.sta.masstack.com/v1/event \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: API_KEY" \
 --data-raw "{
  'event': {
    'appointment': {
      'attachment': [
        {
          'isRef': true,
          'referredType': 'defaultSms',
          'smsBody': 'Hola, ¿Cómo ha ido la instalación de tu fibra? Puedes darnos tu opinión y descargar el parte de instalación aquí...',
          'smsSender': 'MasMovil',
          'tenant': 2
        }
      ],
      'category': 'installation',
      'contactMedium': [
        {
          'characteristic': {
            'phoneNumber': '626666666',
            'type': 'mobile'
          },
          'mediumType': 'phoneNumber',
          'preferred': true
        }
      ],
      'dateTimeEnd': '2023-10-02T11:00:00Z',
      'dateTimeStart': '2023-10-02T09:00:00Z',
      'formerDateTimeEnd': '2023-09-28T11:00:00Z',
      'formerDateTimeStart': '2023-09-28T09:00:00Z',
      'id': 'MYSIM_6872429',
      'status': 'reminded'
    }
  },
  'eventId': '00001',
  'eventTime': '2023-10-02T11:30:16Z',
  'eventType': 'AppointmentStateChangeEventNotification'
}" 

Responses

Code Meaning Description Schema
202 Accepted Accepted None
default Default Error response ErrorDto

default - instance of ErrorDto

Custom schema example

1
2
3
4
5
6
{
  "componentMsg": "ID MYSIM_6922893 not exists",
  "id": "MM0000002",
  "msg": "Resource not found",
  "status": 404
}
Name Type Required Description
componentMsg string false Detailed error message
id string false Error identifier
msg string false Generic error message
status integer(int64) false HTTP error code

Endpoints

Events

    Appointments