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

# Update a location (partial)

Partial update of a single location row — NOT a full-array replace. An omitted field keeps its stored value; a provided field replaces it. The core embedded fields (`name`, `address` and its sub-fields, `mcc`, `phone`) may not be set to `null`: a location's site facts are always concrete, so there is no "clear back to inherited" and a null is rejected with HTTP 400. `bankingId` is the one nullable field — send a valid account id to assign (re-validated against the merchant's `banking[]` exactly as create does), or `null` to clear the assignment. `primaryLocationId` is NOT settable here; it lives on the merchant PATCH, and sending it — or any other unrecognized field — returns 400 rather than being silently ignored. `connectionData` is the one ID-ANCHORED REPLACEMENT field: the array you send is the desired end state of the client-written entries. An entry carrying an `id` updates that stored entry, an entry without one is created, and ANY STORED CLIENT-WRITTEN ENTRY WHOSE ID YOU OMIT IS DELETED. Send `[]` to remove every client-written entry; `null` is rejected. An `id` that does not belong to this location returns HTTP 400 naming the offending id(s). Entries for Preczn-managed processors (currently `AdyenForPlatforms`) are outside that replacement: they are always kept, whatever array you send, and they are returned in the response. Leave them out when sending the array back — an entry naming a Preczn-managed processor returns HTTP 400, and a Preczn-managed entry's `id` cannot be addressed (it is reported as not found on this location).

# 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/{locationId}": {
      "patch": {
        "description": "Partial update of a single location row — NOT a full-array replace. An omitted field keeps its stored value; a provided field replaces it. The core embedded fields (`name`, `address` and its sub-fields, `mcc`, `phone`) may not be set to `null`: a location's site facts are always concrete, so there is no \"clear back to inherited\" and a null is rejected with HTTP 400. `bankingId` is the one nullable field — send a valid account id to assign (re-validated against the merchant's `banking[]` exactly as create does), or `null` to clear the assignment. `primaryLocationId` is NOT settable here; it lives on the merchant PATCH, and sending it — or any other unrecognized field — returns 400 rather than being silently ignored. `connectionData` is the one ID-ANCHORED REPLACEMENT field: the array you send is the desired end state of the client-written entries. An entry carrying an `id` updates that stored entry, an entry without one is created, and ANY STORED CLIENT-WRITTEN ENTRY WHOSE ID YOU OMIT IS DELETED. Send `[]` to remove every client-written entry; `null` is rejected. An `id` that does not belong to this location returns HTTP 400 naming the offending id(s). Entries for Preczn-managed processors (currently `AdyenForPlatforms`) are outside that replacement: they are always kept, whatever array you send, and they are returned in the response. Leave them out when sending the array back — an entry naming a Preczn-managed processor returns HTTP 400, and a Preczn-managed entry's `id` cannot be addressed (it is reported as not found on this location).",
        "operationId": "updateMerchantLocation",
        "parameters": [
          {
            "name": "merchantId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "locationId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateLocationDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Location updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Validation failure, an unrecognized field, a null core field, a `bankingId` that does not match a bank account on this merchant, or a `connectionData` entry naming an unknown processor, repeating a processor, carrying an id not found on this location, or naming 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, or location not found on this merchant."
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ],
        "summary": "Update a location (partial)",
        "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"
        ]
      },
      "UpdateLocationConnectionDataDto": {
        "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
          },
          "id": {
            "type": "string",
            "maxLength": 50,
            "example": "midLocCon_01ABCDEFGHJKMNPQRSTVWXYZ",
            "description": "Id of an existing entry. Include it to update that entry. Omit it to create a new entry."
          }
        },
        "required": [
          "processor"
        ]
      },
      "UpdateLocationDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255,
            "example": "Market Street Flagship",
            "description": "Human-readable name for the location. May not be cleared to null."
          },
          "address": {
            "description": "Physical address of the location. May not be cleared to null.",
            "allOf": [
              {
                "$ref": "#/components/schemas/LocationAddressDto"
              }
            ]
          },
          "mcc": {
            "type": "string",
            "maxLength": 4,
            "example": "5812",
            "description": "Merchant category code for this location. May not be cleared to null."
          },
          "phone": {
            "type": "string",
            "maxLength": 14,
            "example": "+14155550188",
            "description": "Location phone in strict E164 format (+1XXXXXXXXXX). May not be cleared to null."
          },
          "bankingId": {
            "type": "string",
            "maxLength": 50,
            "nullable": true,
            "example": "midBank_5kaft3yde39cssvv3w389kens8",
            "description": "Id of the merchant `banking[]` entry funding this location. Send `null` to clear the assignment."
          },
          "connectionData": {
            "example": [
              {
                "id": "midLocCon_01ABCDEFGHJKMNPQRSTVWXYZ",
                "processor": "JackHenry",
                "debitSingleTransAmount": 7500,
                "debitSingleDayCount": 25,
                "debitSingleDayAmount": 20000,
                "debitPeriodCount": 150,
                "debitPeriodAmount": 100000
              }
            ],
            "description": "Per-connection configuration. ID-ANCHORED REPLACEMENT: the array sent is the desired end state of the client-written entries. An entry with an `id` updates that entry, an entry without one is created, and any stored client-written entry whose id is absent from the array is DELETED. May not be cleared to null; send `[]` to remove all client-written entries. Entries for Preczn-managed processors (currently AdyenForPlatforms) cannot be supplied (HTTP 400) and are kept when omitted. They may appear in responses, so leave them out when sending the array back. 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/UpdateLocationConnectionDataDto"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "name": "x-api-key",
        "in": "header"
      }
    }
  }
}
```