> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.mercoa.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mercoa.com/_mcp/server.

# Get

GET https://api.mercoa.com/entity/{entityId}/counterparty/{counterpartyId}/vendor-credit/{vendorCreditId}

Reference: https://docs.mercoa.com/embedded-ap-ar/api-reference/entity/counterparty/vendor-credit/get

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `entityId` (string, required) — Entity ID or Entity ForeignID
- `counterpartyId` (string, required) — Counterparty Entity ID or Counterparty Entity ForeignID
- `vendorCreditId` (string, required) — ID of the vendor credit to retrieve

## Response

### 200

- `id` (string, required)
- `vendorId` (string, required) — ID of the vendor the vendor credit may be used for
- `payerId` (string, required) — ID of the payer who may use the vendor credit
- `createdAt` (datetime, required)
- `updatedAt` (datetime, required)
- `memoNumber` (string, optional) — Memo number for the vendor credit
- `totalAmount` (double, optional) — Total issued amount of the vendor credit in major units
- `remainingAmount` (double, optional) — Remaining usable amount in the vendor credit in major units
- `currency` (enum, optional) — Currency code for the amount. Defaults to USD.
  - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BOV`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHE`, `CHF`, `CHW`, `CLF`, `CLP`, `COP`, `COU`, `CRC`, `CUC`, `CUP`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ERN`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KPW`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRU`, `MUR`, `MVR`, `MWK`, `MXN`, `MXV`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `CNY`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SDG`, `SEK`, `SGD`, `SHP`, `SLE`, `SLL`, `SOS`, `SRD`, `SSP`, `STN`, `SVC`, `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `USN`, `UYI`, `UYU`, `UYW`, `UZS`, `VED`, `VES`, `VND`, `VUV`, `WST`, `XAF`, `XAG`, `XAU`, `XBA`, `XBB`, `XBC`, `XBD`, `XCD`, `XDR`, `XOF`, `XPD`, `XPF`, `XPT`, `XSU`, `XTS`, `XUA`, `XXX`, `YER`, `ZAR`, `ZMW`, `ZWL`
- `creatorEntityId` (string, optional) — ID of the entity that created this vendor credit
- `note` (string, optional) — An optional note to attach to the vendor credit
- `invoiceIds` (list of string, optional) — The IDs of the invoices that this vendor credit has been applied to

## Errors

### 400 Bad Request

- `errorName` ("BadRequest", required)
- `content` (string, required)

### 401 Unauthorized

- `errorName` ("Unauthorized", required)
- `content` (string, required)

### 403 Forbidden

- `errorName` ("Forbidden", required)
- `content` (string, required)

### 404 Not Found

- `errorName` ("NotFound", required)
- `content` (string, required)

### 409 Conflict

- `errorName` ("Conflict", required)
- `content` (string, required)

### 500 Internal Server Error

- `errorName` ("InternalServerError", required)
- `content` (string, required)

### 501 Unimplemented

- `errorName` ("Unimplemented", required)
- `content` (string, required)

## Examples

**Response**

```json
{
  "id": "vcr_c3f4c87d-794d-4543-9562-575cdddfc0d7",
  "vendorId": "ent_21661ac1-a2a8-4465-a6c0-64474ba8181d",
  "payerId": "ent_8545a84e-a45f-41bf-bdf1-33b42a55812c",
  "createdAt": "2021-01-01T00:00:00Z",
  "updatedAt": "2021-01-01T00:00:00Z",
  "memoNumber": "123456",
  "totalAmount": 100,
  "remainingAmount": 100,
  "currency": "USD",
  "creatorEntityId": "ent_21661ac1-a2a8-4465-a6c0-64474ba8181d",
  "note": "This is a note",
  "invoiceIds": [
    "in_26e7b5d3-a739-4b23-9ad9-6aaa085f47a9"
  ]
}
```

**SDK Code**

```python Default
import requests

url = "https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/counterparty/ent_21661ac1-a2a8-4465-a6c0-64474ba8181d/vendor-credit/vcr_c3f4c87d-794d-4543-9562-575cdddfc0d7"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```typescript Default
import { MercoaClient } from "@mercoa/javascript";

const client = new MercoaClient({ token: "YOUR_TOKEN" });
await client.entity.counterparty.vendorCredit.get("ent_8545a84e-a45f-41bf-bdf1-33b42a55812c", "ent_21661ac1-a2a8-4465-a6c0-64474ba8181d", "vcr_c3f4c87d-794d-4543-9562-575cdddfc0d7");

```

```go Default
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/counterparty/ent_21661ac1-a2a8-4465-a6c0-64474ba8181d/vendor-credit/vcr_c3f4c87d-794d-4543-9562-575cdddfc0d7"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Default
require 'uri'
require 'net/http'

url = URI("https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/counterparty/ent_21661ac1-a2a8-4465-a6c0-64474ba8181d/vendor-credit/vcr_c3f4c87d-794d-4543-9562-575cdddfc0d7")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Default
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/counterparty/ent_21661ac1-a2a8-4465-a6c0-64474ba8181d/vendor-credit/vcr_c3f4c87d-794d-4543-9562-575cdddfc0d7")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Default
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/counterparty/ent_21661ac1-a2a8-4465-a6c0-64474ba8181d/vendor-credit/vcr_c3f4c87d-794d-4543-9562-575cdddfc0d7', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Default
using RestSharp;

var client = new RestClient("https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/counterparty/ent_21661ac1-a2a8-4465-a6c0-64474ba8181d/vendor-credit/vcr_c3f4c87d-794d-4543-9562-575cdddfc0d7");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Default
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.mercoa.com/entity/ent_8545a84e-a45f-41bf-bdf1-33b42a55812c/counterparty/ent_21661ac1-a2a8-4465-a6c0-64474ba8181d/vendor-credit/vcr_c3f4c87d-794d-4543-9562-575cdddfc0d7")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```