API reference › Rates and billing › Rate and billing settings

Create or update rate and billing settings

POST /v1/settings/rates-billing

Scope
settings_rates_billing:edit finance:edit
Roles
admin, scheduler

Creates or updates the rate and billing settings for an organization, including service type rates, provider rates, expense reimbursement settings, client billing cancellations, invoice and pro forma settings.

Parameters

None of its own.

Every call also sends Authorization and X-Tenant-ID; see Getting started.

Request body required

20 top-level fields; 8 hold nested fields, listed below.

FieldTypeDescription
defaultCurrencystring

Example USD.

serviceTypeRateSettingsarray of object (13 nested)
serviceTypeRatesarray of object (23 nested)
singleRatesarray of object (9 nested)
providerSingleRatesarray of object (12 nested)

Organization default single PAY rates (provider pay side of singleRates).

providerRatesarray of object (26 nested)
expenseRepressibilitystring

Example bill_to_client.

expensesEnabledForAssignmentboolean

Example true.

expensesEnabledForShiftboolean

Example true.

expensesEnabledForClientboolean

Example true.

expensesEnabledForClientLocationboolean

Example true.

expensesEnabledForOrganizationboolean

Example true.

expensesEnabledForOrganizationLocationboolean

Example true.

expenseSubmissionDeadlineinteger

Example 7.

expenseSubmissionDurationstring

Example days.

expenseOverrideLateSubmissionsboolean

Example true.

expenseApprovalWorkflowstring

Example organization.

billingCancellationsobject (24 nested)
invoiceSettingsobject (20 nested)
proFormaSettingsobject (22 nested)

Nested fields

serviceTypeRateSettings 13 fields
FieldTypeDescription
serviceTypeRateSettings[].serviceTypeobject
serviceTypeRateSettings[].serviceType.idstring

Example 1.

serviceTypeRateSettings[].serviceType.labelstring

Example ASL.

serviceTypeRateSettings[].minimumProviderDurationRulesarray of object
serviceTypeRateSettings[].minimumProviderDurationRules[].valuenumber

Example 3.

serviceTypeRateSettings[].minimumProviderDurationRules[].durationstring

Example Hours.

serviceTypeRateSettings[].minimumProviderDurationRules[].minProvidersinteger

Example 2.

serviceTypeRateSettings[].applyCancellationFeeboolean

Example true.

serviceTypeRateSettings[].feeTypestring

Example flat.

serviceTypeRateSettings[].feeValuenumber

Example 5.

serviceTypeRateSettings[].cancellationWindowobject
serviceTypeRateSettings[].cancellationWindow.idstring

Example 1.

serviceTypeRateSettings[].cancellationWindow.labelstring

Example 12 hours.

serviceTypeRates 23 fields
FieldTypeDescription
serviceTypeRates[].rateTypeobject
serviceTypeRates[].rateType.idstring

Example 1.

serviceTypeRates[].rateType.labelstring

Example standard.

serviceTypeRates[].serviceTypeobject
serviceTypeRates[].serviceType.idstring

Example 1.

serviceTypeRates[].serviceType.labelstring

Example ASL.

serviceTypeRates[].serviceProviderTypeobject
serviceTypeRates[].serviceProviderType.idstring

Example 2.

serviceTypeRates[].serviceProviderType.labelstring

Example Hearing.

serviceTypeRates[].certificationobject
serviceTypeRates[].certification.idstring

Example 1.

serviceTypeRates[].certification.labelstring

Example RID.

serviceTypeRates[].siteTypeobject
serviceTypeRates[].siteType.idstring

Example onsite.

serviceTypeRates[].siteType.labelstring

Example Onsite.

serviceTypeRates[].specializationobject
serviceTypeRates[].specialization.idstring

Example 1.

serviceTypeRates[].specialization.labelstring

Example Medical.

serviceTypeRates[].unitstring

Example per_hour.

serviceTypeRates[].ratenumber

Example 50.00.

serviceTypeRates[].minimumDurationinteger

Example 6.

serviceTypeRates[].assignmentboolean

Example true.

serviceTypeRates[].shiftboolean

Example true.

singleRates 9 fields
FieldTypeDescription
singleRates[].serviceTypeobject
singleRates[].serviceType.idstring

