---
updatedAt: 2025-04-28T20:08:41.000Z
agentTools:
  projectIndex: https://developer.finvi.com/llms.txt
---

# Query Customers

This is a resource for querying customers. The response will include a customerList of individual customer records.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Customers",
    "description": "This resource provides access to query, create, or modify customer records.",
    "termsOfService": "https://swervepay.qc.ontariosystems.cloud/LICENSE-2.0.html",
    "contact": {
      "name": "Finvi",
      "url": "https://finvi.com",
      "email": "finvi@finvi.com"
    },
    "license": {
      "name": "SwervePay licence",
      "url": "https://swervepay.qc.ontariosystems.cloud/"
    },
    "version": "1.0.6"
  },
  "servers": [
    {
      "url": "https://api.swervepay.com/v/2.0/",
      "description": "This is a production server for SwervePay"
    }
  ],
  "tags": [
    {
      "name": "Base Resource Customers",
      "description": "The base customers resource is used to query or create customer records."
    }
  ],
  "paths": {
    "/{accountSid}/customers": {
      "get": {
        "summary": "Query Customers",
        "operationId": "queryCustomers",
        "tags": [
          "Base Resource Customers"
        ],
        "description": "This is a resource for querying customers. The response will include a customerList of individual customer records.",
        "parameters": [
          {
            "name": "accountSid",
            "in": "path",
            "description": "Account SID in my account",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "maxLength": 256,
              "minLength": 0
            }
          },
          {
            "name": "accountRefId",
            "in": "query",
            "description": "The Account Number from the calling system",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maxLength": 256,
              "minLength": 0
            }
          },
          {
            "name": "afterId",
            "in": "query",
            "description": "Include results with customerId greater than this value",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maxLength": 12,
              "minLength": 0
            }
          },
          {
            "name": "beforeId",
            "in": "query",
            "description": "Include results with customerId less than this value",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maxLength": 12,
              "minLength": 0
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "The number of results to return (default 10, max 1000)",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maxLength": 4,
              "minLength": 0
            }
          },
          {
            "name": "customerEmail",
            "in": "query",
            "description": "Email",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maxLength": 255,
              "minLength": 0
            }
          },
          {
            "name": "customerFirstName",
            "in": "query",
            "description": "First Name",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maxLength": 255,
              "minLength": 0
            }
          },
          {
            "name": "customerId",
            "in": "query",
            "description": "Customer unique identifier",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maxLength": 12,
              "minLength": 0
            }
          },
          {
            "name": "customerLastName",
            "in": "query",
            "description": "Last Name",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maxLength": 255,
              "minLength": 0
            }
          },
          {
            "name": "customerPhoneNumber",
            "in": "query",
            "description": "Mobile Number",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maxLength": 14,
              "minLength": 0
            }
          },
          {
            "name": "customerRefId",
            "in": "query",
            "description": "Customer Reference Id from the calling system",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maxLength": 256,
              "minLength": 0
            }
          },
          {
            "name": "maxId",
            "in": "query",
            "description": "Include results with transactionId less than or equal to this value",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maxLength": 12,
              "minLength": 0
            }
          },
          {
            "name": "minId",
            "in": "query",
            "description": "Include results with transactionId greater or equal to this value",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maxLength": 12,
              "minLength": 0
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "First and/or last name",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maxLength": 255,
              "minLength": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Response list sort order \n\n Valid Values: \n\n transactionId_asc, transactionId_desc \n\n transactionId_asc: Sort by transactionId in ascending order \n\n transactionId_desc: (Default) Sort by transactionId in descendingorder",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maxLength": 18,
              "minLength": 0
            }
          },
          {
            "name": "systemCustomerRefId",
            "in": "query",
            "description": "Transaction Source \n\n Valid Values: auth, capture, credit, refund, sale, validate, void, return",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maxLength": 256,
              "minLength": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestResponse"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "502": {
            "description": "Bad Gateway"
          },
          "503": {
            "description": "Service Unvailable"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Customer": {
        "type": "object",
        "properties": {
          "accountRefId": {
            "example": 5678
          },
          "customerAddress1": {
            "example": "1053 Gerald L. Bates Drive"
          },
          "customerAddress2": {
            "example": "Apartment 3B"
          },
          "customerCity": {
            "example": "Boston"
          },
          "customerCompany": {
            "example": "Clemens Markets"
          },
          "customerEmail": {
            "example": "EricPScott@teleworm.us"
          },
          "customerFaxNumber": {
            "example": ""
          },
          "customerFirstName": {
            "type": "object",
            "example": "Eric"
          },
          "customerId": {
            "example": 200000026176
          },
          "customerLastName": {
            "example": "Scott"
          },
          "customerPhoneNumber": {
            "example": "(617) 631-7886"
          },
          "customerRefId": {
            "example": 9012
          },
          "customerSecondaryNumber": {
            "example": "(617) 682-5782"
          },
          "customerState": {
            "example": "MA"
          },
          "customerZip": {
            "example": 1095
          },
          "systemCustomerRefId": {
            "example": 1234
          }
        },
        "description": "This is a resource for querying customers. The response will include a customerList of individual customer records."
      },
      "BadRequestResponse": {
        "type": "object",
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/BadRequestResponse_metadata"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "message": {
            "description": "Error message",
            "example": "This is a sample error"
          }
        }
      },
      "BadRequestResponse_metadata": {
        "type": "object",
        "properties": {
          "errorCount": {
            "description": "Test",
            "example": 1
          },
          "errorList": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "example": null
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```