Disable Gift Card
curl --request POST \
--url https://api.launchmystore.io/api/v1/gift_cards/{gift_card_id}/disable.json \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.launchmystore.io/api/v1/gift_cards/{gift_card_id}/disable.json"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.launchmystore.io/api/v1/gift_cards/{gift_card_id}/disable.json', 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.launchmystore.io/api/v1/gift_cards/{gift_card_id}/disable.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.launchmystore.io/api/v1/gift_cards/{gift_card_id}/disable.json"
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.launchmystore.io/api/v1/gift_cards/{gift_card_id}/disable.json")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/gift_cards/{gift_card_id}/disable.json")
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{
"status": 200,
"state": "success",
"message": null,
"data": {
"gift_card": {
"id": "5c1b8a7d-2e3f-4a9b-8c6d-1f2e3a4b5c6d",
"gift_card_id": "5c1b8a7d-2e3f-4a9b-8c6d-1f2e3a4b5c6d",
"code": "GIFT-WXYZ-5678-ABCD",
"initial_value": 100,
"balance": 100,
"currency": "USD",
"enabled": false,
"disabled_at": "2024-01-25T10:00:00.000Z",
"starts_at": "2024-01-20T14:30:00.000Z",
"expires_on": null,
"customer_id": "cust_xyz789",
"order_id": null,
"note": null,
"created_at": "2024-01-20T14:30:00.000Z",
"updated_at": "2024-01-25T10:00:00.000Z"
}
}
}
Gift Cards
Disable Gift Card
Disable a gift card
POST
/
api
/
v1
/
gift_cards
/
{gift_card_id}
/
disable.json
Disable Gift Card
curl --request POST \
--url https://api.launchmystore.io/api/v1/gift_cards/{gift_card_id}/disable.json \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.launchmystore.io/api/v1/gift_cards/{gift_card_id}/disable.json"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.launchmystore.io/api/v1/gift_cards/{gift_card_id}/disable.json', 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.launchmystore.io/api/v1/gift_cards/{gift_card_id}/disable.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.launchmystore.io/api/v1/gift_cards/{gift_card_id}/disable.json"
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.launchmystore.io/api/v1/gift_cards/{gift_card_id}/disable.json")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/gift_cards/{gift_card_id}/disable.json")
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{
"status": 200,
"state": "success",
"message": null,
"data": {
"gift_card": {
"id": "5c1b8a7d-2e3f-4a9b-8c6d-1f2e3a4b5c6d",
"gift_card_id": "5c1b8a7d-2e3f-4a9b-8c6d-1f2e3a4b5c6d",
"code": "GIFT-WXYZ-5678-ABCD",
"initial_value": 100,
"balance": 100,
"currency": "USD",
"enabled": false,
"disabled_at": "2024-01-25T10:00:00.000Z",
"starts_at": "2024-01-20T14:30:00.000Z",
"expires_on": null,
"customer_id": "cust_xyz789",
"order_id": null,
"note": null,
"created_at": "2024-01-20T14:30:00.000Z",
"updated_at": "2024-01-25T10:00:00.000Z"
}
}
}
Path Parameters
The gift card ID
Response
{
"status": 200,
"state": "success",
"message": null,
"data": {
"gift_card": {
"id": "5c1b8a7d-2e3f-4a9b-8c6d-1f2e3a4b5c6d",
"gift_card_id": "5c1b8a7d-2e3f-4a9b-8c6d-1f2e3a4b5c6d",
"code": "GIFT-WXYZ-5678-ABCD",
"initial_value": 100,
"balance": 100,
"currency": "USD",
"enabled": false,
"disabled_at": "2024-01-25T10:00:00.000Z",
"starts_at": "2024-01-20T14:30:00.000Z",
"expires_on": null,
"customer_id": "cust_xyz789",
"order_id": null,
"note": null,
"created_at": "2024-01-20T14:30:00.000Z",
"updated_at": "2024-01-25T10:00:00.000Z"
}
}
}
⌘I