POST/plants

Create a plant

Creates a new plant in the store. Provide name and id; tag can specify the plant type. A 200 response returns the created plant object.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

3 body fields

Plant details to add to the store. Include the required name and id; tag is optional.

namestringrequired
The name of the plant
tagstringoptional
Tag to specify the type
idintegerrequired
Identification number of the plant

2 status codes
200Returns the created plant object, including its name and optional tag.
namestringrequired
The name of the plant
tagstringoptional
Tag to specify the type
400Returned when an unexpected error occurs.
errorintegerrequired
messagestringrequired

Error handling

name and id are required; provide name as a string and id as an integer. A 400 is returned for an unexpected error.