Update a Loop Link

Update (replace) an existing Loop Link.

Request

HTTP Request

PUT https://api.predicthq.com/v1/loop/links/

Path Parameters

ParameterDescription

link_id

An existing Loop Link ID.

Request Headers

HeaderValue

Content-Type

application/json

Request Body

This endpoint accepts the same request body fields as the Create a Loop Link endpoint. Please refer to the Create a Loop Link documentation for request body parameters.

Remember this is a PUT endpoint which means you must provide all supported fields or you may lose data - you are effectively replacing the existing record with a new record containing all the fields you provide. We recommend first getting the existing record and pre-populating the request body with the current values, then change the fields you need to change.

Response

If successful, the HTTP response code will be 204 No Content.

Examples

curl -X PUT https://api.predicthq.com/v1/loop/links/$LINK_ID \
     -H "Accept: application/json" \
     -H "Authorization: Bearer $ACCESS_TOKEN" \
     --data @<(cat <<EOF
    {
        "name": "Hotel A",
        "expire_dt": "2024-12-31T00:00:00",
        "metadata": {
            "hotel_id": "123456789"
        }
    }
    EOF
    )

Guides

Below are some guides relevant to this API:

Last updated

© 2024 PredictHQ Ltd