SportsMutation

Fields

    createBot
    Bot!
    Required

    Create a new bot owned by the authenticated vendor.

    Requires a user-context token, unlike the other bot mutations: The bot records a human author, which is required and must be a real user. A client_credentials token has no honest value to put there, and inventing one would corrupt the attribution the public bot directory renders.

      input
      CreateBotInput!
      Required
      Details of the bot to create.
        avatarUrl
        String
        URL of the bot's avatar image.
        botType
        BotType!
        Required
        Which runtime surface the bot plugs into.
        category
        String
        Directory category the bot is filed under.
        configuration
        JSON
        Free-form JSON configuration passed through to the bot runtime.
        description
        String
        What the bot does, shown in the directory. Up to 500 characters.
        displayName
        String!
        Required
        Human-readable name shown in chat and the directory. 2–100 characters.
        isPublic
        Boolean

        Whether to list the bot in the public directory. Defaults to false.

        username
        String!
        Required

        Handle the bot is mentioned by, without the leading @. 3–50 characters, alphanumeric and underscores only, and unique platform-wide.

        webhookSecret
        String
        Shared secret the delivery signature is computed with. 32–128 characters. Store it — it is never returned again.
        webhookUrl
        String
        HTTPS URL to deliver the bot's events to. Without one it receives nothing.
    createFacility
    Facility!
    Required
    Create a facility at one of the vendor's venues.
      input
      CreateFacilityInput!
      Required
      Details of the facility to create.
        bookingMode
        FacilityBookingMode!
        Required
        Whether the facility is booked exclusively or shares capacity between parties.
        cancellationPolicyId
        Int
        Tiered cancellation policy to apply.
        capacity
        Int!
        Required
        Max people per slot. Required >= 1 for shared-capacity; 1 for exclusive.
        depositAmount
        Decimal
        Refundable deposit held per booking.
        environment
        FacilityEnvironment!
        Required
        Whether the facility is indoors or outdoors.
        imageUrls
        [String!]!
        Required
        Defaults:

        Gallery images given as URLs, for callers with no multipart channel (the OAuth2 developer API). Fetched into storage alongside photos.

        maxDurationMinutes
        Int!
        Required
        Longest bookable duration, in minutes.
        minDurationMinutes
        Int!
        Required
        Shortest bookable duration, in minutes.
        name
        String!
        Required
        Facility name shown to customers.
        slotIntervalMinutes
        Int!
        Required
        Spacing between consecutive bookable start times, in minutes.
        sports
        [SportType!]!
        Required
        Sports this facility supports. At least one is required.
        surface
        String
        Playing surface, such as clay or astroturf. Optional.
        vendorLocationId
        Int!
        Required
        Venue the facility belongs to.
    createFacilityAvailabilityBlock
    FacilityAvailabilityBlock!
    Required
    Create a facility availability block (maintenance/closure window).
      input
      CreateFacilityAvailabilityBlockInput!
      Required
      Period to block out and the facility it applies to.
        endsAt
        DateTime!
        Required
        When the block ends (UTC).
        facilityId
        Int!
        Required
        Facility to block out.
        reason
        String
        Why the facility is unavailable. Optional.
        startsAt
        DateTime!
        Required
        When the block begins (UTC).
    createLocation
    Location!
    Required
    Create a new location for the authenticated vendor.
      input
      CreateLocationInput!
      Required
      Details of the location to create.
        address
        String!
        Required
        Street address of the branch.
        city
        String
        City the branch is in.
        country
        String
        Country the branch is in.
        deliveryAvailable
        Boolean

        Whether the branch delivers. Defaults to true.

        deliveryRadius
        Float
        How far the branch delivers, in kilometres. Omit for unlimited.
        email
        String
        Contact email address for the branch.
        isActive
        Boolean

        Whether the branch is in service. Defaults to true.

        latitude
        Float
        Latitude in decimal degrees (WGS 84).
        longitude
        Float
        Longitude in decimal degrees (WGS 84).
        name
        String!
        Required

        Branch name, e.g. Downtown store.

        phone
        String
        Contact phone number for the branch.
        pickupAvailable
        Boolean

        Whether customers can collect from this branch. Defaults to true.

        postalCode
        String
        Postal or ZIP code.
        state
        String
        State, province or region the branch is in.
    createManualFacilityBooking
    FacilityBooking!
    Required
    Create a manual facility booking.
      input
      CreateManualFacilityBookingInput!
      Required
      Details of the booking to record.
        customerEmail
        String
        Walk-in customer's email address.
        customerPhone
        String
        Walk-in customer's phone number.
        durationMinutes
        Int!
        Required
        Booked length in minutes. Must sit within the facility's own minimum and maximum duration.
        facilityId
        Int!
        Required
        Facility to book.
        note
        String
        Free-text note for the venue. Optional.
        participantCount
        Int!
        Required
        People included in the booking.
        requireFloodlight
        Boolean
        Whether floodlights are requested, adding the matching surcharge.
        sport
        SportType!
        Required
        Sport the facility is being booked for.
        startsAt
        DateTime!
        Required
        Requested start (UTC).
        userId
        Int

        The customer this booking is for, identified exactly one way — userId, customerPhone or customerEmail, resolved server-side. Supplying more than one is a 400. Omitting all three still books to the acting vendor user, which is what a venue-held block is.

    createVendorCoupon
    Coupon!
    Required
    Create a coupon on this vendor's storefront. The code must be unique platform-wide, so a collision with an existing coupon — including another vendor's — is rejected.
      input
      CreateVendorCouponInput!
      Required
      Details of the coupon to create.
        code
        String!
        Required
        Code customers type at checkout. Must be unique across the platform.
        color
        String!
        Required
        Hex colour for UI display (e.g. "#FF5733").
        description
        String
        Terms or explanation shown with the coupon. Optional.
        discount
        Decimal!
        Required

        Percentage when percentage is true, otherwise a fixed amount.

        Never negative: the order paths subtract this, so a negative value would increase what the customer pays.

        expiresOn
        DateTime
        When the coupon stops working (UTC). Omit for a coupon that never expires.
        forDelivery
        Boolean!
        Required
        Whether the discount applies to the delivery fee.
        isActive
        Boolean!
        Required
        Whether the coupon can be redeemed straight away.
        maxCouponAmount
        Decimal
        Caps a percentage discount. Ignored for fixed amounts.
        minOrderAmount
        Decimal
        Smallest order the coupon applies to, in the vendor's currency. Omit for no minimum.
        percentage
        Boolean!
        Required

        Whether discount is a percentage rather than a fixed amount.

        productIds
        [Int!]
        Required
        Restrict to specific products. All of the vendor's products when empty.
        times
        Int
        Total redemptions allowed across all customers.
        vendorLocationIds
        [Int!]
        Required
        Restrict to specific locations. Valid at all of the vendor's locations when omitted or empty.
    createWebhook
    Webhook!
    Required
    Register a new webhook endpoint for the authenticated business.
      input
      CreateWebhookInput!
      Required
      Endpoint URL and the events to subscribe to.
        events
        [WebhookEvent!]!
        Required
        Events to subscribe to. At least one.
        isActive
        Boolean
        Whether to start delivering immediately. Defaults to active.
        url
        String!
        Required
        HTTPS URL to deliver events to.
    deactivateFacility
    Boolean!
    Required

    Deactivate a facility. Returns true on success.

      facilityId
      Int!
      Required
      Unique identifier of the facility to deactivate.
    deleteBot
    Boolean!
    Required

    Permanently delete a bot. Returns true on success.

      botId
      Int!
      Required
      Unique identifier of the bot to delete.
    deleteFacilityAvailabilityBlock
    Boolean!
    Required

    Delete a facility availability block. Returns true on success.

      blockId
      Int!
      Required
      Blocked period to remove.
    deleteFacilityPricingRule
    Boolean!
    Required

    Delete a facility pricing rule. Returns true on success.

      ruleId
      Int!
      Required
      Pricing rule to delete.
    deleteLocation
    Boolean!
    Required

    Delete a location. Returns true on success.

      locationId
      Int!
      Required
      Unique identifier of the location to delete.
    deleteVendorCoupon
    Boolean!
    Required
    Delete a coupon this vendor owns.
      couponId
      Int!
      Required
      Unique identifier of the coupon to delete.
    deleteWebhook
    Boolean!
    Required

    Permanently delete a webhook. Returns true on success.

      webhookId
      Int!
      Required
      Unique identifier of the webhook endpoint to delete.
    regenerateBotSecret
    String!
    Required
    Regenerate a webhook bot's secret, invalidating the previous one. Returns the new secret so the caller can update their webhook handler.
      botId
      Int!
      Required
      Unique identifier of the bot to issue a new secret for.
    regenerateWebhookSecret
    String!
    Required
    Rotate a webhook's signing secret, returning the new secret. The new value is only surfaced here — it is stored hashed-in-place and cannot be retrieved again afterwards.
      webhookId
      Int!
      Required
      Webhook whose signing secret to replace.
    setFacilitySports
    [SportType!]!
    Required
    Replace the set of sports a facility supports. Returns the new set.
      facilityId
      Int!
      Required
      Facility to configure.
      sports
      [SportType!]!
      Required
      Sports playable at the facility, replacing the current set.
    testBotWebhook
    BotWebhookTest!
    Required
    Queue a test webhook delivery for a webhook-type bot.
      botId
      Int!
      Required
      Bot whose webhook endpoint to test.
    transitionFacilityBooking
    FacilityBooking!
    Required
    Move a facility booking through its lifecycle.
    updateBot
    Bot!
    Required
    Update an existing bot. Permissions, version and tags are not editable through the developer API.
      botId
      Int!
      Required
      Bot to update.
      input
      UpdateBotInput!
      Required
      Fields to change on the bot.
        avatarUrl
        String
        Replacement avatar image URL.
        category
        String
        Replacement directory category.
        configuration
        JSON
        Replacement JSON configuration. Replaces the stored blob outright.
        description
        String
        Replacement description. Up to 500 characters.
        displayName
        String
        Replacement display name. 2–100 characters.
        isPublic
        Boolean
        Whether the bot is listed in the public directory.
        webhookSecret
        String
        Rotated signing secret. 32–128 characters. Supplying it invalidates the previous secret immediately.
        webhookUrl
        String
        Replacement HTTPS delivery URL.
    updateFacility
    Facility!
    Required
    Update one of the vendor's facilities.
      facilityId
      Int!
      Required
      Facility to update.
      input
      UpdateFacilityInput!
      Required
      Fields to change on the facility.
        bookingMode
        FacilityBookingMode
        Whether the facility is booked exclusively or shares capacity between parties.
        cancellationPolicyId
        Int
        Tiered cancellation policy id.
        capacity
        Int
        New maximum people per slot.
        depositAmount
        Decimal

        Refundable deposit held per booking. Send 0 to clear.

        environment
        FacilityEnvironment
        Whether the facility is indoors or outdoors.
        imageUrls
        [String!]!
        Required
        Defaults:
        Images appended by URL, for callers with no multipart channel.
        isActive
        Boolean
        Whether the facility accepts bookings.
        maxDurationMinutes
        Int
        New longest bookable duration, in minutes.
        minDurationMinutes
        Int
        New shortest bookable duration, in minutes.
        name
        String
        New facility name.
        slotIntervalMinutes
        Int
        New spacing between consecutive bookable start times, in minutes.
        surface
        String
        New playing surface.
    updateLocation
    Location!
    Required
    Update an existing location.
      input
      UpdateLocationInput!
      Required
      Fields to change on the location.
        address
        String
        Replacement street address.
        city
        String
        Replacement city.
        country
        String
        Replacement country.
        deliveryAvailable
        Boolean
        Whether the branch delivers.
        deliveryRadius
        Float
        Replacement delivery radius in kilometres.
        email
        String
        Replacement contact email address.
        isActive
        Boolean
        Whether the branch is in service.
        latitude
        Float
        Replacement latitude in decimal degrees (WGS 84).
        longitude
        Float
        Replacement longitude in decimal degrees (WGS 84).
        name
        String
        Replacement branch name.
        phone
        String
        Replacement contact phone number.
        pickupAvailable
        Boolean
        Whether customers can collect from this branch.
        postalCode
        String
        Replacement postal or ZIP code.
        state
        String
        Replacement state, province or region.
      locationId
      Int!
      Required
      Location to update.
    updateVendorCoupon
    Coupon!
    Required
    Update a coupon this vendor owns.
      couponId
      Int!
      Required
      Coupon to update.
      input
      UpdateVendorCouponInput!
      Required
      Fields to change on the coupon.
        code
        String
        New code customers type at checkout. Omit to leave it unchanged.
        color
        String

        New hex colour for display (e.g. #FF5733). Omit to leave it unchanged.

        description
        String
        New terms or explanation. Omit to leave it unchanged.
        discount
        Decimal
        Never negative, for the same reason as on create: the order paths subtract it.
        expiresOn
        DateTime
        New expiry (UTC). Omit to leave it unchanged.
        forDelivery
        Boolean
        Whether the discount applies to the delivery fee. Omit to leave it unchanged.
        isActive
        Boolean
        Whether the coupon can still be redeemed. Omit to leave it unchanged.
        maxCouponAmount
        Decimal
        New cap on a percentage discount. Omit to leave it unchanged.
        minOrderAmount
        Decimal
        New order minimum, in the vendor's currency. Omit to leave it unchanged.
        percentage
        Boolean

        Whether discount is a percentage. Omit to leave it unchanged.

        productIds
        [Int!]
        Required
        Replaces the product restriction outright. An empty list clears it.
        times
        Int
        New total redemption limit. Omit to leave it unchanged.
        vendorLocationIds
        [Int!]
        Required

        Replaces the location restriction outright. Some(vec![]) clears it.

    updateWebhook
    Webhook!
    Required
    Modify an existing webhook's URL, events, or active status.
      input
      UpdateWebhookInput!
      Required
      Fields to change on the webhook.
        events
        [WebhookEvent!]
        Required
        Replacement subscription list. Replaces the existing set outright.
        isActive
        Boolean

        Whether the webhook delivers. Set false to pause without deleting.

        url
        String
        Replacement HTTPS delivery URL.
      webhookId
      Int!
      Required
      Webhook to update.
    upsertFacilityPricingRule
    FacilityPricingRule!
    Required
    Create or update a facility pricing rule.
      input
      UpsertFacilityPricingRuleInput!
      Required
      Pricing rule to create or replace.
        depositAmount
        Decimal
        Refundable deposit for bookings matched by this rule; overrides the facility default.
        endTime
        String

        End of the intra-day window, HH:MM (24h).

        facilityId
        Int!
        Required
        Facility the rule prices.
        floodlightSurcharge
        Decimal
        Extra charged when floodlights are requested. Omit for none.
        id
        Int
        When set, updates the existing rule; otherwise inserts a new one.
        isMemberRate
        Boolean
        Restrict the rule to members. Defaults to false.
        priceAmount
        Decimal!
        Required
        Price charged under this rule, in the venue's currency.
        pricingBasis
        PricingBasis!
        Required
        Whether the price is charged per slot or per hour, and whether it multiplies by headcount.
        priority
        Int
        Higher values win when several rules match a booking. Defaults to 0.
        sportType
        SportType
        Restrict the rule to one sport. Omit to price every sport at the facility.
        startTime
        String

        HH:MM (24h) intra-day window the rule applies to.

        weekday
        Int

        1 = Sunday … 7 = Saturday. None = every day.

Built with