A
A
API
Search…
Put

Update your user profile data

Parameters:

Name
Optional / Required
Data type
Description
Default
gender
required
String
Your gender (male or female)
firstname
required
String
Your firstname (min. length 2 characters, max. length 100 characters)
lastname
required
String
Your lastname (min. length 2 characters, max. length 100 characters)
birth_date
optional
Date
Your birth_date (YYYY-MM-DD)
address
optional
String
Your address (max. length 255 characters)
zip_code
optional
String
Your zip code (max. length 10 characters)
city
optional
String
Your city (max. length 50 characters)
country
optional
String
Your country (DE, GB, FR, ...)
description
optional
String
Your address (max. length 255 characters)
website
optional
String
Your website (max. length 255 characters, valid URL)
blog
optional
String
Your blog (max. length 255 characters, valid URL)
avatar
optional
String
A valid image URL
language
optional
String
Your language (de, en, fr, ...)
curl
PHP
JavaScript
Java
Example:
1
curl -X PUT -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "gender=male" -d "firstname=firstnameAPI" -d "lastname=User" -d "birth_date=1986-01-01" -d "address=Moosackerstr. 17" -d "zip_code=9444" -d "city=Diepoldsau" -d "country=CH" -d "description=I am the default API user." -d "website=http://www.yumpu.com" -d "blog=http://blog.yumpu.com" -d "language=de" "http://api.yumpu.com/2.0/user.json"
Copied!
Example:
1
require_once('../yumpu.php');
2
$yumpu = new Yumpu();
3
$data = array(
4
'gender' => 'male',
5
'firstname' => 'firstnameAPI',
6
'lastname' => 'User',
7
'birth_date' => '1986-01-01',
8
'address' => 'Moosackerstr. 17',
9
'zip_code' => '9444',
10
'city' => 'Diepoldsau',
11
'country' => 'CH',
12
'description' => 'I am the default API user.',
13
'website' => 'https://www.yumpu.com',
14
'blog' => 'https://blog.yumpu.com',
15
'language' => 'de'
16
);
17
$putUser = $yumpu->putUser($data);
18
print_r($putUser);
Copied!
Example:
1
var yumpu = require('yumpu');
2
yumpu.setToken('yourToken');
3
var parameters = {
4
gender: 'male',
5
firstname: 'firstnameAPI',
6
lastname: 'User',
7
birth_date: '1986-01-01',
8
address: 'Moosackerstr. 17',
9
zip_code: '9444',
10
city: 'Diepoldsau',
11
country: 'CH',
12
description: 'I am the default API user.',
13
website: 'https://www.yumpu.com',
14
blog: 'https://blog.yumpu.com',
15
language: 'de'
16
};
17
yumpu.putUser(parameters, function(statusCode, document){
18
console.log('Status: ' + statusCode);
19
console.log(document);
20
});
Copied!
Example:
1
Yumpu y = new Yumpu("your access token");
2
String[] params = {"gender=male", "firstname=firstnameAPI", "lastname=User", "birth_date=1986-01-01", "address=Moosackerstr. 17", "zip_code=9444", "city=Diepoldsau", "country=CH", "description=I am the default API user.", "website=http://www.yumpu.com", "blog=http://blog.yumpu.com", "language=de"};
3
System.out.println(y.putUser(params));
Copied!
Whatever language you are using, the result will be the same.
1
{
2
"user": {
3
"id": "102864144",
4
"create_date": "2013-03-08 17:13:43",
5
"activate_date": "2013-04-25 14:20:04",
6
"username": "Api.User",
7
"email": "[email protected]",
8
"gender": "male",
9
"firstname": "firstnameAPI",
10
"lastname": "User",
11
"birth_date": "1986-01-01",
12
"address": "Moosackerstr. 17",
13
"zip_code": "9444",
14
"city": "Diepoldsau",
15
"country": "CH",
16
"description": "I am the default API user.",
17
"website": "http://www.yumpu.com",
18
"blog": "http://blog.yumpu.com",
19
"language": "de"
20
},
21
"state": "success"
22
}
Copied!
Last modified 1yr ago