Delete purchase
curl --request DELETE \
--url https://api.streamskill.pro/v1/purchases/{orderId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.streamskill.pro/v1/purchases/{orderId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.streamskill.pro/v1/purchases/{orderId}', 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.streamskill.pro/v1/purchases/{orderId}",
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.streamskill.pro/v1/purchases/{orderId}"
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.streamskill.pro/v1/purchases/{orderId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.streamskill.pro/v1/purchases/{orderId}")
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_body{
"name": "Unauthorized",
"message": "Your request was made with invalid credentials.",
"code": 0,
"status": 401,
"type": "unauthorized_http_exception"
}{
"name": "Purchase not found",
"code": 0,
"message": "Object not found: {ID}",
"status": 404,
"type": "purchase_not_found_exception"
}{
"name": "Method Not Allowed",
"message": "Action is unavailable for this order",
"code": 0,
"status": 405,
"type": "action_unavailable"
}{
"name": "Purchase Done",
"message": "Order already completed",
"code": 0,
"status": 409,
"type": "purchase_done"
}{
"name": "Action failed",
"message": "Action not performed",
"code": 0,
"status": 500,
"type": "action_failed"
}Actions
Delete purchase
DELETE
/
purchases
/
{orderId}
Delete purchase
curl --request DELETE \
--url https://api.streamskill.pro/v1/purchases/{orderId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.streamskill.pro/v1/purchases/{orderId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.streamskill.pro/v1/purchases/{orderId}', 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.streamskill.pro/v1/purchases/{orderId}",
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.streamskill.pro/v1/purchases/{orderId}"
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.streamskill.pro/v1/purchases/{orderId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.streamskill.pro/v1/purchases/{orderId}")
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_body{
"name": "Unauthorized",
"message": "Your request was made with invalid credentials.",
"code": 0,
"status": 401,
"type": "unauthorized_http_exception"
}{
"name": "Purchase not found",
"code": 0,
"message": "Object not found: {ID}",
"status": 404,
"type": "purchase_not_found_exception"
}{
"name": "Method Not Allowed",
"message": "Action is unavailable for this order",
"code": 0,
"status": 405,
"type": "action_unavailable"
}{
"name": "Purchase Done",
"message": "Order already completed",
"code": 0,
"status": 409,
"type": "purchase_done"
}{
"name": "Action failed",
"message": "Action not performed",
"code": 0,
"status": 500,
"type": "action_failed"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
The language of the response
Available options:
en, ru Path Parameters
The ID of the order
Response
OK
⌘I