Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX{
"access_token": string,
"expires_in": number,
"token_type": "Bearer",
"scope": "ALL:ALL"
}{
"error": string,
"error_description": string
}curl --location 'https://global.stampede.ai/oauth/token' \
--header 'Content-Type: application/json' \
--data '{
"client_id": "ai.stampede.marketplace.example",
"client_secret": "XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"grant_type": "client_credentials"
}'const axios = require('axios');
let data = JSON.stringify({
"client_id": "ai.stampede.marketplace.example",
"client_secret": "XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"grant_type": "client_credentials"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://global.stampede.ai/oauth/token',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});<?php
$client = new Client();
$headers = [
'Content-Type' => 'application/json'
];
$body = '{
"client_id": "ai.stampede.marketplace.example",
"client_secret": "XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"grant_type": "client_credentials"
}';
$request = new Request('POST', 'https://global.stampede.ai/oauth/token', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
import http.client
import json
conn = http.client.HTTPSConnection("global.stampede.ai")
payload = json.dumps({
"client_id": "ai.stampede.marketplace.example",
"client_secret": "XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"grant_type": "client_credentials"
})
headers = {
'Content-Type': 'application/json'
}
conn.request("POST", "/oauth/token", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8")){
"data": [
{
{
message: string;
errors: {
code: string;
expected?: string;
received?: string;
path: string[];
}[];
}{
"id": string,
{
data: {
id:
{
id: string;
organization_id: string;
profile_id: number;
last_interacted_at: string;
created_at: string;
data_opt_in_at: string | null;
sms_opt_in_at: string | null;
email_opt_in_at: string;
user_profile: {
email: string;
id: number;
verified: number;
first: string | null;
last: string | null;
phone: string | null;
lat: number | null;
lng: number | null;
birth_day: number | null;
birth_month: number | null;
postcode: string | null;
country: string | null;
gender: string | null;
};
organization_registration_personalisation_choice: any[];
custom_question_answers: any[];
}
{
id: string;
organization_id: string;
profile_id: number;
last_interacted_at: string;
created_at: string;
data_opt_in_at: string;
sms_opt_in_at: string;
email_opt_in_at: string;
user_profile: {
first: string | null;
last: string | null;
email: string;
id: number;
};
};{
stack: string;
code: number;
message: string[];
url: string;
method: string;
}{
stack: string;
code: number;
message: string;
url: string;
method: string;
}10%_OFF:
ABC1
ABC2
ABC3
BOGOF:
DEF1
DEF2
DEF3
2FOR1:
GHI1
GHI2
GHI3{
data: {
id: string;
active: boolean;
name: string;
description: string | null;
expires_at: string | null;
created_at: string;
updated_at: string;
cash_value_amount: number | null;
cash_value_currency: string | null;
days_code_valid_for: number | null;
voucher_codes_count: number;
}[];
links: {
first: string;
last: string;
prev: string | null;
next: string | null;
};
meta: {
current_page: number;
from: number;
last_page: number;
links: {
url: string | null;
label: string;
active: boolean;
}[];
path: string;
per_page: number;
to: number;
total: number;
};
}{
message: string;
voucher: {
id: string;
active: boolean;
name: string | null;
description: string;
expires_at: string | null;
created_at: string;
updated_at: string;
cash_value_amount: number | null;
cash_value_currency: string | null;
days_code_valid_for: number | null;
voucher_codes_count: number | null;
};
}{
message: string;
errors: {
name: string[];
};
}{
data: {
id: string;
voucher_id?: string;
voucher?: {
id: string;
active: boolean;
name: string;
description: string;
expires_at: string | null;
created_at: string;
updated_at: string;
cash_value_amount: number | null;
cash_value_currency: string | null;
days_code_valid_for: number | null;
voucher_codes_count: number;
};
code?: string;
sent_to_profile_id?: number;
redeemed_by_profile_id?: number | null;
redeemed_by_user_id?: number | null;
redeemed_at?: string | null;
is_redeemed?: boolean;
revoked_at?: string | null;
is_revoked?: boolean;
is_revokable?: boolean;
expires_at?: string | null;
created_at?: string;
updated_at?: string;
sent_to_profile_data?: any;
}[];
links: {
first: string;
last: string;
prev: string | null;
next: string | null;
};
meta: {
current_page: number;
from: number | null;
last_page: number;
links: {
url: string | null;
label: string;
active: boolean;
}[];
path: string;
per_page: number;
to: number | null;
total: number;
};
}{
message: string;
errors: {
name: string[];
};
}{
message: string;
voucher_code: {
id: string;
voucher_id: string;
code: string;
sent_to_profile_id: string | null;
redeemed_by_profile_id: string | null;
redeemed_by_user_id: string | null;
redeemed_at: string | null;
is_redeemed: boolean;
revoked_at: string;
is_revoked: boolean;
is_revokable: boolean;
expires_at: string | null;
created_at: string;
updated_at: string;
};
}{
message: string;
errors: {
name: string[];
};
}