Skip to navigation

Manage Digital Plan Product

View as Markdown

Configures an existing product as a digital plan product, or changes the resource grants of an existing plan product.

  • The product’s product_type must be standard or plan. A standard product that already has subscriptions or order items returns 422.
  • Each grant’s resource is the public_id of one of the merchant’s existing resources, created with the Resources Create endpoint. An unknown resource returns 400.
  • Grants are time credits: time_amount is in seconds and must be at least 1, and grace_period is optional, also in seconds.
  • On the first call, Ordergroove also creates an identifier grant for the product. It can’t be deleted, and a request that would delete every grant returns 422.

Afterwards the product’s product_type is plan. To read its grants later, call List or Retrieve with include_product_resource_grants=true.

This endpoint accepts the Application API Scope only. Storefront API Scope signatures are rejected.

Authentication

x-api-keystring

Application API Scope — server-to-server, sent in the x-api-key header. See Authentication.

Path parameters

product_idstringRequiredDefaults to Merchant product id

Request

This endpoint expects an object.
createlist of objectsOptional
Add new resource grants for your digital plan product
updatelist of objectsOptional
Update existing resource grants for product
deletelist of stringsOptional

Delete existing resource grants with public ids to be deleted , ex: [“85eae83c245111eeb185acde48001122”,“b3928a0c3c4211eeac2bacde48001122”]

identifier_time_amountstringOptionalDefaults to product.every * product.every_period

This is the time_amount for the identifier resource grant in seconds

identifier_grace_periodstringOptional

This is the grace_period for the identifier resource grant in seconds

Response

200

Errors

400
Bad Request Error