Example 1.

singleRates[].serviceType.labelstring

Example ASL.

singleRates[].assignmentEnabledboolean

Example true.

singleRates[].assignmentRatenumber

Example 50.00.

singleRates[].assignmentRateUnitstring

Example per_hour.

singleRates[].shiftEnabledboolean

Example true.

singleRates[].shiftRatenumber

Example 60.00.

singleRates[].shiftRateUnitstring

Example per_hour.

providerSingleRates 12 fields
FieldTypeDescription
providerSingleRates[].serviceTypeobject
providerSingleRates[].serviceType.idstring

Example 1.

providerSingleRates[].serviceType.labelstring

Example ASL.

providerSingleRates[].serviceProviderTypeobject
providerSingleRates[].serviceProviderType.idstring

Example 2.

providerSingleRates[].serviceProviderType.labelstring

Example Hearing.

providerSingleRates[].assignmentEnabledboolean

Example true.

providerSingleRates[].assignmentRatenumber

Example 40.00.

providerSingleRates[].assignmentRateUnitstring

Example hr.

providerSingleRates[].shiftEnabledboolean

Example true.

providerSingleRates[].shiftRatenumber

Example 45.00.

providerSingleRates[].shiftRateUnitstring

Example hr.

providerRates 26 fields
FieldTypeDescription
providerRates[].rateTypeobject
providerRates[].rateType.idstring

Example 1.

providerRates[].rateType.labelstring

Example standard.

providerRates[].certificationobject
providerRates[].certification.idstring

Example 1.

providerRates[].certification.labelstring

Example RID.

providerRates[].siteTypeobject
providerRates[].siteType.idstring

Example onsite.

providerRates[].siteType.labelstring

Example Onsite.

providerRates[].specializationobject
providerRates[].specialization.idstring

Example 1.

providerRates[].specialization.labelstring

Example Medical.

providerRates[].providerRoleobject
providerRates[].providerRole.idstring

Example agency.

providerRates[].providerRole.labelstring

Example Agency.

providerRates[].serviceTypeobject
providerRates[].serviceType.idstring

Example 1.

providerRates[].serviceType.labelstring

Example ASL.

providerRates[].serviceProviderTypeobject
providerRates[].serviceProviderType.idstring

Example 2.

providerRates[].serviceProviderType.labelstring

Example Hearing.

providerRates[].unitstring

Example per_hour.

providerRates[].ratenumber

Example 50.00.

providerRates[].minimumDurationinteger

Example 6.

providerRates[].assignmentboolean

Example true.

providerRates[].shiftboolean

Example true.

billingCancellations 24 fields
FieldTypeDescription
billingCancellations.expenseRepressibilitystring

Example bill_to_client.

billingCancellations.paymentTermobject
billingCancellations.paymentTerm.idstring

Example 1.

billingCancellations.paymentTerm.labelstring

Example Net 30.

billingCancellations.billingFrequencyobject
billingCancellations.billingFrequency.idstring

Example 1.

billingCancellations.billingFrequency.labelstring

Example Monthly.

billingCancellations.invoiceFrequencyobject
billingCancellations.invoiceFrequency.idstring

Example 1.

billingCancellations.invoiceFrequency.labelstring

Example Monthly.

billingCancellations.invoicesPerCycleinteger

Example 1.

billingCancellations.beginBillingSchedulestring (date-time)

Example 2023-10-01T00:00:00Z.

billingCancellations.billingDayobject
billingCancellations.billingDay.idstring

Example last.

billingCancellations.billingDay.labelstring

Example Last Day.

billingCancellations.billingResponsibilitystring

Example client.

billingCancellations.enableProFormaStatementboolean

Example true.

billingCancellations.proFormaCadencestring

Example monthly.

billingCancellations.defaultBillingDocumentstring

Example invoice.

billingCancellations.cancellationWindowobject
billingCancellations.cancellationWindow.idstring

Example 1.

billingCancellations.cancellationWindow.labelstring

Example 12 hours.

billingCancellations.cancellationFeeTypestring

Example flat.

billingCancellations.cancellationFeeNotesstring

Example Cancellation fee applies if canceled within 12 hours..

