All URIs are relative to https://hlconnect-api.mu.se
| Method | HTTP request | Description |
|---|---|---|
| connector_purchase_cancel | DELETE /purchase/cancel | Cancel purchase order line item |
| connector_purchase_download_url | GET /purchase/download-url | Get asset download URL |
| connector_purchase_info | GET /purchase/info | Retrieve purchase order information |
| connector_purchase_register | POST /purchase/register | Register a new purchase transaction |
| connector_purchase_validate_purchase_before_payment | POST /purchase/validate-purchase-before-payment | Validate purchase before payment |
| connector_purchase_view_url | GET /purchase/view-url | Get asset view URL |
connector_purchase_cancel(order_id, order_line_id)
Cancel purchase order line item
Cancels a specific line item within a purchase order. The order must be in a cancellable status. Both order ID and order line ID must be specified.
- Bearer Authentication (access_token):
import hlconnect_client
from hlconnect_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://hlconnect-api.mu.se
# See configuration.py for a list of all supported configuration parameters.
configuration = hlconnect_client.Configuration(
host = "https://hlconnect-api.mu.se"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: access_token
configuration = hlconnect_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with hlconnect_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hlconnect_client.PurchaseApi(api_client)
order_id = 12345 # int | Vendor order ID containing the line item to cancel
order_line_id = 1 # int | Specific line item within the order to cancel
try:
# Cancel purchase order line item
api_instance.connector_purchase_cancel(order_id, order_line_id)
except Exception as e:
print("Exception when calling PurchaseApi->connector_purchase_cancel: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| order_id | int | Vendor order ID containing the line item to cancel | |
| order_line_id | int | Specific line item within the order to cancel |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Order line item successfully cancelled | * X-Environment - |
| 400 | Bad Request - Invalid order status for cancellation | - |
| 401 | Unauthorized - Missing or invalid access token | - |
| 404 | Not Found - No order found for the specified order and line item | - |
| 500 | Internal Server Error - Something went wrong processing the request | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DownloadUrl connector_purchase_download_url(order_id, order_line_id)
Get asset download URL
Generates and returns a secure download URL for a purchased digital asset. The URL can be used to download the asset file.
- Bearer Authentication (access_token):
import hlconnect_client
from hlconnect_client.models.download_url import DownloadUrl
from hlconnect_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://hlconnect-api.mu.se
# See configuration.py for a list of all supported configuration parameters.
configuration = hlconnect_client.Configuration(
host = "https://hlconnect-api.mu.se"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: access_token
configuration = hlconnect_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with hlconnect_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hlconnect_client.PurchaseApi(api_client)
order_id = 12345 # int | Vendor order ID that contains the asset to download
order_line_id = 1 # int | Specific line item within the order that identifies the asset to download
try:
# Get asset download URL
api_response = api_instance.connector_purchase_download_url(order_id, order_line_id)
print("The response of PurchaseApi->connector_purchase_download_url:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PurchaseApi->connector_purchase_download_url: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| order_id | int | Vendor order ID that contains the asset to download | |
| order_line_id | int | Specific line item within the order that identifies the asset to download |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Download URL successfully generated and returned | * X-Environment - |
| 401 | Unauthorized - Missing or invalid access token | - |
| 404 | Not Found - No download URL found for the specified order and line item | - |
| 500 | Internal Server Error - Something went wrong processing the request | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[OrderItem] connector_purchase_info(order_id)
Retrieve purchase order information
Returns detailed information about a purchase order including status, asset details, pricing, and fulfillment status. Response varies based on processing status (complete, processing, failed).
- Bearer Authentication (access_token):
import hlconnect_client
from hlconnect_client.models.order_item import OrderItem
from hlconnect_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://hlconnect-api.mu.se
# See configuration.py for a list of all supported configuration parameters.
configuration = hlconnect_client.Configuration(
host = "https://hlconnect-api.mu.se"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: access_token
configuration = hlconnect_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with hlconnect_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hlconnect_client.PurchaseApi(api_client)
order_id = 12345 # int | Vendor order ID to retrieve purchase details for. This is the unique identifier assigned by the vendor when placing the order.
try:
# Retrieve purchase order information
api_response = api_instance.connector_purchase_info(order_id)
print("The response of PurchaseApi->connector_purchase_info:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PurchaseApi->connector_purchase_info: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| order_id | int | Vendor order ID to retrieve purchase details for. This is the unique identifier assigned by the vendor when placing the order. |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successfully retrieved order information. Returns list of order items with complete details. | * X-Environment - |
| 202 | Order is currently processing. Check back later for completion status. | * X-Environment - |
| 401 | Unauthorized - Missing or invalid access token | - |
| 404 | Not Found - No orders found for the specified order ID | - |
| 500 | Internal Server Error - Something went wrong processing the request | - |
| 502 | Bad Gateway - Order processing failed | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
connector_purchase_register(purchase_register_request)
Register a new purchase transaction
Initiates the purchase process for a digital asset. Validates request parameters, creates a new order, and begins fulfillment. This is an asynchronous operation - use /purchase/info to check order status.
- Bearer Authentication (access_token):
import hlconnect_client
from hlconnect_client.models.purchase_register_request import PurchaseRegisterRequest
from hlconnect_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://hlconnect-api.mu.se
# See configuration.py for a list of all supported configuration parameters.
configuration = hlconnect_client.Configuration(
host = "https://hlconnect-api.mu.se"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: access_token
configuration = hlconnect_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with hlconnect_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hlconnect_client.PurchaseApi(api_client)
purchase_register_request = hlconnect_client.PurchaseRegisterRequest() # PurchaseRegisterRequest | Purchase registration request with asset and order details
try:
# Register a new purchase transaction
api_instance.connector_purchase_register(purchase_register_request)
except Exception as e:
print("Exception when calling PurchaseApi->connector_purchase_register: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| purchase_register_request | PurchaseRegisterRequest | Purchase registration request with asset and order details |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Purchase registration process successfully initiated | * X-Environment - |
| 401 | Unauthorized - Missing or invalid access token | - |
| 404 | Not Found - Specified asset ID does not exist | - |
| 409 | Conflict - Order already exists for the specified parameters | - |
| 422 | Unprocessable Entity - Request validation failed | - |
| 500 | Internal Server Error - Something went wrong processing the request | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ValidationToken connector_purchase_validate_purchase_before_payment(purchase_validate_before_payment_request)
Validate purchase before payment
Validates purchase parameters before payment is initiated. Checks asset availability, regional restrictions (based on buyer IP), and minimum quantity requirements.
- Bearer Authentication (access_token):
import hlconnect_client
from hlconnect_client.models.purchase_validate_before_payment_request import PurchaseValidateBeforePaymentRequest
from hlconnect_client.models.validation_token import ValidationToken
from hlconnect_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://hlconnect-api.mu.se
# See configuration.py for a list of all supported configuration parameters.
configuration = hlconnect_client.Configuration(
host = "https://hlconnect-api.mu.se"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: access_token
configuration = hlconnect_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with hlconnect_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hlconnect_client.PurchaseApi(api_client)
purchase_validate_before_payment_request = hlconnect_client.PurchaseValidateBeforePaymentRequest() # PurchaseValidateBeforePaymentRequest | Purchase validation request with asset, buyer IP and quantity
try:
# Validate purchase before payment
api_response = api_instance.connector_purchase_validate_purchase_before_payment(purchase_validate_before_payment_request)
print("The response of PurchaseApi->connector_purchase_validate_purchase_before_payment:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PurchaseApi->connector_purchase_validate_purchase_before_payment: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| purchase_validate_before_payment_request | PurchaseValidateBeforePaymentRequest | Purchase validation request with asset, buyer IP and quantity |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Validation successful. Verification token generated | * X-Environment - |
| 400 | Bad Request | - |
| 401 | Unauthorized - Missing or invalid access token | - |
| 404 | Not Found - Specified asset ID does not exist | - |
| 422 | Unprocessable Entity - Request validation failed | - |
| 500 | Internal Server Error - Something went wrong processing the request | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ViewUrl connector_purchase_view_url(order_id, order_line_id)
Get asset view URL
Generates and returns a secure, time-limited view URL for a purchased digital asset. The URL can be used to view the asset online (e.g., sheet music viewer).
- Bearer Authentication (access_token):
import hlconnect_client
from hlconnect_client.models.view_url import ViewUrl
from hlconnect_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://hlconnect-api.mu.se
# See configuration.py for a list of all supported configuration parameters.
configuration = hlconnect_client.Configuration(
host = "https://hlconnect-api.mu.se"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: access_token
configuration = hlconnect_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with hlconnect_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hlconnect_client.PurchaseApi(api_client)
order_id = 12345 # int | Vendor order ID that contains the asset to view
order_line_id = 1 # int | Specific line item within the order that identifies the asset to view
try:
# Get asset view URL
api_response = api_instance.connector_purchase_view_url(order_id, order_line_id)
print("The response of PurchaseApi->connector_purchase_view_url:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PurchaseApi->connector_purchase_view_url: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| order_id | int | Vendor order ID that contains the asset to view | |
| order_line_id | int | Specific line item within the order that identifies the asset to view |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | View URL successfully generated and returned | * X-Environment - |
| 401 | Unauthorized - Missing or invalid access token | - |
| 404 | Not Found - No view URL found for the specified order and line item | - |
| 500 | Internal Server Error - Something went wrong processing the request | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]