Am 06.03.2019 um 16:41 schrieb Orgoth Dorngree <orgoth....@gmail.com>:Hallo zusammen,ich scheitere aktuell beim Anlegen einer Person über die API.Folgenden Request habe ich an die API gesendet und erhalte dabei die Meldung zurück, dass "name" ausgefüllt werden muss.Ich habe aber alle Felder mit "name" ausgefüllt und weis nun leider nicht wo das Problem liegt.
> POST /api/people.json HTTP/1.1Accept: application/jsonContent-type: application/jsonX-apikey: ...entfernt...Content-Length: 240
{"people":{"first_name":"Test 1","name":"Test 2","custom_fields_attributes":[{"custom_fields_type_id":36732,"name":"Interessent"}],"positions_attributes":[{"company_id":6410088,"name":"Kontakt"}],"tags_attributes":[{"name":"Contactform"}]}}* upload completely sent off: 240 out of 240 bytes< HTTP/1.1 422 Unprocessable Entity< Server: nginx/1.4.6 (Ubuntu)< Date: Wed, 06 Mar 2019 15:24:04 GMT< Content-Type: application/json; charset=utf-8< Transfer-Encoding: chunked< Connection: keep-alive< X-Frame-Options: SAMEORIGIN< X-XSS-Protection: 1; mode=block< X-Content-Type-Options: nosniff< Access-Control-Allow-Origin: *< Access-Control-Request-Method: *< Cache-Control: no-cache< Set-Cookie: cscrm_production_session=...entfernt...; domain=centralstationcrm.net; path=/; expires=Wed, 20 Mar 2019 15:24:04 -0000; HttpOnly< X-Request-Id: f70b8c04-43b9-4d9c-8d74-82439fe36507< X-Runtime: 0.028087<* Connection #0 to host firmaxy.centralstationcrm.net left intact
{"name":["muss ausgefüllt werden"]}
Zur Kontrolle habe ich auch noch einmal in die Dokumentation geschaut.Vielleicht kann mir hier jemand weiterhelfen, wo ich etwas übersehen haben könnte.Beispiel 2 aus der Dokumentation:
{"person"=>{"title"=>"Herr", "first_name"=>"Vorname", "name"=>"Nachname 1a","positions_attributes"=>{"0"=>{"id"=>"", "company_id"=>"", "company_name"=>"firma name","name"=>"firma position", "department"=>"Bereich", "primary_function"=>"true","former"=>"false", "account_id"=>19}},"tags_attributes"=>{"0"=>{"id"=>"", "name"=>"fantastic tag"}},"tels_attributes"=>{"0"=>{"id"=>"", "name"=>"1234", "atype"=>"office"}},"emails_attributes"=>{"0"=>{"id"=>"", "name"=>"jo...@42he.com", "atype"=>"office"}},"homepages_attributes"=>{"0"=>{"id"=>"", "name"=>"42he.com", "atype"=>"office"}},"addrs_attributes"=>{"0"=>{"id"=>"", "street"=>"Marktstraße 10", "zip"=>"50968","city"=>"Köln", "country"=>"Deutschland", "atype"=>"work_hq", "move_addr_id"=>""}},"ims_attributes"=>{"0"=>{"id"=>"", "name"=>"centralstationcrm", "atype"=>"skype"}},"tweets_attributes"=>{"0"=>{"id"=>"", "name"=>"cscrm", "atype"=>"twitter"}},"sms_attributes"=>{"0"=>{"id"=>"", "name"=>"xing-link", "atype"=>"xing"}},"assis_attributes"=>{"0"=>{"id"=>"", "name"=>"Jolly Mäh", "tel"=>"1298034", "email"=>"jolly.a...@42he.com"}},"historic_events_attributes"=>{"0"=>{"id"=>"", "unparsed_date"=>"14.04.1980", "atype"=>"birthday", "desc"=>""}},"custom_fields_attributes"=>{"0"=>{"custom_fields_type_id"=>1, "attachable_id"=>"","attachable_type"=>"Person", "name"=>"individuelles Feld"}}}}
Vielen DankOrgoth--
Sie erhalten diese Nachricht, weil Sie in Google Groups E-Mails von der Gruppe "42he API" abonniert haben.
Wenn Sie sich von dieser Gruppe abmelden und keine E-Mails mehr von dieser Gruppe erhalten möchten, senden Sie eine E-Mail an 42he+uns...@googlegroups.com.
Weitere Optionen finden Sie unter https://groups.google.com/d/optout.