Update a Digital Link
Updates a Digital Link
PATCH
/
api
/
v2
/
platform
/
digital_links
/
{id}
Update a Digital Link
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({digital_link: {access_counter: 0, line_item_id: '1', digital_id: '1'}})
};
fetch('http://{defaultHost}/api/v2/platform/digital_links/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url http://{defaultHost}/api/v2/platform/digital_links/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"digital_link": {
"access_counter": 0,
"line_item_id": "1",
"digital_id": "1"
}
}
'{
"data": {
"id": "8",
"type": "digital_link",
"attributes": {
"token": "hv6VNk8yK2oiZRPsB1pQnazN",
"access_counter": 0
},
"relationships": {
"digital": {
"data": {
"id": "8",
"type": "digital"
}
},
"line_item": {
"data": {
"id": "16",
"type": "line_item"
}
}
}
}
}{
"error": "The access token is invalid"
}{
"error": "The resource you were looking for could not be found."
}{
"error": "Access counter is not a number",
"errors": {
"access_counter": [
"is not a number"
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Show child attributes
Show child attributes
Response
Record updated
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Update a Digital Link
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({digital_link: {access_counter: 0, line_item_id: '1', digital_id: '1'}})
};
fetch('http://{defaultHost}/api/v2/platform/digital_links/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url http://{defaultHost}/api/v2/platform/digital_links/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"digital_link": {
"access_counter": 0,
"line_item_id": "1",
"digital_id": "1"
}
}
'{
"data": {
"id": "8",
"type": "digital_link",
"attributes": {
"token": "hv6VNk8yK2oiZRPsB1pQnazN",
"access_counter": 0
},
"relationships": {
"digital": {
"data": {
"id": "8",
"type": "digital"
}
},
"line_item": {
"data": {
"id": "16",
"type": "line_item"
}
}
}
}
}{
"error": "The access token is invalid"
}{
"error": "The resource you were looking for could not be found."
}{
"error": "Access counter is not a number",
"errors": {
"access_counter": [
"is not a number"
]
}
}