invoiceSettings 20 fields
FieldTypeDescription
invoiceSettings.taxPercentagenumber

Example 18.

invoiceSettings.discountnumber

Example 10.

invoiceSettings.autoGenerateboolean

Example true.

invoiceSettings.autoSendboolean

Example true.

invoiceSettings.paymentTermobject
invoiceSettings.paymentTerm.idstring

Example 1.

invoiceSettings.paymentTerm.labelstring

Example Net 30.

invoiceSettings.notesstring

Example Thank you for your business!.

invoiceSettings.deliveryMethodstring

Example email.

invoiceSettings.enableEmailReminderboolean

Example true.

invoiceSettings.reminderBeforeDueDatearray of object
invoiceSettings.reminderBeforeDueDate[].idstring

Example 1.

invoiceSettings.reminderBeforeDueDate[].labelstring

Example 3 days before.

invoiceSettings.reminderAfterDueDatearray of object
invoiceSettings.reminderAfterDueDate[].idstring

Example 1.

invoiceSettings.reminderAfterDueDate[].labelstring

Example 1 day after.

invoiceSettings.internalApprovalboolean

Example true.

invoiceSettings.approvedDeadlineinteger

Example 7.

invoiceSettings.fallbackBehaviorstring

Example auto_approve.

invoiceSettings.approvalAboveAmountnumber

Example 1000.

proFormaSettings 22 fields
FieldTypeDescription
proFormaSettings.enableProFormaStatementboolean

Example true.

proFormaSettings.autoGenerateboolean

Example true.

proFormaSettings.autoSendboolean

Example true.

proFormaSettings.approvalBeforeInvoiceboolean

Example true.

proFormaSettings.notesstring

Example Pro Forma invoice for your review..

proFormaSettings.deliveryMethodstring

Example email.

proFormaSettings.enableEmailReminderboolean

Example true.

proFormaSettings.reminderBeforeDueDatearray of object
proFormaSettings.reminderBeforeDueDate[].idstring

Example 1.

proFormaSettings.reminderBeforeDueDate[].labelstring

Example 3 days before.

proFormaSettings.reminderAfterDueDatearray of object
proFormaSettings.reminderAfterDueDate[].idstring

Example 1.

proFormaSettings.reminderAfterDueDate[].labelstring

Example 1 day after.

proFormaSettings.internalApprovalBeforeInvoiceboolean

Example true.

proFormaSettings.approvedDeadlineinteger

Example 7.

proFormaSettings.fallbackBehaviorstring

Example auto_approve.

proFormaSettings.approvalAboveAmountnumber

Example 1000.

proFormaSettings.clientApprovalBeforeInvoiceboolean

Example true.

proFormaSettings.notifyClientOnProFormaGenerateboolean

Example true.

proFormaSettings.clientReminderSchedulestring

Example weekly.

proFormaSettings.clientApprovalDeadlineinteger

Example 7.

proFormaSettings.clientFallbackBehaviorstring

Example auto_approve.

Example

