order27 Ops

Order API

Cross-vertical orders, cancel reasons, and lifecycle events.

Queries

QUERY

adminListOrders

#

List orders with admin filters and pagination. Supports filtering by status, driver, customer, kind, date range, and sorting by various fields. # Authorization Requires TenantAdmin or PlatformAdmin role.

Argumente

  • input!

    Standard

    {
      "pagination": {
        "limit": 10,
        "page": 1,
        "after": null
      },
      "statuses": null,
      "driverId": null,
      "customerId": null,
      "fleetIds": null,
      "serviceClassIds": null,
      "kind": null,
      "fromDate": null,
      "toDate": null,
      "sortBy": "CREATED_AT",
      "sortDirection": "ASC"
    }
Gibt zurück!
QUERY

cancelReason

#

Get a single cancel reason by ID (admin view). # Authorization Requires TenantAdmin or PlatformAdmin role.

Argumente

  • idID!
Gibt zurück!
QUERY

cancelReasons

#

List cancel reasons available for the current user's role and app This query returns all active cancel reasons that are applicable to: - The user's current role (from JWT token) - The app specified in the request header - The user's tenant Results are ordered by position and name

Gibt zurück[!]!
QUERY

customerActiveStrikeCount

#

Active (unexpired) strike count for an account / app. Useful for admin dashboards without listing every strike. Requires TenantAdmin.

Argumente

  • accountId!
  • app!
Gibt zurückInt!
QUERY

customerStrikeBlock

#

Current block state for an account / app combo. Returns None when the account has no soft or hard block. Requires TenantAdmin role.

Argumente

  • accountId!
  • app!
Gibt zurück
QUERY

exportOrders

#

Export orders in CSV, JSON, or PDF format. # Authorization Requires TenantAdmin or PlatformAdmin role. # Arguments * input - Export parameters including filters and format # Returns Export data with content type and suggested filename. For PDF format, the data is base64-encoded.

Argumente

  • input!

    Standard

    {
      "statuses": null,
      "driverId": null,
      "customerId": null,
      "fleetIds": null,
      "serviceClassIds": null,
      "kind": null,
      "fromDate": null,
      "toDate": null,
      "format": "CSV",
      "limit": null
    }
Gibt zurück!
QUERY

getPartnershipOrderStatistics

#

Get aggregated statistics for orders associated with a partnership. Returns counts of completed, cancelled, and active orders, along with total revenue and commissions. # Authorization - TenantAdmin/PlatformAdmin can access any partnership - PartnerAdmin can only access their own partnership

Argumente

  • input!
Gibt zurück!
QUERY

listCancelReasons

#

List all cancel reasons for the tenant (admin view). Supports filtering by app and actor, with pagination. Unlike the client-facing cancelReasons query, this includes inactive reasons when includeInactive is true. # Authorization Requires TenantAdmin or PlatformAdmin role.

Argumente

  • input!
Gibt zurück!
QUERY

listPartnershipOrders

#

List orders associated with a partnership. Returns orders where any participant entity is linked to the partnership via entity_partner_links. Uses temporal validity to ensure the link was active at the time of the order. # Authorization - TenantAdmin/PlatformAdmin can access any partnership - PartnerAdmin can only access their own partnership

Argumente

  • input!
Gibt zurück!
QUERY

myOrders

#

List my orders - returns orders for the authenticated user filtered by their app

Argumente

  • input
Gibt zurück[!]!
QUERY

myOrderStatistics

#

Get order statistics for the authenticated user. Statistics are automatically filtered by the app header (vertical).

Gibt zurück!
QUERY

myPaymentBlocks

#

Get active payment blocks for the current user. Returns empty list if no blocks exist.

Gibt zurück[!]!
QUERY

order

#

Get a single order by ID

Argumente

  • orderId!
Gibt zurück
QUERY

orderActivities

#

Fetch all activities for a specific order. # Authorization Requires TenantAdmin or PlatformAdmin role. # Arguments * order_id - The order ID to fetch activities for # Returns List of activities associated with the order in chronological order.

Argumente

  • orderId!
Gibt zurück[!]!
QUERY

orders

#

List orders for an account (admin only) with optional app filtering

Argumente

  • input!
Gibt zurück[!]!
QUERY

orderStatistics

#

Get order statistics for a specific account (admin usage) Statistics are automatically filtered by the app header (vertical)

Argumente

  • accountId!
Gibt zurück!

Mutations

MUTATION

adminCreateOrder

#

Create an order on behalf of a customer. # Authorization Requires TenantAdmin or PlatformAdmin role.

Argumente

  • input!
Gibt zurück!
MUTATION

adminResolvePaymentBlock

#

Waive an account's active payment block (support/admin escape hatch). # Authorization Requires TenantOwner, TenantAdmin, or PlatformAdmin role.

Argumente

  • blockIdString!
  • notesString
Gibt zurückBoolean!
MUTATION

cancelOrder

#

Cancel an order with a specified reason This mutation allows customers, drivers, merchants, or staff to cancel an order with appropriate permissions based on their role and the cancel reason configuration. The order service handles the core cancellation logic and may call vertical-specific gRPC services (e.g., Taxi, Shop) for additional validation if needed.

Argumente

  • input!
Gibt zurück!
MUTATION

clearCustomerStrikeBlock

#

Clear the soft / hard block for an account on a given app. Used by support staff when a customer has gone through manual review. Does not erase the strike history — only the cached block state. Requires TenantAdmin role.

Argumente

  • accountId!
  • app!
Gibt zurückBoolean!
MUTATION

confirmOrderPayment

#

Confirm payment for an order after 3DS authentication

Argumente

  • input!
Gibt zurück!
MUTATION

createCancelReason

#

Create a new cancel reason. # Authorization Requires TenantAdmin or PlatformAdmin role.

Argumente

  • input!
Gibt zurück!
MUTATION

createOrder

#

Create a new order

Argumente

  • input!
Gibt zurück!
MUTATION

deleteCancelReason

#

Delete a cancel reason. # Authorization Requires TenantAdmin or PlatformAdmin role.

Argumente

  • id!
Gibt zurückBoolean!
MUTATION

resetCustomerStrikes

#

Reset (expire) all active strikes for an account on a given app and clear any block state. Equivalent to the on-tier-upgrade reset, but triggered manually by support. Requires TenantAdmin role.

Argumente

  • accountId!
  • app!
Gibt zurückBoolean!
MUTATION

updateCancelReason

#

Update an existing cancel reason. # Authorization Requires TenantAdmin or PlatformAdmin role.

Argumente

  • input!
Gibt zurück!
MUTATION

updateOrderStatus

#

Update order status

Argumente

  • orderId!
  • newStatus!
  • reasonString
Gibt zurück!