EnterpriseMutation

All enterprise mutation roots, merged. Analytics and billing are read-only on this API; billing changes are made from the enterprise portal.

Fields

    activateUser
    Member!
    Required
    Activate an enterprise user.
      userId
      Int!
      Required
      Suspended user to reinstate.
    bulkUpdateSettings
    Boolean!
    Required

    Bulk-update enterprise settings from key-value pairs. Returns true on success.

    createSetting
    SettingsRecord!
    Required
    Create an enterprise settings record.
      input
      CreateEnterpriseSettingsInput!
      Required
      Key, value and scope of the setting to create.
        currencyCode
        String
        ISO 4217 currency code used for invoicing this enterprise.
        scimBaseUrl
        String
        Base URL for SCIM endpoints.
        scimEnabled
        Boolean
        Whether SCIM provisioning is enabled.
        sftpEnabled
        Boolean
        Whether SFTP is enabled.
    createVoucher
    Voucher!
    Required
    Create an enterprise voucher.
      input
      CreateEnterpriseVoucherInput!
      Required
      Details of the voucher to create.
        code
        String!
        Required
        Unique voucher code.
        currencyCode
        String!
        Required
        Currency code for the voucher.
        description
        String
        Optional description of the voucher.
        discountType
        String!
        Required
        Type of discount (percentage or fixed_amount).
        discountValue
        Decimal!
        Required
        Discount value (percentage or amount).
        endDate
        NaiveDate
        Voucher validity end date.
        maxDiscountAmount
        Decimal
        Maximum discount amount that can be applied.
        minOrderAmount
        Decimal
        Minimum order amount required to use the voucher.
        name
        String!
        Required
        Display name of the voucher.
        startDate
        NaiveDate
        Voucher validity start date.
        templateId
        Int
        Optional ID of the template this voucher was generated from.
        usageLimit
        Int
        Total number of times the voucher can be used.
        userUsageLimit
        Int
        Maximum number of times each user can use the voucher.
    createVoucherTemplate
    VoucherTemplate!
    Required
    Create an enterprise voucher template.
      input
      CreateVoucherTemplateInput!
      Required
      Details of the template to create.
        applicableCategories
        [Int!]
        Required
        Categories where this voucher applies.
        applicableVendors
        [Int!]
        Required
        Vendors where this voucher applies.
        autoApproveLimit
        Decimal
        Auto-approve vouchers below this amount.
        discountValue
        Decimal!
        Required
        Discount value.
        excludedCategories
        [Int!]
        Required
        Categories where this voucher is excluded.
        excludedVendors
        [Int!]
        Required
        Vendors where this voucher is excluded.
        isActive
        Boolean!
        Required
        Whether the template is active.
        maxDiscountAmount
        Decimal
        Maximum discount amount that can be applied.
        minOrderValue
        Decimal
        Minimum order value required.
        requiresApproval
        Boolean!
        Required
        Whether voucher generation requires approval.
        templateDescription
        String
        Optional description of the template.
        templateName
        String!
        Required
        Name of the template.
        totalUsageLimit
        Int
        Total usage limit across all vouchers from this template.
        usageLimitPerUser
        Int
        Maximum times each user can use vouchers from this template.
        validFrom
        String
        Valid from date (ISO datetime string).
        validUntil
        String
        Valid until date (ISO datetime string).
        voucherType
        VoucherTemplateType!
        Required
        Type of voucher (percentage, fixed amount, or buy X get Y).
    deleteSetting
    Boolean!
    Required

    Delete an enterprise settings record. Returns true on success.

      settingId
      Int!
      Required
      Unique identifier of the setting to delete.
    deleteVoucher
    Boolean!
    Required

    Delete an enterprise voucher. Returns true on success.

    deleteVoucher takes no enterpriseId, so guard against cross-tenant deletion by confirming the target row belongs to the authorized enterprise first.

      voucherId
      Int!
      Required
      Unique identifier of the voucher to delete.
    deleteVoucherTemplate
    Boolean!
    Required

    Delete an enterprise voucher template. Returns true on success.

      templateId
      Int!
      Required
      Template to delete.
    duplicateVoucherTemplate
    VoucherTemplate!
    Required
    Duplicate an enterprise voucher template under a new name.
      newName
      String!
      Required
      Name for the new copy.
      templateId
      Int!
      Required
      Template to copy.
    generateVoucherFromTemplate
    Voucher!
    Required
    Generate an enterprise voucher from a template.
      input
      GenerateVoucherFromTemplateInput!
      Required
      Template to use and any values overriding it.
        code
        String!
        Required
        Unique voucher code to generate.
        endDateOverride
        NaiveDate
        Optional override for end date.
        name
        String
        Optional custom name for the voucher (defaults to template name).
        startDateOverride
        NaiveDate
        Optional override for start date.
        templateId
        Int!
        Required
        ID of the voucher template to use.
        usageLimitOverride
        Int
        Optional override for usage limit.
    inviteUser
    String!
    Required
    Invite a user to an enterprise. Returns the invitation id.
      email
      String
      Email to invite. Give this or a phone number.
      phone
      String
      Phone to invite. Give this or an email.
      roleIds
      [Int!]!
      Required
      Roles to grant the invited user.
    removeUser
    Boolean!
    Required

    Remove a user from an enterprise (soft delete). Returns true on success.

      userId
      Int!
      Required
      Unique identifier of the user to remove.
    resetUserPassword
    String!
    Required
    Reset an enterprise user's password. Returns the temporary password (echoed once — the caller is responsible for delivering it securely).
      userId
      Int!
      Required
      Unique identifier of the user whose password to reset.
    suspendUser
    Member!
    Required
    Suspend an enterprise user (deactivate).
      userId
      Int!
      Required
      User to suspend.
    updateEnterprise
    Enterprise!
    Required
    Update an enterprise's profile.
      input
      UpdateEnterpriseInput!
      Required
      Fields to change on the enterprise.
        address
        String
        Physical or mailing address
        allowsCorporatePayment
        Boolean
        Whether members can charge orders to the enterprise
        allowsPersonalPayment
        Boolean
        Whether members can pay with personal payment methods
        contactEmail
        String
        Updated contact email
        contactPhone
        String
        Updated contact phone
        dateFormat
        String
        Preferred date format (e.g. "YYYY-MM-DD", "DD/MM/YYYY")
        description
        String
        Updated description
        isActive
        Boolean
        Whether the enterprise is active
        language
        String
        Preferred interface language (e.g. "en", "es", "fr")
        name
        String
        Updated name of the enterprise
        timezone
        String
        IANA timezone identifier (e.g. "UTC", "America/New_York")
        websiteUrl
        String
        Updated website URL
    updateSetting
    SettingsRecord!
    Required
    Update an enterprise settings record.
      input
      UpdateEnterpriseSettingsInput!
      Required
      Fields to change on the setting.
        currencyCode
        String
        Updated ISO 4217 currency code for invoicing.
        scimBaseUrl
        String
        Updated SCIM base URL.
        scimEnabled
        Boolean
        Whether SCIM provisioning is enabled.
        sftpEnabled
        Boolean
        Whether SFTP is enabled.
      settingId
      Int!
      Required
      Setting to update.
    updateUser
    Member!
    Required
    Update an enterprise user's roles/active status.
      input
      UpdateEnterpriseUserInput!
      Required
      Fields to change on the user.
        isActive
        Boolean
        Whether the user is active
        roleIds
        [Int!]
        Required
        List of role IDs to assign to the user
      userId
      Int!
      Required
      User to update.
    updateVoucher
    Voucher!
    Required

    Update an enterprise voucher.

    updateVoucher takes no enterpriseId, so guard against cross-tenant mutation by confirming the target row belongs to the authorized enterprise before applying the update.

      input
      UpdateEnterpriseVoucherInput!
      Required
      Fields to change on the voucher.
        description
        String
        Updated description.
        discountType
        String
        Updated discount type.
        discountValue
        Decimal
        Updated discount value.
        endDate
        NaiveDate
        Updated end date.
        isActive
        Boolean
        Whether the voucher is active.
        maxDiscountAmount
        Decimal
        Updated maximum discount amount.
        minOrderAmount
        Decimal
        Updated minimum order amount.
        name
        String
        Updated display name.
        startDate
        NaiveDate
        Updated start date.
        usageLimit
        Int
        Updated total usage limit.
        userUsageLimit
        Int
        Updated per-user usage limit.
      voucherId
      Int!
      Required
      Voucher to update.
    updateVoucherTemplate
    VoucherTemplate!
    Required
    Update an enterprise voucher template.
      input
      UpdateVoucherTemplateInput!
      Required
      Fields to change on the template.
        applicableCategories
        [Int!]
        Required
        Updated applicable categories.
        applicableVendors
        [Int!]
        Required
        Updated applicable vendors.
        autoApproveLimit
        Decimal
        Updated auto-approve limit.
        discountValue
        Decimal
        Updated discount value.
        excludedCategories
        [Int!]
        Required
        Updated excluded categories.
        excludedVendors
        [Int!]
        Required
        Updated excluded vendors.
        isActive
        Boolean
        Whether the template is active.
        maxDiscountAmount
        Decimal
        Updated maximum discount amount.
        minOrderValue
        Decimal
        Updated minimum order value.
        requiresApproval
        Boolean
        Whether approval is required.
        templateDescription
        String
        Updated description.
        templateName
        String
        Updated template name.
        totalUsageLimit
        Int
        Updated total usage limit.
        usageLimitPerUser
        Int
        Updated per-user usage limit.
        validFrom
        String
        Updated valid from date.
        validUntil
        String
        Updated valid until date.
      templateId
      Int!
      Required
      Template to update.
Built with