1602 строки
49 KiB
JSON
1602 строки
49 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"title": "E-goi",
|
|
"description": "E-goi is a Multichannel Marketing Automation Platform, including email marketing services, SMS, Voice Broadcast, Push Notifications, Web Push and Forms to Capture, Automate, Communicate, Analyse and Generate more Sales. The connector allow users to add/update contacts, attach tags and send transactional SMS.",
|
|
"version": "1.0",
|
|
"contact":{
|
|
"name": "E-goi Support",
|
|
"url": "https://helpdesk.e-goi.com/"
|
|
}
|
|
},
|
|
"host": "api.egoiapp.com",
|
|
"basePath": "/",
|
|
"schemes": [
|
|
"https"
|
|
],
|
|
"consumes": [],
|
|
"produces": [],
|
|
"parameters": {
|
|
"id_list": {
|
|
"x-ms-summary": "List of Contacts",
|
|
"x-ms-dynamic-values": {
|
|
"operationId": "GetListsContacts",
|
|
"value-collection": "items",
|
|
"value-path": "list_id",
|
|
"value-title": "public_name"
|
|
},
|
|
"required": true,
|
|
"in": "path",
|
|
"name": "idList",
|
|
"description": "Select the List of Contacts",
|
|
"x-ms-visibility": "important",
|
|
"x-ms-url-encoding": "single",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"paths": {
|
|
"/lists": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"total_items": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "total_items"
|
|
},
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"list_id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "list_id"
|
|
},
|
|
"internal_name": {
|
|
"type": "string",
|
|
"description": "internal_name"
|
|
},
|
|
"public_name": {
|
|
"type": "string",
|
|
"description": "public_name"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "status"
|
|
},
|
|
"group_id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "group_id"
|
|
},
|
|
"created": {
|
|
"type": "string",
|
|
"description": "created"
|
|
},
|
|
"updated": {
|
|
"type": "string",
|
|
"description": "updated"
|
|
}
|
|
}
|
|
},
|
|
"description": "items"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"summary": "Return a list of contacts",
|
|
"description": "The API returns the available lists of contacts",
|
|
"operationId": "GetListsContacts",
|
|
"security": [
|
|
{
|
|
"API Key": []
|
|
}
|
|
],
|
|
"x-ms-visibility": "internal"
|
|
}
|
|
},
|
|
"/lists/{idList}/contacts": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"total_items": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "total_items"
|
|
},
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"base": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contact_id": {
|
|
"type": "string",
|
|
"description": "contact_id"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "status"
|
|
},
|
|
"consent": {
|
|
"type": "string",
|
|
"description": "consent"
|
|
},
|
|
"consent_date": {
|
|
"type": "string",
|
|
"description": "consent_date"
|
|
},
|
|
"subscription_method": {
|
|
"type": "string",
|
|
"description": "subscription_method"
|
|
},
|
|
"subscription_date": {
|
|
"type": "string",
|
|
"description": "subscription_date"
|
|
},
|
|
"subscription_form": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "subscription_form"
|
|
},
|
|
"unsubscription_method": {
|
|
"type": "string",
|
|
"description": "unsubscription_method"
|
|
},
|
|
"unsubscription_reason": {
|
|
"type": "string",
|
|
"description": "unsubscription_reason"
|
|
},
|
|
"unsubscription_observation": {
|
|
"type": "string",
|
|
"description": "unsubscription_observation"
|
|
},
|
|
"unsubscription_date": {
|
|
"type": "string",
|
|
"description": "unsubscription_date"
|
|
},
|
|
"change_date": {
|
|
"type": "string",
|
|
"description": "change_date"
|
|
},
|
|
"first_name": {
|
|
"type": "string",
|
|
"description": "first_name"
|
|
},
|
|
"last_name": {
|
|
"type": "string",
|
|
"description": "last_name"
|
|
},
|
|
"birth_date": {
|
|
"type": "string",
|
|
"description": "birth_date"
|
|
},
|
|
"language": {
|
|
"type": "string",
|
|
"description": "language"
|
|
},
|
|
"email": {
|
|
"type": "string",
|
|
"description": "email"
|
|
},
|
|
"email_status": {
|
|
"type": "string",
|
|
"description": "email_status"
|
|
},
|
|
"cellphone": {
|
|
"type": "string",
|
|
"description": "cellphone"
|
|
},
|
|
"cellphone_status": {
|
|
"type": "string",
|
|
"description": "cellphone_status"
|
|
},
|
|
"phone": {
|
|
"type": "string",
|
|
"description": "phone"
|
|
},
|
|
"phone_status": {
|
|
"type": "string",
|
|
"description": "phone_status"
|
|
},
|
|
"push_token_android": {
|
|
"type": "array",
|
|
"items": {},
|
|
"description": "push_token_android"
|
|
},
|
|
"push_token_ios": {
|
|
"type": "array",
|
|
"items": {},
|
|
"description": "push_token_ios"
|
|
}
|
|
},
|
|
"description": "base"
|
|
},
|
|
"extra": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"field_id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "field_id"
|
|
},
|
|
"format": {
|
|
"type": "string",
|
|
"description": "format"
|
|
},
|
|
"value": {
|
|
"type": "string",
|
|
"description": "value"
|
|
}
|
|
}
|
|
},
|
|
"description": "extra"
|
|
},
|
|
"tags": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"description": "tags"
|
|
}
|
|
}
|
|
},
|
|
"description": "items"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"summary": "Return all contacts",
|
|
"description": "The API returns all contacts from a chosen list",
|
|
"operationId": "GetAllContacs",
|
|
"parameters": [
|
|
{
|
|
"name": "idList",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "The ID of contact list.",
|
|
"in": "path",
|
|
"x-ms-dynamic-values": {
|
|
"operationId": "GetListsContacts",
|
|
"value-collection": "items",
|
|
"value-path": "list_id",
|
|
"value-title": "public_name"
|
|
}
|
|
}
|
|
],
|
|
"security": [
|
|
{
|
|
"API Key": []
|
|
}
|
|
],
|
|
"x-ms-visibility": "internal"
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"201": {
|
|
"description": "success",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contact_id": {
|
|
"type": "string",
|
|
"description": "contact_id"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "bad request",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "title"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"description": "detail"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "title"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"description": "detail"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "title"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"description": "detail"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "NotFound",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "title"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"description": "detail"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"errors": {
|
|
"type": "object",
|
|
"properties": {},
|
|
"description": "errors"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "title"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"description": "detail"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"429": {
|
|
"description": "Too Many Requests",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "title"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"description": "detail"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "title"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"description": "detail"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"503": {
|
|
"description": "Service Unavailable",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "title"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"description": "detail"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"description": "Create a new contact to a specific list.",
|
|
"summary": "Create Contact",
|
|
"operationId": "CreateContact",
|
|
"x-ms-visibility": "important",
|
|
"parameters": [
|
|
{
|
|
"name": "idList",
|
|
"required": true,
|
|
"description": "The ID of contact list.",
|
|
"type": "string",
|
|
"in": "path",
|
|
"x-ms-summary": "Contacts list",
|
|
"x-ms-dynamic-values": {
|
|
"operationId": "GetListsContacts",
|
|
"value-collection": "items",
|
|
"value-path": "list_id",
|
|
"value-title": "public_name"
|
|
}
|
|
},
|
|
{
|
|
"required": true,
|
|
"name": "body",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"base": {
|
|
"type": "object",
|
|
"properties": {
|
|
"status": {
|
|
"type": "string",
|
|
"description": "Status of the contact.",
|
|
"title": "Status",
|
|
"default": "active",
|
|
"enum": [
|
|
"active",
|
|
"inactive",
|
|
"removed",
|
|
"unconfirmed"
|
|
]
|
|
},
|
|
"first_name": {
|
|
"type": "string",
|
|
"description": "First name of the contact.",
|
|
"title": "First Name"
|
|
},
|
|
"last_name": {
|
|
"type": "string",
|
|
"description": "Last name of the contact.",
|
|
"title": "Last Name"
|
|
},
|
|
"birth_date": {
|
|
"type": "string",
|
|
"description": "Birth date of the contact. (format: yyyy-mm-dd)",
|
|
"title": "Birthdate",
|
|
"format": "date"
|
|
},
|
|
"language": {
|
|
"type": "string",
|
|
"description": "Current language.",
|
|
"title": "Language",
|
|
"format": "",
|
|
"default": "en",
|
|
"enum": [
|
|
"en",
|
|
"pt",
|
|
"br",
|
|
"es",
|
|
"de",
|
|
"hu",
|
|
"fr"
|
|
]
|
|
},
|
|
"email": {
|
|
"type": "string",
|
|
"description": "Email of the contact.",
|
|
"title": "Email",
|
|
"format": ""
|
|
},
|
|
"cellphone": {
|
|
"type": "string",
|
|
"description": "Cellphone of the contact. (format: ccc-xxxxxxxxx)",
|
|
"title": "Cellphone",
|
|
"format": ""
|
|
},
|
|
"phone": {
|
|
"type": "string",
|
|
"description": "Phone of the contact. (format: ccc-xxxxxxxxx)",
|
|
"title": "Phone"
|
|
}
|
|
},
|
|
"description": "base",
|
|
"required": [
|
|
"email"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"base"
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/lists/{list_id}/contacts/actions/attach-tag": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "success",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"tag_id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "tag_id"
|
|
},
|
|
"success": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "success"
|
|
},
|
|
"error": {
|
|
"type": "object",
|
|
"properties": {
|
|
"invalid_contact": {
|
|
"type": "array",
|
|
"items": {},
|
|
"description": "invalid_contact"
|
|
},
|
|
"has_tag_id": {
|
|
"type": "array",
|
|
"items": {},
|
|
"description": "has_tag_id"
|
|
}
|
|
},
|
|
"description": "error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "bad request",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "title"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"description": "detail"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "title"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"description": "detail"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "title"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"description": "detail"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "NotFound",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "title"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"description": "detail"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"errors": {
|
|
"type": "object",
|
|
"properties": {},
|
|
"description": "errors"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "title"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"description": "detail"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"429": {
|
|
"description": "Too Many Requests",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "title"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"description": "detail"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "title"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"description": "detail"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"503": {
|
|
"description": "Service Unavailable",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "title"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"description": "detail"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"summary": "Attach Tag",
|
|
"description": "Attaches a tag of your choosing to an existing contact.",
|
|
"operationId": "AddTag",
|
|
"parameters": [
|
|
{
|
|
"name": "list_id",
|
|
"description": "The ID of contact list.",
|
|
"in": "path",
|
|
"x-ms-summary": "Contacts list",
|
|
"required": true,
|
|
"type": "string",
|
|
"x-ms-dynamic-values": {
|
|
"operationId": "GetListsContacts",
|
|
"value-path": "list_id",
|
|
"value-collection": "items",
|
|
"value-title": "public_name"
|
|
}
|
|
},
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"tag_id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "Tags",
|
|
"title": "Tag",
|
|
"x-ms-dynamic-values": {
|
|
"operationId": "GetTag",
|
|
"value-path": "tag_id",
|
|
"value-collection": "items",
|
|
"value-title": "name"
|
|
}
|
|
},
|
|
"contacts": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"title": "Contact UID",
|
|
"description": "contact IDs to attach the tag."
|
|
},
|
|
"description": "contacts"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/tags": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"total_items": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "total_items"
|
|
},
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"tag_id": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "tag_id"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "name"
|
|
},
|
|
"color": {
|
|
"type": "string",
|
|
"description": "color"
|
|
}
|
|
}
|
|
},
|
|
"description": "items"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"summary": "Get tags",
|
|
"operationId": "GetTag",
|
|
"description": "Return list of tags",
|
|
"parameters": [],
|
|
"x-ms-visibility": "internal"
|
|
}
|
|
},
|
|
"/lists/{list_id}/contacts/{contact_id}": {
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "success",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contact_id": {
|
|
"type": "string",
|
|
"description": "contact_id"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "bad request",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "title"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"description": "detail"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "title"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"description": "detail"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "title"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"description": "detail"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "NotFound",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "title"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"description": "detail"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"errors": {
|
|
"type": "object",
|
|
"properties": {},
|
|
"description": "errors"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "title"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"description": "detail"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"429": {
|
|
"description": "Too Many Requests",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "title"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"description": "detail"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "title"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"description": "detail"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"503": {
|
|
"description": "Service Unavailable",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "title"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"description": "detail"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"summary": "Update Contact",
|
|
"description": "Update an existing contact.",
|
|
"operationId": "UpdateContact",
|
|
"parameters": [
|
|
{
|
|
"name": "list_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"description": "The id of contact lists.",
|
|
"type": "string",
|
|
"x-ms-summary": "Contacts list",
|
|
"x-ms-dynamic-values": {
|
|
"operationId": "GetListsContacts",
|
|
"value-path": "list_id",
|
|
"value-collection": "items",
|
|
"value-title": "public_name"
|
|
}
|
|
},
|
|
{
|
|
"name": "contact_id",
|
|
"in": "path",
|
|
"x-ms-summary": "Contact",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "The Contact Id.",
|
|
"x-ms-dynamic-values": {
|
|
"operationId": "GetAllContacs",
|
|
"value-path": "base/contact_id",
|
|
"value-collection": "items",
|
|
"value-title": "base/email",
|
|
"parameters": {
|
|
"idList": {
|
|
"parameter": "list_id"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"base": {
|
|
"type": "object",
|
|
"properties": {
|
|
"status": {
|
|
"type": "string",
|
|
"description": "active",
|
|
"title": "Status",
|
|
"enum": [
|
|
"active",
|
|
"inactive",
|
|
"removed",
|
|
"unconfirmed"
|
|
]
|
|
},
|
|
"consent": {
|
|
"type": "string",
|
|
"description": "Contact consent.",
|
|
"title": "Consent",
|
|
"enum": [
|
|
"any",
|
|
"consent",
|
|
"contract",
|
|
"legitimate_interest",
|
|
"none",
|
|
"protect_vital_interests",
|
|
"public_interests",
|
|
"required_by_law",
|
|
"withdrawn"
|
|
]
|
|
},
|
|
"first_name": {
|
|
"type": "string",
|
|
"description": "First name of the contact.",
|
|
"title": "First Name"
|
|
},
|
|
"last_name": {
|
|
"type": "string",
|
|
"description": "Last name of the contact.",
|
|
"title": "Last Name"
|
|
},
|
|
"birth_date": {
|
|
"type": "string",
|
|
"description": "Birth date of the contact. (format: yyyy-mm-dd)",
|
|
"title": "Birthdate"
|
|
},
|
|
"language": {
|
|
"type": "string",
|
|
"description": "Current language.",
|
|
"title": "Language",
|
|
"enum": [
|
|
"en",
|
|
"pt",
|
|
"br",
|
|
"es",
|
|
"de",
|
|
"hu",
|
|
"fr"
|
|
],
|
|
"default": "en"
|
|
},
|
|
"cellphone": {
|
|
"type": "string",
|
|
"description": "Cellphone of the contact. (format: ccc-xxxxxxxxx)",
|
|
"title": "Cellphone"
|
|
},
|
|
"cellphone_status": {
|
|
"type": "string",
|
|
"description": "Cellphone channel status.",
|
|
"title": "Cellphone Status",
|
|
"enum": [
|
|
"active",
|
|
"inactive"
|
|
]
|
|
},
|
|
"phone": {
|
|
"type": "string",
|
|
"description": "Phone of the contact. (format: ccc-xxxxxxxxx)",
|
|
"title": "Phone"
|
|
},
|
|
"phone_status": {
|
|
"type": "string",
|
|
"description": "Phone channel status.",
|
|
"title": "Phone Status",
|
|
"enum": [
|
|
"active",
|
|
"inactive"
|
|
]
|
|
}
|
|
},
|
|
"description": "base"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/api/v2/sms/messages/action/send": {
|
|
"post": {
|
|
"responses": {
|
|
"201": {
|
|
"description": "success",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contact_id": {
|
|
"type": "string",
|
|
"description": "messageId"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "bad request",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "title"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"description": "detail"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "title"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"description": "detail"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "title"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"description": "detail"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "type"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "title"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "status"
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"description": "detail"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"summary": "Send SMS",
|
|
"description": "Send an SMS to a contact",
|
|
"operationId": "SendSMS",
|
|
"parameters": [
|
|
{
|
|
"name": " ",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"to": {
|
|
"type": "string",
|
|
"description": "The contact of the recipient. format should be countryCode-phoneNumber. (ex: 351-911111111)",
|
|
"title": "Send to"
|
|
},
|
|
"from": {
|
|
"type": "string",
|
|
"description": "The id of the sender.",
|
|
"title": "Send from",
|
|
"x-ms-dynamic-values": {
|
|
"operationId": "GetSenders",
|
|
"value-path": "id",
|
|
"value-title": "name"
|
|
}
|
|
},
|
|
"textBody": {
|
|
"type": "string",
|
|
"description": "The content of the message. (ex: Hello!)",
|
|
"title": "Message"
|
|
},
|
|
"encoding": {
|
|
"type": "string",
|
|
"description": "The encoding of the message. (ex: unicode)",
|
|
"title": "Encoding",
|
|
"enum": [
|
|
"unicode",
|
|
"gsm0338"
|
|
]
|
|
},
|
|
"maxCount": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "The maximum amount of messages to be sent (if the Text Body is too big for a single message).",
|
|
"title": "Amount",
|
|
"default": 1
|
|
},
|
|
"priority": {
|
|
"type": "string",
|
|
"description": "The priority of the message.",
|
|
"title": "Priority",
|
|
"enum": [
|
|
"urgent",
|
|
"non-urgent"
|
|
],
|
|
"default": "non-urgent"
|
|
},
|
|
"customData": {
|
|
"type": "string",
|
|
"description": "Extra Data related to the campaign to be re-sent via WebHook. (ex: meta-data)",
|
|
"title": "Custom Data"
|
|
},
|
|
"registered": {
|
|
"type": "boolean",
|
|
"description": "Option to register the message. Its an exclusive feature for senders that require it.",
|
|
"title": "Registered",
|
|
"enum": [
|
|
true,
|
|
false
|
|
]
|
|
},
|
|
"group": {
|
|
"type": "string",
|
|
"description": "The group of the message. (ex: welcome)",
|
|
"title": "Group",
|
|
"default": "default"
|
|
}
|
|
},
|
|
"required": [
|
|
"to",
|
|
"textBody",
|
|
"from"
|
|
]
|
|
},
|
|
"required": [
|
|
"to",
|
|
"from",
|
|
"textBody",
|
|
"items"
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/api/v2/sms/senders": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"phoneNumber": {
|
|
"type": "string",
|
|
"description": "phoneNumber"
|
|
},
|
|
"senderStatus": {
|
|
"type": "string",
|
|
"description": "senderStatus"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "name"
|
|
},
|
|
"id": {
|
|
"type": "string",
|
|
"description": "id"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"summary": "Get Senders",
|
|
"operationId": "GetSenders",
|
|
"description": "Get SMS senders",
|
|
"x-ms-visibility": "internal",
|
|
"parameters": []
|
|
}
|
|
}
|
|
},
|
|
"x-ms-connector-metadata": [
|
|
{
|
|
"propertyName": "Website",
|
|
"propertyValue": "https://www.e-goi.com/pt/"
|
|
},
|
|
{
|
|
"propertyName": "Privacy Policy",
|
|
"propertyValue": "https://www.e-goi.com/pt/rgpd-tudo-o-que-precisa-saber/"
|
|
},
|
|
{
|
|
"propertyName": "Categories",
|
|
"propertyValue": "Marketing"
|
|
}
|
|
],
|
|
"definitions": {},
|
|
"responses": {},
|
|
"securityDefinitions": {
|
|
"API Key": {
|
|
"type": "apiKey",
|
|
"in": "header",
|
|
"name": "Apikey"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"API Key": []
|
|
}
|
|
],
|
|
"tags": []
|
|
} |