Creates a new subscription by assigning a specific asset (device) to a customer from an order. This is the order fulfillment step - it links a physical device (by serial number) to a line item in an order, creating an active subscription.
| Field | Required | Description |
|---|---|---|
orderId | Yes | The order to fulfill |
assetSerialNumber | Yes | Serial number of the asset to assign |
customerId | Yes | Customer ID for this subscription |
billingGroupId | No | Billing group for consolidated B2B invoicing |
startDate | No | Subscription start date (default: today) |
contractLength | No | Contract duration in months (1-120, default: from order) |
notes | No | Internal notes for this subscription |
available)rented_out.
rented_out| Setting | Behavior |
|---|---|
immediate | First payment due immediately |
first_of_next_month | First payment on 1st of next month |
same_day_next_month | First payment same day next month |
| Error Code | Cause | Solution |
|---|---|---|
ORDER_NOT_FOUND | Invalid order ID | Verify order exists |
ORDER_NOT_CONFIRMED | Order not in confirmed status | Confirm order first |
ITEM_FULLY_FULFILLED | All units for this item already have subscriptions | Check order item quantity |
ASSET_NOT_FOUND | Serial number doesn’t exist | Create asset first |
ASSET_NOT_AVAILABLE | Asset already rented or unavailable | Use a different asset |
SKU_MISMATCH | Asset SKU doesn’t match order item | Verify correct asset |
API key obtained from FlexPortal dashboard
Your tenant identifier