Skip to main content

 Services

Web services from /about to /webhooks

member data

/member-data/{member}/data/{data} [PUT]

Description

The behaviour and URL of this service is not consistent with other services, please read the description carefully.

Creates or replaces the specified personal member data and can be accessed through the following URL:

/ps/api/member-data/{memberid}/data/{name}

Or

/ps/servlet/members/{memberid}/data/{name}

Where name can contain lowercase letters, numbers, hyphen or underscore and can have an optional alphanumeric extension after a dot which is ignored, for example public-picture.png.

There is a limit of 16 data names per member and per name a size limit on png or jpeg of 10 MB and 100 KB for other data. Images are scaled down to a maximum width or height of 512 pixels.

Allowed media types

The media types that can be stored are:

Type of contentMedia type
JPEG imageimage/jpeg
PNG imageimage/png 
XMLapplication/xml
Vendor-specific XMLapplication/[subtype]+xml
JSONapplication/json
Vendor-specific JSONapplication/[subtype]+json 

Detecting collisions

Since member data are requested and/or updated frequently, this service relies on precondition header fields  to detect and prevent collisions. If the preconditions fail, this service returns an HTTP 412 Precondition Failed  error, otherwise the update proceeds.

The recommended approach is to send the Etag returned by this service or the GET request in the If-Match HTTP header. This services supports If-Match , If-None-Match, andIf-Unmodified-since HTTP headers to check whether the update is possible.

Parameters

NameDescriptionRequiredTypeDefault
titleA user friendly title for the data (e.g. Profile picture)NoString

We recommend that you always use entity tags when making a request to this service using If-Match HTTP header.

Permission

Only the member themselves or an administrator can use this service.

Response

Returns the member data.

The media type is returned in the Content-Type  HTTP header and is one of the allowed media types. JSON and XML response are always encoded using utf-8.

The HTTP 200 response always includes the Cache-Control , Etag , and Last-Modified  HTTP headers. To detect and prevent collisions, use the entity tag to make any PUT or DELETE request on member data.

Error handling

CodeCause / Description
0x102DNo member data found
0x102EToo many member data items (max is 16) 
0x102FMember data exceeds maximum length
0x1030Unsupported media type for member data (HTTP Status 415)
0x1031Unable to process image
0x1030Member data name does not match `[name].[extension]`
0x1030Member data name should not exceed 250 characters
0x1031Member data has been modified since update attempt
0x1032Member data is invalid if XML or JSON cannot be parsed

Maximum length for text: 100kb.

Maximum length for images: 10Mb.

Created on , last edited on