---
title: "Edit store credit"
method: PATCH
path: "/customers/{customer_id}/balance/{balance_history_id}"
tags: ["Customers"]
---

# Edit store credit

`PATCH /customers/{customer_id}/balance/{balance_history_id}`

## Request

- Base URL: `https://api.vrio.app`
- URL: `https://api.vrio.app/customers/{customer_id}/balance/{balance_history_id}`
- Auth: API key in header `X-Api-Key`

Edit a store credit entry

## Request body

- object
  - `credit_total` string
  - `auto_apply` boolean
  - `date_expire` string, date

## Response `200`

OK

- object
  - `customer_balance` string
  - `balance_history` object[]
    - `balance_history_id` integer
    - `order_id` integer
    - `order_offer_id` integer, nullable
    - `credit_type` string
    - `credit_source` integer, nullable
    - `credit_total` string
    - `credit_total_used` string
    - `auto_apply` boolean
    - `transaction_cycle` integer, nullable
    - `date_expire` string, nullable
    - `date_created` string, date-time
    - `date_modified` string, date-time
    - `created_by` integer
    - `modified_by` integer

## Other responses

- `400`: Error response
- `401`: Unauthorized response
- `403`: Forbidden response
- `404`: Not Found response
- `500`: Error response

---

[API](https://skmtc.dev/vrio/apis/customer-service.md) - [All operations](https://skmtc.dev/vrio/apis/customer-service/llms.txt) - [OpenAPI document](https://skmtc.dev/vrio/apis/customer-service/revisions/88f76a0e56f0?raw)
