SaaShop Seller API is created for SaaS-companies that have joined the SaaShop marketplace as Sellers. The Sellers have their SaaS-product listed in the SaaShop Marketplace and available to be purchased by other companies or organizations.
The Seller is able to use the Seller API to get data of purchase events and provisioning actions required for the SaaS-product. This documentation describes how to use the SaaShop Marketplace Seller API.
If you have any questions, comments or feedback regarding the Seller API, please contact us at developer@saashop.com.
API includes the following key concepts
The seller needs to have products created, configured and published to the Marketplace. Seller has credentials to Seller Console where they have the ability to manage product catalog, services and buyers. If you are a Seller who needs to finalize product setup reach out to your contact person or partners@saashop.com for guidance.
You need an API key and secret to be able to authenticate to the Seller API. These are required and managed through the Seller Console. You can have multiple key/secret pairs if needed. There is no development environment available at this moment for the Seller API so all the authentication is to the production environment.
Login to Seller Console and navigate to ../integrations/saashop-clients
Click Add and fill name for API Client.
After a few seconds you will get Client Id and Client Secret which are used to create a token.
Save Client Id and Client Secret in a safe place. The Client Secret is only shown in the creation phase.
This ping endpoint can be used to check the status of the API without any authentication headers.
curl --location --request GET 'https://api.saashop.com/base/v1/ping'
Status 200 OK
{
"access": "public",
"date": "2022-04-29-11:58:13",
"stage": "prod",
"version": "v1"
}
Send ClientId:ClientSecret in base64 format in the Authorization header in order to create a token. Also provide your own X-Request-ID. Then you can use the token to use other API endpoints.
curl --location --request POST 'https://api.saashop.com/auth/v1/tokens' \
--header 'X-Request-ID: $XRequestID' \
--header 'Authorization: Basic {base64($ClientId:$ClientSecret)}'
Notes
In response you will get jwt accessToken. This token is valid for 30 minutes.
Status: 201 Created
{
"accessToken": "eyJraWQiOiJ2c0VtUFJuS0JNd3paanh3V08wZmhocHlYTXMrcm1HVGdqTmJVd1ZDSGR3PSIsImFsZyI6IlJTMjU2In0.
zOlwvXC9jb2duaXRvLWlkcC5ldS13ZXN0LTEuYW1hem9uYXdzLmNvbVwvZXUtd2VzdC0xXzN0c0xiUUJNNCIsImV4cCI6MTY1MTIzNjI3NCw
iaWF0Ijoc0LCJ2ZXJzaW9uIjoyLCJqdGkiOiI0NTgyMGI3My1mYTEyLTQxNmItYTIxMi04M2FmZTQ4NTQxMmMiLCJjbGllbnRfaWQiOiI1dT
ZoaW5lMmZqZjhhb2NoMnY0NGNyaDFrNiJ9.9exGs9Wu8Yu98c_ns-iNDJBgBK_fbWPeoluIJeoJELI60k69z2awoPDK21xy6k6YV6A",
"tokenType": "Bearer"
}
MarketplaceEvents includes links to orders. Order details can be fetched based on order identifier.
offset | integer Default: 0 The number of items to skip before starting to collect the result set |
limit | integer Default: 50 The numbers of items to return |
X-Request-ID required | string <uuid> Example: cf2ebcc1-45db-4833-9a52-35cd0c537a5e Unique identifier of the call, as determined by the initiating party. |
{- "hasMore": false,
- "marketplaceEvents": [
- {
- "eventId": "577f4dc3-05ec-417f-a1d1-a4e1743a8d35",
- "eventTypeCode": "ServicePurchased",
- "statusCode": "ProvisioningStarted",
- "eventTime": "2022-03-29 09:47:51.58881+00",
- "description": "Service purchased",
- "detailedDescription": "Service purchased",
- "additionalProperties": [
- {
- "name": "orderId",
- "value": "4b7d7cbd-c5f6-4698-8e34-b1a3210cee43",
- "description": "Unique identifier of the order. This identifer can be used to fetch the order."
}
]
}, - {
- "eventId": "69b47da8-970d-4f76-800b-8bbffa02fa29",
- "eventTypeCode": "ServicePurchased",
- "statusCode": "ProvisioningStarted",
- "eventTime": "2022-03-29 09:47:51.58881+00",
- "description": "Service purchased",
- "detailedDescription": "Service purchased",
- "additionalProperties": [
- {
- "name": "orderId",
- "value": "f239c9ac-8694-473c-a7a8-ac2d9bf07beb",
- "description": "Unique identifier of the order. This identifer can be used to fetch the order."
}
]
}
]
}
You can send a MarketplaceEvent. MarketplaceEvent is sent to inform the progress of the service provisioning.
X-Request-ID required | string <uuid> Example: cf2ebcc1-45db-4833-9a52-35cd0c537a5e Unique identifier of the call, as determined by the initiating party. |
MarketplaceEvent describing provisioning status.
eventId | string Unique event identifier in UUID format. |
sellerId | integer An identifier for seller who is owner of MarketplaceEvent. |
eventTypeCode required | string Enum: "ServicePurchased" "Evaluation" "Trial" "UpgradeToTrial" "UpgradeToPurchase" Event type. Currently supported types: ServicePurchased |
statusCode required | string Enum: "ProvisioningStarted" "ProvisioningInProgress" "ProvisioningCompleted" "ProvisioningFailed" Status code to indicate the provisioning status. |
eventTime | string Time of the event. |
description required | string Description of the event. |
detailedDescription | string Detailed description of the event. |
seenTime | string Time of the event seen. |
Array of objects An array of additional details as key-value pair. |
{- "eventTypeCode": "ServicePurchased",
- "statusCode": "ProvisioningCompleted",
- "description": "Provisioning has been completed",
- "detailedDescription": "Provisioning has been completed 2019-06-25 13:02 GMT",
- "additionalProperties": [
- {
- "name": "orderId",
- "value": "4b7d7cbd-c5f6-4698-8e34-b1a3210cee43",
- "description": "Unique identifier of the order. This identifer can be used to fetch the order."
}
]
}
{- "errorCode": "BadRequest",
- "description": "Invalid request parameters.",
- "detailedDescription": "Mandatory request parameter is missing"
}
MarketplaceEvents includes links to orders. Order details can be fetched based on order identifier.
offset | integer Default: 0 The number of items to skip before starting to collect the result set |
limit | integer Default: 50 The numbers of items to return |
X-Request-ID required | string <uuid> Example: cf2ebcc1-45db-4833-9a52-35cd0c537a5e Unique identifier of the call, as determined by the initiating party. |
{- "hasMore": false,
- "marketplaceEvents": [
- {
- "eventId": "577f4dc3-05ec-417f-a1d1-a4e1743a8d35",
- "eventTypeCode": "ServicePurchased",
- "statusCode": "ProvisioningStarted",
- "eventTime": "2022-03-29 09:47:51.58881+00",
- "description": "Service purchased",
- "detailedDescription": "Service purchased",
- "additionalProperties": [
- {
- "name": "orderId",
- "value": "4b7d7cbd-c5f6-4698-8e34-b1a3210cee43",
- "description": "Unique identifier of the order. This identifer can be used to fetch the order."
}
]
}, - {
- "eventId": "69b47da8-970d-4f76-800b-8bbffa02fa29",
- "eventTypeCode": "ServicePurchased",
- "statusCode": "ProvisioningStarted",
- "eventTime": "2022-03-29 09:47:51.58881+00",
- "description": "Service purchased",
- "detailedDescription": "Service purchased",
- "additionalProperties": [
- {
- "name": "orderId",
- "value": "f239c9ac-8694-473c-a7a8-ac2d9bf07beb",
- "description": "Unique identifier of the order. This identifer can be used to fetch the order."
}
]
}
]
}
List of Orders.
offset | integer Default: 0 The number of items to skip before starting to collect the result set |
limit | integer Default: 50 The numbers of items to return |
X-Request-ID required | string <uuid> Example: cf2ebcc1-45db-4833-9a52-35cd0c537a5e Unique identifier of the call, as determined by the initiating party. |
{- "hasMore": false,
- "orders": [
- {
- "orderId": "4b7d7cbd-c5f6-4698-8e34-b1a3210cee43",
- "issueTime": "2022-03-29 09:47:51.58881+00",
- "orderTypeCode": "Purchase",
- "note": "New purchase order for SaaS service",
- "documentCurrencyCode": "USD",
- "validityPeriod": {
- "startDate": "2019-06-21",
- "endDate": "2020-06-20",
- "description": "Annual subscription"
}, - "buyerCustomerParty": {
- "supplierAssignedAccountId": "S2123322",
- "party": {
- "partyName": "City Tours Finland Oy",
- "partyIdentifications": [
- {
- "id": "FI85654321",
- "schemeId": "VAT"
}
], - "postalAddress": {
- "addressLine": "Mannerheimintie 2",
- "cityName": "Helsinki",
- "postalZone": "00100",
- "countryCode": "FI"
}
}, - "buyerContact": {
- "name": "Customer support",
- "telephone": "3589123522",
- "electronicMail": "support@citytours.fi",
- "note": "Support open Mon-Fri 8-16"
}
}, - "sellerSupplierParty": {
- "party": {
- "partyName": "Cloud SaaS Seller Ltd",
- "partyIdentifications": [
- {
- "id": "GB123456789",
- "schemeId": "VAT"
}
], - "postalAddress": {
- "addressLine1": "49, Featherstone Street",
- "cityName": "London",
- "postalZone": "EC1Y 8SY",
- "countryCode": "UK"
}
}
}, - "anticipatedMonetaryTotal": {
- "amount": 150,
- "currencyCode": "EUR"
}, - "documentLines": [
- {
- "lineId": 1,
- "note": "Silver package with annual payments",
- "lineItem": {
- "name": "Silver",
- "sellersItemId": "001-SILVER",
- "quantity": {
- "value": 12,
- "unitCode": "MON"
}, - "price": {
- "priceAmount": {
- "amount": 12.5,
- "currencyCode": "EUR"
}, - "baseQuantity": {
- "value": 1,
- "unitCode": "MON"
}
}, - "delivery": {
- "contact": {
- "name": "Matti Viljanen",
- "telephone": "3584061234512",
- "electronicMail": "support@citytours.fi",
- "note": "Support open Mon-Fri 8-16"
}
}
}
}
]
}, - {
- "orderId": "4b7d7cbd-c5f6-4698-8e34-b1a3210cee43",
- "issueTime": "2022-03-29 09:47:51.58881+00",
- "orderTypeCode": "Purchase",
- "note": "New purchase order for SaaS service",
- "documentCurrencyCode": "USD",
- "validityPeriod": {
- "startDate": "2019-06-21",
- "endDate": "2020-06-20",
- "description": "Annual subscription"
}, - "buyerCustomerParty": {
- "supplierAssignedAccountId": "S2123322",
- "party": {
- "partyName": "City Tours Finland Oy",
- "partyIdentifications": [
- {
- "id": "FI85654321",
- "schemeId": "VAT"
}
], - "postalAddress": {
- "addressLine": "Mannerheimintie 2",
- "cityName": "Helsinki",
- "postalZone": "00100",
- "countryCode": "FI"
}
}, - "buyerContact": {
- "name": "Customer support",
- "telephone": "3589123522",
- "electronicMail": "support@citytours.fi",
- "note": "Support open Mon-Fri 8-16"
}
}, - "sellerSupplierParty": {
- "party": {
- "partyName": "Cloud SaaS Seller Ltd",
- "partyIdentifications": [
- {
- "id": "GB123456789",
- "schemeId": "VAT"
}
], - "postalAddress": {
- "addressLine1": "49, Featherstone Street",
- "cityName": "London",
- "postalZone": "EC1Y 8SY",
- "countryCode": "UK"
}
}
}, - "anticipatedMonetaryTotal": {
- "amount": 150,
- "currencyCode": "EUR"
}, - "documentLines": [
- {
- "lineId": 1,
- "note": "Silver package with annual payments",
- "lineItem": {
- "name": "Silver",
- "sellersItemId": "001-SILVER",
- "quantity": {
- "value": 12,
- "unitCode": "MON"
}, - "price": {
- "priceAmount": {
- "amount": 12.5,
- "currencyCode": "EUR"
}, - "baseQuantity": {
- "value": 1,
- "unitCode": "MON"
}
}, - "delivery": {
- "contact": {
- "name": "Matti Viljanen",
- "telephone": "3584061234512",
- "electronicMail": "support@citytours.fi",
- "note": "Support open Mon-Fri 8-16"
}
}
}
}
]
}
]
}
Order includes details about the buyer and the purchased product.
Each order is identified by an identifier orderId
.
orderId required | string <uuid> Example: 21bb0ed5-7d89-45d5-a85b-3aa3d058b4ed Unique order identifier in UUID format. |
X-Request-ID required | string <uuid> Example: cf2ebcc1-45db-4833-9a52-35cd0c537a5e Unique identifier of the call, as determined by the initiating party. |
{- "orderId": "4b7d7cbd-c5f6-4698-8e34-b1a3210cee43",
- "issueTime": "2022-03-29 09:47:51.58881+00",
- "orderTypeCode": "Purchase",
- "note": "New purchase order for SaaS service",
- "documentCurrencyCode": "USD",
- "validityPeriod": {
- "startDate": "2019-06-21",
- "endDate": "2020-06-20",
- "description": "Annual subscription"
}, - "buyerCustomerParty": {
- "supplierAssignedAccountId": "S2123322",
- "party": {
- "partyName": "City Tours Finland Oy",
- "partyIdentifications": [
- {
- "id": "FI85654321",
- "schemeId": "VAT"
}
], - "postalAddress": {
- "addressLine": "Mannerheimintie 2",
- "cityName": "Helsinki",
- "postalZone": "00100",
- "countryCode": "FI"
}
}, - "buyerContact": {
- "name": "Customer support",
- "telephone": "3589123522",
- "electronicMail": "support@citytours.fi",
- "note": "Support open Mon-Fri 8-16"
}
}, - "sellerSupplierParty": {
- "party": {
- "partyName": "Cloud SaaS Seller Ltd",
- "partyIdentifications": [
- {
- "id": "GB123456789",
- "schemeId": "VAT"
}
], - "postalAddress": {
- "addressLine1": "49, Featherstone Street",
- "cityName": "London",
- "postalZone": "EC1Y 8SY",
- "countryCode": "UK"
}
}
}, - "anticipatedMonetaryTotal": {
- "amount": 150,
- "currencyCode": "EUR"
}, - "documentLines": [
- {
- "lineId": 1,
- "note": "Silver package with annual payments",
- "lineItem": {
- "name": "Silver",
- "sellersItemId": "001-SILVER",
- "quantity": {
- "value": 12,
- "unitCode": "MON"
}, - "price": {
- "priceAmount": {
- "amount": 12.5,
- "currencyCode": "EUR"
}, - "baseQuantity": {
- "value": 1,
- "unitCode": "MON"
}
}, - "delivery": {
- "contact": {
- "name": "Matti Viljanen",
- "telephone": "3584061234512",
- "electronicMail": "support@citytours.fi",
- "note": "Support open Mon-Fri 8-16"
}
}
}
}
]
}
License includes links to order. Order details can be fetched based on order identifier.
orderId | string <uuid> Example: orderId=21bb0ed5-7d89-45d5-a85b-3aa3d058b4ed Unique identifier in uuid format. |
X-Request-ID required | string <uuid> Example: cf2ebcc1-45db-4833-9a52-35cd0c537a5e Unique identifier of the call, as determined by the initiating party. |
[- {
- "licenseId": "f957cf5e-14b6-40a5-8598-847334085658",
- "electronicMail": "TEST-USER-1@pilvi.com",
- "additionalProperties": [
- {
- "name": "orderId",
- "value": "227be951-c3df-48e9-ab80-5c665ca2547f"
}
]
}, - {
- "licenseId": "f957cf5e-14b6-40a5-8598-847334085658",
- "electronicMail": "TEST-USER-1@pilvi.com",
- "additionalProperties": [
- {
- "name": "orderId",
- "value": "227be951-c3df-48e9-ab80-5c665ca2547f"
}
]
}
]
License includes details about the buyer and the purchased product.
Each license is identified by an identifier licenseId
.
licenseId required | string <uuid> Example: 21bb0ed5-7d89-45d5-a85b-3aa3d058b4ed Unique license identifier in UUID format. |
X-Request-ID required | string <uuid> Example: cf2ebcc1-45db-4833-9a52-35cd0c537a5e Unique identifier of the call, as determined by the initiating party. |
{- "licenseId": "f957cf5e-14b6-40a5-8598-847334085658",
- "electronicMail": "TEST-USER-1@pilvi.com",
- "additionalProperties": [
- {
- "name": "orderId",
- "value": "227be951-c3df-48e9-ab80-5c665ca2547f"
}
]
}
hasMore required | boolean Indicates whether there are more items to fetch. |
required | Array of objects (MarketplaceEvent) An array of marketplaceEvents. |
{- "hasMore": false,
- "marketplaceEvents": [
- {
- "eventId": "f957cf5e-14b6-40a5-8598-847334085658",
- "sellerId": 1,
- "eventTypeCode": "ServicePurchased",
- "statusCode": "ProvisioningStarted",
- "eventTime": "2022-03-29 09:47:51.58881+00",
- "description": "Service purchased",
- "detailedDescription": "string",
- "seenTime": "2022-03-29 09:47:51.58881+00",
- "additionalProperties": [
- {
- "name": "orderId",
- "value": "4b7d7cbd-c5f6-4698-8e34-b1a3210cee43",
- "description": "Unique identifier of the order"
}
]
}
]
}
orderId | string <uuid> Unique order identifier in UUID format. |
issueTime | string The time, which this document was issued. Time is in ISO 8601 format with UTC time zone. |
orderTypeCode required | string Enum: "Purchase" "Evaluation" "Trial" Order type. Currently supported types: Purchase |
note | string Free-form text pertinent to this document, conveying information that is not contained explicitly in other structures. |
documentCurrencyCode required | string (CurrencyCode) [A-Z]{3} Currency code is ISO 4217 Alpha 3 currency code. |
object (TimePeriod) Time period with start and end date. | |
required | object (BuyerCustomerParty) Buyer customer party. |
required | object (SellerSupplierParty) Seller supplier party. |
object (MonetaryAmount) The monetary amount of the transaction. | |
required | Array of objects (DocumentLine) An array of document lines. |
{- "orderId": "21bb0ed5-7d89-45d5-a85b-3aa3d058b4ed",
- "issueTime": "2022-03-29 09:47:51.58881+00",
- "orderTypeCode": "Purchase",
- "note": "New purchase order for SaaS service",
- "documentCurrencyCode": "USD",
- "validityPeriod": {
- "startDate": "2019-06-21",
- "endDate": "2020-06-20",
- "description": "Annual subscription"
}, - "buyerCustomerParty": {
- "supplierAssignedAccountId": "CS-25442300",
- "party": {
- "partyName": "City Tours Finland Oy",
- "partyIdentifications": [
- {
- "id": "FI85654321",
- "schemeId": "VAT"
}
], - "postalAddress": {
- "addressLine1": "1800 Main Street",
- "addressLine2": "1800 Main Street",
- "addressLine3": "1800 Main Street",
- "postalZone": "60612",
- "cityName": "60612",
- "countrySubentityCode": "IL",
- "countryCode": "US"
}
}, - "buyerContact": {
- "name": "Customer support",
- "telephone": "3589123522",
- "electronicMail": "support@citytours.fi",
- "note": "Support open Mon-Fri 8-16"
}
}, - "sellerSupplierParty": {
- "party": {
- "partyName": "City Tours Finland Oy",
- "partyIdentifications": [
- {
- "id": "FI85654321",
- "schemeId": "VAT"
}
], - "postalAddress": {
- "addressLine1": "1800 Main Street",
- "addressLine2": "1800 Main Street",
- "addressLine3": "1800 Main Street",
- "postalZone": "60612",
- "cityName": "60612",
- "countrySubentityCode": "IL",
- "countryCode": "US"
}
}
}, - "anticipatedMonetaryTotal": {
- "amount": 9.9,
- "currencyCode": "USD"
}, - "documentLines": [
- {
- "lineId": 1,
- "note": "Silver package with annual payments",
- "lineItem": {
- "name": "Silver",
- "sellersItemId": "001-SILVER",
- "quantity": {
- "value": 12,
- "unitCode": "MON"
}, - "price": {
- "priceAmount": {
- "amount": 9.9,
- "currencyCode": "USD"
}, - "baseQuantity": {
- "value": 12,
- "unitCode": "MON"
}
}, - "delivery": {
- "contact": {
- "name": "Customer support",
- "telephone": "3589123522",
- "electronicMail": "support@citytours.fi",
- "note": "Support open Mon-Fri 8-16"
}
}
}
}
]
}
hasMore required | boolean Indicates whether there are more items to fetch. |
required | Array of objects (License) An array of Licenses. |
{- "hasMore": false,
- "licenses": [
- {
- "licenseId": "f957cf5e-14b6-40a5-8598-847334085658",
- "electronicMail": "support@citytours.fi",
- "additionalProperties": [
- {
- "description": "Unique identifier of the order",
- "name": "orderId",
- "value": "4b7d7cbd-c5f6-4698-8e34-b1a3210cee43"
}
]
}
]
}