Actions72
- Bài Viết Actions
- Blog Actions
- Bộ Sưu Tập Actions
- Khách Hàng Actions
- Đơn Hàng Actions
- Trang Actions
- Sản Phẩm Actions
- Biến Thể Sản Phẩm Actions
Đơn Hàng → Lấy Chi Tiết
AI-generatedOverview
This node manages custom metafields on various resources within the Sapo platform, such as orders, products, customers, and more. Specifically, for the "Đơn Hàng" (Orders) resource with the "Lấy Chi Tiết" (Get Detail) operation, it retrieves detailed information about a specific custom metafield associated with an order.
Common scenarios where this node is useful include:
- Fetching additional metadata attached to an order that is not part of the standard order fields.
- Integrating custom business logic or external systems that rely on these extended attributes.
- Auditing or reporting on custom data stored in metafields for orders.
Practical example:
- You have an order with a custom metafield storing delivery instructions. Using this node, you can retrieve the exact value of that metafield by specifying the order ID and the metafield ID.
Properties
| Name | Meaning |
|---|---|
| ID Tài Nguyên | The numeric ID of the resource (order) from which to retrieve the metafield detail. |
| ID Trường Tùy Chỉnh | The numeric ID of the custom metafield to get details for. Required for get, update, delete operations. |
Output
The node outputs a JSON object representing the metafield's details. This typically includes properties such as namespace, key, value, value type, description, and other metadata related to the custom field.
Example output structure (simplified):
{
"id": 123,
"namespace": "inventory",
"key": "warehouse_location",
"value": "A-12",
"value_type": "string",
"description": "Storage location in warehouse",
"owner_type": "order",
"owner_id": 456
}
No binary data output is produced by this node.
Dependencies
- Requires an API credential for authenticating with the Sapo platform.
- Depends on the internal
SapoApiBaseclass to interact with the metafields API endpoints. - The node expects proper configuration of the Sapo API credentials within n8n.
Troubleshooting
Common issues:
- Providing an invalid or non-existent order ID or metafield ID will result in errors or empty responses.
- Missing or incorrect API credentials will cause authentication failures.
- Attempting to get a metafield for a resource that does not support metafields may fail.
Error messages:
- Errors returned from the Sapo API are surfaced with their message and stack trace.
- If the node is set to continue on failure, errors are returned as JSON objects with an
errorproperty containing the message.
Resolutions:
- Verify that the resource ID and metafield ID exist and are correct.
- Ensure the API credentials are valid and have sufficient permissions.
- Check that the resource supports metafields and that the operation is appropriate.
Links and References
- Sapo Platform API Documentation (general reference for Sapo APIs)
- n8n documentation on creating custom nodes