Upload an SSE

Before you upload a server-side extension to Commerce, be sure to remove any unneeded modules from the node_modules folder. You should include only the modules that the application requires.

To upload an extension to Commerce, you must first obtain an application key and use it to log into the Admin REST API. For example:

POST /ccadmin/v1/login  HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Authorization: Bearer <application_key>

grant_type=client_credentials

Commerce returns a bearer token, which you supply with subsequent requests.

Now use the POST /ccadmin/v1/serverExtensions endpoint to upload the extension:

POST /ccadmin/v1/serverExtensions  HTTP/1.1
Content-Type: multipart/form-data
Authorization: Bearer <access_token>

filename: <extension_name>.zip
uploadType: extensions
force: true
fileUpload: <open_handle_to_extension_file>