def METHOD_NAME(self, serviceRecord, activity):
    # Upload the workout as a .FIT file
    uploaddata = FITIO.Dump(activity)
    headers = self._apiHeaders(serviceRecord.Authorization)
    headers['Content-Type'] = 'application/octet-stream'
    resp = requests.post(TRAINASONE_SERVER_URL + "/api/sync/activity/fit", data=uploaddata, headers=headers)
    if resp.status_code != 200:
        raise APIException(
            "Error uploading activity - " + str(resp.status_code),
            block=False)
    responseJson = resp.json()
    if not responseJson["id"]:
        raise APIException(
            "Error uploading activity - " + resp.Message,
            block=False)
    activityId = responseJson["id"]
    return activityId