GET /mids
Get all MIDs
Retrieve a paginated list of MIDs with optional filtering and search
Authentication Required
Authorization: Bearer {token}
header string This header is required to access this endpoint
Required Parameters
x-account-id
header string Account ID for the request
Optional Parameters
Click here to view an exhaustive list of all available parameters
page
query integer Page number
pageSize
query integer Number of MIDs per page
search
query string Search across MID number, descriptor, and merchant name
sort
query string Comma separated list of fields to sort by, prefix with - for descending order
status
query string Filter by MID status
processingStatus
query string Filter by processing status
merchantId
query string Filter by merchant ID
gatewayId
query string Filter by gateway ID
createdFrom
query string Filter by creation date from
createdTo
query string Filter by creation date to
includeRelations
query boolean Include additional related data (configuration, limits, metrics)
Try it out
Output:
Responses
Description
Successful response
{ "mids": [ null ], "totalCount": 0, "totalPages": 0, "currentPage": 0}Description
Unauthorized - User not authenticated
Description
Forbidden - User does not have the required permissions
Description
Internal server error
References
#/components/parameters/xAccountIdHeader
in: headername: x-account-idschema: type: stringdescription: Account ID for the requestrequired: trueexample: "2311"|export type xAccountIdHeader = any; // Schema type not fully supported#/components/schemas/Mid
type: objectproperties: id: type: integer description: Unique identifier for the MID merchantId: type: integer description: ID of the merchant this MID belongs to midNumber: type: string description: Unique MID number descriptor: type: string description: MID descriptor status: type: string enum: - pending - active - suspended - terminated description: Current status of the MID processingStatus: type: string enum: - enabled - disabled - limited - hold description: Processing status of the MID agentId: type: string description: Agent ID associated with the MID agentName: type: string description: Agent name isoId: type: string description: ISO ID isoName: type: string description: ISO name activatedDate: type: string format: date-time description: Date when MID was activated lastProcessingDate: type: string format: date-time description: Last processing date createdBy: type: string description: User who created the MID updatedBy: type: string description: User who last updated the MID createdAt: type: string format: date-time description: Creation timestamp updatedAt: type: string format: date-time description: Last update timestamp|export interface Mid { /** Unique identifier for the MID */ id?: number; /** ID of the merchant this MID belongs to */ merchantId?: number; /** Unique MID number */ midNumber?: string; /** MID descriptor */ descriptor?: string; /** Current status of the MID */ status?: "pending" | "active" | "suspended" | "terminated"; /** Processing status of the MID */ processingStatus?: "enabled" | "disabled" | "limited" | "hold"; /** Agent ID associated with the MID */ agentId?: string; /** Agent name */ agentName?: string; /** ISO ID */ isoId?: string; /** ISO name */ isoName?: string; /** Date when MID was activated */ activatedDate?: Date; /** Last processing date */ lastProcessingDate?: Date; /** User who created the MID */ createdBy?: string; /** User who last updated the MID */ updatedBy?: string; /** Creation timestamp */ createdAt?: Date; /** Last update timestamp */ updatedAt?: Date;}#/components/schemas/MidConfiguration
type: objectproperties: id: type: integer midId: type: integer descriptor: type: string timezone: type: string batchTime: type: string autoSettle: type: boolean allowRefunds: type: boolean allowPartialRefunds: type: boolean refundLimit: type: string status: type: string enum: - pending - configured - incomplete - review configuredDate: type: string format: date-time configuredBy: type: string|export interface MidConfiguration { id?: number; midId?: number; descriptor?: string; timezone?: string; batchTime?: string; autoSettle?: boolean; allowRefunds?: boolean; allowPartialRefunds?: boolean; refundLimit?: string; status?: "pending" | "configured" | "incomplete" | "review"; configuredDate?: Date; configuredBy?: string;}#/components/schemas/MidProcessingLimits
type: objectproperties: id: type: integer midId: type: integer dailyLimit: type: string monthlyLimit: type: string transactionLimit: type: string currentDaily: type: string currentMonthly: type: string resetDate: type: string format: date-time|export interface MidProcessingLimits { id?: number; midId?: number; dailyLimit?: string; monthlyLimit?: string; transactionLimit?: string; currentDaily?: string; currentMonthly?: string; resetDate?: Date;}#/components/schemas/MidGatewaySettings
type: objectproperties: id: type: integer midId: type: integer gatewayId: type: string gatewayName: type: string endpoint: type: string merchantId: type: string terminalId: type: string isActive: type: boolean lastSync: type: string format: date-time connectionStatus: type: string enum: - connected - disconnected - error|export interface MidGatewaySettings { id?: number; midId?: number; gatewayId?: string; gatewayName?: string; endpoint?: string; merchantId?: string; terminalId?: string; isActive?: boolean; lastSync?: Date; connectionStatus?: "connected" | "disconnected" | "error";}#/components/schemas/MidPerformanceMetrics
type: objectproperties: id: type: integer midId: type: integer period: type: string transactionVolume: type: string transactionCount: type: integer successRate: type: string chargebackRate: type: string chargebackCount: type: integer refundRate: type: string revenue: type: string averageTicket: type: string tier: type: string enum: - excellent - good - fair - poor|export interface MidPerformanceMetrics { id?: number; midId?: number; period?: string; transactionVolume?: string; transactionCount?: number; successRate?: string; chargebackRate?: string; chargebackCount?: number; refundRate?: string; revenue?: string; averageTicket?: string; tier?: "excellent" | "good" | "fair" | "poor";}#/components/schemas/MidWithRelations
allOf: - type: object properties: id: type: integer description: Unique identifier for the MID merchantId: type: integer description: ID of the merchant this MID belongs to midNumber: type: string description: Unique MID number descriptor: type: string description: MID descriptor status: type: string enum: - pending - active - suspended - terminated description: Current status of the MID processingStatus: type: string enum: - enabled - disabled - limited - hold description: Processing status of the MID agentId: type: string description: Agent ID associated with the MID agentName: type: string description: Agent name isoId: type: string description: ISO ID isoName: type: string description: ISO name activatedDate: type: string format: date-time description: Date when MID was activated lastProcessingDate: type: string format: date-time description: Last processing date createdBy: type: string description: User who created the MID updatedBy: type: string description: User who last updated the MID createdAt: type: string format: date-time description: Creation timestamp updatedAt: type: string format: date-time description: Last update timestamp fromRef: "#/components/schemas/Mid" - type: object properties: configuration: $ref: "#/components/schemas/MidConfiguration" processingLimits: $ref: "#/components/schemas/MidProcessingLimits" gatewaySettings: $ref: "#/components/schemas/MidGatewaySettings" performanceMetrics: type: array items: $ref: "#/components/schemas/MidPerformanceMetrics" merchant: type: object description: Associated merchant information|export interface MidWithRelations_AllOf_0 { /** Unique identifier for the MID */ id?: number; /** ID of the merchant this MID belongs to */ merchantId?: number; /** Unique MID number */ midNumber?: string; /** MID descriptor */ descriptor?: string; /** Current status of the MID */ status?: "pending" | "active" | "suspended" | "terminated"; /** Processing status of the MID */ processingStatus?: "enabled" | "disabled" | "limited" | "hold"; /** Agent ID associated with the MID */ agentId?: string; /** Agent name */ agentName?: string; /** ISO ID */ isoId?: string; /** ISO name */ isoName?: string; /** Date when MID was activated */ activatedDate?: Date; /** Last processing date */ lastProcessingDate?: Date; /** User who created the MID */ createdBy?: string; /** User who last updated the MID */ updatedBy?: string; /** Creation timestamp */ createdAt?: Date; /** Last update timestamp */ updatedAt?: Date;}
export interface MidWithRelations_AllOf_1 { configuration?: MidConfiguration; processingLimits?: MidProcessingLimits; gatewaySettings?: MidGatewaySettings; performanceMetrics?: MidPerformanceMetrics[]; /** Associated merchant information */ merchant?: {};}
export type MidWithRelations = MidWithRelations_AllOf_0 & MidWithRelations_AllOf_1;#/components/schemas/MidList
type: objectproperties: mids: type: array items: $ref: "#/components/schemas/MidWithRelations" totalCount: type: integer description: Total number of MIDs totalPages: type: integer description: Total number of pages currentPage: type: integer description: Current page number|export interface MidList { mids?: MidWithRelations[]; /** Total number of MIDs */ totalCount?: number; /** Total number of pages */ totalPages?: number; /** Current page number */ currentPage?: number;}Route Source Code
Check out the source code for this route entrypoint here: /mids/route.ts
Or the swagger.yaml spec this documentation was generated from:
/mids/swagger.yaml