Saltar al contenido principal

Contrato histórico: PUT edit-event-rule

Contrato histórico de API. Esta página describe un contrato anterior. Los métodos, las rutas y las respuestas pueden diferir de la API vigente.

Significado histórico​

Editar regla de evento

Este endpoint sirve para editar una regla de evento

API vigente​

Para desarrollar una integración nueva, consulta la referencia o guía vigente enlazada.

Ver la referencia de la API vigente

Parámetros​

[
{
"name": "language",
"in": "path",
"schema": {
"type": "string",
"default": "en"
},
"required": true
},
{
"name": "project",
"in": "path",
"schema": {
"type": "string",
"default": "<redacted-personal>"
},
"required": true
},
{
"name": "api_version",
"in": "path",
"schema": {
"type": "string",
"default": "v400"
},
"required": true
},
{
"name": "event_rule_id",
"in": "path",
"schema": {
"type": "integer",
"format": "int32"
},
"required": true
}
]

Cuerpo de solicitud​

{
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"launch_type": {
"type": "string",
"default": "times"
},
"date": {
"type": "string"
},
"times": {
"type": "string"
},
"type": {
"type": "string",
"default": "abandoned_cart"
}
}
}
}
}
}

Respuestas​

{
"200": {
"description": "200",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"error\": false,\n \"result\": {\n \"id\": 3,\n \"name\": \"<redacted-personal>\",\n \"description\": \"This is a test\",\n \"enabled\": true,\n \"times\": [\n 60\n ],\n \"date\": null,\n \"launch_type\": \"times\",\n \"type\": \"abandoned_cart\",\n \"created_at\": \"2022-05-18 16:55:08\",\n \"updated_at\": \"2022-05-18 16:55:50\"\n }\n}"
}
},
"schema": {
"type": "object",
"properties": {
"error": {
"type": "boolean",
"example": false,
"default": true
},
"result": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 3,
"default": 0
},
"name": {
"type": "string",
"example": "<redacted-personal>"
},
"description": {
"type": "string",
"example": "This is a test"
},
"enabled": {
"type": "boolean",
"example": true,
"default": true
},
"times": {
"type": "array",
"items": {
"type": "integer",
"example": 60,
"default": 0
}
},
"date": {},
"launch_type": {
"type": "string",
"example": "times"
},
"type": {
"type": "string",
"example": "abandoned_cart"
},
"created_at": {
"type": "string",
"example": "2022-05-18 16:55:08"
},
"updated_at": {
"type": "string",
"example": "2022-05-18 16:55:50"
}
}
}
}
}
}
}
},
"400": {
"description": "400",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{}"
}
},
"schema": {
"type": "object",
"properties": {}
}
}
}
}
}