Creates a Digital Link
JavaScript
const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: JSON.stringify({digital_link: {line_item_id: '1', digital_id: '1', access_counter: 0}}) }; fetch('http://{defaultHost}/api/v2/platform/digital_links', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
{ "data": { "id": "5", "type": "digital_link", "attributes": { "token": "6bPn1uP9HWaYecdMFkFAkcc3", "access_counter": 0 }, "relationships": { "digital": { "data": { "id": "5", "type": "digital" } }, "line_item": { "data": { "id": "13", "type": "line_item" } } } } }
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Show child attributes
Record created
Was this page helpful?