Jump to content

IPS 4.2.2 - REST - POST /core/members/{id} not working correctly


derpunker

Recommended Posts

Hello everybody,

I've got an problem using the REST-API.
I want to update the "customfields" of my members, but it fails.  :cry:

Changing "name", "email",... works fine.

I'm using the format described in the documentation (https://invisioncommunity.com/developers/rest-api?endpoint=core/members/POSTitem) and send the request as 'application/x-www-form-urlencoded' (https://invisioncommunity.com/developers/rest-api).

I have already created a support ticket asking the exact format for the "customfields". The answer was,

Quote

"customFields": [
  {
    "XX": "Testwert!"
  }
]

Where 'XX' is the field ID (not the key or human-readable name) of the custom field you wish to set this value for.

 

but it still doesn't work. :cry:

 

Here some fiddler logs

 

HEADER

POST /api/index.php?/core/members/3 HTTP/1.1
Authorization: Basic xxxxxx
Content-Type: application/x-www-form-urlencoded
Host: yyyyyyy
Content-Length: 53


CONTENT
email=test7%40me.de&customFields=[{"11":"TestValue"}]

Field 11 exists. The email is accepted and stored in IPS, but not the customfield.

 

In the REST API Log of IPS, I can find the incoming request.

REQUEST DATA
{
    "\/core\/members\/3": "",
    "email": "test7@me.de",
    "customFields": "[{\"11\":\"TestValue\"}]"
}
RESPONSE
.....

 

Are there any ideas what's wrong in my request?

 

The partial presponse for an GET request at this member:

 

"customFields": {
        "1": {
           ....
        },
        "2": {
            "name": "Profile Information",
            "fields": {
                "11": {
                    "name": "Interests",
                    "value": "default"
                }
            }
        },
		....

 

Thank you in advance :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...