Petstore icon

Petstore

Interact with Petstore API

Overview

This node allows you to create a new user in the system by sending user details such as ID, username, name, email, password, phone number, and status. It is useful in scenarios where you want to automate user registration or onboarding processes, for example, adding users from a form submission or syncing users from another system.

Properties

Name Meaning
Id Numeric identifier for the user.
Username The username chosen for the user account.
First Name User's first name.
Last Name User's last name.
Email User's email address.
Password Password for the user account.
Phone User's phone number.
User Status Numeric status of the user (e.g., active/inactive).

Output

The node outputs JSON data representing the created user object returned from the API after successful creation. This typically includes all the user details sent plus any additional metadata or identifiers assigned by the backend. There is no indication that binary data is output by this node.

Dependencies

  • Requires an API key or authentication token configured in n8n credentials to authorize requests to the Petstore API.
  • Uses the Petstore API endpoint at https://petstore3.swagger.io/api/v3 to perform user creation.
  • Depends on the @devlikeapro/n8n-openapi-node package for OpenAPI integration.

Troubleshooting

  • Common issues:

    • Missing or invalid API credentials will cause authentication errors.
    • Providing incomplete or invalid user data (e.g., missing required fields) may result in validation errors from the API.
    • Network connectivity problems can prevent the request from reaching the API.
  • Error messages:

    • Authentication failures: Check that your API key or token is correctly set up in n8n credentials.
    • Validation errors: Verify that all required user properties are provided and correctly formatted.
    • HTTP errors (4xx or 5xx): Inspect the response message for details; ensure the API endpoint is reachable and operational.

Links and References

Discussion