JSON
{
  "defaultCurrency": "USD",
  "serviceTypeRateSettings": [
    {
      "serviceType": {
        "id": "1",
        "label": "ASL"
      },
      "minimumProviderDurationRules": [
        {
          "value": "3",
          "duration": "Hours",
          "minProviders": "2"
        }
      ],
      "applyCancellationFee": true,
      "feeType": "flat",
      "feeValue": "5",
      "cancellationWindow": {
        "id": "1",
        "label": "12 hours"
      }
    }
  ],
  "serviceTypeRates": [
    {
      "rateType": {
        "id": "1",
        "label": "standard"
      },
      "serviceType": {
        "id": "1",
        "label": "ASL"
      },
      "serviceProviderType": {
        "id": "2",
        "label": "Hearing"
      },
      "certification": {
        "id": "1",
        "label": "RID"
      },
      "siteType": {
        "id": "onsite",
        "label": "Onsite"
      },
      "specialization": {
        "id": "1",
        "label": "Medical"
      },
      "unit": "per_hour",
      "rate": "50.00",
      "minimumDuration": "6",
      "assignment": true,
      "shift": true
    }
  ],
  "singleRates": [
    {
      "serviceType": {
        "id": "1",
        "label": "ASL"
      },
      "assignmentEnabled": true,
      "assignmentRate": "50.00",
      "assignmentRateUnit": "per_hour",
      "shiftEnabled": true,
      "shiftRate": "60.00",
      "shiftRateUnit": "per_hour"
    }
  ],
  "providerSingleRates": [
    {
      "serviceType": {
        "id": "1",
        "label": "ASL"
      },
      "serviceProviderType": {
        "id": "2",
        "label": "Hearing"
      },
      "assignmentEnabled": true,
      "assignmentRate": "40.00",
      "assignmentRateUnit": "hr",
      "shiftEnabled": true,
      "shiftRate": "45.00",
      "shiftRateUnit": "hr"
    }
  ],
  "providerRates": [
    {
      "rateType": {
        "id": "1",
        "label": "standard"
      },
      "certification": {
        "id": "1",
        "label": "RID"
      },
      "siteType": {
        "id": "onsite",
        "label": "Onsite"
      },
      "specialization": {
        "id": "1",
        "label": "Medical"
      },
      "providerRole": {
        "id": "agency",
        "label": "Agency"
      },
      "serviceType": {
        "id": "1",
        "label": "ASL"
      },
      "serviceProviderType": {
        "id": "2",
        "label": "Hearing"
      },
      "unit": "per_hour",
      "rate": "50.00",
      "minimumDuration": "6",
      "assignment": true,
      "shift": true
    }
  ],
  "expenseRepressibility": "bill_to_client",
  "expensesEnabledForAssignment": true,
  "expensesEnabledForShift": true,
  "expensesEnabledForClient": true,
  "expensesEnabledForClientLocation": true,
  "expensesEnabledForOrganization": true,
  "expensesEnabledForOrganizationLocation": true,
  "expenseSubmissionDeadline": 7,
  "expenseSubmissionDuration": "days",
  "expenseOverrideLateSubmissions": true,
  "expenseApprovalWorkflow": "organization",
  "billingCancellations": {
    "expenseRepressibility": "bill_to_client",
    "paymentTerm": {
      "id": "1",
      "label": "Net 30"
    },
    "billingFrequency": {
      "id": "1",
      "label": "Monthly"
    },
    "invoiceFrequency": {
      "id": "1",
      "label": "Monthly"
    },
    "invoicesPerCycle": 1,
    "beginBillingSchedule": "2023-10-01T00:00:00Z",
    "billingDay": {
      "id": "last",
      "label": "Last Day"
    },
    "billingResponsibility": "client",
    "enableProFormaStatement": true,
    "proFormaCadence": "monthly",
    "defaultBillingDocument": "invoice",
    "cancellationWindow": {
      "id": "1",
      "label": "12 hours"
    },
    "cancellationFeeType": "flat",
    "cancellationFeeNotes": "Cancellation fee applies if canceled within 12 hours."
  },
  "invoiceSettings": {
    "taxPercentage": 18,
    "discount": 10,
    "autoGenerate": true,
    "autoSend": true,
    "paymentTerm": {
      "id": "1",
      "label": "Net 30"
    },
    "notes": "Thank you for your business!",
    "deliveryMethod": "email",
    "enableEmailReminder": true,
    "reminderBeforeDueDate": [
      {
        "id": "1",
        "label": "3 days before"
      }
    ],
    "reminderAfterDueDate": [
      {
        "id": "1",
        "label": "1 day after"
      }
    ],
    "internalApproval": true,
    "approvedDeadline": 7,
    "fallbackBehavior": "auto_approve",
    "approvalAboveAmount": 1000
  },
  "proFormaSettings": {
    "enableProFormaStatement": true,
    "autoGenerate": true,
    "autoSend": true,
    "approvalBeforeInvoice": true,
    "notes": "Pro Forma invoice for your review.",
    "deliveryMethod": "email",
    "enableEmailReminder": true,
    "reminderBeforeDueDate": [
      {
        "id": "1",
        "label": "3 days before"
      }
    ],
    "reminderAfterDueDate": [
      {
        "id": "1",
        "label": "1 day after"
      }
    ],
    "internalApprovalBeforeInvoice": true,
    "approvedDeadline": 7,
    "fallbackBehavior": "auto_approve",
    "approvalAboveAmount": 1000,
    "clientApprovalBeforeInvoice": true,
    "notifyClientOnProFormaGenerate": true,
    "clientReminderSchedule": "weekly",
    "clientApprovalDeadline": 7,
    "clientFallbackBehavior": "auto_approve"
  }
}

