Undo a debt adjustment
curl --request DELETE \
--url https://api.exowpee.com/v1/catalog/purchases/{purchase}/debt-adjustments/{debt_adjustment} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/catalog/purchases/{purchase}/debt-adjustments/{debt_adjustment}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/catalog/purchases/{purchase}/debt-adjustments/{debt_adjustment}', 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.exowpee.com/v1/catalog/purchases/{purchase}/debt-adjustments/{debt_adjustment}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/catalog/purchases/{purchase}/debt-adjustments/{debt_adjustment}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.exowpee.com/v1/catalog/purchases/{purchase}/debt-adjustments/{debt_adjustment}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/purchases/{purchase}/debt-adjustments/{debt_adjustment}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyPay suppliers and adjust debt
Undo a debt adjustment
Cancels the most recent debt adjustment of a purchase so the amount owed goes back up. The adjustment disappears from the list.
DELETE
/
catalog
/
purchases
/
{purchase}
/
debt-adjustments
/
{debt_adjustment}
Undo a debt adjustment
curl --request DELETE \
--url https://api.exowpee.com/v1/catalog/purchases/{purchase}/debt-adjustments/{debt_adjustment} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/catalog/purchases/{purchase}/debt-adjustments/{debt_adjustment}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/catalog/purchases/{purchase}/debt-adjustments/{debt_adjustment}', 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.exowpee.com/v1/catalog/purchases/{purchase}/debt-adjustments/{debt_adjustment}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/catalog/purchases/{purchase}/debt-adjustments/{debt_adjustment}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.exowpee.com/v1/catalog/purchases/{purchase}/debt-adjustments/{debt_adjustment}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/purchases/{purchase}/debt-adjustments/{debt_adjustment}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyCompany space
Cannot be undone
For: Buyer, Accountant · Permission:
purchase_debt_adjustments.delete
Conditions
- The purchase must be a credit purchase whose status is pending, completed or closed.
- Only the latest adjustment (by adjusted_at, then creation time) can be deleted; an older one is refused.
- Removes the adjustment: it disappears from the list and can no longer be viewed.
- Recomputes the purchase’s amount_debt_adjusted from the remaining adjustments, then recalculates its amount paid, remaining amount and payment status; the amount owed goes back up.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the purchase (27-character KSUID).
Identifier of the debt adjustment, which must belong to the purchase in the path (27-character KSUID string).
Query Parameters
Response mode. Default none; none answers 204 No Content.
Available options:
none Response
204
No Content (response mode none).