V2
Examples
An example resource represents the expected communication data given a template (defined by its type, organization, language and channel) and some specific input arguments
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| org | path | string | true | Organization name as it is registered in Mas-Stack |
| exampleId | path | string | true | The example Id |
Request example
|
|
Responses
| Code | Meaning | Description | Schema |
|---|---|---|---|
| 202 | Accepted | Example found and returned | ExampleResponse |
| 404 | Not Found | Example not found | ResponseErrorDto |
| 500 | Internal Server Error | Server Error | ResponseErrorDto |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| org | path | string | true | Organization name as it is registered in Mas-Stack |
| exampleId | path | string | true | The example Id |
| body | body | ExampleRequestDto | true | Request body to create an example in JSON format |
Request body - instance of ExampleRequestDto
|
|
| Name | Type | Required | Description |
|---|---|---|---|
| id | string(uuid) | false | UUID to be used as identifier of the example. It must be unique in the system |
| type | string | true | Communication type code according to the ones previously defined in the system |
| language | string | true | Example’s language(ISO 639-1) |
| channel | string | true | Channel of example |
| requestRef | string | false | Reference of issue where example was requested |
| description | string | false | Comprehensive description of the purpose of the example |
| expectedOutput | ExampleRequestExpectedOutput | true | Expected output required for the example definition. It is different depending on the channel |
| arguments | object | false | Input arguments used in the example. Name and value of arguments must be coherent with registered type’s arguments. |
| » additionalProperties | object | false | Input arguments used in the example. Name and value of arguments must be coherent with registered type’s arguments. |
Request example
|
|
Responses
| Code | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Communication example successfully updated | ExampleResponse |
| 400 | Bad Request | Client error | ResponseErrorDto |
| 500 | Internal Server Error | Server Error | ResponseErrorDto |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| org | path | string | true | Organization name as it is registered in Mas-Stack |
| exampleId | path | string | true | The example Id |
Request example
|
|
Responses
| Code | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Deleted example | ExampleResponse |
| 404 | Not Found | Example not found | ResponseErrorDto |
| 500 | Internal Server Error | Server Error | ResponseErrorDto |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| org | path | string | true | Organization name as it is registered in Mas-Stack |
| type | query | string | false | Communication type. Allows EQ (type=password_reset), and CONTAINS (type[contains]=password) operations |
| language | query | string | false | Template language |
| channel | query | string | false | Template channel |
| description | query | string | false | Example description. Allows EQ (description=Shipping in transit), and CONTAINS (description[contains]=shipping) operations |
| requestRef | query | string | false | Example request reference. Allows EQ (requestRef=https://jira.com/CUCO-123), and CONTAINS (requestRef[contains]=CUCO-123) operations |
| subject | query | string | false | Email example expected subject. Allows EQ (subject=Welcome to masmovil), and CONTAINS (subject[contains]=Welcome) operations |
| content | query | string | false | Expected content for example. Allows EQ (content=Your portability is done), and CONTAINS (content[contains]=portability) operations |
| limit | query | integer(int64) | false | Limit of results in the response |
| offset | query | integer(int64) | false | Offset applied to results for pagination |
Request example
|
|
Responses
| Code | Meaning | Description | Schema |
|---|---|---|---|
| 202 | Accepted | Found examples | ExampleListResponse |
| 500 | Internal Server Error | Server Error | ResponseErrorDto |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| org | path | string | true | Organization name as it is registered in Mas-Stack |
| body | body | ExampleRequestDto | true | Request body to create an example in JSON format |
Request body - instance of ExampleRequestDto
|
|
| Name | Type | Required | Description |
|---|---|---|---|
| id | string(uuid) | false | UUID to be used as identifier of the example. It must be unique in the system |
| type | string | true | Communication type code according to the ones previously defined in the system |
| language | string | true | Example’s language(ISO 639-1) |
| channel | string | true | Channel of example |
| requestRef | string | false | Reference of issue where example was requested |
| description | string | false | Comprehensive description of the purpose of the example |
| expectedOutput | ExampleRequestExpectedOutput | true | Expected output required for the example definition. It is different depending on the channel |
| arguments | object | false | Input arguments used in the example. Name and value of arguments must be coherent with registered type’s arguments. |
| » additionalProperties | object | false | Input arguments used in the example. Name and value of arguments must be coherent with registered type’s arguments. |
Request example
|
|
Responses
| Code | Meaning | Description | Schema |
|---|---|---|---|
| 202 | Accepted | Communication example successfully created | ExampleResponse |
| 400 | Bad Request | Client error | ResponseErrorDto |
| 500 | Internal Server Error | Server Error | ResponseErrorDto |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| org | path | string | true | Organization name as it is registered in Mas-Stack |
| exampleId | path | string | true | The example Id |
Request example
|
|
Responses
| Code | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Example validated successfully | ExampleValidationResponse |
| 400 | Bad Request | Client error | ResponseErrorDto |
| 404 | Not Found | Example not found | ResponseErrorDto |
| 500 | Internal Server Error | Server Error | ResponseErrorDto |
Endpoints
CMS
Communications
Short URLs
Communication Types
Template Deployment
Examples
Templates