---
title: "Apply account credit to an invoice"
method: POST
path: "/invoice/{invoiceId}/apply-account-credit"
tags: ["Invoice"]
---

# Apply account credit to an invoice

`POST /invoice/{invoiceId}/apply-account-credit`

## Request

- Base URL: `https://core.hivelocity.net/api/v2`
- URL: `https://core.hivelocity.net/api/v2/invoice/{invoiceId}/apply-account-credit`
- Auth: API key in header `X-API-KEY`

## Headers

- `X-Fields` string, mask

## Response `200`

Successfully applied account credit to invoice

- Invoice
  - `amount` number
  - `amountUnpaid` number
  - `clientId` integer
  - `created` integer
  - `datePaid` integer
  - `due` integer
  - `id` integer
  - `sent` integer
  - `status` string

## Other responses

- `400`: No account credits available to apply to invoice
- `403`: You have not been granted permission to complete this action. Please contact your account manager to grant the proper permission.
- `404`: Not found

---

[API](https://skmtc.dev/hivelocity/apis/hivelocity-api.md) - [All operations](https://skmtc.dev/hivelocity/apis/hivelocity-api/llms.txt) - [OpenAPI document](https://skmtc.dev/hivelocity/apis/hivelocity-api/revisions/ee6b717b5015?raw)
