---
updatedAt: 2026-08-28T20:13:20.000Z
agentTools:
  projectIndex: https://docs.preczn.com/llms.txt
---

# List locations for a merchant

Returns one page of locations in the platform's standard list envelope — `{ locations, hasMore, lastId }` — never a bare array. Page forward by passing the previous response's `lastId`. A merchant with no locations returns an empty envelope with HTTP 200, not a 404.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Preczn API",
    "version": "1.0",
    "contact": {}
  },
  "servers": [
    {
      "url": "https://api.preczn.com"
    }
  ],
  "paths": {
    "/v1/merchants/{merchantId}/locations": {
      "get": {
        "description": "Returns one page of locations in the platform's standard list envelope — `{ locations, hasMore, lastId }` — never a bare array. Page forward by passing the previous response's `lastId`. A merchant with no locations returns an empty envelope with HTTP 200, not a 404.",
        "operationId": "listMerchantLocations",
        "parameters": [
          {
            "name": "merchantId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lastId",
            "required": false,
            "in": "query",
            "description": "The `lastId` from the previous page. Omit for the first page.",
            "schema": {
              "example": "midLoc_01jr8qk2m9x4tn5vw7yz3a",
              "type": "string"
            }
          },
          {
            "name": "pageSize",
            "required": false,
            "in": "query",
            "description": "Locations per page, 1–50. Defaults to 10.",
            "schema": {
              "example": 10,
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Locations returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationListResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "`pageSize` is not a number between 1 and 50.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized (test-mode mismatch)."
          },
          "403": {
            "description": "Forbidden (platform mismatch)."
          },
          "404": {
            "description": "Merchant not found, or `lastId` is not a location on this merchant."
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "List locations for a merchant",
        "tags": [
          "Merchant Locations"
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ApiErrorResponse": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "description": "Http status code."
          },
          "error": {
            "type": "string",
            "description": "General http error message"
          },
          "message": {
            "oneOf": [
              {
                "type": "string",
                "description": "Error message"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "List of error messages or validation failure",
                "example": [
                  "field should not be empty.",
                  "field should be non zero."
                ]
              }
            ]
          }
        }
      },
      "LocationAddressDto": {
        "type": "object",
        "properties": {
          "address1": {
            "type": "string",
            "maxLength": 255,
            "example": "1 Market St",
            "description": "Street address line 1. Must be a street address; a PO box is rejected."
          },
          "address2": {
            "type": "string",
            "maxLength": 255,
            "example": "Suite 400",
            "description": "Street address line 2 (suite, unit, floor)."
          },
          "city": {
            "type": "string",
            "maxLength": 255,
            "example": "San Francisco",
            "description": "City."
          },
          "region": {
            "type": "string",
            "maxLength": 50,
            "example": "CA",
            "description": "State, province, or region code."
          },
          "postal": {
            "type": "string",
            "maxLength": 20,
            "example": "94105",
            "description": "Postal or ZIP code."
          },
          "country": {
            "type": "string",
            "maxLength": 3,
            "example": "USA",
            "description": "ISO 3166-1 alpha-3 country code."
          }
        }
      },
      "LocationConnectionDataResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "midLocCon_01ABCDEFGHJKMNPQRSTVWXYZ",
            "description": "The entry's server-minted id. Stable across edits."
          },
          "processor": {
            "type": "string",
            "example": "JackHenry",
            "description": "The connection this entry configures."
          }
        },
        "required": [
          "id",
          "processor"
        ]
      },
      "LocationResponseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "midLoc_01jr8qk2m9x4tn5vw7yz3a",
            "description": "Location id."
          },
          "merchantId": {
            "type": "string",
            "example": "mid_2zyd88xrnr90xskmjmqpd0x1vj",
            "description": "The Preczn merchant this location belongs to."
          },
          "name": {
            "type": "string",
            "maxLength": 255,
            "example": "Market Street Flagship",
            "description": "Human-readable name for the location."
          },
          "address": {
            "description": "Physical address of the location.",
            "allOf": [
              {
                "$ref": "#/components/schemas/LocationAddressDto"
              }
            ]
          },
          "mcc": {
            "type": "string",
            "maxLength": 4,
            "example": "5812",
            "description": "Merchant category code for this location."
          },
          "phone": {
            "type": "string",
            "maxLength": 14,
            "example": "+14155550188",
            "description": "Location phone in strict E164 format (+1XXXXXXXXXX)."
          },
          "bankingId": {
            "type": "string",
            "nullable": true,
            "example": "midBank_5kaft3yde39cssvv3w389kens8",
            "description": "Id of the merchant `banking[]` entry funding this location, or `null` when unassigned."
          },
          "connectionData": {
            "example": [
              {
                "id": "midLocCon_01ABCDEFGHJKMNPQRSTVWXYZ",
                "processor": "JackHenry",
                "debitSingleTransAmount": 7500,
                "debitSingleDayCount": 25,
                "debitSingleDayAmount": 20000,
                "debitPeriodCount": 150,
                "debitPeriodAmount": 100000
              }
            ],
            "description": "Per-connection configuration for this location, one entry per processor. Each connection adds its own fields at the root of its entry. Jack Henry requires five ACH limit fields on every location: `debitSingleTransAmount`, `debitSingleDayCount`, `debitSingleDayAmount`, `debitPeriodCount`, and `debitPeriodAmount`. Each is a whole number greater than 0; amounts are in whole dollars, and the period is two weeks. Within each group a limit must be at least the one before it: `debitSingleTransAmount` ≤ `debitSingleDayAmount` ≤ `debitPeriodAmount`, and `debitSingleDayCount` ≤ `debitPeriodCount`. See the Jack Henry connection guide at https://docs.preczn.com/docs/jack-henry.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LocationConnectionDataResponseDto"
            }
          },
          "createdOn": {
            "type": "string",
            "example": "2024-05-22T04:00:00Z",
            "description": "Date and time the location was created (ISO-8601)."
          },
          "modifiedOn": {
            "type": "string",
            "example": "2024-05-22T04:00:00Z",
            "description": "Date and time the location was last modified (ISO-8601)."
          }
        },
        "required": [
          "id",
          "merchantId",
          "name",
          "address",
          "mcc",
          "phone",
          "createdOn",
          "modifiedOn"
        ]
      },
      "LocationListResponseDto": {
        "type": "object",
        "properties": {
          "locations": {
            "description": "Array of location records",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LocationResponseDto"
            }
          },
          "hasMore": {
            "type": "boolean",
            "description": "Boolean flag indicating whether or not there are more Locations to request using `lastId` value."
          },
          "lastId": {
            "type": "string",
            "example": "midLoc_01jr8qk2m9x4tn5vw7yz3a",
            "description": "The Id of the last Location in the current result set, used to request the next page of Locations."
          }
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "name": "x-api-key",
        "in": "header"
      }
    }
  }
}
```