Retrieve order by ID
curl --request GET \
--url https://api-testbed.giftbit.com/papi/v1/campaign/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-testbed.giftbit.com/papi/v1/campaign/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-testbed.giftbit.com/papi/v1/campaign/{id}', 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-testbed.giftbit.com/papi/v1/campaign/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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-testbed.giftbit.com/papi/v1/campaign/{id}"
req, _ := http.NewRequest("GET", 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.get("https://api-testbed.giftbit.com/papi/v1/campaign/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-testbed.giftbit.com/papi/v1/campaign/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"info": {
"code": "INFO_CAMPAIGN_RETRIEVED",
"name": "Campaign Retrieved",
"message": "A campaign or list of campaigns has been retrieved."
},
"campaign": {
"company_name": "Company Name",
"message": "Thanks for being such an awesome customer!",
"subject": "Please enjoy this reward!",
"price_in_cents": 5000,
"brand_codes": [
"itunesus"
],
"status": "CAMPAIGN_CREATED",
"uuid": "ee0d3f657fb640c987033e63a82e2279",
"suppress_default_greeting": false,
"delivery_type": "GIFTBIT_EMAIL",
"expiry": "2017-05-01",
"gift_template": "XDKHE",
"id": "clientProvidedGiftId_abc1232"
}
}Retrieve order by ID
Retrieves the status and information about the specified order.
GET
/
campaign
/
{id}
Retrieve order by ID
curl --request GET \
--url https://api-testbed.giftbit.com/papi/v1/campaign/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-testbed.giftbit.com/papi/v1/campaign/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-testbed.giftbit.com/papi/v1/campaign/{id}', 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-testbed.giftbit.com/papi/v1/campaign/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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-testbed.giftbit.com/papi/v1/campaign/{id}"
req, _ := http.NewRequest("GET", 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.get("https://api-testbed.giftbit.com/papi/v1/campaign/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-testbed.giftbit.com/papi/v1/campaign/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"info": {
"code": "INFO_CAMPAIGN_RETRIEVED",
"name": "Campaign Retrieved",
"message": "A campaign or list of campaigns has been retrieved."
},
"campaign": {
"company_name": "Company Name",
"message": "Thanks for being such an awesome customer!",
"subject": "Please enjoy this reward!",
"price_in_cents": 5000,
"brand_codes": [
"itunesus"
],
"status": "CAMPAIGN_CREATED",
"uuid": "ee0d3f657fb640c987033e63a82e2279",
"suppress_default_greeting": false,
"delivery_type": "GIFTBIT_EMAIL",
"expiry": "2017-05-01",
"gift_template": "XDKHE",
"id": "clientProvidedGiftId_abc1232"
}
}Authorizations
Send your API token prefixed by Bearer in the Authorization header.
Path Parameters
The order id assigned by the client, or the uuid assigned by Giftbit.