/v1/facilities/{facility_id}/unit-ratesAuthentication
Bearer API key or Facily session, subject to permissions and facility scope.
Authentication and scopeRequest 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 --request POST \
--url 'https://api.staging.facily.ai/v1/facilities/<FACILITY_ID>/unit-rates' \
--header "Authorization: Bearer $FACILY_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"rows": [
{
"standard_rate": 0,
"unit_id": "00000000-0000-4000-8000-000000000001"
}
]
}'Parameters
facility_idpath · stringrequiredFormat: uuid
Request body
application/json · Required
rowsUnitRateImportRowRequest[]requiredMin items: 1 · Max items: 2000
Show rows schema
standard_ratenumber | string | nullrequiredPattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
Show standard_rate schema
number | string | nullVariant 1: number
numberVariant 2: string
stringVariant 3: null
nullunit_idstringrequiredFormat: uuid
Responses
Expand a status to inspect its schema. Generated examples show structure and synthetic values.
200Successful Response
{
"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
dataRateImportResponserequiredA rate sheet's outcome: all-or-nothing, with a result per row.
Show data schema
appliedbooleanrequiredFalse when any row failed: then nothing was written.
changedintegerrequirederrorsintegerrequiredrowsRateImportRowResponse[]requiredShow rows schema
errorstring | nullShow error schema
string | nullVariant 1: string
stringVariant 2: null
nullindexintegerrequiredThe row's position in the request, from 0.
statusstringrequiredValues: "changed", "unchanged", "error"
target_idstring | nullThe group or unit the row matched.
Format: uuid
Show target_id schema
string | nullThe group or unit the row matched.
Variant 1: string
stringVariant 2: null
nullunchangedintegerrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired400Validation error
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired401Unauthenticated
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired403Permission denied
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired404Not found
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired409Business logic error
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired503Temporary failure
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired