person_contact

This class provides RESTful services to get contact details, register a person as a member, and update a member.

Note: This REST API does not support pagination.

Handler Class:

com.ibm.commerce.rest.member.handler.PersonContactHandler

Method Summary

HTTP MethodPathDescription
GET/store/{storeId}/person/@self/contactGets the contacts in a person's address book. If the addressType optional query parameter is passed in, the returned contacts are filtered by addressType.
GET/store/{storeId}/person/@self/contact/{nickName}Gets a person contact by nick name.
GET/store/{storeId}/person/@self/contact/byAddressId/{addressId}Gets a person contact by address ID.
POST/store/{storeId}/person/@self/contactCreates a new contact in a person's address book.
PUT/store/{storeId}/person/@self/contact/{nickName}Updates the contact in the address book identified by nickName.
DELETE/store/{storeId}/person/@self/contact/{nickName}Deletes the contact in the address book identified by nickName.

Method Details

GET /store/{storeId}/person/@self/contact

Gets the contacts in a person's address book. If the addressType optional query parameter is passed in, the returned contacts are filtered by addressType.

Handler Method:

getAllPersonContact

Secure Call Mandatory:

true

Partial Authentication Allowed:

false

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
addressTypeThe address type.querystringfalsefalse
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

person-contact

GET /store/{storeId}/person/@self/contact/{nickName}

Gets a person contact by nick name.

Handler Method:

findPersonContactByNickName

Secure Call Mandatory:

true

Partial Authentication Allowed:

false

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
nickNameThe contact name saved in addressBook by registered shopper.pathstringtrueN/A
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
404The specified resource couldn't be found.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

person-singleContact

GET /store/{storeId}/person/@self/contact/byAddressId/{addressId}

Gets a person contact by address ID.

Handler Method:

findPersonContactById

Secure Call Mandatory:

true

Partial Authentication Allowed:

false

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
addressIdThe address identifier.pathstringtrueN/A
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
404The specified resource couldn't be found.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

person-singleContact

POST /store/{storeId}/person/@self/contact

Creates a new contact in a person's address book.

Handler Method:

addPersonContact

Secure Call Mandatory:

true

Partial Authentication Allowed:

false

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
bodyRequest body.bodyperson-contactfalseN/A
HTTP Status Codes:
HTTP Status CodeDescription
201The requested resource has been created.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

com.ibm.commerce.rest.member.handler.PersonContactHandler$UserIdentifier

PUT /store/{storeId}/person/@self/contact/{nickName}

Updates the contact in the address book identified by nickName.

Handler Method:

updatePersonContact

Secure Call Mandatory:

true

Partial Authentication Allowed:

false

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
nickNameThe contact name saved in addressBook by registered shopper.pathstringtrueN/A
bodyRequest body.bodyperson-contactfalseN/A
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
404The specified resource couldn't be found.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

com.ibm.commerce.rest.member.handler.PersonContactHandler$AddressIdentifier

DELETE /store/{storeId}/person/@self/contact/{nickName}

Deletes the contact in the address book identified by nickName.

Handler Method:

deletePersonContact

Secure Call Mandatory:

true

Partial Authentication Allowed:

false

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
nickNameThe contact name saved in addressBook by registered shopper.pathstringtrueN/A
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
404The specified resource couldn't be found.
500Internal server error. Additional details will be contained on the server logs.

Data Type Details

com.ibm.commerce.foundation.common.datatypes.OrganizationIdentifierType

Properties:
NameData TypeRequired
uniqueIDstringfalse
distinguishedNamestringfalse

com.ibm.commerce.foundation.common.datatypes.PersonIdentifierType

Properties:
NameData TypeRequired
externalIdentifiercom.ibm.commerce.foundation.common.datatypes.PersonIdentifierType.externalIdentifierfalse
uniqueIDstringfalse
distinguishedNamestringfalse

com.ibm.commerce.foundation.common.datatypes.PersonIdentifierType.externalIdentifier

Properties:
NameData TypeRequired
identifierstringfalse

com.ibm.commerce.rest.member.handler.PersonContactHandler$AddressIdentifier

Address identitifier.

Properties:
NameData TypeRequired
addressIdstringtrue

com.ibm.commerce.rest.member.handler.PersonContactHandler$UserIdentifier

User identitifier.

Properties:
NameData TypeRequired
userIdstringtrue

java.util.Map$Entry

Properties:
NameData TypeRequired
valuestringfalse
keystringtrue

person-contact

Properties:
NameData TypeRequired
contactperson-contact.contact arraytrue
userIdstringfalse
addressIdstringfalse

person-contact.contact

Properties:
NameData TypeRequired
middleNamestringfalse
lastNamestringfalse
organizationUnitNamestringfalse
primarystringfalse
personTitlestringfalse
phone1stringtrue
phone2stringtrue
mobilePhone1stringtrue
addressLinestring arrayfalse
phone1Publishstringfalse
nickNamestringtrue
addressTypestringfalse
mobilePhone1Countrystringtrue
statestringfalse
email1stringtrue
email2stringtrue
countrystringfalse
attributesjava.util.Map$Entry arrayfalse
languagestringfalse
internalOfficeAddressstringfalse
firstNamestringfalse
phone1Typestringfalse
organizationNamestringfalse
phone2Typestringfalse
personIdentifiercom.ibm.commerce.foundation.common.datatypes.PersonIdentifierTypefalse
userDataFieldperson-contact.contact.userDataField arrayfalse
citystringfalse
phone2Publishstringfalse
bestCallingTimestringfalse
zipCodestringfalse
addressIdstringfalse
fax1stringtrue
fax2stringtrue
geographicalTaxCodestringfalse
businessTitlestringfalse
organizationIdentifiercom.ibm.commerce.foundation.common.datatypes.OrganizationIdentifierTypefalse
geographicalShippingCodestringfalse

person-contact.contact.userDataField

Properties:
NameData TypeRequired
valuestringfalse
keystringtrue

person-singleContact

Properties:
NameData TypeRequired
middleNamestringfalse
lastNamestringfalse
organizationUnitNamestringfalse
primarystringfalse
personTitlestringfalse
phone1stringtrue
phone2stringtrue
mobilePhone1stringtrue
addressLinestring arrayfalse
phone1Publishstringfalse
nickNamestringtrue
addressTypestringfalse
mobilePhone1Countrystringtrue
statestringfalse
email1stringtrue
email2stringtrue
countrystringfalse
attributesjava.util.Map$Entry arrayfalse
languagestringfalse
internalOfficeAddressstringfalse
firstNamestringfalse
phone1Typestringfalse
phone2Typestringfalse
organizationNamestringfalse
personIdentifiercom.ibm.commerce.foundation.common.datatypes.PersonIdentifierTypefalse
userDataFieldperson-singleContact.userDataField arrayfalse
phone2Publishstringfalse
citystringfalse
bestCallingTimestringfalse
zipCodestringfalse
addressIdstringfalse
fax1stringtrue
fax2stringtrue
geographicalTaxCodestringfalse
businessTitlestringfalse
organizationIdentifiercom.ibm.commerce.foundation.common.datatypes.OrganizationIdentifierTypefalse
geographicalShippingCodestringfalse

person-singleContact.userDataField

Properties:
NameData TypeRequired
valuestringfalse
keystringtrue