curl --request POST \
--url https://staging.api.prexsell.com/v2/reports/company/orders \
--header 'Content-Type: application/json' \
--data '
{
"startDate": "2025-01-01T00:00:00.000Z",
"endDate": "2025-12-31T23:59:59.999Z",
"orderBy": "DepartureDate"
}
'import requests
url = "https://staging.api.prexsell.com/v2/reports/company/orders"
payload = {
"startDate": "2025-01-01T00:00:00.000Z",
"endDate": "2025-12-31T23:59:59.999Z",
"orderBy": "DepartureDate"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
startDate: '2025-01-01T00:00:00.000Z',
endDate: '2025-12-31T23:59:59.999Z',
orderBy: 'DepartureDate'
})
};
fetch('https://staging.api.prexsell.com/v2/reports/company/orders', 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://staging.api.prexsell.com/v2/reports/company/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'startDate' => '2025-01-01T00:00:00.000Z',
'endDate' => '2025-12-31T23:59:59.999Z',
'orderBy' => 'DepartureDate'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging.api.prexsell.com/v2/reports/company/orders"
payload := strings.NewReader("{\n \"startDate\": \"2025-01-01T00:00:00.000Z\",\n \"endDate\": \"2025-12-31T23:59:59.999Z\",\n \"orderBy\": \"DepartureDate\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://staging.api.prexsell.com/v2/reports/company/orders")
.header("Content-Type", "application/json")
.body("{\n \"startDate\": \"2025-01-01T00:00:00.000Z\",\n \"endDate\": \"2025-12-31T23:59:59.999Z\",\n \"orderBy\": \"DepartureDate\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.prexsell.com/v2/reports/company/orders")
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 \"startDate\": \"2025-01-01T00:00:00.000Z\",\n \"endDate\": \"2025-12-31T23:59:59.999Z\",\n \"orderBy\": \"DepartureDate\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"report": {
"id": "clxyz1234567890abc",
"status": "Queued",
"orderBy": "DepartureDate",
"createdAt": "2025-01-01T00:00:00.000Z",
"startDate": "2025-01-01T00:00:00.000Z",
"endDate": "2025-12-31T23:59:59.999Z",
"expiresAt": null,
"downloadedAt": null
}
}
}{
"errors": [
{
"message": "Offer expired",
"errorCode": "OFFER_EXPIRED"
}
]
}{
"errors": [
{
"message": "AUTH_INVALID_CREDENTIALS",
"errorCode": "UNAUTHORIZED"
}
]
}{
"errors": [
{
"message": "AUTH_NO_ACCESS",
"errorCode": "FORBIDDEN"
}
]
}Create company orders report
Enqueues an async CSV report of the authenticated companyโs orders over the specified date range. Returns 202 Accepted with the new report record. Poll GET /orders or fetch GET /orders/:id/download once status is Completed. The date range must not exceed 366 days. The company is resolved from the session โ it cannot be supplied by the client.
curl --request POST \
--url https://staging.api.prexsell.com/v2/reports/company/orders \
--header 'Content-Type: application/json' \
--data '
{
"startDate": "2025-01-01T00:00:00.000Z",
"endDate": "2025-12-31T23:59:59.999Z",
"orderBy": "DepartureDate"
}
'import requests
url = "https://staging.api.prexsell.com/v2/reports/company/orders"
payload = {
"startDate": "2025-01-01T00:00:00.000Z",
"endDate": "2025-12-31T23:59:59.999Z",
"orderBy": "DepartureDate"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
startDate: '2025-01-01T00:00:00.000Z',
endDate: '2025-12-31T23:59:59.999Z',
orderBy: 'DepartureDate'
})
};
fetch('https://staging.api.prexsell.com/v2/reports/company/orders', 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://staging.api.prexsell.com/v2/reports/company/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'startDate' => '2025-01-01T00:00:00.000Z',
'endDate' => '2025-12-31T23:59:59.999Z',
'orderBy' => 'DepartureDate'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging.api.prexsell.com/v2/reports/company/orders"
payload := strings.NewReader("{\n \"startDate\": \"2025-01-01T00:00:00.000Z\",\n \"endDate\": \"2025-12-31T23:59:59.999Z\",\n \"orderBy\": \"DepartureDate\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://staging.api.prexsell.com/v2/reports/company/orders")
.header("Content-Type", "application/json")
.body("{\n \"startDate\": \"2025-01-01T00:00:00.000Z\",\n \"endDate\": \"2025-12-31T23:59:59.999Z\",\n \"orderBy\": \"DepartureDate\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.prexsell.com/v2/reports/company/orders")
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 \"startDate\": \"2025-01-01T00:00:00.000Z\",\n \"endDate\": \"2025-12-31T23:59:59.999Z\",\n \"orderBy\": \"DepartureDate\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"report": {
"id": "clxyz1234567890abc",
"status": "Queued",
"orderBy": "DepartureDate",
"createdAt": "2025-01-01T00:00:00.000Z",
"startDate": "2025-01-01T00:00:00.000Z",
"endDate": "2025-12-31T23:59:59.999Z",
"expiresAt": null,
"downloadedAt": null
}
}
}{
"errors": [
{
"message": "Offer expired",
"errorCode": "OFFER_EXPIRED"
}
]
}{
"errors": [
{
"message": "AUTH_INVALID_CREDENTIALS",
"errorCode": "UNAUTHORIZED"
}
]
}{
"errors": [
{
"message": "AUTH_NO_ACCESS",
"errorCode": "FORBIDDEN"
}
]
}Body
Date window and optional sort order for the report. The company is resolved from the session.
Inclusive start of the date range (ISO 8601 date-time).
"2025-01-01T00:00:00.000Z"
Inclusive end of the date range (ISO 8601 date-time).
"2025-12-31T23:59:59.999Z"
Field to sort orders by. "DepartureDate" (default) sorts by departure date; "CreatedAt" sorts by order creation date.
CreatedAt, DepartureDate "DepartureDate"
Response
Report enqueued successfully. Poll GET /orders or fetch GET /orders/:id/download once status is Completed.
Show child attributes
Show child attributes
