Making a Request
The below example will walk you through making a GET request using Tulip’s Core API.
Prerequisites for making a request with Postman
We will use Postman in this example as an HTTP client that facilitates making CRUD (Create, Read, Update, Delete) requests on Tulip entities. To make a request with Postman on a Tulip entity, you will need 3 things:
- The Postman application
- An API key or OAuth 2.0 Token. You can follow the authentication page to obtain this. For this example, we will use an API key.
- The core API endpoints and Tulip environment you will be using. You can download the spec for the full set of currently supported endpoints by clicking
Download OpenAPI spec
at the top of this page.
Walkthrough - setting up your first request using Postman
Begin by downloading the core API spec at the top of this page.
Open the import the spec into Postman
Once imported, you can expand the collection to explore the available request endpoints.
You’ll notice the collection includes placeholders for the bearer token and the baseURL for your environment. To get up and running, we’ll need to assign those placeholders to use the appropriate values for your tenant (the tenant you’ve been set up with in Tulip). To do this, we will set up an environment.
In postman, click the
Environment
button on the left panel.Click the
+
button to create a new environment.Set your environment name.
Create environment variables for
bearerToken
andbaseUrl
:- The
bearerToken
is the token retrieved from Admin Console under Integrations -> API keys. You can find instructions on how to retrieve that token here. Add an entry forbearerToken
in your environment variables and paste the token retrieved from Admin Console into the initial value section. It should autopopulate the Current Value. - The
baseUrl
is derived from the URL displayed near the top of this page. If you are on the staging server, your URL base URL is https://tulip-staging-{tenant}.tulipretail.com/api/{version}, whereas if you are on the production server, your base URL is https://tulip-prod-{region}-{tenant}.tulipretail.com/api/{version} (where region is one of the available Tulip server regions such asna
,eu
,de
, orcn
). The version is the version you choose to use for your integration (typically the most recent release)*. For instance, if your tenant was calledmystore
and you were testing in the staging environment on version2022-08
, yourbaseUrl
would behttps://tulip-staging-mystore.tulipretail.com/api/2022-08
. If you were based on an environment running from the eu, once you move to production yourbaseUrl
would be https://tulip-prod-{region}-{tenant}.tulipretail.com/api/{version}. To make sure you are using thebaseURL
, you can use the dropdowns here to populate it appropriately.
- The
Save the environment variables.
Select your newly created environment from the environment picker on the top right
Return to your collection by selecting the
Collections
button on the left panel.Click the topmost folder
Tulip Core API
and clickAuthorization
.Hover over
{{bearerToken}}
and verify that you see it populated.For this example, we will try to get a list of customers. Click
customers
->Get all customers
.Hover over
baseUrl
and verify that it is populatedMake sure the params submenu is selected.
Update the
expand
parameter. For this exercise, we will expand all, so replace<string>
withall
.Next, we’ll uncheck the query param to make it more likely that we retrieve customers in our initial test.
Finally, we’ll click Send. This should retrieve a paginated list of customers.