Operations
Operations ReversalGet
https://sandbox-api.srpago.com/v1/operations/apply-reversal/:operation_id
Apply a reversal/ Cancel an operation
headers
AuthorizationBasic
Content-Typeapplication/json
PATH VARIABLES
operation_idMjY1OTM2MQ==
Example Request
curl --location --request GET "https://sandbox-api.srpago.com/v1/operations/apply-reversal/:operation_id" \ --header "Content-Type: application/json" --header "Authorization: Basic"
var settings = {
"url": "https://sandbox-api.srpago.com/v1/operations/apply-reversal/:operation_id",
"method": "GET",
"timeout": 0,
"headers": {
"Content-Type": "application/json",
"Authorization": "Basic "
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
require "uri"
require "net/http"
url = URI("https://sandbox-api.srpago.com/v1/operations/apply-reversal/:operation_id")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Content-Type"] = "application/json",
request["Content-Type"] = "Basic "
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPConnection("sandbox-api,srpago,com")
headers = {
'Content-Type': "application/json",
'Authorization': "Basic ",
'cache-control': "no-cache",
'Postman-Token': "3952be41-be3c-49cc-9e40-7cd7a5e1d6ba"
}
conn.request("GET", "v1,operations,apply-reversal,:operation_id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
var http = require("https");
var options = {
"method": "GET",
"hostname": [
"sandbox-api",
"srpago",
"com"
],
"path": [
"v1",
"operations",
"apply-reversal",
"gjdk483"
],
"headers": {
"Content-Type": "application/json",
"Authorization": "Basic ",
"cache-control": "no-cache",
"Postman-Token": "1668d366-9539-4cf2-acab-200fed559277"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://sandbox-api.srpago.com/v1/operations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => false,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json",
"Authorization: Basic "
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main
import (
"fmt"
"os"
"path/filepath"
"net/http"
"io/ioutil"
)
func main() {
url := "https://sandbox-api.srpago.com/v1/operations/apply-reversal/:operation_id"
method := "GET"
client := &http.Client {
CheckRedirect: func(req *http.Request, via []*http.Request) error {
return http.ErrUseLastResponse
},
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Basic ")
res, err := client.Do(req)
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}