Account Operations
Account Information
Account information is retrieved under the /User URI. See below for details of what data is returned for various resources. In addition, a single field may be requested by specifying it in the URI, ex. "GET /User/Email". By default, data is retrieved for the authenticated user. Data for other users may be requested by using the
AccountNo or
UserID parameter, ex. "GET /User/Profile?AccountNo=172". Data on other user accounts is subject to the user's privacy settings.
Modifying Information - PUT Operations
In order to modify or insert data into the user account, an HTTP PUT request should be generated, targeted on the resource to be altered. The response will indicate successful update or failure by returning the appropriate data or error message. Not every operation is supported by every caller via this API. For instance, we won't allow users to add any kind of shells to their account. Also user information can only be changed by the particular user (using their UserID and password to authenticate the message).
NOTE: All PUT operations require a successfully authenticated request.
Sample PUT Request
PUT /User/ContactInformation HTTP/1.0
Authorization: GPAPI cbscribe:7VBlglEAtqiZ1dRiOuoD5YhVE+ECB-
Content-Type: text/html
Date: Sun, 25 Jun 2006 09:49:44 GMT
X-GP-DevToken: 44CF9590006BF252F707
X-GP-ID: cbscribe
<UserContactInformationRequest>
<Phone>+82-10-9624-7006</Phone>
</UserContactInformationRequest>
Examples
To retrieve information about a particular GoPets user, use the GET operation on the User URI.
Sample Request
GET /User/Pets HTTP/1.0
Authorization: GPAPI 15B4D3461F177624206A:J3dZMRrvG+00yAeI3zNev33KH8g=
Content-Type: text/html
Date: Sun, 26 Jun 2006 07:13:49 GMT
X-GP-DevToken: 44CF9590006BF252F707
X-GP-ID: cbscribe
Sample Response
HTTP/1.1 200 OK
x-gp-request-id: kWKN9dJip1L
x-gp-api-version: 20060620
Date: Sun, 26 Jun 2006 07:13:49 GMT
Content-Type: application/xml
Content-Length: 302
Connection: close
Server: GPAPI
<?xml version="1.0" encoding="UTF-8"?>
<UserPetsResult>
<Pet>
<PetNo>10718</PetNo>
<Name>Machka</PetName>
<Breed>Cat</Breed>
<Gender>Female</Gender>
<PetPictureNo>10718_1</PetPictureNo>
<PetPictureURL>http://iku.gopetslive.com/PetPortrait/PetPortrait_10718_1.jpg</PetPictureURL>
</Pet>
<Pet>
<PetNo>654798</PetNo>
<Name>Pasha</PetName>
<Breed>Dog</Breed>
<Gender>Male</Gender>
<PetPictureNo>654798_1</PetPictureNo>
<PetPictureURL>http://iku.gopetslive.com/PetPortrait/PetPortrait_654798_1.jpg</PetPictureURL>
</Pet>
<Pet>
<PetNo>987354</PetNo>
<Name>Spot</PetName>
<Breed>Cat</Breed>
<Gender>Male</Gender>
<PetPictureNo>987354_1</PetPictureNo>
<PetPictureURL>http://iku.gopetslive.com/PetPortrait/PetPortrait_987354_1.jpg</PetPictureURL>
</Pet>
</UserPetsResult>
Back to
APIDraft
to top