curl --request GET \
--url https://prod01-apigw.{customer_name}.fabric.zone/api-order/orders/user/guest \
--header 'x-site-context: <x-site-context>'import requests
url = "https://prod01-apigw.{customer_name}.fabric.zone/api-order/orders/user/guest"
headers = {"x-site-context": "<x-site-context>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-site-context': '<x-site-context>'}};
fetch('https://prod01-apigw.{customer_name}.fabric.zone/api-order/orders/user/guest', 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://prod01-apigw.{customer_name}.fabric.zone/api-order/orders/user/guest",
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-site-context: <x-site-context>"
],
]);
$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://prod01-apigw.{customer_name}.fabric.zone/api-order/orders/user/guest"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-site-context", "<x-site-context>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://prod01-apigw.{customer_name}.fabric.zone/api-order/orders/user/guest")
.header("x-site-context", "<x-site-context>")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod01-apigw.{customer_name}.fabric.zone/api-order/orders/user/guest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-site-context"] = '<x-site-context>'
response = http.request(request)
puts response.read_body[
{
"_id": "60271eb8f69adb00083a80ac",
"tags": "<array>",
"cartId": "602710f862e75a0009ed25b7",
"attributes": [
{
"price": 4,
"_id": "60271baf8e1368000914bd0e",
"attributeId": "60270ac95b4c090007cafde3",
"value": true,
"name": "Small Package Giftwrap",
"type": "bool",
"id": "60271baf8e1368000914bd0e"
}
],
"customerEmail": "abid@fabric.inc",
"orderCurrency": "USD",
"orderTotal": 8433,
"taxTotal": 22,
"channel": 12,
"status": "ORDER_CREATED",
"statusLog": "Order has been created",
"orderReference": "6015-4453-86622",
"orderId": "1461-8514-32344",
"shipTo": [
{
"address": {
"name": {
"first": "Mike",
"middle": "p",
"last": "holard"
},
"phone": {
"number": "998-992-9404",
"kind": "Mobile"
},
"street1": "3520 Crowley Drive",
"city": "Vancouver",
"state": "BC",
"country": "Canada",
"zipCode": 98004,
"kind": "shipping",
"email": "mike@fabric.inc"
},
"promosApplied": "<array>",
"_id": "60271c6d8d9f7a000852a107",
"shipToType": "SHIP_TO_ADDRESS",
"taxCode": "FR1000",
"shipToId": 49,
"price": 5,
"currency": "USD",
"shipmentMethodId": 10002,
"estimatedTax": 2,
"shipmentCarrier": "Fedex",
"shipmentMethod": "Next Day",
"total": 7,
"id": "60271c6d8d9f7a000852a107"
}
],
"items": [
{
"group": [
1.2312312312312322e+23
],
"promosApplied": [
{
"unit": "10%OFF",
"value": 16,
"ON": {
"kind": "SKU",
"value": "<string>"
},
"id": "6023f20cb609010008c06af8",
"promoId": "6023f20cb609010008c06af6"
}
],
"_id": "602710f862e75a0009ed25b8",
"price": 8400,
"weightUnit": "kg",
"itemId": 1000000050,
"quantity": 1,
"priceListId": 100000,
"sku": "WATCH123456",
"taxCode": "PAC12345",
"title": "Watch",
"weight": 2,
"lineItemId": 1,
"attributeTotalPrice": 2,
"attributes": [
{
"price": 2,
"_id": "60271b3cfb9109000886b4a9",
"attributeId": "602714e50e8f780007e66d97",
"value": "Happy for you",
"name": "Item Level free Text",
"type": "string",
"id": "60271b3cfb9109000886b4a9"
}
],
"currency": "USD",
"shipToId": 49,
"discount": 1600,
"estimatedTax": 20,
"total": 8420,
"id": "602710f862e75a0009ed25b8"
}
],
"shipments": "<array>",
"payments": [
{
"billToAddress": {
"name": {
"first": "Mike",
"last": "holard"
},
"phone": {
"number": 7780811973,
"kind": "Mobile"
},
"email": "mike@fabric.inc",
"street1": "345 67 Main Street",
"street2": "tex",
"city": "AUSTIN",
"state": "TX",
"country": "US",
"zipCode": 1003
},
"shipToId": [
49
],
"_id": "60271eb8f69adb00083a80b1",
"paymentIdentifier": {
"cardIdentifier": 1111
},
"paymentMethod": "Visa",
"paymentKind": "Fabric User",
"amount": 8433,
"currency": "USD",
"conversion": 1,
"paymentToken": {
"token": 40059083049,
"type": "CARD"
},
"id": "60271eb8f69adb00083a80b1"
}
],
"revision": 0,
"totalQuantity": 1,
"statusDescriptions": "<array>",
"events": "<array>",
"createdAt": "2021-02-13T00:35:04.240Z",
"updatedAt": "2021-02-13T00:35:04.240Z",
"__v": 0
}
]{
"code": "<string>",
"message": "<string>"
}{
"message": "Forbidden"
}{
"code": "<string>",
"message": "<string>"
}Get order by email
Get order by email
curl --request GET \
--url https://prod01-apigw.{customer_name}.fabric.zone/api-order/orders/user/guest \
--header 'x-site-context: <x-site-context>'import requests
url = "https://prod01-apigw.{customer_name}.fabric.zone/api-order/orders/user/guest"
headers = {"x-site-context": "<x-site-context>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-site-context': '<x-site-context>'}};
fetch('https://prod01-apigw.{customer_name}.fabric.zone/api-order/orders/user/guest', 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://prod01-apigw.{customer_name}.fabric.zone/api-order/orders/user/guest",
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-site-context: <x-site-context>"
],
]);
$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://prod01-apigw.{customer_name}.fabric.zone/api-order/orders/user/guest"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-site-context", "<x-site-context>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://prod01-apigw.{customer_name}.fabric.zone/api-order/orders/user/guest")
.header("x-site-context", "<x-site-context>")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod01-apigw.{customer_name}.fabric.zone/api-order/orders/user/guest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-site-context"] = '<x-site-context>'
response = http.request(request)
puts response.read_body[
{
"_id": "60271eb8f69adb00083a80ac",
"tags": "<array>",
"cartId": "602710f862e75a0009ed25b7",
"attributes": [
{
"price": 4,
"_id": "60271baf8e1368000914bd0e",
"attributeId": "60270ac95b4c090007cafde3",
"value": true,
"name": "Small Package Giftwrap",
"type": "bool",
"id": "60271baf8e1368000914bd0e"
}
],
"customerEmail": "abid@fabric.inc",
"orderCurrency": "USD",
"orderTotal": 8433,
"taxTotal": 22,
"channel": 12,
"status": "ORDER_CREATED",
"statusLog": "Order has been created",
"orderReference": "6015-4453-86622",
"orderId": "1461-8514-32344",
"shipTo": [
{
"address": {
"name": {
"first": "Mike",
"middle": "p",
"last": "holard"
},
"phone": {
"number": "998-992-9404",
"kind": "Mobile"
},
"street1": "3520 Crowley Drive",
"city": "Vancouver",
"state": "BC",
"country": "Canada",
"zipCode": 98004,
"kind": "shipping",
"email": "mike@fabric.inc"
},
"promosApplied": "<array>",
"_id": "60271c6d8d9f7a000852a107",
"shipToType": "SHIP_TO_ADDRESS",
"taxCode": "FR1000",
"shipToId": 49,
"price": 5,
"currency": "USD",
"shipmentMethodId": 10002,
"estimatedTax": 2,
"shipmentCarrier": "Fedex",
"shipmentMethod": "Next Day",
"total": 7,
"id": "60271c6d8d9f7a000852a107"
}
],
"items": [
{
"group": [
1.2312312312312322e+23
],
"promosApplied": [
{
"unit": "10%OFF",
"value": 16,
"ON": {
"kind": "SKU",
"value": "<string>"
},
"id": "6023f20cb609010008c06af8",
"promoId": "6023f20cb609010008c06af6"
}
],
"_id": "602710f862e75a0009ed25b8",
"price": 8400,
"weightUnit": "kg",
"itemId": 1000000050,
"quantity": 1,
"priceListId": 100000,
"sku": "WATCH123456",
"taxCode": "PAC12345",
"title": "Watch",
"weight": 2,
"lineItemId": 1,
"attributeTotalPrice": 2,
"attributes": [
{
"price": 2,
"_id": "60271b3cfb9109000886b4a9",
"attributeId": "602714e50e8f780007e66d97",
"value": "Happy for you",
"name": "Item Level free Text",
"type": "string",
"id": "60271b3cfb9109000886b4a9"
}
],
"currency": "USD",
"shipToId": 49,
"discount": 1600,
"estimatedTax": 20,
"total": 8420,
"id": "602710f862e75a0009ed25b8"
}
],
"shipments": "<array>",
"payments": [
{
"billToAddress": {
"name": {
"first": "Mike",
"last": "holard"
},
"phone": {
"number": 7780811973,
"kind": "Mobile"
},
"email": "mike@fabric.inc",
"street1": "345 67 Main Street",
"street2": "tex",
"city": "AUSTIN",
"state": "TX",
"country": "US",
"zipCode": 1003
},
"shipToId": [
49
],
"_id": "60271eb8f69adb00083a80b1",
"paymentIdentifier": {
"cardIdentifier": 1111
},
"paymentMethod": "Visa",
"paymentKind": "Fabric User",
"amount": 8433,
"currency": "USD",
"conversion": 1,
"paymentToken": {
"token": 40059083049,
"type": "CARD"
},
"id": "60271eb8f69adb00083a80b1"
}
],
"revision": 0,
"totalQuantity": 1,
"statusDescriptions": "<array>",
"events": "<array>",
"createdAt": "2021-02-13T00:35:04.240Z",
"updatedAt": "2021-02-13T00:35:04.240Z",
"__v": 0
}
]{
"code": "<string>",
"message": "<string>"
}{
"message": "Forbidden"
}{
"code": "<string>",
"message": "<string>"
}Headers
"0LybWR49k95cCwYh3cu0waCYoh4H2Eux2J52wn4k"
The x-site-context header is a JSON object that contains information about the source you wish to pull from. The mandatory account is the 24 character identifier found in Copilot. The channel (Sales channel ID), stage (environment name), and date attributes can be used to further narrow the scope of your data source.
"{\"date\": \"2023-01-01T00:00:00.000Z\", \"channel\": 12, \"account\": \"1234abcd5678efgh9ijklmno\",\"stage\":\"production\"}"
Query Parameters
User email that we want to get orders for.
"johnsmith@gmail.com"
Response
Order
"60271eb8f69adb00083a80ac"
"602710f862e75a0009ed25b7"
Show child attributes
Show child attributes
"abid@fabric.inc"
"USD"
8433
22
12
"ORDER_CREATED"
"Order has been created"
"6015-4453-86622"
"1461-8514-32344"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
0
1
"2021-02-13T00:35:04.240Z"
"2021-02-13T00:35:04.240Z"
0
Was this page helpful?