Example request

Shell
curl -X POST "https://api.fetchfido.ai/v1/settings/rates-billing" \
  -H "Authorization: Bearer $FIDO_API_KEY" \
  -H "X-Tenant-ID: $FIDO_TENANT_ID" \
  -H "Content-Type: application/json" \
  -d '{"defaultCurrency":"USD","serviceTypeRateSettings":[{"serviceType":{"id":"1","label":"ASL"},"minimumProviderDurationRules":[{"value":"3","duration":"Hours","minProviders":"2"}],"applyCancellationFee":true,"feeType":"flat","feeValue":"5","cancellationWindow":{"id":"1","label":"12 hours"}}],"serviceTypeRates":[{"rateType":{"id":"1","label":"standard"},"serviceType":{"id":"1","label":"ASL"},"serviceProviderType":{"id":"2","label":"Hearing"},"certification":{"id":"1","label":"RID"},"siteType":{"id":"onsite","label":"Onsite"},"specialization":{"id":"1","label":"Medical"},"unit":"per_hour","rate":"50.00","minimumDuration":"6","assignment":true,"shift":true}],"singleRates":[{"serviceType":{"id":"1","label":"ASL"},"assignmentEnabled":true,"assignmentRate":"50.00","assignmentRateUnit":"per_hour","shiftEnabled":true,"shiftRate":"60.00","shiftRateUnit":"per_hour"}],"providerSingleRates":[{"serviceType":{"id":"1","label":"ASL"},"serviceProviderType":{"id":"2","label":"Hearing"},"assignmentEnabled":true,"assignmentRate":"40.00","assignmentRateUnit":"hr","shiftEnabled":true,"shiftRate":"45.00","shiftRateUnit":"hr"}],"providerRates":[{"rateType":{"id":"1","label":"standard"},"certification":{"id":"1","label":"RID"},"siteType":{"id":"onsite","label":"Onsite"},"specialization":{"id":"1","label":"Medical"},"providerRole":{"id":"agency","label":"Agency"},"serviceType":{"id":"1","label":"ASL"},"serviceProviderType":{"id":"2","label":"Hearing"},"unit":"per_hour","rate":"50.00","minimumDuration":"6","assignment":true,"shift":true}],"expenseRepressibility":"bill_to_client","expensesEnabledForAssignment":true,"expensesEnabledForShift":true,"expensesEnabledForClient":true,"expensesEnabledForClientLocation":true,"expensesEnabledForOrganization":true,"expensesEnabledForOrganizationLocation":true,"expenseSubmissionDeadline":7,"expenseSubmissionDuration":"days","expenseOverrideLateSubmissions":true,"expenseApprovalWorkflow":"organization","billingCancellations":{"expenseRepressibility":"bill_to_client","paymentTerm":{"id":"1","label":"Net 30"},"billingFrequency":{"id":"1","label":"Monthly"},"invoiceFrequency":{"id":"1","label":"Monthly"},"invoicesPerCycle":1,"beginBillingSchedule":"2023-10-01T00:00:00Z","billingDay":{"id":"last","label":"Last Day"},"billingResponsibility":"client","enableProFormaStatement":true,"proFormaCadence":"monthly","defaultBillingDocument":"invoice","cancellationWindow":{"id":"1","label":"12 hours"},"cancellationFeeType":"flat","cancellationFeeNotes":"Cancellation fee applies if canceled within 12 hours."},"invoiceSettings":{"taxPercentage":18,"discount":10,"autoGenerate":true,"autoSend":true,"paymentTerm":{"id":"1","label":"Net 30"},"notes":"Thank you for your business!","deliveryMethod":"email","enableEmailReminder":true,"reminderBeforeDueDate":[{"id":"1","label":"3 days before"}],"reminderAfterDueDate":[{"id":"1","label":"1 day after"}],"internalApproval":true,"approvedDeadline":7,"fallbackBehavior":"auto_approve","approvalAboveAmount":1000},"proFormaSettings":{"enableProFormaStatement":true,"autoGenerate":true,"autoSend":true,"approvalBeforeInvoice":true,"notes":"Pro Forma invoice for your review.","deliveryMethod":"email","enableEmailReminder":true,"reminderBeforeDueDate":[{"id":"1","label":"3 days before"}],"reminderAfterDueDate":[{"id":"1","label":"1 day after"}],"internalApprovalBeforeInvoice":true,"approvedDeadline":7,"fallbackBehavior":"auto_approve","approvalAboveAmount":1000,"clientApprovalBeforeInvoice":true,"notifyClientOnProFormaGenerate":true,"clientReminderSchedule":"weekly","clientApprovalDeadline":7,"clientFallbackBehavior":"auto_approve"}}'

