Locations
A Location is a place a merchant operates from: a store, a warehouse, a stockroom. Locations are operational children of a merchant, not organization hierarchy nodes.
A Location has a name, a postal address, and a time zone, and other parts of the API refer to it by location_id. Create one for every place that holds stock, ships or delivers orders, offers pickup, or has registers assigned to it. Payments don't take a Location.
| Area | How it uses a Location |
|---|---|
| Inventory | Stock is kept per Location. Orders and reservations claim stock only at Locations that allow inventory allocation. |
| Delivery | Shipping and local delivery leave from origin Locations, and pickup methods offer Locations as stores. Delivery uses the address, and counts business days in the Location's time zone. |
| Sales tax | When every taxable item is picked up at one store, that store's address is the order's tax location. |
| Fulfillment | A fulfillment's location_id names the Location responsible for it. |
| Returns | Returned items are received and inspected at a Location, and restocked into its inventory. |
| Devices | A register or terminal can be assigned to one active Location. |
Create a Location#
name, address, and timezone are required. timezone is an IANA name such as America/New_York. address.country is an uppercase ISO 3166-1 alpha-2 code such as US, and a US address also needs state and postal_code. Flint rejects values it would have to correct, such as a lowercase country code, with 400 INVALID_REQUEST and the field in param.
A coordinate is optional. Send coordinate together with coordinate_source, either merchant_supplied or geocoded. A new Location is active unless you send "status": "inactive", and it doesn't route stock to orders unless you send "inventory_allocation_enabled": true, which needs an extra scope.
curl -X POST https://api.withflintpay.com/v1/locations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: location-brooklyn-warehouse" \
-H "Content-Type: application/json" \
-d '{
"name": "Brooklyn warehouse",
"external_reference_id": "wh-bk-01",
"address": {
"line1": "120 Kent Avenue",
"city": "Brooklyn",
"state": "NY",
"postal_code": "11249",
"country": "US"
},
"timezone": "America/New_York",
"coordinate": { "latitude": 40.7213, "longitude": -73.9615 },
"coordinate_source": "merchant_supplied",
"inventory_allocation_enabled": true
}'
{
"data": {
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"version": 1,
"name": "Brooklyn warehouse",
"status": "active",
"metadata": {},
"external_reference_id": "wh-bk-01",
"geography_version": 1,
"address": {
"line1": "120 Kent Avenue",
"city": "Brooklyn",
"state": "NY",
"postal_code": "11249",
"country": "US"
},
"timezone": "America/New_York",
"coordinate": { "latitude": 40.7213, "longitude": -73.9615 },
"coordinate_source": "merchant_supplied",
"validation_status": "not_validated",
"inventory_allocation_enabled": true,
"created_at": "2026-10-28T15:04:00Z",
"updated_at": "2026-10-28T15:04:00Z"
},
"request_id": "req_01KWM6N1JHF8ZAKK41C12T5VJ9"
}
external_reference_id holds your own ID for the place, such as a warehouse code from another system. Flint doesn't require it to be unique. To find Locations by it, list with external_reference_id=wh-bk-01 for an exact match. The query parameter is a looser search: it matches the start of a Location ID, or text anywhere in an external reference ID or name.
Status#
- active moves to inactive on PATCH status: inactive
- inactive moves to active on PATCH status: active
- active moves to archived on DELETE
- inactive moves to archived on DELETE
status on locationactiveIn operation. Only an active Location can route stock to orders, appear in an allocation policy or a delivery location set, or take a device assignment.inactiveClosed for now, and reversible:PATCHstatusback toactiveto reopen it. It keeps its stock, and you can still adjust, count, transfer, and receive stock there, but orders can't claim it.archivedFinalRetired byDELETE, and final: an archived Location can't be changed or reactivated. It stays readable by ID, so fulfillments, inventory movements, and other records keep their reference. Lists leave it out unlessstatusnamesarchived.
What blocks deactivating or archiving#
Flint refuses to deactivate or archive a Location that other records still depend on. The request returns 409 RESOURCE_IN_USE and changes nothing. details[0].blocking_resources lists up to 25 of the blockers by resource_type and resource_id, and details[0].blocking_resource_count gives the total.
Deactivating and archiving are both blocked by:
resource_type | Blocker, and how to clear it |
|---|---|
device | A device assigned to the Location. Move the device to another Location, or send "location_id": null. |
inventory_allocation_policy | An active allocation policy that lists the Location. Remove the Location from the policy. |
fulfillment | An open fulfillment at the Location. Complete or cancel it. |
Archiving is also blocked by:
resource_type | Blocker, and how to clear it |
|---|---|
inventory_level | Stock with any quantity other than zero, including held, committed, safety, and incoming stock. Transfer or adjust the stock out, and set safety stock to zero. |
inventory_reservation | An active reservation that holds or commits stock there. Consume or release that stock. |
inventory_transfer | A transfer to or from the Location that isn't closed. Receive, cancel, or otherwise resolve it until it closes. |
inventory_count | A draft count at the Location. Apply or cancel it. |
merchant | Settings saved for this Location alone. |
Deactivating or archiving a Location also affects sales tax. An open order whose automatic tax was calculated from this Location, and that has no issued invoice, moves to tax status incomplete. Updating the order calculates its tax again.
Update a Location#
PATCH /v1/locations/{location_id} changes the name, metadata, external_reference_id, status, geography, and inventory_allocation_enabled, alone or together. Fields you leave out keep their values, and a request with none of them returns 400 INVALID_REQUEST. Archiving is the one change PATCH doesn't make: use DELETE.
Versions#
A Location carries two version numbers.
versionadvances with every accepted write. Send theversionyou read asexpected_versionto guard a write: in the body forPATCH, and as a query parameter forDELETE.expected_versionis optional. When it is stale, the request returns409 VERSION_CONFLICTwith the current value indetails[0].current_version, and the Location is unchanged.geography_versionadvances only when the address, time zone, coordinate, or coordinate source changes to a new value. Sending the same geography again leaves it alone. It is read-only, and records that depend on a Location's geography pin it.
For example, a checkout session records the Location geography it evaluated delivery quotes against as location_geography_version in delivery_pinned_dependencies, and a delivery revocation can target one exact geography version.
Change the geography#
address and coordinate are each replaced whole, so send every line of the address, including line2 when there is one. A coordinate describes the address it came with, which gives these rules:
- A request that sends
addressmust also sendcoordinate: the new coordinate, ornullto clear it. - A non-null
coordinateneedscoordinate_sourcein the same request. "coordinate": nullclears both the coordinate and its source.coordinate_sourcemust then be omitted ornull.timezoneandcoordinatecan each change withoutaddress.
Moving the Brooklyn warehouse to a new address, with its new coordinate:
curl -X PATCH https://api.withflintpay.com/v1/locations/loc_01K0P7W6A4N9F3J2T8Q5R1C6XM \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: location-brooklyn-move-water-st" \
-H "Content-Type: application/json" \
-d '{
"expected_version": 1,
"address": {
"line1": "55 Water Street",
"line2": "Unit 4",
"city": "Brooklyn",
"state": "NY",
"postal_code": "11201",
"country": "US"
},
"coordinate": { "latitude": 40.7033, "longitude": -73.9881 },
"coordinate_source": "merchant_supplied"
}'
{
"data": {
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"version": 2,
"name": "Brooklyn warehouse",
"status": "active",
"metadata": {},
"external_reference_id": "wh-bk-01",
"geography_version": 2,
"address": {
"line1": "55 Water Street",
"line2": "Unit 4",
"city": "Brooklyn",
"state": "NY",
"postal_code": "11201",
"country": "US"
},
"timezone": "America/New_York",
"coordinate": { "latitude": 40.7033, "longitude": -73.9881 },
"coordinate_source": "merchant_supplied",
"validation_status": "not_validated",
"inventory_allocation_enabled": true,
"created_at": "2026-10-28T15:04:00Z",
"updated_at": "2026-10-28T16:20:00Z"
},
"request_id": "req_01KWM6SE31GYFR1FNQTDHY4SNQ"
}
Like deactivating, a change to the geography moves open orders whose automatic tax was calculated from this Location to tax status incomplete until they're updated.
Inventory allocation#
Every Location can hold stock. Two separate rules decide what you can do with it.
Any Location that isn't archived
Record stock
Adjustments, counts, transfers, receipts, safety stock, and Return restocks. These work at an inactive Location too, whatever inventory_allocation_enabled says.
Active, with allocation enabled
Claim stock for demand
Reservations, order holds, fixed_location routing sources, allocation policies, and pickup stock. The Location must be active and have inventory_allocation_enabled: true.
A claim that names a Location that can't route returns 409 ACTION_NOT_ALLOWED. details[0].reason is unsupported_state for an inactive or archived Location, and configuration_required for an active one with allocation off. Recording stock at an archived Location also returns unsupported_state. When an order routes through an allocation policy, Flint skips any Location in the policy that can't route and tries the others.
inventory_allocation_enabled defaults to false, so a new office or pickup counter doesn't start receiving routed orders by accident. Send true on create or on a later PATCH to turn routing on, and false to turn it off. The field is always a boolean: null is rejected, and leaving it out keeps the current setting. Turning allocation off or deactivating never removes stock already on hand, and you can deactivate and turn allocation off in the same request. To find routing Locations, list with inventory_allocation_enabled=true.
The Inventory guide walks through stocking a Location and routing orders across several.
Scopes#
| Scope | Grants |
|---|---|
merchants.locations.read | Get and list Locations, including inventory_allocation_enabled and its list filter. |
merchants.locations.write | Create, update, and archive Locations, and everything the read scope allows. |
commerce.inventory.allocation.write | Send inventory_allocation_enabled on create or PATCH, with true or false. It works only alongside merchants.locations.write and grants no Location writes alone. |
A request that sends inventory_allocation_enabled without commerce.inventory.allocation.write returns 403 INSUFFICIENT_SCOPE with param: inventory_allocation_enabled and changes nothing. So a key with only merchants.locations.write can manage a Location's name, geography, and status, but can't change whether its stock is routed to orders and pickup.
Errors#
- StatusHTTP 400CodeINVALID_
REQUEST What to doparamnames the field, such asaddress.country,timezone,coordinate, orcoordinate_source. Common causes are a lowercase country code, a US address withoutstateorpostal_code, a time zone that isn't an IANA name, anaddresswithoutcoordinate, a coordinate without its source, or aPATCHwith no fields. - StatusHTTP 403What to doThe credential lacks a Location scope, or sent
inventory_allocation_enabledwithoutcommerce.inventory.allocation.write. In the second caseparamisinventory_allocation_enabled. - StatusHTTP 404What to doNo Location with this
location_idexists in the credential's environment. - StatusHTTP 409What to doThe Location changed since you read it. Read it again, reapply your change, and send the new
versionasexpected_versionwith a newIdempotency-Key. - StatusHTTP 409CodeRESOURCE_
IN_ USE What to doDeactivating or archiving is blocked.details[0].blocking_resourceslists what still depends on the Location. Clear those and retry.
Related#
InventoryStock a Location, hold units at checkout, and route orders across several Locations.Delivery optionsShip from warehouses and offer pickup at stores, using each Location's address and time zone.Fulfill and ship ordersPack, ship, and hand over orders from the Location responsible for them.The Location object#
A physical or logical place a merchant operates from. Every Location can hold stock. inventory_allocation_enabled controls whether it accepts inventory allocation.
Returned by GET /v1/locations/{location_id} and carried by the endpoints below.
Attributes
addressobject or nullRequiredPublished postal address. `null` when the Location has no address on record.
citystringCity or locality of the address.
countrystringRequiredISO 3166-1 alpha-2 country code.
line1stringStreet address, including the building number.
line2stringApartment, suite, floor, or other address details.
postal_codestringPostal or ZIP code of the address.
statestringState, province, or region of the address.
coordinateobjectLatitude and longitude of the Location. Omitted when none was sent.
latitudenumberRequiredLatitude between -90 and 90. Responses always include this field, including 0.
longitudenumberRequiredLongitude between -180 and 180. Responses always include this field, including 0.
coordinate_sourceenumWhere `coordinate` came from. Omitted when the Location has no coordinate.
merchant_suppliedgeocoded
created_atstringRequiredTime the Location was created.
external_reference_idstringCaller-owned identifier for this resource in an external system.
geography_versionintegerRequiredRead-only version that advances only on geography changes and is pinned by tax and delivery dependencies. It is not a request fence.
inventory_allocation_enabledbooleanRequiredWhether this Location accepts inventory allocation. Always present, including false when allocation is not configured.
location_idstringRequiredStable Location ID.
metadatamap of stringRequiredCaller-owned metadata.
namestringRequiredMerchant-facing Location name.
normalized_addressobjectProvider-normalized address used for geography evaluation.
citystringCity or locality of the address.
countrystringRequiredISO 3166-1 alpha-2 country code.
line1stringStreet address, including the building number.
line2stringApartment, suite, floor, or other address details.
postal_codestringPostal or ZIP code of the address.
statestringState, province, or region of the address.
statusenumRequiredCurrent Location lifecycle status.
activeinactivearchived
timezonestringRequiredIANA timezone for local schedules.
updated_atstringRequiredTime the Location last changed.
validation_statusenumRequiredAddress validation status.
not_validatedvalidatedmerchant_verified
versionintegerRequiredOptimistic-concurrency version that advances on every Location change.
{
"address": {
"city": "Brooklyn",
"country": "US",
"line1": "120 Kent Avenue",
"postal_code": "11249",
"state": "NY"
},
"coordinate": {
"latitude": 40.7213,
"longitude": -73.9615
},
"coordinate_source": "merchant_supplied",
"created_at": "2026-05-02T11:04:00Z",
"geography_version": 2,
"inventory_allocation_enabled": true,
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"metadata": {
"region": "northeast"
},
"name": "Brooklyn warehouse",
"status": "active",
"timezone": "America/New_York",
"updated_at": "2026-07-14T09:12:00Z",
"validation_status": "not_validated",
"version": 4
}List locations#
/v1/locationsRequires scope merchants.locations.read or merchants.locations.write
Rate limit: read
List Locations. inventory_allocation_enabled is always included and can be filtered with the Location read scope. The false filter includes Locations without an inventory allocation configuration. Default order: location_id ascending; this key uniquely orders the results.
Query parameters
page_sizeintegerMaximum number of results to return, from 1 to 100. Defaults to 20.
page_tokenstringOpaque next_page_token from the previous response. Omit on the first request. You may change `page_size` between pages. Reuse it with the same endpoint, filters, sort, and request context. Do not parse or construct tokens. An invalid, expired, or mismatched token returns a validation error.
statusarray of enumFilter by status. Omitted, the list leaves out archived rows; name archived to include them. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.
activeinactivearchived
inventory_allocation_enabledbooleanFilter by whether the Location accepts inventory allocation. false includes Locations without an inventory allocation configuration.
external_reference_idstringExact-match filter on the caller-owned external reference ID.
querystringSearch Location ID, external reference ID, or name.
Response · 200
Successful response.
dataarray of objectRequiredResource, collection, or operation result returned by this request.
addressobject or nullRequiredPublished postal address. `null` when the Location has no address on record.
coordinateobjectLatitude and longitude of the Location. Omitted when none was sent.
coordinate_sourceenumWhere `coordinate` came from. Omitted when the Location has no coordinate.
merchant_suppliedgeocoded
created_atstringRequiredTime the Location was created.
external_reference_idstringCaller-owned identifier for this resource in an external system.
geography_versionintegerRequiredRead-only version that advances only on geography changes and is pinned by tax and delivery dependencies. It is not a request fence.
inventory_allocation_enabledbooleanRequiredWhether this Location accepts inventory allocation. Always present, including false when allocation is not configured.
location_idstringRequiredStable Location ID.
metadatamap of stringRequiredCaller-owned metadata.
namestringRequiredMerchant-facing Location name.
normalized_addressobjectProvider-normalized address used for geography evaluation.
statusenumRequiredCurrent Location lifecycle status.
activeinactivearchived
timezonestringRequiredIANA timezone for local schedules.
updated_atstringRequiredTime the Location last changed.
validation_statusenumRequiredAddress validation status.
not_validatedvalidatedmerchant_verified
versionintegerRequiredOptimistic-concurrency version that advances on every Location change.
metaobjectAdditional information about this response.
api_versionstringAPI version used to produce this response.
idempotency_replayedbooleanWhether this response replays a stored result for the supplied Idempotency-Key.
trace_idstringTrace identifier to include when contacting Flint about this request.
warningsarray of objectConditions that need attention even though the request succeeded.
next_page_tokenstringOpaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl https://api.withflintpay.com/v1/locations \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": [
{
"address": {
"city": "Brooklyn",
"country": "US",
"line1": "120 Kent Avenue",
"postal_code": "11249",
"state": "NY"
},
"coordinate": {
"latitude": 40.7213,
"longitude": -73.9615
},
"coordinate_source": "merchant_supplied",
"created_at": "2026-05-02T11:04:00Z",
"geography_version": 2,
"inventory_allocation_enabled": true,
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"metadata": {
"region": "northeast"
},
"name": "Brooklyn warehouse",
"status": "active",
"timezone": "America/New_York",
"updated_at": "2026-07-14T09:12:00Z",
"validation_status": "not_validated",
"version": 4
}
],
"meta": {
"api_version": "2026-09-07"
},
"next_page_token": "",
"request_id": "req_01KWM6N1JHF8ZAKK41C12T5VJ9"
}Create location#
/v1/locationsIdempotentRequires scope merchants.locations.write
Also requires commerce.inventory.allocation.write when setting inventory_allocation_enabled.
Rate limit: write
Create a Location. Sending inventory_allocation_enabled also requires commerce.inventory.allocation.write. Omitted inventory_allocation_enabled defaults to false. Every Location can hold stock. Idempotency is scoped to the authenticated merchant, environment, and endpoint. Its fingerprint includes the canonical request body.
Request body
addressobjectRequiredPostal address of the Location.
citystringRequiredNonempty after surrounding whitespace is trimmed. Limits count Unicode code points after trimming.
countrystringRequiredA real ISO 3166-1 alpha-2 country code. Lowercase codes and surrounding whitespace are rejected.
line1stringRequiredNonempty after surrounding whitespace is trimmed. Limits count Unicode code points after trimming.
line2string or nullNonempty after surrounding whitespace is trimmed. Limits count Unicode code points after trimming. Send null or omit it when the address has none.
postal_codestring or nullNonempty after surrounding whitespace is trimmed. Limits count Unicode code points after trimming. Send null or omit it when the address has none. Required for US addresses.
statestring or nullNonempty after surrounding whitespace is trimmed. Limits count Unicode code points after trimming. Send null or omit it when the address has none. Required for US addresses.
coordinateobjectLatitude and longitude of the Location. Send it with `coordinate_source`.
latitudenumberRequiredLatitude between -90 and 90. Responses always include this field, including 0.
longitudenumberRequiredLongitude between -180 and 180. Responses always include this field, including 0.
coordinate_sourceenum or nullWhere `coordinate` came from: `merchant_supplied` if you chose or measured it, `geocoded` if you got it by geocoding the address. Required with `coordinate`, and rejected without it. `null` is the same as omitting the field.
merchant_suppliedgeocodednull
external_reference_idstringCaller-owned identifier for this resource in an external system.
inventory_allocation_enabledbooleanWhether this Location accepts inventory allocation. Sending this field requires commerce.inventory.allocation.write in addition to the route scope.
metadatamap of stringCaller-owned metadata. Values can't be empty strings. Keys starting with flint_ are reserved for Flint, are not returned, and cannot be written through the public API.
namestringRequiredMerchant-facing Location name, from 1 to 255 characters.
statusenumStatus the Location starts in. Defaults to `active`.
activeinactive
timezonestringRequiredIANA time zone for the Location's local schedules, such as `America/New_York`.
Response · 201
Successful response.
dataobjectRequiredResource, collection, or operation result returned by this request.
addressobject or nullRequiredPublished postal address. `null` when the Location has no address on record.
coordinateobjectLatitude and longitude of the Location. Omitted when none was sent.
coordinate_sourceenumWhere `coordinate` came from. Omitted when the Location has no coordinate.
merchant_suppliedgeocoded
created_atstringRequiredTime the Location was created.
external_reference_idstringCaller-owned identifier for this resource in an external system.
geography_versionintegerRequiredRead-only version that advances only on geography changes and is pinned by tax and delivery dependencies. It is not a request fence.
inventory_allocation_enabledbooleanRequiredWhether this Location accepts inventory allocation. Always present, including false when allocation is not configured.
location_idstringRequiredStable Location ID.
metadatamap of stringRequiredCaller-owned metadata.
namestringRequiredMerchant-facing Location name.
normalized_addressobjectProvider-normalized address used for geography evaluation.
statusenumRequiredCurrent Location lifecycle status.
activeinactivearchived
timezonestringRequiredIANA timezone for local schedules.
updated_atstringRequiredTime the Location last changed.
validation_statusenumRequiredAddress validation status.
not_validatedvalidatedmerchant_verified
versionintegerRequiredOptimistic-concurrency version that advances on every Location change.
metaobjectAdditional information about this response.
api_versionstringAPI version used to produce this response.
idempotency_replayedbooleanWhether this response replays a stored result for the supplied Idempotency-Key.
trace_idstringTrace identifier to include when contacting Flint about this request.
warningsarray of objectConditions that need attention even though the request succeeded.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl -X POST https://api.withflintpay.com/v1/locations \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"address": {
"city": "Brooklyn",
"country": "US",
"line1": "120 Kent Avenue",
"postal_code": "11249",
"state": "NY"
},
"inventory_allocation_enabled": true,
"name": "Brooklyn warehouse",
"status": "active",
"timezone": "America/New_York"
}'Get location#
/v1/locations/{location_id}Requires scope merchants.locations.read or merchants.locations.write
Rate limit: read
Returns one location by ID, with its address, timezone, status, and whether it accepts inventory allocation. Archived locations remain readable by ID.
Path parameters
location_idstringRequiredFlint Location ID.
curl https://api.withflintpay.com/v1/locations/loc_01KEZF7C00CMHRRYA3MV996JB2 \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": {
"address": {
"city": "Brooklyn",
"country": "US",
"line1": "120 Kent Avenue",
"postal_code": "11249",
"state": "NY"
},
"coordinate": {
"latitude": 40.7213,
"longitude": -73.9615
},
"coordinate_source": "merchant_supplied",
"created_at": "2026-05-02T11:04:00Z",
"geography_version": 2,
"inventory_allocation_enabled": true,
"location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
"metadata": {
"region": "northeast"
},
"name": "Brooklyn warehouse",
"status": "active",
"timezone": "America/New_York",
"updated_at": "2026-07-14T09:12:00Z",
"validation_status": "not_validated",
"version": 4
},
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM6N1JHF8ZAKK41C12T5VJ9"
}Update location#
/v1/locations/{location_id}IdempotentRequires scope merchants.locations.write
Also requires commerce.inventory.allocation.write when setting inventory_allocation_enabled.
Rate limit: write
Update a Location's profile, availability, geography, and inventory allocation in one call. Sending inventory_allocation_enabled also requires commerce.inventory.allocation.write. The version advances on every change. expected_version is optional and compared with version when sent. Idempotency is scoped to the authenticated merchant, environment, and endpoint. Its fingerprint includes the canonical request body.
Path parameters
location_idstringRequiredFlint Location ID.
Request body
addressobjectComplete replacement postal address, validated as on create. Requires coordinate in the same request, including null to clear it.
citystringRequiredNonempty after surrounding whitespace is trimmed. Limits count Unicode code points after trimming.
countrystringRequiredA real ISO 3166-1 alpha-2 country code. Lowercase codes and surrounding whitespace are rejected.
line1stringRequiredNonempty after surrounding whitespace is trimmed. Limits count Unicode code points after trimming.
line2string or nullNonempty after surrounding whitespace is trimmed. Limits count Unicode code points after trimming. Send null or omit it when the address has none.
postal_codestring or nullNonempty after surrounding whitespace is trimmed. Limits count Unicode code points after trimming. Send null or omit it when the address has none. Required for US addresses.
statestring or nullNonempty after surrounding whitespace is trimmed. Limits count Unicode code points after trimming. Send null or omit it when the address has none. Required for US addresses.
coordinateobject or nullComplete replacement coordinate. Send null to clear both coordinate and coordinate_source. A non-null value requires coordinate_source in the same request.
latitudenumberRequiredLatitude between -90 and 90. Responses always include this field, including 0.
longitudenumberRequiredLongitude between -180 and 180. Responses always include this field, including 0.
coordinate_sourceenum or nullSource of the coordinate sent in the same request. A non-null coordinate requires merchant_supplied or geocoded. Send null only with coordinate: null to clear both fields.
merchant_suppliedgeocodednull
expected_versionintegerVersion last read from the resource returned in `data` (the primary resource for a result object). The write fails with `VERSION_CONFLICT` if it has changed. Requiredness depends on the operation and fields being changed.
external_reference_idstring or nullCaller-owned identifier for this resource in an external system. Send null to clear it.
inventory_allocation_enabledbooleanWhether this Location accepts inventory allocation. Sending this field requires commerce.inventory.allocation.write in addition to the route scope.
metadatamap of string or nullCaller-owned metadata. Omit this field to leave metadata unchanged. Send an object to merge by key, set a key to null to remove it, or set metadata to null to clear all caller-owned metadata. An empty object makes no change. Values can't be empty strings. Keys starting with flint_ are reserved for Flint, are not returned, and cannot be written through the public API.
namestringMerchant-facing Location name, from 1 to 255 characters.
statusenumNew status for the Location. Omit it to leave the status unchanged.
activeinactive
timezonestringIANA timezone for local schedules, validated as on create. Can be updated without address.
curl -X PATCH https://api.withflintpay.com/v1/locations/loc_01KEZF7C00CMHRRYA3MV996JB2 \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"expected_version": 4,
"inventory_allocation_enabled": true,
"name": "Brooklyn warehouse (Kent Ave)",
"timezone": "America/New_York"
}'Retire location#
/v1/locations/{location_id}IdempotentRequires scope merchants.locations.write
Rate limit: write
Retire a Location. Preserves the archived resource for direct reads.
Path parameters
location_idstringRequiredFlint Location ID.
Query parameters
expected_versionintegerCurrent resource version used as a concurrency fence.
curl -X DELETE https://api.withflintpay.com/v1/locations/loc_01KEZF7C00CMHRRYA3MV996JB2 \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Was this helpful?
