User Queue
curl --request GET \
--url https://api.centralcart.io/v1/app/user_queue/{user-id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.centralcart.io/v1/app/user_queue/{user-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.centralcart.io/v1/app/user_queue/{user-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.centralcart.io/v1/app/user_queue/{user-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.centralcart.io/v1/app/user_queue/{user-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.centralcart.io/v1/app/user_queue/{user-id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.centralcart.io/v1/app/user_queue/{user-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[
{
"id": 3362388,
"store_id": 1,
"user_id": "1",
"command": "addGroup 1 Bronze",
"offline_execute": false,
"execute_at": "2024-01-28T15:08:57.000-03:00",
"order": {
"client_identifier": "1",
"client_email": "[email protected]",
"client_name": "Central Cart",
"client_discord": null,
"internal_id": "nwwcsZCXz_QQ",
"variables": [
{
"name": "client_identifier",
"value": "1"
}
]
}
},
{
"id": 3362390,
"store_id": 1,
"user_id": "1",
"command": "userNotify 1 pwwcsZCXz_QQ",
"offline_execute": false,
"execute_at": "2024-01-28T15:08:57.000-03:00",
"order": {
"client_identifier": "1",
"client_email": "[email protected]",
"client_name": "Central Cart",
"client_discord": null,
"internal_id": "nwwcsZCXz_QQ",
"variables": [
{
"name": "client_identifier",
"value": "1"
}
]
}
}
]Comandos
User Queue
Retorna a lista de comandos pendentes
GET
/
app
/
user_queue
/
{user-id}
User Queue
curl --request GET \
--url https://api.centralcart.io/v1/app/user_queue/{user-id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.centralcart.io/v1/app/user_queue/{user-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.centralcart.io/v1/app/user_queue/{user-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.centralcart.io/v1/app/user_queue/{user-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.centralcart.io/v1/app/user_queue/{user-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.centralcart.io/v1/app/user_queue/{user-id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.centralcart.io/v1/app/user_queue/{user-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[
{
"id": 3362388,
"store_id": 1,
"user_id": "1",
"command": "addGroup 1 Bronze",
"offline_execute": false,
"execute_at": "2024-01-28T15:08:57.000-03:00",
"order": {
"client_identifier": "1",
"client_email": "[email protected]",
"client_name": "Central Cart",
"client_discord": null,
"internal_id": "nwwcsZCXz_QQ",
"variables": [
{
"name": "client_identifier",
"value": "1"
}
]
}
},
{
"id": 3362390,
"store_id": 1,
"user_id": "1",
"command": "userNotify 1 pwwcsZCXz_QQ",
"offline_execute": false,
"execute_at": "2024-01-28T15:08:57.000-03:00",
"order": {
"client_identifier": "1",
"client_email": "[email protected]",
"client_name": "Central Cart",
"client_discord": null,
"internal_id": "nwwcsZCXz_QQ",
"variables": [
{
"name": "client_identifier",
"value": "1"
}
]
}
}
]Autorizações
Token de API gerado no painel da CentralCart.
Parâmetros de caminho
O ID, nickname ou identificador do cliente.
Resposta
200 - application/json
Lista de comandos pendentes do usuário.
O ID do comando
O ID da loja
O ID do cliente associado ao comando
O comando a ser manipulado e executado
Se "true", o comando será executado mesmo com o jogador offline
Data e hora em que o comando deve ser executado
Show child attributes
Show child attributes