Get Order
curl --request GET \
--url https://api-ai.textyess.com/orders/{id} \
--header 'x-auth-token: <api-key>'import requests
url = "https://api-ai.textyess.com/orders/{id}"
headers = {"x-auth-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-auth-token': '<api-key>'}};
fetch('https://api-ai.textyess.com/orders/{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-ai.textyess.com/orders/{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 => [
"x-auth-token: <api-key>"
],
]);
$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-ai.textyess.com/orders/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-auth-token", "<api-key>")
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-ai.textyess.com/orders/{id}")
.header("x-auth-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-ai.textyess.com/orders/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-auth-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "order_12345",
"number_of_items": 3,
"total_price": "99.99",
"paid": true,
"created_at": "2024-03-20T10:30:00Z"
}
{
"message": "Order not found"
}
Orders API
Get Order
Retrieve a specific order from your store by its ID
GET
/
orders
/
{id}
Get Order
curl --request GET \
--url https://api-ai.textyess.com/orders/{id} \
--header 'x-auth-token: <api-key>'import requests
url = "https://api-ai.textyess.com/orders/{id}"
headers = {"x-auth-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-auth-token': '<api-key>'}};
fetch('https://api-ai.textyess.com/orders/{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-ai.textyess.com/orders/{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 => [
"x-auth-token: <api-key>"
],
]);
$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-ai.textyess.com/orders/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-auth-token", "<api-key>")
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-ai.textyess.com/orders/{id}")
.header("x-auth-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-ai.textyess.com/orders/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-auth-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "order_12345",
"number_of_items": 3,
"total_price": "99.99",
"paid": true,
"created_at": "2024-03-20T10:30:00Z"
}
{
"message": "Order not found"
}
Overview
The get order endpoint allows you to retrieve detailed information about a specific order in your store using its unique identifier. This endpoint returns the most recent order matching the provided ID.Authentication
This endpoint requires a valid JWT token in thex-auth-token header. You can find your token in the Developers section:
x-auth-token: your_jwt_token
Path Parameters
string
required
The unique identifier (cms_id) of the order you want to retrieve
Response
The response includes the following fields:string
The unique identifier (cms_id) of the order
number
The total number of items in the order
string
The total price of the order in decimal format (e.g., “99.99”)
boolean
Indicates if the order has been paid
string
The timestamp when the order was created
{
"id": "order_12345",
"number_of_items": 3,
"total_price": "99.99",
"paid": true,
"created_at": "2024-03-20T10:30:00Z"
}
{
"message": "Order not found"
}