Customers

Adds a location (job site / address) to a customer.

Requires ManageCustomers and an Idempotency-Key header. Same rules as Customers → Addresses → Add in the app: name, address, city, state and postalCode are required; isMailingAddress: true moves the mailing flag here from the customer's other locations, and a customer's first location is always the mailing address. Attributed to the user who created the API key.

post/api/v1/customers/{id}/locations

Request

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

Path parameters

idinteger required

Customer 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 new location; Location points at /api/v1/customers/{id}/locations/{locationId}.

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.