Manages the links between parents (pet owners) and companions (the pets, also shown as animal, pet, or patient depending on the clinic's preference): listing links, updating a co-parent's permissions, promoting a co-parent to primary, and removing a co-parent. All routes are called by the mobile app and authenticated with the pet parent's SuperTokens session (requireMobileAuth). See the Parent API for parent records.
Endpoints
GET /parent/:parentId
- Auth:
requireMobileAuth - Params:
parentId - Controller:
ParentCompanionController.getLinksForParent - Response:
400: keysmessage,200: JSON,500: keysmessage
GET /companion/:companionId
- Auth:
requireMobileAuth - Params:
companionId - Controller:
ParentCompanionController.getLinksForCompanion - Response:
400: keysmessage,200: JSON,500: keysmessage
PATCH /:companionId/:targetParentId/permissions
- Auth:
requireMobileAuth - Params:
companionId,targetParentId - Controller:
ParentCompanionController.updatePermissions - Response:
401: keysmessage,400: keysmessage,200: keysmessage,500: keysmessage
POST /:companionId/:targetParentId/promote
- Auth:
requireMobileAuth - Params:
companionId,targetParentId - Controller:
ParentCompanionController.promoteToPrimary - Response:
401: keysmessage,400: keysmessage,200: keysmessage,500: keysmessage
DELETE /:companionId/:coParentId
- Auth:
requireMobileAuth - Params:
companionId,coParentId - Controller:
ParentCompanionController.removeCoParent - Response:
401: keysmessage,400: keysmessage,204: keysmessage,500: keysmessage