Manage Digital Plan Product
Configures an existing product as a digital plan product, or changes the resource grants of an existing plan product.
- The product’s
product_typemust bestandardorplan. Astandardproduct that already has subscriptions or order items returns422. - Each grant’s
resourceis thepublic_idof one of the merchant’s existing resources, created with the Resources Create endpoint. An unknown resource returns400. - Grants are time credits:
time_amountis in seconds and must be at least1, andgrace_periodis 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_id
Request
This endpoint expects an object.
create
Add new resource grants for your digital plan product
update
Update existing resource grants for product
delete
Delete existing resource grants with public ids to be deleted , ex: [“85eae83c245111eeb185acde48001122”,“b3928a0c3c4211eeac2bacde48001122”]
identifier_time_amount
This is the time_amount for the identifier resource grant in seconds
identifier_grace_period
This is the grace_period for the identifier resource grant in seconds
Response
200
Errors
400
Bad Request Error