Update Components

Atomically modify (create, update, and/or delete) components associated with a subscription

This endpoint updates all components linked to a subscription. Changing the components will impact items that will still be sent as well as new ones created in the future

Validations

A single subscription can not have multiple components for the same product, and this endpoint will not allow you to make modifications that break this systemic rule or leaves subscription’s components in any kind of incoherent state. As a result, you will receive a 400 error and no modifications will occur if you provide a request payload that:

  • Attempts to create a component for a product that is already present in the subscription’s component list.
  • Attempts to update a component to a product that is also being provided to the create input in the same request.
  • Attempts to remove all components from a subscription.
  • Attempts to delete and update the same component in a single request.

In addition, the following validations will also be applied at the field level:

  • Any provided quantity field must be an integer greater than or equal to 1.
  • Any provided product input must be a product that exists in Ordergroove’s system.
  • The components provided in either the update or delete input must be associated with the subscription that was specified in the url-path.

You will receive empty lists in the created, updated, or deleted response fields if you did not provide any values for the respective input field on the request payload.

Language