generateOAuthToken
post
/ccadmin/v1/token
Generates the oAuth token for the profile/organization(for the respective punchout profile) provided.
Request
Supported Media Types
- application/json
Query Parameters
-
requestType(optional): string
Request type of the endpoint. Only possible value is punchout. By default requestType is for purchase order if didn't passed.
Root Schema : generateOAuthToken_request
Type:
Show Source
object
-
organizationId(optional):
string
Organization Id.
-
profileId(optional):
string
Profile Id.
Example:
{
"organizationId":"or-100001",
"profileId":"bb-110000"
}
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : generateOAuthToken_response
Type:
Show Source
object
-
status(optional):
string
Status code.
-
token(optional):
string
OAuth token.
Example Response (application/json)
{
"token":"eyJhbGciOiJSUzI1NiIsImprdSI6IjVkYmQyZTRhIiwia2lkIjpudWxsLCJ4NWMiOm51bGwsIng1dSI6Imh0dHA6Ly9QREFCUkFIQS1JTjo5MDgwL2NjYWRtaW4vdjEvdGVuYW50Q2VydENoYWluIn0=.eyJpYXQiOjE1MjIzMjM0MjIsImV4cCI6MTUyMjMyNDMyMiwic3ViIjoibHBhcHJvY2tpQGV4YW1wbGUuY29tIiwiYXVkIjoic3RvcmVmcm9udFVJIiwiY29tLm9yYWNsZS5hdGcuY2xvdWQuY29tbWVyY2Uucm9sZXMiOm51bGwsIm9jY3MuYWRtaW4ucm9sZXMiOm51bGwsImlzcyI6Imh0dHA6Ly9QREFCUkFIQS1JTjo5MDgwL29jY3MtYWRtaW4iLCJvY2NzLmFkbWluLmxvY2FsZSI6ImVuIiwib2Njcy5hZG1pbi50eiI6bnVsbCwib2Njcy5hZG1pbi50ZW5hbnRUeiI6IkV0Yy9VVEMiLCJvY2NzLmFkbWluLmtlZXBBbGl2ZVVSTCI6Imh0dHA6Ly9QREFCUkFIQS1JTjo5MDgwL2tlZXBhbGl2ZSIsIm9jY3MuYWRtaW4udG9rZW5SZWZyZXNoVVJMIjoiaHR0cDovL1BEQUJSQUhBLUlOOjkwODAvY2NhZG1pbi92MS9zc29Ub2tlbnMvcmVmcmVzaCIsIm9jY3MuYWRtaW4udmVyc2lvbiI6IjE4LjEtU05BUFNIT1QiLCJvY2NzLmFkbWluLmJ1aWxkIjoiTE9DQUwiLCJvY2NzLmFkbWluLmVtYWlsIjoibHBhcHJvY2tpQGV4YW1wbGUuY29tIiwib2Njcy5hZG1pbi5wcm9maWxlSWQiOiJiYi0xMTAwMDAiLCJvY2NzLmFnZW50Lm9ibyI6bnVsbCwib2Njcy5hZG1pbi5maXJzdE5hbWUiOiJMZW5uYSIsIm9jY3MuYWRtaW4ubGFzdE5hbWUiOiJQYXByb2NraSIsIm9jY3MuYWRtaW4ucHVuY2hvdXRBY2Nlc3MiOnRydWV9.nhTDxFVIRd5M+g3wuDpHLJeGLzX8kPq0d7n9iLrcg51yOjc0mKpLwFJvNTvZkV6/1JdLP0UR3+7MT0sk8gz/t1DCusGiWX3Cqm1gyKxbsPCKjtQeyN6BISJNWAMxX+PU7PiHkJHbovTOi/Bqi1MNnEcTPlRZMdeHCRFeIkNVV7/rQEDSCp6X5grjiFhPhZ0B8uq/BXAO6pt8DoJ7FILp+ranXwY2KK/Zy4zNnJhYWVPiNT3FofehuJk5pG108bgg5lJ5GtrcTcNNp3jt6/1Kgpm69/2RtDpQFKVgNFvba8RNDpTgjNz1oUqIZL+txahQXxNiBfxXxGXTMhIztKb5ew==",
"status":"200"
}
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|
|------------------|------------------|
|181000|If the input is null or Both profile or organization values are null|
|181001|If provided user is not available|
|181002|If requested for profiles other than b2b profiles|
|181003|If punchout is not enabled for the requested organization|
|181004|If the requested user is in-active|
|181005|If the provided user is not associated with the given organization|
|181006|If provided organization is not active|
Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
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(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code