Cancel an order
curl --request GET \
--url https://b.anny.co/api/v1/orders/{order_number}/cancelimport requests
url = "https://b.anny.co/api/v1/orders/{order_number}/cancel"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://b.anny.co/api/v1/orders/{order_number}/cancel', 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://b.anny.co/api/v1/orders/{order_number}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://b.anny.co/api/v1/orders/{order_number}/cancel"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://b.anny.co/api/v1/orders/{order_number}/cancel")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/orders/{order_number}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"type": "orders",
"id": "2010985",
"attributes": {
"number": "BO66236921",
"currency": "EUR",
"total": 0,
"net_amount": 0,
"tax_amount": 0,
"discount_amount": 0,
"status": "canceled",
"access_token": "VGcIMIwStxojwlkTYVeM0tCYgsx0xz",
"expires_at": null,
"created_at": "2021-09-24T12:33:50+00:00",
"updated_at": "2021-09-24T12:34:43+00:00"
},
"links": {
"self": "https://b.anny.co/api/v1/orders/2010985"
},
"meta": {
"download_url": "https://b.anny.co/downloads/order-confirmation/2010985?access_token=VGcIMIwStxojwlkTYVeM0tCYgsx0xz",
"voucher_code": null,
"is_base_order": false,
"payment_flow": "pay-offline"
}
}
}Orders & Checkout
Cancel an order
Auth: optional. This endpoint allows a customer to cancel an order via the order number. This can be done either anonymously via the access token or via the customer login. Canceling the order will also cancel all related bookings.
GET
/
api
/
v1
/
orders
/
{order_number}
/
cancel
Cancel an order
curl --request GET \
--url https://b.anny.co/api/v1/orders/{order_number}/cancelimport requests
url = "https://b.anny.co/api/v1/orders/{order_number}/cancel"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://b.anny.co/api/v1/orders/{order_number}/cancel', 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://b.anny.co/api/v1/orders/{order_number}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://b.anny.co/api/v1/orders/{order_number}/cancel"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://b.anny.co/api/v1/orders/{order_number}/cancel")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/orders/{order_number}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"type": "orders",
"id": "2010985",
"attributes": {
"number": "BO66236921",
"currency": "EUR",
"total": 0,
"net_amount": 0,
"tax_amount": 0,
"discount_amount": 0,
"status": "canceled",
"access_token": "VGcIMIwStxojwlkTYVeM0tCYgsx0xz",
"expires_at": null,
"created_at": "2021-09-24T12:33:50+00:00",
"updated_at": "2021-09-24T12:34:43+00:00"
},
"links": {
"self": "https://b.anny.co/api/v1/orders/2010985"
},
"meta": {
"download_url": "https://b.anny.co/downloads/order-confirmation/2010985?access_token=VGcIMIwStxojwlkTYVeM0tCYgsx0xz",
"voucher_code": null,
"is_base_order": false,
"payment_flow": "pay-offline"
}
}
}⌘I