# plantEvents GET /ws/plants Connect to receive real-time plant lifecycle events. Subscribe to specific event types or receive all events. Reference: https://docs.getinstacash.in/api-reference/plant-store-async-api/plant-events/plant-events ## AsyncAPI Specification ```yaml asyncapi: 2.6.0 info: title: plantEvents version: subpackage_plantEvents.plantEvents description: | Connect to receive real-time plant lifecycle events. Subscribe to specific event types or receive all events. channels: /ws/plants: description: | Connect to receive real-time plant lifecycle events. Subscribe to specific event types or receive all events. bindings: ws: query: type: object properties: eventTypes: type: string plantId: type: string headers: type: object properties: Authorization: type: string publish: operationId: plant-events-publish summary: Server messages message: oneOf: - $ref: >- #/components/messages/subpackage_plantEvents.plantEvents-server-0-receivePlantEvents - $ref: >- #/components/messages/subpackage_plantEvents.plantEvents-server-1-receivePlantEvents - $ref: >- #/components/messages/subpackage_plantEvents.plantEvents-server-2-receivePlantEvents subscribe: operationId: plant-events-subscribe summary: subscribe description: Send a subscription request to filter events. message: name: subscribe title: subscribe description: Send a subscription request to filter events. payload: $ref: '#/components/schemas/plantEvents_subscribeRequest' servers: plantStoreWebsocket: url: wss://ws.plantstore.dev/ protocol: wss x-default: true components: messages: subpackage_plantEvents.plantEvents-server-0-receivePlantEvents: name: receivePlantEvents title: receivePlantEvents description: Receive plant lifecycle events from the server. payload: $ref: '#/components/schemas/plantEvents_plantCreated' subpackage_plantEvents.plantEvents-server-1-receivePlantEvents: name: receivePlantEvents title: receivePlantEvents description: Receive plant lifecycle events from the server. payload: $ref: '#/components/schemas/plantEvents_plantUpdated' subpackage_plantEvents.plantEvents-server-2-receivePlantEvents: name: receivePlantEvents title: receivePlantEvents description: Receive plant lifecycle events from the server. payload: $ref: '#/components/schemas/plantEvents_plantStatusChanged' schemas: ChannelsPlantEventsMessagesPlantCreatedType: type: string enum: - plant.created - plant.updated title: ChannelsPlantEventsMessagesPlantCreatedType PlantResponse: type: object properties: id: type: integer name: type: string status: type: string tags: type: array items: type: string title: PlantResponse plantEvents_plantCreated: type: object properties: type: $ref: '#/components/schemas/ChannelsPlantEventsMessagesPlantCreatedType' occurredAt: type: string format: date-time data: $ref: '#/components/schemas/PlantResponse' required: - type - occurredAt - data title: plantEvents_plantCreated ChannelsPlantEventsMessagesPlantUpdatedType: type: string enum: - plant.created - plant.updated title: ChannelsPlantEventsMessagesPlantUpdatedType plantEvents_plantUpdated: type: object properties: type: $ref: '#/components/schemas/ChannelsPlantEventsMessagesPlantUpdatedType' occurredAt: type: string format: date-time data: $ref: '#/components/schemas/PlantResponse' required: - type - occurredAt - data title: plantEvents_plantUpdated ChannelsPlantEventsMessagesPlantStatusChangedType: type: string enum: - plant.status.changed title: ChannelsPlantEventsMessagesPlantStatusChangedType ChannelsPlantEventsMessagesPlantStatusChangedPreviousStatus: type: string enum: - available - pending - sold title: ChannelsPlantEventsMessagesPlantStatusChangedPreviousStatus ChannelsPlantEventsMessagesPlantStatusChangedNewStatus: type: string enum: - available - pending - sold title: ChannelsPlantEventsMessagesPlantStatusChangedNewStatus plantEvents_plantStatusChanged: type: object properties: type: $ref: >- #/components/schemas/ChannelsPlantEventsMessagesPlantStatusChangedType occurredAt: type: string format: date-time plantId: type: integer previousStatus: $ref: >- #/components/schemas/ChannelsPlantEventsMessagesPlantStatusChangedPreviousStatus newStatus: $ref: >- #/components/schemas/ChannelsPlantEventsMessagesPlantStatusChangedNewStatus required: - type - occurredAt - plantId - previousStatus - newStatus title: plantEvents_plantStatusChanged ChannelsPlantEventsMessagesSubscribeRequestAction: type: string enum: - subscribe - unsubscribe title: ChannelsPlantEventsMessagesSubscribeRequestAction ChannelsPlantEventsMessagesSubscribeRequestEventTypesItems: type: string enum: - plant.created - plant.updated - plant.status.changed title: ChannelsPlantEventsMessagesSubscribeRequestEventTypesItems plantEvents_subscribeRequest: type: object properties: action: $ref: >- #/components/schemas/ChannelsPlantEventsMessagesSubscribeRequestAction eventTypes: type: array items: $ref: >- #/components/schemas/ChannelsPlantEventsMessagesSubscribeRequestEventTypesItems plantId: type: integer description: Filter events for a specific plant ID. required: - action title: plantEvents_subscribeRequest ```