Skip to content

Commit b836a95

Browse files
authored
Adding Swagger for Short Code API (#15312)
* saving progress * fixing typos * fixing typos * fixing typo * running prettier * small comment change * minor fixes * minor fix * saving progress * saving progress * saving progress * saving progress * saving progress * saving progress * saving progress * saving progress * saving progress * saving progress * saving progress * saving progress * saving progress * saving progress * saving progress * saving progress * saving progress * saving progress * saving progress * saving progress * saving progress * saving progress * saving progress * saving progress * saving progress * saving progress * saving progress * saving progress * saving progress * saving progress * saving progress * moving shortcodes files to its own folder * saving progress * adding basic readme file * Changing message details to support adding examples for contenttypes, adding estimatedRampUpTime and directionality * adding format for urls, emails and phone numbers * renames on different fields * adding back helpMessage and optOutMessage * removing tel format
1 parent 7ecd888 commit b836a95

File tree

11 files changed

+1645
-1
lines changed

11 files changed

+1645
-1
lines changed

custom-words.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2391,6 +2391,10 @@ multislot
23912391
noAddressPrefixes
23922392
serviceTagChangeNumber
23932393
Tebibytes
2394+
shortcodes
2395+
programbriefs
2396+
passcode
2397+
bursty
23942398
privatelinkservicesforpowerbi
23952399
NodePool
23962400
hnsonmigration
@@ -2411,4 +2415,4 @@ sesparse
24112415
stackset
24122416
CSPM
24132417
autoprovisioning
2414-
schemagroups
2418+
schemagroups
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-10-25-preview",
4+
"programBriefId": "146b433f-d774-40b9-9138-55d386208725",
5+
"endpoint": "https://resourcename.region.dev.communications.azure.net/"
6+
},
7+
"responses": {
8+
"204": {
9+
"headers": {}
10+
}
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-10-25-preview",
4+
"endpoint": "https://resourcename.region.dev.communications.azure.net/"
5+
},
6+
"responses": {
7+
"200": {
8+
"headers": {},
9+
"body": {
10+
"shortCodes": [
11+
{
12+
"number": "123456",
13+
"numberType": "shortCode",
14+
"countryCode": "US",
15+
"programBriefIds": [
16+
"146b433f-d774-40b9-9138-55d386208725"
17+
],
18+
"purchaseDate": "2021-07-14T13:00:00+00:00"
19+
}
20+
],
21+
"nextLink": "<NEXT_LINK_URL>"
22+
}
23+
}
24+
}
25+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-10-25-preview",
4+
"programBriefId": "146b433f-d774-40b9-9138-55d386208725",
5+
"endpoint": "https://resourcename.region.dev.communications.azure.net/"
6+
},
7+
"responses": {
8+
"200": {
9+
"headers": {},
10+
"body": {
11+
"id": "146b433f-d774-40b9-9138-55d386208725",
12+
"status": "approved",
13+
"number": "123456",
14+
"reviewNotes": [
15+
{
16+
"message": "Program Brief is approved.",
17+
"date": "2021-07-11T21:36:24.8898166+00:00"
18+
}
19+
],
20+
"costs": [
21+
{
22+
"amount": 1500.0,
23+
"currencyCode": "USD",
24+
"billingFrequency": "monthly"
25+
},
26+
{
27+
"amount": 650.0,
28+
"currencyCode": "USD",
29+
"billingFrequency": "once"
30+
}
31+
],
32+
"submissionDate": "2021-07-11T21:36:24.8898166+00:00",
33+
"statusUpdatedDate": "2021-08-10T21:36:24.8898162+00:00",
34+
"programDetails": {
35+
"isVanity": true,
36+
"preferredVanityNumbers": [
37+
"123456"
38+
],
39+
"numberType": "shortCode",
40+
"isPoliticalCampaign": false,
41+
"name": "CONTOSO Shipping",
42+
"description": "CONTOSO Shipping program that will send shipping notification messages",
43+
"url": "https://www.contoso.com/shipping",
44+
"signUpTypes": [
45+
"sms",
46+
"website"
47+
],
48+
"signUpUrl": "https://www.contoso.com/shipping/callToAction.png",
49+
"termsOfServiceUrl": "https://www.contoso.com/shipping/termsofservice",
50+
"privacyPolicyUrl": "https://www.contoso.com/shipping/privacypolicy",
51+
"expectedDateOfService": "2021-10-25T00:00:00+00:00"
52+
},
53+
"companyInformation": {
54+
"name": "CONTOSO",
55+
"url": "https://www.contoso.com",
56+
"address": "CONTOSO Address",
57+
"contactInformation": {
58+
"name": "John Doe",
59+
"phone": "+1123456789",
60+
"email": "[email protected]"
61+
},
62+
"customerCareInformation": {
63+
"tollFreeNumber": "+1987654321",
64+
"email": "[email protected]"
65+
}
66+
},
67+
"messageDetails": {
68+
"supportedProtocols": [
69+
"sms"
70+
],
71+
"recurrence": "transaction",
72+
"helpMessage": "This is the HELP message test.",
73+
"optOutMessage": "This is the STOP message test.",
74+
"optInMessage": "CONTOSO Shipping - To confirm your subscription with us, please reply 'Y', and you will be added to our list.",
75+
"optInReply": "JOIN",
76+
"confirmationMessage": "CONTOSO Shipping - Welcome message to CONTOSO Shipping. Messaging & data rates may apply.For help, reply \"HELP\" or call/email [email protected] unsubscribe, reply \"STOP\". Visit our terms and conditions at https://www.contoso.com/shipping/termsofservice.",
77+
"estimatedRampUpTimeInDays": 10,
78+
"directionality": "twoWay",
79+
"useCases": [
80+
{
81+
"contentCategory": "loyaltyProgramPointsPrizes",
82+
"examples": [
83+
{
84+
"messages": [
85+
{
86+
"direction": "toUser",
87+
"text": "Your password is 123 STOP/HELP"
88+
}
89+
]
90+
},
91+
{
92+
"messages": [
93+
{
94+
"direction": "toUser",
95+
"text": "Want me to notify you when package in the way?"
96+
},
97+
{
98+
"direction": "fromUser",
99+
"text": "Y"
100+
}
101+
]
102+
}
103+
]
104+
}
105+
]
106+
},
107+
"trafficDetails": {
108+
"totalMonthlyVolume": 10,
109+
"monthlyAverageMessagesFromUser": 2,
110+
"monthlyAverageMessagesToUser": 1,
111+
"isSpiky": false,
112+
"spikeDetails": "Higher traffic expected during holiday season and Black Friday."
113+
}
114+
}
115+
}
116+
}
117+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-10-25-preview",
4+
"endpoint": "https://resourcename.region.dev.communications.azure.net/"
5+
},
6+
"responses": {
7+
"200": {
8+
"headers": {},
9+
"body": {
10+
"programBriefs": [
11+
{
12+
"id": "146b433f-d774-40b9-9138-55d386208725",
13+
"status": "approved",
14+
"number": "123456",
15+
"reviewNotes": [
16+
{
17+
"message": "Program Brief is approved.",
18+
"date": "2021-07-11T21:36:24.8898166+00:00"
19+
}
20+
],
21+
"costs": [
22+
{
23+
"amount": 1500.0,
24+
"currencyCode": "USD",
25+
"billingFrequency": "monthly"
26+
},
27+
{
28+
"amount": 650.0,
29+
"currencyCode": "USD",
30+
"billingFrequency": "once"
31+
}
32+
],
33+
"submissionDate": "2021-07-11T21:36:24.8898166+00:00",
34+
"statusUpdatedDate": "2021-08-10T21:36:24.8898162+00:00",
35+
"programDetails": {
36+
"isVanity": true,
37+
"preferredVanityNumbers": [
38+
"123456"
39+
],
40+
"numberType": "shortCode",
41+
"isPoliticalCampaign": false,
42+
"name": "CONTOSO Shipping",
43+
"description": "CONTOSO Shipping program that will send shipping notification messages",
44+
"url": "https://www.contoso.com/shipping",
45+
"signUpTypes": [
46+
"sms",
47+
"website"
48+
],
49+
"signUpUrl": "https://www.contoso.com/shipping/callToAction.png",
50+
"termsOfServiceUrl": "https://www.contoso.com/shipping/termsofservice",
51+
"privacyPolicyUrl": "https://www.contoso.com/shipping/privacypolicy",
52+
"expectedDateOfService": "2021-10-25T00:00:00+00:00"
53+
},
54+
"companyInformation": {
55+
"name": "CONTOSO",
56+
"url": "https://www.contoso.com",
57+
"address": "CONTOSO Address",
58+
"contactInformation": {
59+
"name": "John Doe",
60+
"phone": "+1123456789",
61+
"email": "[email protected]"
62+
},
63+
"customerCareInformation": {
64+
"tollFreeNumber": "+1987654321",
65+
"email": "[email protected]"
66+
}
67+
},
68+
"messageDetails": {
69+
"supportedProtocols": [
70+
"sms"
71+
],
72+
"recurrence": "transaction",
73+
"helpMessage": "This is the HELP message test.",
74+
"optOutMessage": "This is the STOP message test.",
75+
"optInMessage": "CONTOSO Shipping - To confirm your subscription with us, please reply 'Y', and you will be added to our list.",
76+
"optInReply": "JOIN",
77+
"confirmationMessage": "CONTOSO Shipping - Welcome message to CONTOSO Shipping. Messaging & data rates may apply.For help, reply \"HELP\" or call/email [email protected] unsubscribe, reply \"STOP\". Visit our terms and conditions at https://www.contoso.com/shipping/termsofservice.",
78+
"estimatedRampUpTimeInDays": 10,
79+
"directionality": "twoWay",
80+
"useCases": [
81+
{
82+
"contentCategory": "loyaltyProgramPointsPrizes",
83+
"examples": [
84+
{
85+
"messages": [
86+
{
87+
"direction": "toUser",
88+
"text": "Your password is 123 STOP/HELP"
89+
}
90+
]
91+
},
92+
{
93+
"messages": [
94+
{
95+
"direction": "toUser",
96+
"text": "Want me to notify you when package in the way?"
97+
},
98+
{
99+
"direction": "fromUser",
100+
"text": "Y"
101+
}
102+
]
103+
}
104+
]
105+
}
106+
]
107+
},
108+
"trafficDetails": {
109+
"totalMonthlyVolume": 10,
110+
"monthlyAverageMessagesFromUser": 2,
111+
"monthlyAverageMessagesToUser": 1,
112+
"isSpiky": false,
113+
"spikeDetails": "Higher traffic expected during holiday season and Black Friday."
114+
}
115+
}
116+
],
117+
"nextLink": "<NEXT_LINK_URL>"
118+
}
119+
}
120+
}
121+
}

0 commit comments

Comments
 (0)