Update Components
Creates, updates and deletes a subscription’s new bundle components in one atomic request. The changes apply to the subscription’s unsent order and to orders generated later.
A subscription can’t have two components for the same product. The request returns 400 and changes nothing if it:
- Creates a component for a product already on the subscription
- Repeats a product across
createandupdate - Would leave the subscription with no components
- Repeats a component
public_idacrossupdateanddelete - Sends a
quantitythat isn’t an integer of at least1 - References a product that doesn’t exist for the merchant
- Updates or deletes a component that isn’t on this subscription
created, updated and deleted are empty lists when the matching input is omitted.
Authentication
x-api-keystring
Application API Scope — server-to-server, sent in the x-api-key header. See Authentication.
OR
Path parameters
subscription_public_Id
Unique subscription ID
Request
This endpoint expects an object.
create
Bundle Components to create with product and its quantity
update
Bundle Components to be updated with fields to change
delete
Bundle components public ids to be deleted [“85eae83c245111eeb185acde48001122”,“b3928a0c3c4211eeac2bacde48001122”]
Response
200
created
updated
deleted
Errors
400
Bad Request Error
404
Not Found Error