POST

Add Line Items


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Adds line items to a draft subscription contract.

Returns the updated draft subscription contract with recalculated totals.

You can add 2 types of line items:

  • Catalog line items: The item details come from the catalog that catalogReference.appId identifies, through the Catalog service plugin. The item must come from the same catalog as the subscription contract's existing catalog line items.
  • Custom line items: You specify all item details. Custom line items don't call the Catalog service plugin.

Added line items get the billing schedule in the draft subscription contract's subscriptionSettings.

Adding an item that's already in the draft subscription contract creates another line item. To change the quantity of an existing line item, call Update Line Items.

A draft subscription contract can have up to 100 line items, including removed line items.

You can add line items only to a draft subscription contract that you created.

Notes:

  • A site member can't set the price of a catalog line item.
  • A site member can't add custom line items.
Permission Scopes
Write draft subscription contracts
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/ecom/v1/draft-subscription-contracts/{draftSubscriptionContractId}/add-line-items

Errors
400Invalid Argument

There are 3 errors with this status code.

403Permission Denied

There are 2 errors with this status code.

404Not Found

There are 2 errors with this status code.

409Already Exists

There are 2 errors with this status code.

428Failed Precondition

There are 5 errors with this status code.

This method may also return standard errors. Learn more about standard Wix errors.

Event TriggersThis method triggers the following events:
Did this help?