API ReferenceapianalyticsPOST /v1/outcomes/{id}/entries

POST /v1/outcomes/\{id\}/entries

Service: analytics · operationId: (none)

Required scopes

(no scope declared — review service config)

Path parameters

  • id (string) required

Request body

{
  "type": "object",
  "properties": {
    "subject_id": {
      "type": "string",
      "minLength": 1
    },
    "brand_id": {
      "type": "string",
      "minLength": 1
    },
    "value": {
      "type": "string",
      "minLength": 1
    },
    "recorded_at": {
      "type": "string",
      "format": "date-time"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {}
    }
  },
  "required": [
    "subject_id",
    "brand_id",
    "value"
  ]
}

Responses

201 Entry recorded

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "outcome_id": {
      "type": "string"
    },
    "subject_id": {
      "type": "string"
    },
    "brand_id": {
      "type": "string"
    },
    "value": {
      "type": "string"
    },
    "recorded_at": {
      "type": "string"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {}
    }
  },
  "required": [
    "id",
    "outcome_id",
    "subject_id",
    "brand_id",
    "value",
    "recorded_at",
    "metadata"
  ]
}

404 Outcome not found

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

500 Internal error

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

Example

curl -X POST https://analytics.platform.loop.health/v1/outcomes/{id}/entries \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'