Skip to content
FacilydevelopersDashboard
Build with Facily
DocsREST APIsImport Unit Group Rates
Search the full API reference Esc to close

Import Unit Group Rates

Pricing & rates · REST API reference

Get support
POST/v1/facilities/{facility_id}/unit-group-rates
Apply a group-grain rate sheet to one facility, all-or-nothing (design 7.5).

Authentication

Bearer API key or Facily session, subject to permissions and facility scope.

Authentication and scope

Request example

Replace bracketed path values with real IDs from your environment. The body, where shown, is generated from the schema and uses illustrative values.

cURL
curl --request POST \
  --url 'https://api.staging.facily.ai/v1/facilities/<FACILITY_ID>/unit-group-rates' \
  --header "Authorization: Bearer $FACILY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "rows": [
    {
      "code": "string",
      "group_id": "00000000-0000-4000-8000-000000000001",
      "max_rate": 0,
      "min_rate": 0,
      "name": "string",
      "standard_rate": 0,
      "web_rate": 0
    }
  ]
}'
An example for building your request, not an executed call. Check required fields, allowed values, and environment configuration before sending.

Parameters

facility_idpath · stringrequired

Format: uuid

Request body

application/json · Required

rowsGroupRateImportRowRequest[]required

Min items: 1 · Max items: 1000

Show rows schema
codestring | null

Max length: 100

Show code schema
string | null
Variant 1: string
string
Variant 2: null
null
group_idstring | null

Format: uuid

Show group_id schema
string | null
Variant 1: string
string
Variant 2: null
null
max_ratenumber | string | null

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

Show max_rate schema
number | string | null
Variant 1: number
number
Variant 2: string
string
Variant 3: null
null
min_ratenumber | string | null

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

Show min_rate schema
number | string | null
Variant 1: number
number
Variant 2: string
string
Variant 3: null
null
namestring | null

Max length: 100

Show name schema
string | null
Variant 1: string
string
Variant 2: null
null
standard_ratenumber | string | null

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

Show standard_rate schema
number | string | null
Variant 1: number
number
Variant 2: string
string
Variant 3: null
null
web_ratenumber | string | null

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

Show web_rate schema
number | string | null
Variant 1: number
number
Variant 2: string
string
Variant 3: null
null

Responses

Expand a status to inspect its schema. Generated examples show structure and synthetic values.

200Successful Response
JSON · generated example
{
  "data": {
    "applied": false,
    "changed": 0,
    "errors": 0,
    "rows": [
      {
        "index": 0,
        "status": "changed",
        "error": "string",
        "target_id": "00000000-0000-4000-8000-000000000001"
      }
    ],
    "unchanged": 0
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

dataRateImportResponserequired

A rate sheet's outcome: all-or-nothing, with a result per row.

Show data schema
appliedbooleanrequired

False when any row failed: then nothing was written.

changedintegerrequired
errorsintegerrequired
rowsRateImportRowResponse[]required
Show rows schema
errorstring | null
Show error schema
string | null
Variant 1: string
string
Variant 2: null
null
indexintegerrequired

The row's position in the request, from 0.

statusstringrequired

Values: "changed", "unchanged", "error"

target_idstring | null

The group or unit the row matched.

Format: uuid

Show target_id schema
string | null

The group or unit the row matched.

Variant 1: string
string
Variant 2: null
null
unchangedintegerrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
400Validation error
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
401Unauthenticated
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
403Permission denied
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
404Not found
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
409Business logic error
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
503Temporary failure
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
Build something that works beautifully.

Facily API · Contract v1.200 · Reviewed October 29, 2026

Import Unit Group Rates | Facily Developers