Cancel a Physical Card Order
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.valox.co/api/v1/order/{orderId}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.valox.co/api/v1/order/{orderId}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.valox.co/api/v1/order/{orderId}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.valox.co/api/v1/order/{orderId}/cancel"
req, _ := http.NewRequest("POST", 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.post("https://api.valox.co/api/v1/order/{orderId}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.valox.co/api/v1/order/{orderId}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"ok": true
}{
"message": "Invalid order transition"
}{
"message": "<string>"
}{
"message": "Card order not found."
}{
"message": "An unexpected error occurred."
}Physical Card Order
Cancel a Physical Card Order
This endpoint transitions the card order to the cancelled state.
POST
/
api
/
v1
/
order
/
{orderId}
/
cancel
Cancel a Physical Card Order
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.valox.co/api/v1/order/{orderId}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.valox.co/api/v1/order/{orderId}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.valox.co/api/v1/order/{orderId}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.valox.co/api/v1/order/{orderId}/cancel"
req, _ := http.NewRequest("POST", 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.post("https://api.valox.co/api/v1/order/{orderId}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.valox.co/api/v1/order/{orderId}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"ok": true
}{
"message": "Invalid order transition"
}{
"message": "<string>"
}{
"message": "Card order not found."
}{
"message": "An unexpected error occurred."
}⌘I

