# Get Contact Marketing Campaign Status

Reads a contact's current automation positions by campaign and reference, including action, state, dueAt and skippable status (only skippable waits can be ended with move-contact-past-automation-wait). state is scheduled, processing, waiting-for-condition, waiting-for-time-condition, waiting-for-restart, enriching, generating-email, open-end (stays at the end of a branch) or paused (automation paused). dueAt: when a scheduled action runs, when a time condition is checked next, when a paused action was due (past = runs on activation), when the open end was reached; else empty. Finished or exited automations are omitted. Reads only.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "contactId": {
      "type": "integer",
      "description": "Numeric contact ID returned by search-contacts",
      "minimum": 1
    },
    "automationId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "Only this automation; omit for every automation the contact is in",
      "default": null,
      "minimum": 1
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "description": "User ID of the account; omit for the account of the access token",
      "default": null,
      "minimum": 1
    }
  },
  "required": [
    "contactId"
  ],
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "accountId",
    "contactId",
    "count",
    "positions",
    "historyUrl"
  ],
  "properties": {
    "accountId": {
      "type": "integer"
    },
    "contactId": {
      "type": "integer"
    },
    "count": {
      "type": "integer"
    },
    "positions": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "automationId",
          "automationName",
          "referenceId",
          "actionId",
          "actionType",
          "actionName",
          "state",
          "dueAt",
          "skippable",
          "skipEffect",
          "editUrl"
        ],
        "properties": {
          "automationId": {
            "type": "integer"
          },
          "automationName": {
            "type": "string"
          },
          "referenceId": {
            "type": "integer"
          },
          "actionId": {
            "type": "integer"
          },
          "actionType": {
            "type": "string"
          },
          "actionName": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "scheduled",
              "processing",
              "waiting-for-condition",
              "open-end",
              "waiting-for-restart",
              "waiting-for-time-condition",
              "enriching",
              "generating-email",
              "paused"
            ]
          },
          "dueAt": {
            "type": "string"
          },
          "skippable": {
            "type": "boolean"
          },
          "skipEffect": {
            "type": "string",
            "enum": [
              "",
              "time-condition",
              "scheduled-wait"
            ]
          },
          "editUrl": {
            "type": "string"
          }
        }
      }
    },
    "historyUrl": {
      "type": "string"
    }
  }
}
```

