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

# Create a merchant location

Creates a physical location on the merchant and appends its id to the merchant's `locations` index. `name`, `address`, `mcc` and `phone` are required and are stored exactly as supplied — a location never inherits the merchant's own values. If `bankingId` is supplied it must reference an existing bank account on this merchant, otherwise the request is rejected with HTTP 400. `connectionData` is optional per-connection configuration: at most one entry per `processor`, whose value must be a recognised processor name. Entry ids are server-minted — supplying one on create returns HTTP 400. Entries for Preczn-managed processors (currently `AdyenForPlatforms`) are written by Preczn, not by clients: supplying one returns HTTP 400. The merchant does NOT need an existing connection for that processor, since these values are an input to boarding rather than a result of it.

# 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": {
      "post": {
        "description": "Creates a physical location on the merchant and appends its id to the merchant's `locations` index. `name`, `address`, `mcc` and `phone` are required and are stored exactly as supplied — a location never inherits the merchant's own values. If `bankingId` is supplied it must reference an existing bank account on this merchant, otherwise the request is rejected with HTTP 400. `connectionData` is optional per-connection configuration: at most one entry per `processor`, whose value must be a recognised processor name. Entry ids are server-minted — supplying one on create returns HTTP 400. Entries for Preczn-managed processors (currently `AdyenForPlatforms`) are written by Preczn, not by clients: supplying one returns HTTP 400. The merchant does NOT need an existing connection for that processor, since these values are an input to boarding rather than a result of it.",
        "operationId": "createMerchantLocation",
        "parameters": [
          {
            "name": "merchantId",
            "required": true,
            "in": "path",
            "description": "The Preczn merchant to attach the location to.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLocationDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Location created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure, `bankingId` does not match a bank account on this merchant, or `connectionData` names an unknown processor, repeats a processor, supplies an entry id, or supplies an entry for a Preczn-managed processor.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized (test-mode mismatch)."
          },
          "403": {
            "description": "Forbidden (platform mismatch)."
          },
          "404": {
            "description": "Merchant not found."
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Create a merchant location",
        "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."
                ]
              }
            ]
          }
        }
      },
      "CreateLocationAddressDto": {
        "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.",
            "minLength": 1
          },
          "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.",
            "minLength": 1
          },
          "region": {
            "type": "string",
            "maxLength": 50,
            "example": "CA",
            "description": "State, province, or region code.",
            "minLength": 1
          },
          "postal": {
            "type": "string",
            "maxLength": 20,
            "example": "94105",
            "description": "Postal or ZIP code.",
            "minLength": 1
          },
          "country": {
            "type": "string",
            "maxLength": 3,
            "example": "USA",
            "description": "ISO 3166-1 alpha-3 country code.",
            "format": "iso3166-1-alpha-3",
            "minLength": 1
          }
        },
        "required": [
          "address1",
          "city",
          "region",
          "postal",
          "country"
        ]
      },
      "CreateLocationConnectionDataDto": {
        "type": "object",
        "properties": {
          "processor": {
            "type": "string",
            "maxLength": 50,
            "example": "JackHenry",
            "description": "The connection this entry configures. Must be a valid processor name. At most one entry per processor per location.",
            "minLength": 1
          }
        },
        "required": [
          "processor"
        ]
      },
      "CreateLocationDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255,
            "example": "Market Street Flagship",
            "description": "Human-readable name for the location.",
            "minLength": 1
          },
          "address": {
            "description": "Physical address of the location.",
            "allOf": [
              {
                "$ref": "#/components/schemas/CreateLocationAddressDto"
              }
            ]
          },
          "mcc": {
            "type": "string",
            "maxLength": 4,
            "example": "5812",
            "description": "Merchant category code for this location.",
            "pattern": "^\\d{4}$",
            "minLength": 1
          },
          "phone": {
            "type": "string",
            "maxLength": 14,
            "example": "+14155550188",
            "description": "Location phone in strict E164 format (+1XXXXXXXXXX).",
            "minLength": 1
          },
          "bankingId": {
            "type": "string",
            "maxLength": 50,
            "nullable": true,
            "example": "midBank_5kaft3yde39cssvv3w389kens8",
            "description": "Id of the merchant `banking[]` entry funding this location. Omit or send `null` for no assigned account."
          },
          "connectionData": {
            "example": [
              {
                "processor": "JackHenry",
                "debitSingleTransAmount": 5000,
                "debitSingleDayCount": 25,
                "debitSingleDayAmount": 20000,
                "debitPeriodCount": 150,
                "debitPeriodAmount": 100000
              }
            ],
            "description": "Per-connection configuration for this location, at most one entry per processor. Do NOT supply entry ids on create. They are server-minted. Entries for Preczn-managed processors (currently AdyenForPlatforms) cannot be supplied: such an entry is rejected with HTTP 400. 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/CreateLocationConnectionDataDto"
            }
          }
        },
        "required": [
          "name",
          "address",
          "mcc",
          "phone"
        ]
      },
      "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"
        ]
      }
    },
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "name": "x-api-key",
        "in": "header"
      }
    }
  }
}
```