Can you provide more details? There isn't enough information in your post to give you any kind of answer.
- Are you using webhooks?
- Are you seeing new activities come in on your webhook?
- Are you receiving an error from the API when you make a call?
- If so what error?
- What endpoint are you trying to access?
- Are you using valid access tokens for the athlete? Tokens expire after some time and need to be refreshed. You should have received a refresh token when the athlete authorized your app.
Generally, yes the API can be used to do what you've described. When a new activity comes in to your webhook, you can make an API call to getActivityById to get details of the activity including the distance.