Loadsmart Webhooks API
Webhooks allow you to receive certain events from Loadsmart. When one of those events is triggered, we'll send an HTTP POST request to the webhook's configured URL(s). This URL(s) should be sent to Loadsmart as part of the onboarding process. Webhooks can be used to update your own system with information from Loadsmart. ## Authentication Loadsmart Webhooks use the same authentication scheme used in the API, except in this case, Loadsmart generates the JWT tokens and the TMS authenticates our requests with these tokens. During the setup process Loadsmart will send to TMS the public key and the TMS will be responsible for validating the token. ### Token structure The JWT token header will be: ``` { "alg": "RS256", "typ": "JWT" } ``` The token payload will have: ``` { "iss": "loadsmart", // the token issuer "iat": 1517239022, // unix timestamp when the token was issued "exp": 1626239022 //unix timestamp when the token will expire } ``` The JWT token will be present in the Authorization header on all requests, as in the following example: ``` Authorization: JWT eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.TCYt5XsITJX1CxPCT8yAV-TVkIEq_PbChOMqsLfRoPsnsgw5WEuts01mq-pQy7UJiN5mgRxD-WUcX16dUEMGlv50aqzpqh4Qktb3rk-BuQy72IFLOqV0G_zS245-kronKb78cPN25DGlcTwLtjPAYuNzVBAh4vGHSrQyHUdBBPM ```