Sharpei icon

Sharpei

Consume Sharpei Api

Overview

This node integrates with the Sharpei API to update a specific product variant. It allows users to modify details of an existing variant by specifying the product and variant identifiers along with the new variant data in JSON format. This is useful in e-commerce scenarios where product variants (such as size, color, or SKU variations) need to be updated dynamically, for example, adjusting prices, barcodes, or titles without recreating the entire product.

Practical examples include:

  • Updating the selling price or cost of a variant after a supplier price change.
  • Correcting or adding barcode information for inventory management.
  • Changing the SKU or title to reflect new marketing or cataloging standards.

Properties

Name Meaning
Product Pid The unique identifier (Pid) of the product to which the variant belongs.
Variant Pid The unique identifier (Pid) of the variant that needs to be updated.
Variant Data (JSON) A JSON object containing the variant's updated data fields. Supported fields include: pid, title, SKU, barcode, cost, and selling_price.

Example of Variant Data (JSON):

{
  "pid": "",
  "title": "New Variant Title",
  "SKU": "NEW-SKU-123",
  "barcode": "0123456789012",
  "cost": "10.00",
  "selling_price": "15.00"
}

Output

The node outputs JSON data representing the response from the Sharpei API after updating the variant. This typically includes the updated variant details confirming the changes made.

If the API supports it, the output may also contain status messages or error information if the update failed.

No binary data output is indicated.

Dependencies

  • Requires an active connection to the Sharpei API.
  • Needs an API authentication token or key configured in n8n credentials to authorize requests.
  • The base URL for the API is https://api.prod.gosharpei.com/api.
  • Proper network access to the Sharpei API endpoint is necessary.

Troubleshooting

  • Invalid or missing Product Pid or Variant Pid: Ensure these identifiers are correct and correspond to existing entities in Sharpei.
  • Malformed JSON in Variant Data: The JSON must be valid and conform to expected fields; otherwise, the API may reject the request.
  • Authentication errors: Verify that the API key or token is correctly set up in n8n credentials and has sufficient permissions.
  • Network issues: Confirm that your environment can reach the Sharpei API endpoint without firewall or proxy blocking.
  • API errors: If the API returns errors, check the message for details such as invalid fields or rate limits.

Links and References

Discussion