Falsche user_field-Information - API-Dokumentation

create user field

I see

{
  "user_field[name]": "string",
  "user_field[description]": "string",
  "user_field[field_type": "string",
  "user_field[required]": true
}

Are you sure ?

I think it should be something like

{
  "user_field: {
     "name": "asdf",
     "description": "asdf",
     "field_type": "confirm",
     "required": true
  }
}

I believe that @blake wrote that documentation so let’s see what he reckons here.

Yes, if you are using Content-Type: application/json you should send it in like

The example in the api docs is using Content-Type: multipart/form-data, but I’ll be sure to update it to the json example.

2 „Gefällt mir“

Screen Shot 2020-08-20 at 15.48.17

Thank you @blake

Note:
The problem is … i see application/json in the example (so that’s why my partner spent all hours to figure it out how to use this call)

2 „Gefällt mir“

Ich habe auch etwa 24 Stunden lang damit gekämpft, da das Dokumentationsbeispiel für die Erstellung eines neuen Benutzers application/json-formatierte Anfragen für user_field als boolesch vorschlägt …

Mir wurde gesagt, dass ich nicht alle erforderlichen Benutzerfelder ausgefüllt hätte … aber in meinem Fall habe ich ein bestehendes erforderliches user_field, in das ich Daten eingeben muss, und es sollte wie folgt formatiert sein:

{
  "name": "Full Name",
  "email": "email@address.com",
  "password": "348hqpwfaed",
  "username": "UserName",
  "user_fields": {
    "1": "Required User Field Data"
  }
}

Die obige Formatierung hat für mich funktioniert.

Sind die Dokumente in diesem Fall für die Erstellung eines neuen Benutzers korrekt?

1 „Gefällt mir“

Nein, das war immer noch das Form-data-Format. Ich habe es auf JSON umgestellt, damit das Beispiel dem Format entspricht. Danke, dass Sie das angesprochen haben!

2 „Gefällt mir“