Skip to main content
GET
/
v2
/
reports
/
company
/
orders
/
{id}
/
download
Download company order report
curl --request GET \
  --url https://staging.api.prexsell.com/v2/reports/company/orders/{id}/download
import requests

url = "https://staging.api.prexsell.com/v2/reports/company/orders/{id}/download"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://staging.api.prexsell.com/v2/reports/company/orders/{id}/download', 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/{id}/download",
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://staging.api.prexsell.com/v2/reports/company/orders/{id}/download"

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://staging.api.prexsell.com/v2/reports/company/orders/{id}/download")
.asString();
require 'uri'
require 'net/http'

url = URI("https://staging.api.prexsell.com/v2/reports/company/orders/{id}/download")

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_body
{
  "data": {
    "url": "https://storage.googleapis.com/bucket/exports/company/cmp123/company-order-report-clxyz.csv?X-Goog-Signature=...",
    "expiresAt": "2025-01-01T00:15:00.000Z"
  }
}
{
"errors": [
{
"message": "AUTH_INVALID_CREDENTIALS",
"errorCode": "UNAUTHORIZED"
}
]
}
{
"errors": [
{
"message": "AUTH_NO_ACCESS",
"errorCode": "FORBIDDEN"
}
]
}
{
"errors": [
{
"message": "RESOURCE_NOT_FOUND",
"errorCode": "NOT_FOUND"
}
]
}
{
"errors": [
{
"message": "Orders already paid",
"errorCode": "CONFLICT",
"details": {
"ordersIds": [
"ord_1"
]
}
}
]
}

Path Parameters

id
string
required

Report id.

Example:

"clxyz1234567890abc"

Response

Fresh signed download URL minted successfully.

data
object
required