Create an extension
post
/ccadmin/v1/extensions
Note:This endpoint is intended for extensions that have just been uploaded and never previously activiated. It validates and processes a previously uploaded extension file. The file must have been uploaded previously using the /ccadmin/v1/files endpoint.
An ExtensionID must also have be created before uploading the extension and copied into the extension manifest file.
See Create an Extension for more information on extensions.
Sample Request:
POST /ccadmin/v1/extensions
Request
Supported Media Types
- application/json
Root Schema : createExtension_request
Type:
Show Source
object
-
name:
string
The name of the previously uploaded extension.
Example:
POST /ccadmin/v1/extensions
Response
Supported Media Types
- application/json
200 Response
Returned when the operation succeeds.
Root Schema : createExtension_response
Type:
Show Source
object
-
errors(optional):
string
An array of strings containing explanations of the errors that caused the server to not accept the extension.
-
success(optional):
boolean
True if the extension was successfully processed.
-
warnings(optional):
string
An array of strings. You can get warnings even if the extension was successfully processed.
Example Response (application/json)
{
"success":true,
"warnings":[
],
"error":[
]
}
400 Response
Returned when the extension contains an error.
Root Schema : createExtension_400response
Type:
Show Source
object
-
errorCode(optional):
string
The error code
-
message(optional):
string
The localized message describing the error
-
status(optional):
string
HTTP status code
Example Response (application/json)
{
"message":"HTTP 400 Bad Request",
"type":"HTTP://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4",
"status":"400"
}
401 Response
Returned if the user is not authenticated
Root Schema : createExtension_401response
Type:
Show Source
object
-
errorCode(optional):
string
The error code
-
message(optional):
string
The localized message describing the error
-
status(optional):
string
HTTP status code
Example Response (application/json)
{
"errorCode":"00001000",
"message":"The user is not authenticated",
"status":"401"
}
404 Response
Returned if the source extension is not found.
Root Schema : createExtension_404response
Type:
Show Source
object
-
errorCode(optional):
string
The error code
-
message(optional):
string
The localized message describing the error
-
status(optional):
string
HTTP status code
Example Response (application/json)
{
"message":"HTTP 404 not found",
"type":"HTTP://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4",
"status":"404"
}
500 Response
Returned if an internal error occurs in the endpoint.
Root Schema : createExtension_500response
Type:
Show Source
object
-
errorCode(optional):
string
The Commerce error code. See the table below for information on common codes.
-
message(optional):
string
The localized message describing the error
-
status(optional):
string
HTTP status code
Example Response (application/json)
{
"errorCode":"000000000",
"message":"Internal Error",
"status":"500"
}
Default Response
The following internal error codes are thrown by this API when the request fails in Commerce:
The error response:
Error Code | Description | Possible Fix |
---|---|---|
91004 | Extension internal error | See error messages for further information. |
20307 | File not found | Ensure that the extension file has been uploaded. |
The error response:
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