Skip to content

Update Provisioning Status

The providerSetSubscriptionServiceStatus mutation allows merchants to set the status of a provision, unprovision, or amend request for a subscription. This mutation is used to update the status of the merchant subscription to an Underline subscription.

Note: A new version of this mutation is being developed to align the naming from Provider to Merchant. Additional changes might occur as well.

mutation providerSetSubscriptionServiceStatus($input: ProviderSetSubscriptionServiceStatusInput!) {
providerSetSubscriptionServiceStatus(input: $input)
}
  • Returns: Boolean! — A boolean value indicating whether the status update was successful.

Input Type: ProviderSetSubscriptionServiceStatusInput

Section titled “Input Type: ProviderSetSubscriptionServiceStatusInput”

Contains the necessary information to set the status of a subscription service.

  • subscriptionId (ID!): The unique identifier of the subscription.
  • serviceId (ID!): The unique identifier of the service associated with the subscription.
  • actionType (ProviderSubscriptionServiceStatusActionType!): Specifies whether the action is a provision, unprovision, or amend.
  • isComplete (Boolean!): Indicates whether the provisioning, unprovisioning, or amendment process is complete.
  • statusMessage (String): An optional message providing additional information about the status.

Enum: ProviderSubscriptionServiceStatusActionType

Section titled “Enum: ProviderSubscriptionServiceStatusActionType”

Defines the action type for the status update.

  • provision: Indicates that the service is being provisioned.
  • unprovision: Indicates that the service is being unprovisioned.
  • amend: Indicates that an existing subscription is being amended, for example a price change or an option added, removed, or changed in quantity.

Below is an example of how to use the providerSetSubscriptionServiceStatus mutation, including sample JSON data.

mutation SetSubscriptionServiceStatus($input: ProviderSetSubscriptionServiceStatusInput!) {
providerSetSubscriptionServiceStatus(input: $input)
}
{
"input": {
"subscriptionId": "subscription-uuid",
"serviceId": "service-uuid",
"actionType": "provision",
"isComplete": true,
"statusMessage": "Provisioning completed successfully."
}
}
  • subscriptionId: Replace "subscription-uuid" with the unique identifier of the subscription.
  • serviceId: Replace "service-uuid" with the unique identifier of the service.
  • actionType: Set to "provision", "unprovision", or "amend" depending on the action.
  • isComplete: Set to true if the action is complete, or false if it’s still in progress.
  • statusMessage: (Optional) Provide a message with additional details about the status.
{
"data": {
"providerSetSubscriptionServiceStatus": true
}
}
  • A response of true indicates that the status was updated successfully.
  • Upcoming Changes: A new version of this mutation is being developed to change the naming from Provider to Merchant. Additional changes to the input fields or response structure might also occur.
  • Enum Values: The actionType must be one of the defined enum values: "provision", "unprovision", or "amend".
  • Amendments: When Underline sends a subscription.amend.service webhook, call this mutation with actionType set to "amend" once you have completed the change on your side. See the webhook guide.

If there’s an error during the mutation (e.g., invalid input, missing required fields), the response will include error details:

{
"errors": [
{
"message": "Invalid subscriptionId provided.",
"locations": [{ "line": 2, "column": 3 }],
"path": ["providerSetSubscriptionServiceStatus"]
}
],
"data": {
"providerSetSubscriptionServiceStatus": null
}
}
  • Check the errors array for details about what went wrong.