Update/Create Company User

put

/rest/v16/companies/{companyName}/users/{userName}

This operation replaces the details of an existing user or creates a new user. If the Request URI references an existing user, the existing user details are replaced with an updated version of the user details. If the Request URI references a user that does not already exist, a new user is created. Note: CPQ is standardizing v13 REST APIs with the PUT method. Beginning in v13, any parameters that are not explicitly included in the request body will be set to the default value, including 'isAccessAdminPremEnabled' and 'isWebServicesOnly' properties. If you are not sending all parameters in the request to update a user, you should use the PATCH method to avoid clearing unspecified properties.

Request

Supported Media Types
Path Parameters
Body ()
Root Schema : User request model
Type: object
Title: User request model
Request for creating a user
Show Source
Nested Schema : Email
Type: array
Title: Email
Email of the User
Show Source
Nested Schema : enterpriseUser
Type: object
Show Source
Nested Schema : extensionUser
Type: object
Show Source
Nested Schema : Name
Type: object
Title: Name
Full name of the user
Show Source
Nested Schema : Phone Numbers
Type: array
Title: Phone Numbers
Phone numbers of the User
Show Source
Nested Schema : email
Type: object
Show Source
Nested Schema : addresses
Type: array
Show Source
Nested Schema : address
Type: object
Show Source
Nested Schema : Shipping/Billing Full name
Type: object
Title: Shipping/Billing Full name
Shipping/Billing Full name
Show Source
Nested Schema : phoneNumber
Type: object
Show Source
Back to Top

Response

Supported Media Types

Default Response

Updated User details
Body ()
Root Schema : user
Type: object
Show Source
Nested Schema : Access Permissions
Type: object
Title: Access Permissions
Access Permissions of a user
Show Source
Nested Schema : Company details
Type: object
Title: Company details
User Company details. Applicable only for Users Across Companies
Show Source
Nested Schema : Currency
Type: object
Title: Currency
Currency preference of user. Value holds currency code
Show Source
Nested Schema : Date Format
Type: object
Title: Date Format
User preferred date time format
Show Source
Nested Schema : Enabled For SSO
Type: object
Title: Enabled For SSO
Enabled For SSO
Show Source
Nested Schema : Groups
Type: object
Title: Groups
Groups to which the user belongs
Show Source
Nested Schema : Language
Type: object
Title: Language
Language preference of user. Value holds language code
Show Source
Nested Schema : Number Format
Type: object
Title: Number Format
Preferred number format of user
Show Source
Nested Schema : Status
Type: object
Title: Status
Status of the user
Show Source
Nested Schema : TimeZone of user
Type: object
Title: TimeZone of user
User preferred timezone
Show Source
Nested Schema : Type
Type: object
Title: Type
Type of the user
Show Source
Nested Schema : Units
Type: object
Title: Units
User preferred units
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : Access Permission
Type: object
Title: Access Permission
User access bits information
Show Source
  • Title: Has Access
    Boolean attribute that indicates if a user has access to the restricted entity.
  • Title: Restricted Entity Name
    Name of the entity to which access restrictions apply
  • Title: Type
    Type of the restricted entity. Possible values productFamily, supportedProductFamily and dataTableFolder
  • Title: Restricted Entity Variable Name
    Variable name of the entity to which access restrictions apply
Nested Schema : items
Type: array
Show Source
Nested Schema : Group
Type: object
Title: Group
User group information
Show Source
Back to Top

Examples

Note: CPQ is standardizing v12 REST APIs with the PUT method. Beginning in v12, any parameters that are not explicitly included in the request body will be set to the default value, including "isAccessAdminPremEnabled" and "isWebServicesOnly" properties. If you are not sending all parameters in the request to update a user, you should use the PATCH method to avoid clearing unspecified properties.

This operation replaces the details of an existing user or creates a new user. If the Request URI references an existing user, the existing user details are replaced with an updated version of the user details. If the Request URI references a user that does not already exist, a new user is created. Submit a PUT request to the REST resource using cURL to perform this operation For more information about cURL, see Use cURL.

curl - X PUT - i - H "Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQg" - H "Content-type: application/json"
https://sitename.oracle.com/rest/v16/companies/abcCo/users/janedoe

Request Body Sample

{
  "login": "janedoe",
  "firstName": "Jane",
  "lastName": "Doe",
  "jobTitle": "Developer",
  "email": "jane.doe@abcCo.com",
  "phone": "9999999999",
  "fax": "9999999999",
  "billLastName": "Bill Last Name",
  "billCompany": "Bill Company",
  "billCompany2": "Bill Company 2",
  "billAddress1": "Address1",
  "billAddress2": "Address2",
  "billCity": "City",
  "billStateProvince": "Illinois",
  "billZip": "23434",
  "billCountry": "United States",
  "billPhone": "457657657",
  "billFax": "657657",
  "billEmail": "billing@abcCo.com",
  "shipFirstName": "Super",
  "shipLastName": "User",
  "shipCompany": "B",
  "shipCompany2": "B",
  "shipAddress1": "Address",
  "shipAddress2": "Address",
  "shipCity": "City",
  "shipStateProvince": "California",
  "shipZip": "345435",
  "shipCountry": "United States",
  "shipPhone": "345435",
  "shipFax": "235435",
  "shipEmail": "shipping@abcCo.com",
  "partnerLogin": null,
  "separateShipAddr": false,
  "isNotifyEmail": true,
  "isNotifyFax": false,
  "type": {
    "value": "RESTRICTED_ACCESS",
    "displayValue": "RestrictedAccess"
  },
  "language": {
    "value": "en_US",
    "displayValue": "English"
  },
  "currency": {
    "value": "USD",
    "displayValue": "US Dollar"
  },
  "numberFormat": {
    "value": 1,
    "displayValue": "####,##"
  },
  "timeZone": {
    "value": "America/Los_Angeles",
    "displayValue": "(GMT-8:00 GMT-7:00) Los Angeles"
  },
  "dateFormat": {
    "value": 16,
    "displayValue": "dd/MM/yyyy h:mm a"
  },
  "status": {
    "value": 1,
    "displayValue": "Active"
  },
  "enabledForSso": {
    "value": "SSO_ENABLED",
    "displayValue": "Enabled for SSO"
  }
}
Back to Top