aboutsummaryrefslogtreecommitdiffstats
path: root/docs/offeredapis/listener/markDown.md
blob: 332c6cf8032c5f1cf0e875006217565dbb3847d5 (plain)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# API Listener


<a name="overview"></a>
## Overview

### Api URL

[Swagger UI](https://api-designer.sso.infra.ftgroup/swagger-ui/?url=https://api-designer.sso.infra.ftgroup/api/1.0/apis/aoG0EJ01Pv/swagger.json)


[plant UML UI](https://plantuml.rd.francetelecom.fr/proxy?fmt=svg&src=https://api-designer.sso.infra.ftgroup/api/1.0/apis/aoG0EJ01Pv/plantuml&noCache=7322.0)

Listener API has to be implemented on the client side in order to receive notification.
Notification are received if HUB has been posted on server side.


### Version information
*Version* : 0.1.0_inProgress


### URI scheme
*Host* : serverRoot  
*BasePath* : /externalapi/listener/v1  
*Schemes* : HTTPS


### Tags

* Listener


### Produces

* `application/json;charset=utf-8`


<a name="paths"></a>
## Resources

<a name="listener_resource"></a>
### Listener

<a name="listenercreate"></a>
#### createEvent
```
POST /listener
```


##### Description
The create event is used by the seller to trigger (POST) a notification to the buyer. The buyer has previously subscribed to receive notification

Specific business errors for current operation will be encapsulated in

HTTP Response 422 Unprocessable entity


##### Parameters

|Type|Name|Schema|
|---|---|---|
|**Body**|**event**  <br>*required*|[Listener](#listener)|


##### Responses

|HTTP Code|Description|Schema|
|---|---|---|
|**201**|Success|[Listener](#listener)|
|**400**|Bad Request<br><br>List of supported error codes:<br>- 20: Invalid URL parameter value<br>- 21: Missing body<br>- 22: Invalid body<br>- 23: Missing body field<br>- 24: Invalid body field<br>- 25: Missing header<br>- 26: Invalid header value<br>- 27: Missing query-string parameter<br>- 28: Invalid query-string parameter value|[ErrorRepresentation](#errorrepresentation)|
|**401**|Unauthorized<br><br>List of supported error codes:<br>- 40: Missing credentials<br>- 41: Invalid credentials<br>- 42: Expired credentials|[ErrorRepresentation](#errorrepresentation)|
|**403**|Forbidden<br><br>List of supported error codes:<br>- 50: Access denied<br>- 51: Forbidden requester<br>- 52: Forbidden user<br>- 53: Too many requests|[ErrorRepresentation](#errorrepresentation)|
|**422**|Unprocessable entity<br><br>Functional error|[ErrorRepresentation](#errorrepresentation)|
|**500**|Internal Server Error<br><br>List of supported error codes:<br>- 1: Internal error|[ErrorRepresentation](#errorrepresentation)|
|**503**|Service Unavailable<br><br>List of supported error codes:<br>- 5: The service is temporarily unavailable<br>- 6: Orange API is over capacity, retry later !|[ErrorRepresentation](#errorrepresentation)|


##### Consumes

* `application/json;charset=utf-8`


##### Produces

* `application/json;charset=utf-8`


<a name="definitions"></a>
## Definitions

<a name="errorrepresentation"></a>
### ErrorRepresentation

|Name|Schema|
|---|---|
|**@schemaLocation**  <br>*optional*|string|
|**@type**  <br>*optional*|string|
|**code**  <br>*required*|integer (int32)|
|**message**  <br>*optional*|string|
|**reason**  <br>*optional*|string|
|**referenceError**  <br>*optional*|string|
|**status**  <br>*optional*|integer (int32)|


<a name="eventtype"></a>
### EventType
*Type* : enum (ServiceOrderCreationNotification, ServiceOrderStateChangeNotification, ServiceOrderItemStateChangeNotification)


<a name="listener"></a>
### Listener
An event will be triggered for each time a notification is send to a listener.


|Name|Description|Schema|
|---|---|---|
|**event**  <br>*required*|An event representation is the payload of information send with the notification; it will feature event attributes + summary view of the resource.|object|
|**eventDate**  <br>*required*||string (date-time)|
|**eventId**  <br>*required*|id of the event|string|
|**eventType**  <br>*required*||[EventType](#eventtype)|