curl --request POST \
--url https://api.procuros.io/v2/transactions/{procurosTransactionId}/drop \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "Rejected by our ERP"
}
'import requests
url = "https://api.procuros.io/v2/transactions/{procurosTransactionId}/drop"
payload = { "reason": "Rejected by our ERP" }
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({reason: 'Rejected by our ERP'})
};
fetch('https://api.procuros.io/v2/transactions/{procurosTransactionId}/drop', 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.procuros.io/v2/transactions/{procurosTransactionId}/drop",
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([
'reason' => 'Rejected by our ERP'
]),
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.procuros.io/v2/transactions/{procurosTransactionId}/drop"
payload := strings.NewReader("{\n \"reason\": \"Rejected by our ERP\"\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.procuros.io/v2/transactions/{procurosTransactionId}/drop")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"Rejected by our ERP\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.procuros.io/v2/transactions/{procurosTransactionId}/drop")
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 \"reason\": \"Rejected by our ERP\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": null,
"data": {
"procurosTransactionId": "949b2f25-fd9d-4c58-8899-b4dc277f8cf9",
"status": "DROPPED"
}
}{
"success": false,
"message": "Transaction not found",
"errors": []
}{
"success": false,
"message": "Transaction is not in a droppable state",
"errors": []
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>"
}{
"success": false,
"message": "Transaction could not be dropped",
"errors": []
}Drop Transaction
Drop a transaction that you sent or received, for example a transaction that is blocked by an error. A dropped transaction gets the status DROPPED and Procuros does not process it further.
Use the procurosTransactionId from GET /v2/transactions, from GET /v2/all-transactions or from the response of POST /v2/transactions. Send the reason for the drop. The Procuros Portal shows the reason on the transaction.
If a transaction failed before Procuros accepted it for delivery, only the sender can drop it.
The endpoint returns 404 when the transaction does not exist or is not yours. It returns 409 when the transaction cannot be dropped in its current state, for example because it is already delivered, already dropped or replaced by a newer transaction.
curl --request POST \
--url https://api.procuros.io/v2/transactions/{procurosTransactionId}/drop \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "Rejected by our ERP"
}
'import requests
url = "https://api.procuros.io/v2/transactions/{procurosTransactionId}/drop"
payload = { "reason": "Rejected by our ERP" }
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({reason: 'Rejected by our ERP'})
};
fetch('https://api.procuros.io/v2/transactions/{procurosTransactionId}/drop', 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.procuros.io/v2/transactions/{procurosTransactionId}/drop",
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([
'reason' => 'Rejected by our ERP'
]),
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.procuros.io/v2/transactions/{procurosTransactionId}/drop"
payload := strings.NewReader("{\n \"reason\": \"Rejected by our ERP\"\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.procuros.io/v2/transactions/{procurosTransactionId}/drop")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"Rejected by our ERP\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.procuros.io/v2/transactions/{procurosTransactionId}/drop")
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 \"reason\": \"Rejected by our ERP\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": null,
"data": {
"procurosTransactionId": "949b2f25-fd9d-4c58-8899-b4dc277f8cf9",
"status": "DROPPED"
}
}{
"success": false,
"message": "Transaction not found",
"errors": []
}{
"success": false,
"message": "Transaction is not in a droppable state",
"errors": []
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>"
}{
"success": false,
"message": "Transaction could not be dropped",
"errors": []
}Was this page helpful?