Getting Started
...
UpStart Commerce APIs
Management APIs
API Key
19min
this section explains the process of generating an api key through both our upstart commerce portal ui and apis generate an api key through the upstart commerce portal to interact and integrate with our management apis, the first step is to create an api key follow the steps below to generate an api key through the upstart commerce portal step 1 log in to the upstart commerce portal access the upstart commerce portal and log in using your credentials (login and password) if you are not registered, follow this link to create your sandbox account step 2 access user details after successfully logging in, locate your username in the top right corner click on the "details" button you will be directed to the "user management" page step 3 generate an api key scroll down to the " api key " section on the page and click on the "generate key" button to initiate the key generation process step 4 fill in api key details add a unique "key name" for your api and set the "expiration date", as required click on the "generate key" button to proceed step 5 copy api key upon successful generation, the form will display your key code click on the "copy key and close" button to copy the api key code to your clipboard important copy and save your api key value, as it cannot be recovered and will no longer be available once you navigate away from the page step 6 utilize your api key once the api key is successfully generated, you can utilize it to perform various operations and integrations within the upstart commerce platform to understand the process of making an api call by using an api key, please refer to api key docid\ bzhmb qiyhszicddadkh1 generate an api key through our apis step 1 create an account on the upstart commerce portal to initiate the api key generation process, you must first have an account on the upstart commerce portal if you have not registered yet, create an account by visiting this link step 2 obtain tenant id and session id for authorization, you will require two parameters tenant id and session id tenant id you can create a tenant id by visiting this link , or you can request the upstart commerce support team to create it for you after successfully creating a tenant id, set your specified {{tenant header field name}} in the header authorization field session id you can generate a session id by simply copying the curl below and executing it in a terminal or command prompt request curl location 'https //nochannel test 1 api nochannel test upstart team/v1/user/session login' \\ \ header 'content type application/json' \\ \ header 'cache control no cache' \\ \ header 'x upstart tenant \<your tenantid>' \\ \ data { "login" "test", "tenant" "\<your tenantid>", "password" "\<your password>" } for more information, go to the obtain session id endpoint example request response { "sessionid" "\<your sessionid>" } note for authorization, you will need two parameters tenant id and session id ensure to securely store these values for further api interactions step 3 generate api key copy the curl command below to generate an api key replace {{tenant header field name}} and {{sessionid header field name}} with the specific values obtained in step 2 request curl location 'https //nochannel test 1 api nochannel test upstart team/v1/user/profile/api keys' \\ \ header 'content type application/json' \\ \ header 'cache control no cache' \\ \ header 'x upstart tenant \<your tenantid>' \\ \ header 'x upstart session id \<session id obtained from step 2>' \\ \ data { "name" "test22", "validto" "2036 12 17t00 00 00 000z" } for more information, go to the create new api key endpoint example request step 4 check the status code upon making an api key creation request, it responds with a status code indicating the outcome success (http 200) the server has successfully processed your request error responses http 401 the server was unable to process the request check and ensure that the provided credentials are valid http 403 the request contains valid credentials, but the user's roles may be insufficient or the credentials may be expired step 5 api key generated successfully after executing the curl above, you have successfully generated an api key the response includes {{apikey field name}} and {{apikeyid field name}} for specific api identification, and {{date field name}} to check the expiration date of the api key once generated, you can invoke this api key to start exploring and testing our management apis response { "apikey" "\<your apikey>", "apikeyid" "\<your apikeyid>", "validto" "2036 01 17t00 00 00z" } important to further interact with our apis, utilize the apikey and apikeyid provided in the response by following these steps, you can generate an api key through our apis , ensuring secure and authorized access to upstart commerce management apis how to use an api key once the api key is generated, you can use it in the header of the api request within the authorization field this step is crucial for authenticating and accessing management apis header key {{apikey header field name}} header value \<your apikey> example api request to use an api key, replace your apikey in the authorization header with the actual value of the api key obtained from the response in step 5 make your first api call with an api key to make your first call by using an api key, you need to add your api key and tenant id (created above) in the request header by using the curl below request curl location 'https //nochannel test 1 api nochannel test upstart team/v1/user/list' \\ \ header 'x upstart tenant \<your tenantid>' \\ \ header 'accept application/json' \\ \ header 'x upstart api key \<your apikey>' replace \<your tenantid> with the tenant id of your instance and \<your apikey> with the corresponding value of your api key to execute this api you should have a "portals users management" role for more information, go to the get users by tenant id example request response \[ { "id" "id", "login" " username", "name" "name", "userroles" { "\<tenantid>" { "roleids" \[ "tenant admin" ], "sites" { "\<siteid>" { "roleids" \[] } } } }, "tenant" "\<tenantid>", "emailaddress" "emailaddress\@example com", "registrationdate" "2023 10 20t15 49 37 738p", "lock" false, "system" true }, { "id" "id", "login" "username", "name" "name", "userroles" { "\<tenantid>" { "roleids" \[ "portal order mgmt", "portal qa mgmt", "portal customers mgmt", "portal promotions mgmt", "portal inventory mgmt", "portal ratings mgmt", "portal data capture mgmt", "portal data feed mgmt", "portal default", "portal shipping carrier mgmt", "portal cart mgmt", "portal wishlist mgmt", "portal clotho mgmt", "portal pim mgmt", "portal users mgmt", "portal catalog mgmt", "portal quotes mgmt", "portal return policy mgmt", "portal locations mgmt", "portal finance offers mgmt", "portal analytics mgmt", "portal configurations mgmt", "portal pricing feed mgmt" ], "sites" { "\<siteid>" { "roleids" \[] } } } }, "tenant" "\<tenantid>", "emailaddress" "emailaddress\@example com", "registrationdate" "2024 12 1234 09 42 300p", "lock" false, "system" false }, { "id" "id", "login" "username", "name" "name", "userroles" { "\<tenantid>" { "roleids" \[ "portal locations mgmt", "portal default" ], "sites" { "\<siteid>" { "roleids" \[] } } } }, "tenant" "\<tenantid>", "emailaddress" "emailaddress\@example com", "registrationdate" "2023 11 21t16 30 38 131z", "lock" false, "system" false } ] upon successfully receiving the response for the get users by tenant id request, you have completed your first upstart commerce management api call, using an api key