Queries and mutations for managing Recurrence Policies in the platform.
Queries
Query Recurrence Policies
Recurrence policies are managed and queried through the Recurrence Policy API and associated to a Price
| Arguments | |
|---|---|
whereString | |
sortArray of String | |
limitInt | |
offsetInt | |
Get Recurrence Policy
Recurrence policies are managed and queried through the Recurrence Policy API and associated to a Price
| Arguments | |
|---|---|
idString | Queries with specified ID |
keyString | Queries with specified key |
Mutations
Create Recurrence Policy
Update Recurrence Policy
| Arguments | |
|---|---|
versionLong | |
actionsArray of RecurrencePolicyUpdateAction | |
idString | Queries with specified ID |
keyString | Queries with specified key |
Delete Recurrence Policy
| Arguments | |
|---|---|
versionLong | |
idString | Queries with specified ID |
keyString | Queries with specified key |
Output types
RecurrencePolicy
Recurrence policies are managed and queried through the Recurrence Policy API and associated to a Price
idString | Unique identifier of the RecurrencePolicy. |
versionLong | Current version of the RecurrencePolicy. |
keyString | User-defined unique identifier of the RecurrencePolicy. |
nameString | Name of the RecurrencePolicy. |
nameAllLocalesArray of LocalizedString | Name of the RecurrencePolicy. |
descriptionString | Description of the RecurrencePolicy. |
descriptionAllLocalesArray of LocalizedString | Description of the RecurrencePolicy. |
schedule | Schedule of the RecurrencePolicy. |
minDaysBetweenOrdersInt | Minimum number of days that must pass since the last Order of a Recurring Order before the Request Order Now update action is allowed. If not set, there is no limit.
This value does not affect the recurrence schedule. For example, a weekly RecurrencePolicy with a value of
30 still creates Orders weekly.
The time is measured in multiples of 24 hours from lastOrderAt of the Recurring Order, regardless of whether the last Order was created on schedule or early.The limit applies to all Recurring Orders that use this RecurrencePolicy, and changes take effect immediately. It is ignored when the RecurrencePolicy is attached to a Price. |
createdAt | Date and time (UTC) the RecurrencePolicy was initially created. |
lastModifiedAt | Date and time (UTC) the RecurrencePolicy was last updated. |
createdBy | IDs and references that created the RecurrencePolicy. |
lastModifiedBy | IDs and references that last modified the RecurrencePolicy. |
RecurrencePolicyQueryResult
offsetInt | |
countInt | |
totalLong | |
existsBoolean | |
resultsArray of RecurrencePolicy |
RecurrencePolicySchedule
typeString |
StandardSchedule
valueInt | Number of intervals between orders. |
intervalUnit | Interval of this schedule. Can beDays, Weeks, or Months |
typeString |
DayOfMonthSchedule
dayInt | The day of the month when the Recurring Order is created.
If the value is greater than the number of days in a given month, the order is created on the last day of the month. |
typeString |
IntervalUnit
DaysWeeksMonths
Input types
RecurrencePolicyDraft
keyString | User-defined unique identifier for the RecurrencePolicy. |
nameArray of LocalizedStringItemInputType | Name of the RecurrencePolicy. |
descriptionArray of LocalizedStringItemInputType | Description of the RecurrencePolicy. |
schedule | Schedule where the recurrence is defined. |
minDaysBetweenOrdersInt | Minimum number of days that must pass since the last Order of a Recurring Order before the Request Order Now update action is allowed. If not set, there is no limit.
This value does not affect the recurrence schedule. For example, a weekly RecurrencePolicy with a value of
30 still creates Orders weekly.
The time is measured in multiples of 24 hours from lastOrderAt of the Recurring Order, regardless of whether the last Order was created on schedule or early.The limit applies to all Recurring Orders that use this RecurrencePolicy, and changes take effect immediately. It is ignored when the RecurrencePolicy is attached to a Price. |
RecurrencePolicyScheduleInput
standard | |
dayOfMonth |
StandardScheduleInput
valueInt | |
intervalUnit | Can be Days, Weeks, or Months |
DayOfMonthScheduleInput
dayInt |
RecurrencePolicyUpdateAction
setDescription | |
setKey | |
setMinDaysBetweenOrders | |
setName | |
setSchedule |
Update actions
Set Description
descriptionArray of LocalizedStringItemInputType | Value to set. If omitted, any existing value is removed. |
Set Key
keyString | Value to set. If omitted, any existing value is removed. |
Set Min Days Between Orders
minDaysBetweenOrdersInt | Value to set. Must be greater than 0.
If omitted, any existing value is removed and there is no limit. |
Set Name
nameArray of LocalizedStringItemInputType | Value to set. If omitted, any existing value is removed. |
Set Schedule
schedule | Schedule where the recurrence is defined. |