cURL
curl --request POST \ --url https://qwoty.app/api/product-parents \ --header 'Authorization: <authorization>' \ --header 'Content-Type: application/json' \ --data ' { "api_name": "<string>", "recurrence_type": "<string>", "name": "<string>", "reference": "<string>", "description": "<string>", "is_active": true, "id_crm": "<string>", "id_erp": "<string>", "id_accounting": "<string>" } '
{ "success": true, "data": { "id": "550e8400-e29b-41d4-a716-446655440000", "catalog_ids": ["660e8400-e29b-41d4-a716-446655440001"], "name": "Premium Widget", "api_name": "premium_widget", "recurrence_type": "recurring", "reference": "PROD-001", "description": "High-quality widget for professional use", "is_active": true, "id_crm": null, "id_erp": null, "id_accounting": null, "created_at": "2024-12-21T10:30:00Z", "updated_at": "2024-12-21T10:30:00Z" } }
Create a new product parent in your workspace
Bearer qwoty_your_token
one_off
recurring
curl -X POST https://qwoty.app/api/product-parents \ -H "Authorization: Bearer qwoty_your_token" \ -H "Content-Type: application/json" \ -d '{ "api_name": "premium_widget", "recurrence_type": "recurring", "name": "Premium Widget", "description": "High-quality widget for professional use", "reference": "PROD-001", "is_active": true }'
{ "success": false, "error": "Validation error", "details": [ "Field 'api_name' is required", "Field 'recurrence_type' is required (one_off | recurring)" ] }
Was this page helpful?