Skip to main content
PUT
/
api
/
opportunity
Actualizar Oportunidad
curl --request PUT \
  --url https://api.plazbot.com/api/opportunity \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-workspace-id: <x-workspace-id>' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "amount": 123,
  "stageId": "<string>",
  "contactId": "<string>",
  "customFields": [
    {
      "name": "<string>",
      "value": "<string>"
    }
  ]
}
'
{
  "success": true,
  "code": 123,
  "errorCode": "<string>",
  "message": "<string>",
  "data": {
    "id": "<string>",
    "opportunity": {
      "id": "<string>",
      "opportCode": "<string>",
      "opportStatus": 123,
      "winLossStatus": 123,
      "winLossDate": "2023-11-07T05:31:56Z",
      "finalAmount": 123,
      "creationDate": "2023-11-07T05:31:56Z",
      "creationTypeId": 123,
      "updatedDate": "2023-11-07T05:31:56Z",
      "deletionDate": "2023-11-07T05:31:56Z",
      "userDeletion": "<string>",
      "statusId": 123,
      "files": [
        "<string>"
      ],
      "orderInCards": 123,
      "orderInCardsLastUpdated": "2023-11-07T05:31:56Z",
      "activities": [
        "<string>"
      ],
      "segmentationId": "<string>",
      "workspaceId": "<string>",
      "name": "<string>",
      "description": "<string>",
      "amount": 123,
      "userCreation": "<string>",
      "contactId": "<string>",
      "expirationDate": "2023-11-07T05:31:56Z",
      "assignedAgentId": "<string>",
      "stageId": "<string>",
      "customFields": [
        {
          "name": "<string>",
          "value": "<string>"
        }
      ]
    }
  }
}

Authorizations

Authorization
string
header
required

Token de autenticacion Bearer. Obtenga el token usando el endpoint /api/user/login

Headers

x-workspace-id
string
required

Identificador del workspace

Query Parameters

id
string
required

ID de la oportunidad a actualizar

workspaceId
string
required

Identificador del workspace

Body

application/json
name
string

Nombre de la oportunidad

description
string

Descripcion de la oportunidad

amount
number

Monto de la oportunidad

stageId
string | null

ID de la fase

contactId
string | null

ID del contacto asociado

customFields
object[]

Campos personalizados

Response

Oportunidad actualizada exitosamente

success
boolean
required

Indica si la operacion fue exitosa

code
integer
required

Codigo HTTP de la respuesta

errorCode
string | null
required

Codigo de error, null si no hay error

message
string
required

Mensaje descriptivo del resultado

data
object
required