Try it

Responses

200 Settings have been updated

Settings have been updated.

JSON
{
  "success": true,
  "message": "Settings have been updated",
  "data": null
}
Response fields (3)
FieldTypeDescription
successboolean

Example true.

messagestring

Example Settings have been updated.

datastring or null
401 Not signed in

Unauthorized - Authentication required

JSON
{
  "success": false,
  "message": "Invalid API key. Org and user tier keys must send an X-Tenant-ID header naming the organization the key was issued for.",
  "errors": null,
  "code": "API_KEY_MISSING"
}
Response fields (4)
FieldTypeDescription
successboolean

Example false.

messagestring

Example Invalid API key. Org and user tier keys must send an X-Tenant-ID header naming the organization the key was issued for..

errorsany or null

Null on this status.

codestring

Machine-readable reason, for branching on in client code.

One of: API_KEY_MISSING, API_KEY_INVALID, API_KEY_EXPIRED. Example API_KEY_MISSING.

403 Not allowed

Forbidden. The payload carries a Service Type Rates, Provider Pay or Reimbursable Expenses field (serviceTypeRateSettings, singleRates, providerSingleRates, the expense settings) and the role has no Finance Read, or the role has no Rates & Billing Edit. Nothing is saved.

JSON
{
  "success": false,
  "message": "You don't have permission to access this endpoint. This API key is missing the 'settings_rates_billing:edit' scope.",
  "errors": null,
  "code": ""
}
Response fields (4)
FieldTypeDescription
successboolean

Example false.

messagestring

Example You don't have permission to access this endpoint. This API key is missing the 'settings_rates_billing:edit' scope..

errorsany or null

Null on this status.

codestring

Always empty on this status.

Example .

422 Validation failed

Validation error. A unit other than Per Hour or Per Minute (for example weekly) is refused and nothing is saved (a unit sent back exactly as stored is kept, even one saved before units were checked). The message is under the key of the field that carried the unit: serviceTypeRateSettings.N.billingUnit, serviceTypeRateSettings.N.providerPayUnit, singleRates.N.assignmentRateUnit, singleRates.N.shiftRateUnit, providerSingleRates.N.assignmentRateUnit or providerSingleRates.N.shiftRateUnit (N is the row index).

JSON
{
  "status": "error",
  "message": "Unable to save. Please check the highlighted fields.",
  "errors": {
    "singleRates.0.assignmentRateUnit": [
      "The unit must be Per Hour or Per Minute (hr or min)."
    ]
  }
}
429 Too many requests

Rate limit exceeded. See Retry-After.

JSON
{
  "success": false,
  "message": "You've exceeded this API key's rate limit of 120 requests per minute. Try again in 37 seconds.",
  "errors": null,
  "code": "RATE_LIMITED"
}
Response fields (4)
FieldTypeDescription
successboolean

Example false.

messagestring

Example You've exceeded this API key's rate limit of 120 requests per minute. Try again in 37 seconds..

errorsany or null

Null on this status.

codestring

Machine-readable reason, for branching on in client code.

One of: RATE_LIMITED. Example RATE_LIMITED.

500 Server error

Internal server error

JSON
{
  "success": false,
  "message": "An unexpected error occurred. Please try again later."
}
Response fields (2)
FieldTypeDescription
successboolean

Example false.

messagestring

Example An unexpected error occurred. Please try again later..