Updates a Digital Link
JavaScript
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));
{ "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" } } } } }
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Show child attributes
Record updated
Was this page helpful?