Sires
Sales
Tokens
Properties

TokenID: Auto generated Unique ID for the session.

TokenPersonID: The person that the token is issued to.

TokenMemberID: The member that the token is scoped to.

INIT
await fetch(core.herdlogic.com/v1/token/init',
{
    body: JSON.stringify({
        PersonEmail: '{{Email Address}}',
    }),
    method: 'POST',
    headers: {
            'Content-Type': 'application/json',
        }
    }
);
                
AUTH
await fetch(core.herdlogic.com/v1/token/auth',
{
    body: JSON.stringify({
        SecurityCode: '{{Security Code}}',
    }),
    method: 'POST',
    headers: {
            'Content-Type': 'application/json',
            'authorization': '{{Access Token}}',
        }
    }
);
                
SCOPE
await fetch(core.herdlogic.com/v1/token/scope',
{
    body: JSON.stringify({
        MemberID: '{{Member ID to scope to}}',
    }),
    method: 'POST',
    headers: {
            'Content-Type': 'application/json',
            'authorization': '{{Access Token}}',
        }
    }
);
                
REFRESH
await fetch(core.herdlogic.com/v1/token/refresh',
{
    method: 'GET',
    headers: {
            'Content-Type': 'application/json',
            'authorization': '{{Access Token}}',
        }
    }
);
                
EXPIRE
await fetch(core.herdlogic.com/v1/token/expire',
{
    method: 'POST',
    headers: {
            'Content-Type': 'application/json',
            'authorization': '{{Access Token}}',
        }
    }
);