getMember
get
/ccagent/v1/organizationMembers/{id}
Get Member. This operation is used to get the profile information of a customer that is associated to an account from Oracle Commerce Cloud. Takes X-CCAgentContext header which is a JSON object with 'shopperProfileId' as a property. If 'shopperProfileId' is not provided, it is considered as an anonymous profile. Optionally takes the x-ccasset-language header to get translated content in another language. Also it takes X-CCOrganization header which is a JSON field with organization ID as value. If this header is not provided, then the endPoint will consider first active organization as the current organization. This endpoint is different from getProfile endpoint. Certain additional details like hasIncompleteOrder property, etc which are necessary for creating or editing orders are returned by getProfile endpoint, whereas only profile and account specific details are returned by getMember endpoint.
Request
Supported Media Types
- application/json
Path Parameters
-
id(required): string
The ID of the requested shopper profile.
Query Parameters
-
includedRoles: string
This field determines if only organizational roles or all roles are to be returned for the member. Default value is 'organizationalRolesForCurrentOrganization'. Possible values are 'organizationalRolesForCurrentOrganization', 'allRolesForCurrentOrganization'.
Header Parameters
-
X-CCAgentContext(required): string
The Agent Context is a JSON object with shopperProfileId as a property.
-
X-CCAsset-Language: string
The asset language of the request. E.g., en,de,fr_CA.
-
X-CCOrganization: string
The organization Id associated with the shopper profile
-
X-CCSite: string
The site Id to retrieve the site specific shopper profile properties
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : getMember_response
Type:
Show Source
object
-
active:
boolean
This is active status of the profile should be true or false.
-
customerContactId:
string
The external customer contact id.
-
dynamicProperties:
array dynamicProperties
List of dynamic properties associated with profile along with meta-data.
-
email:
string
The email address of the profile.
-
firstName:
string
The first name of the profile.
-
GDPRProfileP13nConsentDate:
string
The date on which GDPR personalization consent was granted by the user.
-
GDPRProfileP13nConsentGranted:
boolean
Indicates whether the user has given GDPR Profile P13n consent on the current site. Can be true or false.
-
id:
string
The ID of the shopper profile.
-
lastName:
string
The last name of the profile.
-
locale:
string
The locale of the request/response.
-
orderPriceLimit:
string
The order pricelimit for the organization
-
parentOrganization:
object parentOrganization
This attribute is added for 'Account-Based Commerce', this is required only in case of 'Account-Based Commerce', this is the id of organization to which user is associated
-
profileType:
string
This attribute is added for account-based commerce, It's value is 'b2b_user'.
-
receiveEmail:
string
Indicates whether the customer has opted for receiving marketing emails on the current site. Can be yes or no.
-
receiveEmailDate:
string
The date on which the customer opted for receiving marketing emails.
-
repositoryId:
string
The repository id of the profile.
-
roles:
array roles
List of user roles
-
secondaryOrganizations:
object secondaryOrganizations
This attribute is added for 'Account-Based Commerce', this is required only in case of 'Account-Based Commerce', this is the id of organization to which user is associated
Nested Schema : dynamicProperties
Type:
array
List of dynamic properties associated with profile along with meta-data.
Show Source
Nested Schema : parentOrganization
Type:
object
This attribute is added for 'Account-Based Commerce', this is required only in case of 'Account-Based Commerce', this is the id of organization to which user is associated
Show Source
-
active:
boolean
This is active status of the profile should be true or false.
-
approvalRequired:
boolean
The value if approval is needed for that organization
-
billingAddress:
object billingAddress
Default billing address of the organization
-
description:
string
Description of the Organization
-
externalOrganizationId:
string
External organization id
-
id:
string
The id of the parent organization
-
name:
string
The name of the parent organization
-
punchoutUserId:
string
Punchout user Id of organization, read only property.
-
repositoryId:
string
The id of the parent organization
-
shippingAddress:
object shippingAddress
Default shipping address of the organization
Nested Schema : secondaryOrganizations
Type:
object
This attribute is added for 'Account-Based Commerce', this is required only in case of 'Account-Based Commerce', this is the id of organization to which user is associated
Show Source
-
active:
boolean
This is active status of the profile should be true or false.
-
approvalRequired:
boolean
The value if approval is needed for that organization
-
billingAddress:
object billingAddress
Default billing address of the organization
-
description:
string
Description of the Organization
-
externalOrganizationId:
string
External organization id
-
id:
string
The id of the parent organization
-
name:
string
The name of the parent organization
-
repositoryId:
string
The id of the parent organization
-
shippingAddress:
object shippingAddress
Default shipping address of the organization
Nested Schema : items
Type:
Show Source
object
-
default:
boolean
default value of the property
-
id:
string
The ID of the dynamic property.
-
label:
string
UI label for the dynamic property.
-
length:
integer
length of type supported.
-
required:
boolean
If this is a required property.
-
type:
string
The type of the dynamic property. Supported types are boolean, date, float, string, timestamp, enumerated, big string.
-
uiEditorType:
string
The UI editor type
-
value:
string
The value of the dynamic property.
Nested Schema : billingAddress
Type:
object
Default billing address of the organization
Show Source
-
repositoryId:
string
The id of the billing address
Nested Schema : shippingAddress
Type:
object
Default shipping address of the organization
Show Source
-
repositoryId:
string
The id of the shipping address
Nested Schema : items
Type:
Show Source
object
-
associations:
array associations
Associations of the role with the organization member.
-
function:
string
The function of the role which can be admin or buyer.
-
id:
string
ID of the role
-
name:
string
Name of the role
-
relativeTo:
object relativeTo
Organization in which the role applies. Present only if type is organizationalRole
-
repositoryId:
string
The repository id of the role.
-
type:
string
Type of the role which can be organizationalRole or role
Nested Schema : associations
Type:
array
Associations of the role with the organization member.
Show Source
Nested Schema : relativeTo
Type:
object
Organization in which the role applies. Present only if type is organizationalRole
Show Source
-
id:
string
Organization ID
Nested Schema : items
Type:
Show Source
object
- relatedItemId: string
-
type:
string
Type of the association.Possible values are - organization,global.
Nested Schema : billingAddress
Type:
object
Default billing address of the organization
Show Source
-
repositoryId:
string
The id of the billing address
Nested Schema : shippingAddress
Type:
object
Default shipping address of the organization
Show Source
-
repositoryId:
string
The id of the shipping address
Example Response (application/json)
{
"lastName":"Blooming",
"GDPRProfileP13nConsentDate":"2018-03-23T09:02:31.955Z",
"GDPRProfileP13nConsentGranted":true,
"customerContactId":"CRMID_1",
"dynamicProperties":[
{
"uiEditorType":"shortText",
"default":"Field1",
"length":null,
"id":"field1",
"label":"Nickname",
"type":"string",
"value":"Field1",
"required":false
}
],
"roles":[
{
"associations":[
{
"relatedItemId":"or-100001",
"type":"organization"
}
],
"function":"admin",
"relativeTo":{
"id":"or-100001"
},
"repositoryId":"100001",
"name":"Admin",
"id":"100001",
"type":"organizationalRole"
},
{
"associations":[
{
"relatedItemId":"or-100001",
"type":"organization"
}
],
"function":"buyer",
"relativeTo":{
"id":"or-100001"
},
"repositoryId":"100002",
"name":"Buyer",
"id":"100002",
"type":"organizationalRole"
},
{
"associations":[
{
"relatedItemId":"or-100001",
"type":"organization"
}
],
"function":"buyer",
"relativeTo":{
"id":"or-100002"
},
"repositoryId":"100004",
"name":"Buyer",
"id":"100004",
"type":"organizationalRole"
}
],
"receiveEmail":"yes",
"active":true,
"locale":"en",
"parentOrganization":{
"approvalRequired":true,
"repositoryId":"or-100001",
"punchoutUserId":"100012",
"name":"National Discount Auto Parts",
"active":true,
"description":null,
"shippingAddress":{
"repositoryId":"ci-110024"
},
"secondaryAddresses":{
"Address2":{
"repositoryId":"ci-110024"
},
"Address1":{
"repositoryId":"ci-110023"
}
},
"billingAddress":{
"repositoryId":"ci-110024"
},
"id":"or-100001",
"externalOrganizationId":"EXT_ORG_1",
"orderPriceLimit":50
},
"receiveEmailDate":"2018-03-23T09:02:31.955Z",
"orderPriceLimit":50,
"firstName":"Ron",
"profileType":"b2b_user",
"repositoryId":"bb-110023",
"links":[
{
"rel":"self",
"href":"ccagent/v1/organizationMembers/bb-110023"
}
],
"id":"bb-110023",
"secondaryOrganizations":[
{
"approvalRequired":false,
"repositoryId":"or-100002",
"name":"US Motor Works, Inc.",
"active":true,
"description":"US Motor Works, Inc.",
"shippingAddress":{
"repositoryId":"ci-110029"
},
"secondaryAddresses":{
"Address1":{
"repositoryId":"ci-110029"
}
},
"billingAddress":{
"repositoryId":"ci-110029"
},
"id":"or-100002",
"externalOrganizationId":"EXT_ORG_1",
"orderPriceLimit":null
}
],
"email":"ron@example.com"
}
Default Response
The error response.
The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud:
|Error Code|Description|
|------------------|------------------|
|22010|If the profile id passed is not associated to the account of the profileId passed in the AgentContext header.|
|22000|If the profile id passed is null or empty|
|22001|If there was any internal error while getting the profile|
|22002|If there was no profile found with the given id|
|82005000|If there is an error while processing the AgentContext header. Possible reasons include invalid profileId, incorrect JSON format or other errors|
|89103|If no shopperProfileId is passed in the AgentContext header|
|89102|If the shopperProfile passed in the AgentContext header or the associated account is inactive|
|89101|If the shopperProfile passed in the AgentContext header is not an administrator for the account|
|22007|If the profile id passed is not associated to the account of the profileId passed in the AgentContext header.|
Root Schema : errorModel
Type:
Show Source
object
-
devMessage:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
errors:
array errors
An optional list of errors if multiple errors were encountered
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code
-
type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code