Skip to content
Docs
Reference

BackstageClient.passes()

BackstageClient.passes() in @ticketlayer/backstage.

@ticketlayer/backstage


@ticketlayer/backstage / BackstageClient / passes()

passes: (passeId: string) => {
  entitlements: {
     redeem: (barcode: string, request: {
        deviceId?: string;
        idempotencyKey?: string;
        location?: string;
      }, requestOptions?: RequestOptions) => Promise<{
        entitlement: {
           eventOccurrenceId: string | null;
           id: string;
           name: string;
           redemptionCount: number;
           redemptionLimit: number | null;
           seatLabel: string | null;
           status: string;
           type: string;
        };
        outcome: "duplicate" | "void" | "valid";
        pass: {
           id: string;
           status: string;
        };
        reason?: string;
        redemption?: {
           id: string;
           redeemedAt: string;
        };
     }>;
  };
};

Defined in: client.ts:8880

passes methods Use passes() to access nested resources: passes(id).entitlements

Parameters#

ParameterType
passeIdstring

Returns#

{
  entitlements: {
     redeem: (barcode: string, request: {
        deviceId?: string;
        idempotencyKey?: string;
        location?: string;
      }, requestOptions?: RequestOptions) => Promise<{
        entitlement: {
           eventOccurrenceId: string | null;
           id: string;
           name: string;
           redemptionCount: number;
           redemptionLimit: number | null;
           seatLabel: string | null;
           status: string;
           type: string;
        };
        outcome: "duplicate" | "void" | "valid";
        pass: {
           id: string;
           status: string;
        };
        reason?: string;
        redemption?: {
           id: string;
           redeemedAt: string;
        };
     }>;
  };
}

entitlements#

entitlements: {
  redeem: (barcode: string, request: {
     deviceId?: string;
     idempotencyKey?: string;
     location?: string;
   }, requestOptions?: RequestOptions) => Promise<{
     entitlement: {
        eventOccurrenceId: string | null;
        id: string;
        name: string;
        redemptionCount: number;
        redemptionLimit: number | null;
        seatLabel: string | null;
        status: string;
        type: string;
     };
     outcome: "duplicate" | "void" | "valid";
     pass: {
        id: string;
        status: string;
     };
     reason?: string;
     redemption?: {
        id: string;
        redeemedAt: string;
     };
  }>;
};

entitlements.redeem()#

redeem: (barcode: string, request: {
  deviceId?: string;
  idempotencyKey?: string;
  location?: string;
}, requestOptions?: RequestOptions) => Promise<{
  entitlement: {
     eventOccurrenceId: string | null;
     id: string;
     name: string;
     redemptionCount: number;
     redemptionLimit: number | null;
     seatLabel: string | null;
     status: string;
     type: string;
  };
  outcome: "duplicate" | "void" | "valid";
  pass: {
     id: string;
     status: string;
  };
  reason?: string;
  redemption?: {
     id: string;
     redeemedAt: string;
  };
}>;

Redeem a pass Redeem a pass by its barcode at a gate. Idempotent under an Idempotency-Key header. Returns an outcome of valid, duplicate, or void. (Basic implementation: status + limit only; the full rules engine is part of the scanning/Go stream.)

Parameters#

ParameterType
barcodestring
request{ deviceId?: string; idempotencyKey?: string; location?: string; }
request.deviceId?string
request.idempotencyKey?string
request.location?string
requestOptions?RequestOptions

Returns#

Promise<{ entitlement: { eventOccurrenceId: string | null; id: string; name: string; redemptionCount: number; redemptionLimit: number | null; seatLabel: string | null; status: string; type: string; }; outcome: "duplicate" | "void" | "valid"; pass: { id: string; status: string; }; reason?: string; redemption?: { id: string; redeemedAt: string; }; }>

Operation Id#

redeemPass