Customer Seats
Claim Seat
POST
/
v1
/
customer-seats
/
claim
Go (SDK)
package main
import(
"context"
macropaygo "github.com/web3group/macropay-go-main"
"github.com/web3group/macropay-go-main/models/components"
"log"
)
func main() {
ctx := context.Background()
s := macropaygo.New()
res, err := s.CustomerSeats.ClaimSeat(ctx, components.SeatClaim{
InvitationToken: "<value>",
})
if err != nil {
log.Fatal(err)
}
if res.CustomerSeatClaimResponse != nil {
// handle response
}
}from macropay_sdk import Macropay
with Macropay() as macropay:
res = macropay.customer_seats.claim_seat(request={
"invitation_token": "<value>",
})
# Handle response
print(res)import { Macropay } from "@macropayments/sdk";
const macropay = new Macropay();
async function run() {
const result = await macropay.customerSeats.claimSeat({
invitationToken: "<value>",
});
console.log(result);
}
run();declare(strict_types=1);
require 'vendor/autoload.php';
use Macropay;
use Macropay\Models\Components;
$sdk = Macropay\Macropay::builder()->build();
$request = new Components\SeatClaim(
invitationToken: '<value>',
);
$response = $sdk->customerSeats->claimSeat(
request: $request
);
if ($response->customerSeatClaimResponse !== null) {
// handle response
}curl --request POST \
--url https://api.macropay.ai/v1/customer-seats/claim \
--header 'Content-Type: application/json' \
--data '
{
"invitation_token": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({invitation_token: '<string>'})
};
fetch('https://api.macropay.ai/v1/customer-seats/claim', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.macropay.ai/v1/customer-seats/claim")
.header("Content-Type", "application/json")
.body("{\n \"invitation_token\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.macropay.ai/v1/customer-seats/claim")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"invitation_token\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"seat": {
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subscription_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"member_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "<string>",
"customer_email": "<string>",
"invitation_token_expires_at": "2023-11-07T05:31:56Z",
"claimed_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z",
"seat_metadata": {}
},
"customer_session_token": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Body
application/json
Invitation token to claim the seat
⌘I
Go (SDK)
package main
import(
"context"
macropaygo "github.com/web3group/macropay-go-main"
"github.com/web3group/macropay-go-main/models/components"
"log"
)
func main() {
ctx := context.Background()
s := macropaygo.New()
res, err := s.CustomerSeats.ClaimSeat(ctx, components.SeatClaim{
InvitationToken: "<value>",
})
if err != nil {
log.Fatal(err)
}
if res.CustomerSeatClaimResponse != nil {
// handle response
}
}from macropay_sdk import Macropay
with Macropay() as macropay:
res = macropay.customer_seats.claim_seat(request={
"invitation_token": "<value>",
})
# Handle response
print(res)import { Macropay } from "@macropayments/sdk";
const macropay = new Macropay();
async function run() {
const result = await macropay.customerSeats.claimSeat({
invitationToken: "<value>",
});
console.log(result);
}
run();declare(strict_types=1);
require 'vendor/autoload.php';
use Macropay;
use Macropay\Models\Components;
$sdk = Macropay\Macropay::builder()->build();
$request = new Components\SeatClaim(
invitationToken: '<value>',
);
$response = $sdk->customerSeats->claimSeat(
request: $request
);
if ($response->customerSeatClaimResponse !== null) {
// handle response
}curl --request POST \
--url https://api.macropay.ai/v1/customer-seats/claim \
--header 'Content-Type: application/json' \
--data '
{
"invitation_token": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({invitation_token: '<string>'})
};
fetch('https://api.macropay.ai/v1/customer-seats/claim', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.macropay.ai/v1/customer-seats/claim")
.header("Content-Type", "application/json")
.body("{\n \"invitation_token\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.macropay.ai/v1/customer-seats/claim")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"invitation_token\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"seat": {
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subscription_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"member_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "<string>",
"customer_email": "<string>",
"invitation_token_expires_at": "2023-11-07T05:31:56Z",
"claimed_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z",
"seat_metadata": {}
},
"customer_session_token": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}