curl --request POST \
--url https://api.arcuserp.com/v1/vendor-credits/{id}/unapply \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "<string>",
"bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"effective_date": "2023-12-25"
}
'import requests
url = "https://api.arcuserp.com/v1/vendor-credits/{id}/unapply"
payload = {
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "<string>",
"bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"effective_date": "2023-12-25"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
application_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
reason: '<string>',
bill_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
effective_date: '2023-12-25'
})
};
fetch('https://api.arcuserp.com/v1/vendor-credits/{id}/unapply', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.arcuserp.com/v1/vendor-credits/{id}/unapply",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'application_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'reason' => '<string>',
'bill_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'effective_date' => '2023-12-25'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.arcuserp.com/v1/vendor-credits/{id}/unapply"
payload := strings.NewReader("{\n \"application_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reason\": \"<string>\",\n \"bill_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"effective_date\": \"2023-12-25\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.arcuserp.com/v1/vendor-credits/{id}/unapply")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"application_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reason\": \"<string>\",\n \"bill_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"effective_date\": \"2023-12-25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.arcuserp.com/v1/vendor-credits/{id}/unapply")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"application_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reason\": \"<string>\",\n \"bill_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"effective_date\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"credit_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credit_number": "<string>",
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"anchor": "bill",
"amount": 123,
"credit_after": {
"remaining_amount": 123,
"status": "<string>"
},
"bill_after": {},
"payment_after": {},
"reversal": {}
},
"idempotent_replay": true
}{
"error": "not_found",
"code": "not_found",
"type": "not_found",
"hint": "The requested order does not exist or does not belong to this entity.",
"param": "expand[0]",
"required": "accounts:read",
"request_id": "req_abc123"
}{
"error": "not_found",
"code": "not_found",
"type": "not_found",
"hint": "The requested order does not exist or does not belong to this entity.",
"param": "expand[0]",
"required": "accounts:read",
"request_id": "req_abc123"
}{
"error": "not_found",
"code": "not_found",
"type": "not_found",
"hint": "The requested order does not exist or does not belong to this entity.",
"param": "expand[0]",
"required": "accounts:read",
"request_id": "req_abc123"
}{
"error": "not_found",
"code": "not_found",
"type": "not_found",
"hint": "The requested order does not exist or does not belong to this entity.",
"param": "expand[0]",
"required": "accounts:read",
"request_id": "req_abc123"
}{
"error": "not_found",
"code": "not_found",
"type": "not_found",
"hint": "The requested order does not exist or does not belong to this entity.",
"param": "expand[0]",
"required": "accounts:read",
"request_id": "req_abc123"
}{
"error": "not_found",
"code": "not_found",
"type": "not_found",
"hint": "The requested order does not exist or does not belong to this entity.",
"param": "expand[0]",
"required": "accounts:read",
"request_id": "req_abc123"
}{
"error": "not_found",
"code": "not_found",
"type": "not_found",
"hint": "The requested order does not exist or does not belong to this entity.",
"param": "expand[0]",
"required": "accounts:read",
"request_id": "req_abc123"
}Un-apply one application of a vendor credit
Takes ONE application of a vendor credit back: the credit is open again by the amount and the bill owes it again. By what the application is attached to: a bill (with no entry of its own, the draw is restored; with its own entry, that entry is reversed by a new entry dated today or effective_date); a payment that drew the credit with its own entry (name the bill whose share the credit paid in bill_id; the payment keeps its cash and its share of that bill falls by the credit). Requires purchasing:write scope plus the per-user accounting.post permission. Refused 400 missing_entity_id, invalid_vendor_credit_id, missing_application_id, missing_reason, invalid_bill_id, invalid_effective_date or missing_bill_id (a payment’s application names no bill); 404 vendor_credit_not_found or vendor_credit_application_not_found; 409 vendor_credit_application_deposit_anchored (void that deposit to restore the credit), vendor_credit_application_inside_payment (an application inside a payment with no entry of its own: reverse that payment), vendor_credit_application_is_history (the payment was voided), vendor_credit_bill_unapply_bill_not_live, vendor_credit_application_changed, credit_restore_conflict (a voided credit), vendor_credit_unapply_credit_expired (the credit has expired, by its status or a passed expiry date: an expired credit cannot be applied again, so the application stays; expires_on names the day), vendor_credit_bill_unapply_entry_not_the_draw, vendor_credit_bill_unapply_vendor_mismatch, vendor_credit_bill_unapply_not_conserved, vendor_credit_payment_unapply_* (the payment’s state, its bank match or its share); 422 vendor_credit_bill_unapply_period_closed or vendor_credit_payment_unapply_period_closed.
curl --request POST \
--url https://api.arcuserp.com/v1/vendor-credits/{id}/unapply \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "<string>",
"bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"effective_date": "2023-12-25"
}
'import requests
url = "https://api.arcuserp.com/v1/vendor-credits/{id}/unapply"
payload = {
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "<string>",
"bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"effective_date": "2023-12-25"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
application_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
reason: '<string>',
bill_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
effective_date: '2023-12-25'
})
};
fetch('https://api.arcuserp.com/v1/vendor-credits/{id}/unapply', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.arcuserp.com/v1/vendor-credits/{id}/unapply",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'application_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'reason' => '<string>',
'bill_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'effective_date' => '2023-12-25'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.arcuserp.com/v1/vendor-credits/{id}/unapply"
payload := strings.NewReader("{\n \"application_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reason\": \"<string>\",\n \"bill_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"effective_date\": \"2023-12-25\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.arcuserp.com/v1/vendor-credits/{id}/unapply")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"application_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reason\": \"<string>\",\n \"bill_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"effective_date\": \"2023-12-25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.arcuserp.com/v1/vendor-credits/{id}/unapply")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"application_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reason\": \"<string>\",\n \"bill_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"effective_date\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"credit_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credit_number": "<string>",
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"anchor": "bill",
"amount": 123,
"credit_after": {
"remaining_amount": 123,
"status": "<string>"
},
"bill_after": {},
"payment_after": {},
"reversal": {}
},
"idempotent_replay": true
}{
"error": "not_found",
"code": "not_found",
"type": "not_found",
"hint": "The requested order does not exist or does not belong to this entity.",
"param": "expand[0]",
"required": "accounts:read",
"request_id": "req_abc123"
}{
"error": "not_found",
"code": "not_found",
"type": "not_found",
"hint": "The requested order does not exist or does not belong to this entity.",
"param": "expand[0]",
"required": "accounts:read",
"request_id": "req_abc123"
}{
"error": "not_found",
"code": "not_found",
"type": "not_found",
"hint": "The requested order does not exist or does not belong to this entity.",
"param": "expand[0]",
"required": "accounts:read",
"request_id": "req_abc123"
}{
"error": "not_found",
"code": "not_found",
"type": "not_found",
"hint": "The requested order does not exist or does not belong to this entity.",
"param": "expand[0]",
"required": "accounts:read",
"request_id": "req_abc123"
}{
"error": "not_found",
"code": "not_found",
"type": "not_found",
"hint": "The requested order does not exist or does not belong to this entity.",
"param": "expand[0]",
"required": "accounts:read",
"request_id": "req_abc123"
}{
"error": "not_found",
"code": "not_found",
"type": "not_found",
"hint": "The requested order does not exist or does not belong to this entity.",
"param": "expand[0]",
"required": "accounts:read",
"request_id": "req_abc123"
}{
"error": "not_found",
"code": "not_found",
"type": "not_found",
"hint": "The requested order does not exist or does not belong to this entity.",
"param": "expand[0]",
"required": "accounts:read",
"request_id": "req_abc123"
}Authorizations
API key issued per entity via Settings > Developers > API Keys.
Each key carries scopes (e.g. orders:read, products:write).
Bearer token format: Authorization: Bearer ark_live_ent_Test keys use ark_test_ent_. Both are issued per entity
via Settings > Developers > API Keys.
Headers
A key that already un-applied this credit answers that result again and writes nothing.
Path Parameters
Vendor credit UUID.
Body
The application to take back (the credit's applications[].id).
Why; kept on the credit and the bill.
500An application inside a payment: the bill whose share the credit paid.
The day of the reversal entry (an application with its own entry); defaults to today.
Was this page helpful?

