Orders API (PII version)
vtex · Company
Endpoints that deal with order management. New version of the orders API.
Authentication
Sample Requests
Retrieves order details by searching a specific order ID. >If you wish to retrieve unmasked data, use the `reason` parameter. > The `View order` resource is needed to use this API request. This is included in `OMS - Full access` and `IntegrationProfile - Fulfillment Oms`, among other default r
Hover any highlighted part to learn what it does
| Accept | application/json |
| Content-Type | application/json |
curl -X GET "https://api.apis.guru/v2/specs/vtex.local/Orders-API-(PII-version)/1.0/api/orders/pvt/document/{orderId}?reason=data-validation" \
-H "Accept: application/json" \
-H "Content-Type: application/json"import requests
params = {
"reason": "data-validation"
}
headers = {
"Accept": "application/json",
"Content-Type": "application/json"
}
response = requests.get(
"https://api.apis.guru/v2/specs/vtex.local/Orders-API-(PII-version)/1.0/api/orders/pvt/document/{orderId}",
params=params,
headers=headers,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/vtex.local/Orders-API-(PII-version)/1.0/api/orders/pvt/document/{orderId}');
url.searchParams.set('reason', 'data-validation');
const response = await fetch(url, {
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/vtex.local/Orders-API-(PII-version)/1.0/api/orders/pvt/document/{orderId}")
q := baseURL.Query()
q.Set("reason", "data-validation")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
req.Header.Set("Accept", "application/json")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/vtex.local/Orders-API-(PII-version)/1.0/api/orders/pvt/document/{orderId}")
uri.query = URI.encode_www_form({
"reason" => "data-validation"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
req["Accept"] = "application/json"
req["Content-Type"] = "application/json"
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/vtex.local/Orders-API-(PII-version)/1.0/api/orders/pvt/document/{orderId}?" . http_build_query([
"reason" => "data-validation"
]);
$opts = ["http" => [
"method" => "GET",
"header" => implode("\r\n", [
"Accept: application/json",
"Content-Type: application/json"
]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Retrieves a list of orders according to the filters described below. > This endpoint returns masked order data. > This should **not** be used for integrations. Use the [orders Feed or hook](https://developers.vtex.com/vtex-rest-api/docs/feed-v3-1) for this purpose. This endpoint returns onl
Hover any highlighted part to learn what it does
| Accept | application/json |
| Content-Type | application/json |
curl -X POST "https://api.apis.guru/v2/specs/vtex.local/Orders-API-(PII-version)/1.0/api/orders/extendsearch/orders?f_hasInputInvoice=false" \ -H "Accept: application/json" \ -H "Content-Type: application/json"
import requests
params = {
"f_hasInputInvoice": "false"
}
headers = {
"Accept": "application/json",
"Content-Type": "application/json"
}
response = requests.post(
"https://api.apis.guru/v2/specs/vtex.local/Orders-API-(PII-version)/1.0/api/orders/extendsearch/orders",
params=params,
headers=headers,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/vtex.local/Orders-API-(PII-version)/1.0/api/orders/extendsearch/orders');
url.searchParams.set('f_hasInputInvoice', 'false');
const response = await fetch(url, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/vtex.local/Orders-API-(PII-version)/1.0/api/orders/extendsearch/orders")
q := baseURL.Query()
q.Set("f_hasInputInvoice", "false")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("POST", targetURL, nil)
req.Header.Set("Accept", "application/json")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/vtex.local/Orders-API-(PII-version)/1.0/api/orders/extendsearch/orders")
uri.query = URI.encode_www_form({
"f_hasInputInvoice" => "false"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Post.new(uri)
req["Accept"] = "application/json"
req["Content-Type"] = "application/json"
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/vtex.local/Orders-API-(PII-version)/1.0/api/orders/extendsearch/orders?" . http_build_query([
"f_hasInputInvoice" => "false"
]);
$opts = ["http" => [
"method" => "POST",
"header" => implode("\r\n", [
"Accept: application/json",
"Content-Type: application/json"
]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));You should use this endpoint to cancel an order by its `orderId`. A common scenario is one where the seller has a problem with the order fulfillment and needs to request the order cancellation to the marketplace. To do this, the seller would need to make this request, passing the `orderId` in the U
Hover any highlighted part to learn what it does
| Accept | application/json |
| Content-Type | application/json |
curl -X POST "https://api.apis.guru/v2/specs/vtex.local/Orders-API-(PII-version)/1.0/api/orders/pvt/document/{orderId}/cancel" \
-H "Accept: application/json" \
-H "Content-Type: application/json"import requests
headers = {
"Accept": "application/json",
"Content-Type": "application/json"
}
response = requests.post(
"https://api.apis.guru/v2/specs/vtex.local/Orders-API-(PII-version)/1.0/api/orders/pvt/document/{orderId}/cancel",
headers=headers,
)
print(response.json())const url = 'https://api.apis.guru/v2/specs/vtex.local/Orders-API-(PII-version)/1.0/api/orders/pvt/document/{orderId}/cancel';
const response = await fetch(url, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://api.apis.guru/v2/specs/vtex.local/Orders-API-(PII-version)/1.0/api/orders/pvt/document/{orderId}/cancel"
req, _ := http.NewRequest("POST", targetURL, nil)
req.Header.Set("Accept", "application/json")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/vtex.local/Orders-API-(PII-version)/1.0/api/orders/pvt/document/{orderId}/cancel")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Post.new(uri)
req["Accept"] = "application/json"
req["Content-Type"] = "application/json"
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/vtex.local/Orders-API-(PII-version)/1.0/api/orders/pvt/document/{orderId}/cancel";
$opts = ["http" => [
"method" => "POST",
"header" => implode("\r\n", [
"Accept: application/json",
"Content-Type: application/json"
]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- See official documentation for authentication and setup.
What can you build with Orders API (PII version)?
Orders API (PII version) is a Company API. Developers commonly use company APIs for:
- enriching CRM records with company firmographics
- building lead-generation and prospecting tools
- verifying business identity and registration details
- monitoring competitors and market intelligence
- powering B2B data enrichment pipelines
No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. Orders API (PII version) is free to use, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide