Customers

Edits a customer location; only the fields sent change.

Requires ManageCustomers and an Idempotency-Key header. "" clears an optional field; name, address, city, state and postalCode cannot be cleared. isMailingAddress: true unmarks the customer's other locations; isActive retires or restores the location. Optional optimistic concurrency: send the ETag from GET …/locations/{locationId} as If-Match to get 412 instead of overwriting a change made in the meantime. Example: PATCH /api/v1/customers/5/locations/9 { "notes": "Gate code 4411" }.

patch/api/v1/customers/{id}/locations/{locationId}

Request

  • Base URL: https://app.flexonthejob.com
  • URL: https://app.flexonthejob.com/api/v1/customers/{id}/locations/{locationId}
  • Auth: HTTP bearer

Path parameters

idinteger required

Customer id.

locationIdinteger required

Location id.

Request body

namestring nullable

Label for the location, 1–100 characters. Example: "Main Office".

addressstring nullable

Street address line 1, up to 200 characters. Example: "12 Oak St".

address2string nullable

Street address line 2 (suite, unit), up to 200 characters.

citystring nullable

City, up to 100 characters. Example: "Springfield".

statestring nullable

State / province, up to 50 characters. Example: "IL".

postalCodestring nullable

ZIP / postal code, up to 20 characters. Example: "62701".

countrystring nullable

Country, up to 100 characters. Example: "USA".

isMailingAddressboolean nullable

True makes this the customer's mailing address and unmarks every other location of the customer. Default false on create — except that a customer's first location is always the mailing address.

isActiveboolean nullable

False retires the location (kept for history, no longer offered for new jobs). Default true on create.

notesstring nullable

Free-text notes about the site (gate codes, parking), up to 500 characters.

Response

The location after the edit.

idinteger

Numeric id of the location. Stable within this organization.

syncIdstring uuid

Globally unique sync id (GUID). Use it as the after pagination cursor.

customerIdinteger

Id of the owning customer (matches the {id} in the URL).

namestring

Label given to the location, e.g. "Main Office" or "Rental Property 1".

addressstring nullable

Street address line 1.

address2string nullable

Street address line 2 (suite, unit).

citystring nullable

City.

statestring nullable

State / province.

postalCodestring nullable

ZIP / postal code.

countrystring nullable

Country.

isMailingAddressboolean

True when this is the customer's mailing address.

isActiveboolean

False when the location has been retired and should not be offered for new jobs.

notesstring nullable

Free-text notes about the site (gate codes, parking), max 500 characters.

createdAtstring date-time

UTC creation timestamp.

updatedAtstring date-time nullable

UTC timestamp of the last edit; null when never edited.

Changes

No recorded changes to this operation across all 1 revision of this API.