Get Order
curl --request GET \
--url https://api.example.com/wp-json/latepoint-api/v1/orders/{id}import requests
url = "https://api.example.com/wp-json/latepoint-api/v1/orders/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/wp-json/latepoint-api/v1/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.example.com/wp-json/latepoint-api/v1/orders/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/wp-json/latepoint-api/v1/orders/{id}"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/wp-json/latepoint-api/v1/orders/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/wp-json/latepoint-api/v1/orders/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyOrders
Get Order
Retrieve a specific order by ID.
GET
/
wp-json
/
latepoint-api
/
v1
/
orders
/
{id}
Get Order
curl --request GET \
--url https://api.example.com/wp-json/latepoint-api/v1/orders/{id}import requests
url = "https://api.example.com/wp-json/latepoint-api/v1/orders/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/wp-json/latepoint-api/v1/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.example.com/wp-json/latepoint-api/v1/orders/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/wp-json/latepoint-api/v1/orders/{id}"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/wp-json/latepoint-api/v1/orders/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/wp-json/latepoint-api/v1/orders/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyPath Parameters
integer
required
The ID of the order to retrieve
Example Request
GET /wp-json/latepoint-api/v1/orders/38
Authorization: Bearer YOUR_API_KEY
Example Response
{
"id": 38,
"confirmation_code": "LP38CONF",
"subtotal": "45.00",
"total": "45.00",
"status": "open",
"fulfillment_status": "not_fulfilled",
"payment_status": "not_paid",
"customer_id": 8,
"coupon_code": null,
"tax_total": "0.00",
"customer_comment": null,
"created_at": "2024-12-21 17:45:32",
"updated_at": "2024-12-21 17:45:32",
"items": [
{
"id": 38,
"variant": "booking",
"item_data": "{\"booking_id\":38}",
"quantity": 1,
"subtotal": "45.00",
"total": "45.00"
}
]
}
Related Endpoints
Once you have an order ID, you can access related resources:Order Invoices
# Get all invoices for an order
GET /wp-json/latepoint-api/v1/orders/{order_id}/invoices
# Get a specific invoice
GET /wp-json/latepoint-api/v1/orders/{order_id}/invoices/{invoice_id}
# Update an invoice
PUT /wp-json/latepoint-api/v1/orders/{order_id}/invoices/{invoice_id}
Order Transactions
# Get all transactions for an order
GET /wp-json/latepoint-api/v1/orders/{order_id}/transactions
# Get a specific transaction
GET /wp-json/latepoint-api/v1/orders/{order_id}/transactions/{transaction_id}
Example Usage
# Get invoices for order 56
GET /wp-json/latepoint-api/v1/orders/56/invoices
Authorization: Bearer YOUR_API_KEY
# Get transactions for order 56
GET /wp-json/latepoint-api/v1/orders/56/transactions
Authorization: Bearer YOUR_API_KEY
⌘I
