curl --request POST \
--url https://api.arcuserp.com/v1/vendor-prepayments/{id}/unapply \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "<string>",
"effective_date": "2023-12-25"
}
'import requests
url = "https://api.arcuserp.com/v1/vendor-prepayments/{id}/unapply"
payload = {
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "<string>",
"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>',
effective_date: '2023-12-25'
})
};
fetch('https://api.arcuserp.com/v1/vendor-prepayments/{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-prepayments/{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>',
'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-prepayments/{id}/unapply"
payload := strings.NewReader("{\n \"application_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reason\": \"<string>\",\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-prepayments/{id}/unapply")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"application_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reason\": \"<string>\",\n \"effective_date\": \"2023-12-25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.arcuserp.com/v1/vendor-prepayments/{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 \"effective_date\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"prepayment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"prepayment_number": "<string>",
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bill_number": "<string>",
"amount_unapplied": 123,
"prepayment_balance": 123,
"prepayment_status": "active",
"bill_balance_due": 123,
"bill_status": "<string>",
"journal_entry_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reversal_journal_entry_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entry_disposition": "reversed",
"entry_date": "2023-12-25",
"payment_hold": {
"bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bill_number": "<string>",
"outcome": "restored",
"payment_hold_type": "<string>",
"cause": "<string>",
"hold": "automatic"
},
"restored_bill_holds": [
{
"bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bill_number": "<string>",
"outcome": "restored",
"payment_hold_type": "<string>",
"cause": "<string>",
"hold": "automatic"
}
],
"holds_plan": [
{
"bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bill_number": "<string>",
"hold": "automatic",
"from": "held",
"to": "held",
"cause": "open_prepayment",
"prepayment_numbers": [
"<string>"
],
"prepayment_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"outcome": "placed"
}
]
},
"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"
}Reverse a vendor prepayment application
Takes one application of a vendor prepayment back off its bill: the application’s journal entry is reversed (dated effective_date in an open period, else the entity’s calendar day), the application is removed, and the bill’s paid amount and balance due and the prepayment’s balance are restored. The payment holds follow the state the reversal leaves (holds_plan): the bill and every other bill of the vendor on the prepayment’s purchase order that has money to pay and to which open prepayment money is proposed again, and that no waiver names, is held again (payment_hold for this bill, restored_bill_holds for the others), whatever write had released it (the hold a system release took off comes back when its text still names exactly the open money, else a fresh hold names it); a person’s unrelieved_prepayment hold that a full relief ended comes back on this bill, a hold a person released stays released for the prepayments it waived, and a paid or voided bill is never held again. Requires ap:write scope, and the call is refused 404 prepayment_application_not_found, or 409 bill_header_unapply_unsupported (nothing written) where the AP balance writer cannot yet give the amount back.
curl --request POST \
--url https://api.arcuserp.com/v1/vendor-prepayments/{id}/unapply \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "<string>",
"effective_date": "2023-12-25"
}
'import requests
url = "https://api.arcuserp.com/v1/vendor-prepayments/{id}/unapply"
payload = {
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "<string>",
"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>',
effective_date: '2023-12-25'
})
};
fetch('https://api.arcuserp.com/v1/vendor-prepayments/{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-prepayments/{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>',
'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-prepayments/{id}/unapply"
payload := strings.NewReader("{\n \"application_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reason\": \"<string>\",\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-prepayments/{id}/unapply")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"application_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reason\": \"<string>\",\n \"effective_date\": \"2023-12-25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.arcuserp.com/v1/vendor-prepayments/{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 \"effective_date\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"prepayment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"prepayment_number": "<string>",
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bill_number": "<string>",
"amount_unapplied": 123,
"prepayment_balance": 123,
"prepayment_status": "active",
"bill_balance_due": 123,
"bill_status": "<string>",
"journal_entry_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reversal_journal_entry_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entry_disposition": "reversed",
"entry_date": "2023-12-25",
"payment_hold": {
"bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bill_number": "<string>",
"outcome": "restored",
"payment_hold_type": "<string>",
"cause": "<string>",
"hold": "automatic"
},
"restored_bill_holds": [
{
"bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bill_number": "<string>",
"outcome": "restored",
"payment_hold_type": "<string>",
"cause": "<string>",
"hold": "automatic"
}
],
"holds_plan": [
{
"bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bill_number": "<string>",
"hold": "automatic",
"from": "held",
"to": "held",
"cause": "open_prepayment",
"prepayment_numbers": [
"<string>"
],
"prepayment_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"outcome": "placed"
}
]
},
"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
Optional idempotency key; a retry returns the first result, even after the application row is gone.
Path Parameters
Vendor prepayment UUID.
Body
Was this page helpful?

