Sections ▾

PATCH ​/api​/subscriptions

Update the tags for all subscription types that this device is interested in.

  
    curl -X PATCH "https://app.contexthub.com/api/subscriptions" \
         -H "Authorization: Token token=\"534e565f-335a-469d-974e-e18a85f00d2d\"" \
         -H "CONTEXTHUB_FRAMEWORK: v1.3.4" \
         -H "Content-Type: application/json" \
         -H "CONTEXTHUB_DEVICE_ID: DB4E6157-D64F-43EE-B114-39A13D2B9BC7" \
         -d $'{\n"subscription_type": ["geofence", "vault"], \n"operation": "add", \n"tags": ["foo", "bar"]\n}' \
         -v \
  

Request

Example Request

{
  "operation": "remove",
  "tags": [
    "bar"
  ],
  "subscription_type": [
    "beacon"
  ]
}

Example Parameters

Response

Example Response

[
  {
    "GeofenceSubscription": {
      "tags": [
        "foo"
      ]
    },
    "VaultSubscription": {
      "tags": [
        "foo"
      ]
    },
    "BeaconSubscription": {
      "tags": [
        "foo"
      ]
    },
    "DeviceSubscription": {
      "tags": [
        "foo"
      ]
    }
  }
]

Response Parameters

Response Codes

Successful Response Codes

Failure Response Codes