Getting Started with Pet Adoptions


Getting Started with the Pet Adoptions API Workflow

This pet adoption workflow provides a comprehensive process to search for, select, and adopt a pet. Utilizing two APIs, it starts by searching for available pets based on location, then moves to adopt a selected pet, confirm the adoption, update the pet's status to adopted, and finally confirm the pet's status update. The workflow is designed to be both developer and user-friendly, providing clear steps and expected outcomes.

Following this workflow will greatly reduce your meantime to integration 🚀

Arazzo Workflow Metadata

Here's some useful metadata about the supported workflow:

MetadataValue
Specification1.0.0
TitleA pet adoptions workflow
SummaryShowcases how to search for and adopt a pet through a sequence of API calls
DescriptionGuides through searching for, selecting, and adopting an available pet.
Version1.0.0
Source Descriptions2 (petsApiDescription, adoptionsApiDescription)

Workflow: A Pet Purchasing Workflow

Summary

This workflow guides you through the process of searching for and adopting a pet, covering pet selection, adoption initiation, adoption updating, adoption and pet confirmation checks.

Step Overview

Here's a breakdown of the steps you'll carry out to integrate this capability into your application:

#Step IDDescriptionOperation IDParametersSuccess CriteriaOutputs
1️⃣getPetStepRetrieve a pet by statuspetsApiDescription.getPetsstatus, location, token$statusCode == 200 availablePets
2️⃣adoptPetStepAdopt a petadoptionsApiDescription.postAdoptionpetId, token$statusCode == 201adoptionId
3️⃣confirmAdoptionStepConfirm the adoption by updating the statusadoptionsApiDescription.patchAdoptionStatus adoptionId, token$statusCode == 200N/A
4️⃣updatePetStepUpdate the pet status to adoptedpetsApiDescription.patchPetStatus petId, token$statusCode == 200 N/A
5️⃣confirmPetStatusStepConfirm the pet status update to adoptedpetsApiDescription.getPetByIdpetId, token$statusCode == 200, adopted statusadoptedPetName, adoptedPetStatus, adoptedPetId, adoptedPetLocation

Graphical Representation of Workflow Steps

Arazzo-PlantUML.png

Arazzo-Mermaid.png

Developer Integration Guidance

Developers integrating this workflow should note:

  • Authentication is crucial at each step, requiring a valid token.
  • The sequence of steps must be followed precisely for successful execution.
  • Proper error handling should be implemented to handle unsuccessful API calls or unmet success criteria.
  • Developers must ensure the correct mapping and passing of parameters between steps, especially for dynamically derived values like petId.

Client Code Samples