Quick start
Use the Partner API to get details for their own sales units and merchants. In addition, you can order products on behalf of your merchants.
Be aware that these are running on the production server.
Postman
Prerequisites
Review Quick start guides for information about getting your test environment set up.
Step 1: Get the Postman collection and environment
Save the following files to your computer:
Step 2: Import the Postman files
- In Postman, click Import in the upper-left corner.
- In the dialog that opens, with File selected, click Upload Files.
- Select the two files you have just downloaded and click Import.
Step 3: Set up Postman environment
Important: Partner keys must be kept secret. They can be used to act on behalf of all the partner's merchants. It is the partner's responsibility to manage the partner keys securely. See Partner keys.
Click the down arrow, next to the "eye" icon in the top-right corner, and select the environment you have imported.
Click the "eye" icon and, in the dropdown window, click
Edit
in the top-right corner.Fill in the
Current Value
for the following fields to get started.client-id
- Partner key is required for getting the access token.client-secret
- Partner key is required for getting the access token.Ocp-Apim-Subscription-Key
- Partner subscription key is required for all requests.merchantSerialNumber
- Merchant ID is only required forGet sales unit details based on MSN
, but can be included in all headers.orgno
-The Organization number for the merchant. It is only used inGet merchant by organization number
.base_url_production
- Set to:https://api.vipps.no
.
The Partner API only works in the production environment, so
base_url
is set toapi.vipps.no
.
Make API calls
Be aware that these are running on the production server.
Here is a proposed order of steps, but you can send most of these requests independently of each other. See the API reference for details about the calls.
Get sales unit by Merchant Serial Number
Send request
Get Access Token
. This provides you with access to the API. Be sure to use the address to the production server and provide keys for a production sales unit.Send request
Get sales unit details based on MSN
. This returns a JSON structure with the details, including the org number. If necessary, updateorgno
in the environment. SeeGET:v0/salesunits/:msn/
.
Get merchant by organization number
- Send request
Get merchant by organization number
for details about the merchant. SeeGET:v0/merchants/:orgno
.
Order products on behalf of merchants
- Review the
Order products on behalf of merchants
to see an example of ordering products. Since this is running on the production server, you might not want to run it. SeePOST:v0/products/orders
.