Sharpei icon

Sharpei

Consume Sharpei Api

Overview

This node integrates with the Sharpei API to create product options. Specifically, the "Create Options" operation under the "Options" resource allows users to define new option sets for products by providing a product identifier and detailed option data in JSON format. This is useful in e-commerce scenarios where products have customizable attributes or variants that need to be managed programmatically.

For example, if you sell clothing items, you might use this node to create size or color options for a specific product by supplying the product's unique ID and the option details structured as JSON.

Properties

Name Meaning
Product Pid The unique identifier (Pid) of the product for which options are being created.
Product Data (JSON) A JSON object describing the product options. It typically includes option lines with values, allowing detailed specification of each option attribute.

The Product Data (JSON) default structure looks like this:

{
  "name": "",
  "options_lines": [
    {
      "value": ""
    },
    {
      "value": ""
    }
  ]
}

Users should replace the empty strings with actual option names and values relevant to their product.

Output

The node outputs JSON data representing the response from the Sharpei API after creating the options. This output typically contains confirmation of the created options, including any assigned IDs or status messages. There is no indication that binary data is handled or returned by this node.

Dependencies

  • Requires an active connection to the Sharpei API.
  • Needs an API authentication token or key configured in n8n credentials (referred generically as "an API key credential").
  • The base URL for API requests is https://api.prod.gosharpei.com/api.
  • The node expects JSON content-type headers for communication.

Troubleshooting

  • Invalid Product Pid: If the provided product identifier does not exist or is malformed, the API may return an error. Verify the product ID before running the node.
  • Malformed JSON in Product Data: Ensure the JSON input for product options is correctly formatted. Invalid JSON will cause request failures.
  • Authentication Errors: Missing or incorrect API credentials will prevent successful API calls. Confirm that the API key credential is properly set up in n8n.
  • API Connectivity Issues: Network problems or incorrect base URL configuration can lead to timeouts or connection errors.
  • Empty Option Values: Providing empty strings for option values may result in incomplete or rejected option creation. Populate all required fields meaningfully.

Links and References

Discussion