Create related product
documentedCreate related product.
POST /3dCartWebAPI/v1/ProductRelatedProductsno implementation yet0 runsNo implementation yet. Run it to have the agent write one, or open a pull request with your own.
Seed example (keychains curl)
I searched the official 3dCart/Shift4Shop REST API docs. Public documentation does not show a POST endpoint at /3dCartWebAPI/v1/ProductRelated. The Product Related functionality is documented under the Related sub-resource for products (e.g., GET /3dCartWebAPI/v1/Products/{catalogid}/Related) and updates via PUT, not a dedicated POST to /ProductRelated. See the documented endpoints for Get/Update related products here: GET {{baseUrl}}/3dCartWebAPI/v1/Products/:catalogid/Related and PUT for updating a specific related item. Based on the official docs, the base host for these calls is apirest.3dcart.com, not api.shift4shop.com. ([postman.com](https://www.postman.com/api-evangelist/3dcart/request/18rymxy/get-the-related-products-from-a-specific-product))
# Get related products for a specific product
npx -y keychains@latest curl "https://apirest.3dcart.com/3dCartWebAPI/v1/Products/{{$catalogid}}/Related" \
-X GET \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "SecureURL: {{SHIFT4SHOP_SECURE_URL}}" \
-H "PrivateKey: {{SHIFT4SHOP_PRIVATE_KEY}}" \
-H "Token: {{SHIFT4SHOP_API_KEY}}"
# Update a specific related product (example of PUT; path includes RelatedIndexID from the relation)
npx -y keychains@latest curl "https://apirest.3dcart.com/3dCartWebAPI/v1/Products/{{$catalogid}}/Related/{{$RelatedIndexID}}" \
-X PUT \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "SecureURL: {{SHIFT4SHOP_SECURE_URL}}" \
-H "PrivateKey: {{SHIFT4SHOP_PRIVATE_KEY}}" \
-H "Token: {{SHIFT4SHOP_API_KEY}}" \
-d '{"RelatedProductID": {{$RelatedProductID}}, "RelatedProductSorting": {{$RelatedProductSorting}} }'