The “Get Order by ID” API allows to retrieve information for a specific order using its unique identifier. Use this endpoint to fetch details for a single order based on the provided order ID.
GET https://services.leadconnectorhq.com/payments/orders/{orderId}
Autorización
Bearer token generado desde el portal Leadway. Ver Autenticación .
Version
string
default: "2021-07-28"
required
Versión de la API.
Path parameters
orderId
string
default: "653f5e0cde5a1314e62a837c"
required
ID of the order that needs to be returned
Query parameters
locationId
string
default: "3SwdhCu3svxI8AKsPJt6"
LocationId is the id of the account.
altId
string
default: "3SwdhCu3svxI8AKsPJt6"
required
AltId is the unique identifier e.g: account id.
Respuestas
200 - Successful response
_id
string
default: "653f5e0cde5a1314e62a837c"
required
The unique identifier for the order.
altId
string
default: "3SwdhCu3svxI8AKsPJt6"
required
AltId is the unique identifier eg: account id.
altType
string
default: "account"
required
AltType is the type of identifier.
contactId
string
default: "XPLSw2SVagl12LMDeTmQ"
Contact id corresponding to the order.
Currency in which order was created.
status
string
default: "completed"
required
The status of the order (e.g., completed).
Order is in live / test mode.
createdAt
string
default: "2023-11-20T10:23:36.515Z"
required
The creation timestamp of the order.
updatedAt
string
default: "2024-01-23T09:57:04.846Z"
required
The last update timestamp of the order.
fulfillmentStatus
string
default: "unfulfilled"
Fulfillment status of the order.
Contact details of the order.
amountSummary
object
default: "{ subtotal: 100, discount: 5 }"
Amount details of the order.
Source details of the order.
Item details of the order.
Coupon details of the order.
trackingId
string
default: "63319ef9-de0a-4c84-aebd-3585fb4a0cdf"
Tracking id of the order.
fingerprint
string
default: "5d51db5a-42b0-4b04-ba88-2c046c982a3a"
Fingerprint id of the order.
meta
object
default: "{ couponSessionExpired: true }"
Meta details of the order.
traceId
string
default: "d3b16a92-a8ed-4e6b-8467-844750f78ed5"
Trace id of the order.
Automatic taxes applied for the Order
Provider name for automatic tax calculation
User ID who created the order.
{
"_id" : "653f5e0cde5a1314e62a837c" ,
"altId" : "3SwdhCu3svxI8AKsPJt6" ,
"altType" : "account" ,
"contactId" : "XPLSw2SVagl12LMDeTmQ" ,
"currency" : "USD" ,
"amount" : "100" ,
"status" : "completed" ,
"liveMode" : "false" ,
"createdAt" : "2023-11-20T10:23:36.515Z" ,
"updatedAt" : "2024-01-23T09:57:04.846Z" ,
"fulfillmentStatus" : "unfulfilled" ,
"contactSnapshot" : "{ last_name: \" Mcclain \" , type: \" lead \" , first_name_lower_case: \" rogan \" , email: \" anish+11@leadwaycrm.com \" , last_name_lower_case: \" mcclain \" , location_id: \" o6241QsiRwUIJHyjuhos \" , company_name: \" Jordan and Cox Trading \" }" ,
"amountSummary" : "{ subtotal: 100, discount: 5 }" ,
"source" : "{ type: \" invoice \" , id: \" 61dd48ff65b013bc39bb09c6 \" }" ,
"items" : "{ _id: 61dd33e88058b9f967ca79dc, authorizeAmount: 0, locationId: \" SBAWb4yu7A4LSc0skQ6g \" , name: \" Sample Product \" : price: {}, product: { name: \" Testing product \" , productType: \" SERVICE \" }}" ,
"coupon" : "{ code: \" FEST10 \" , _id: \" 63455e48901b43d4ef364a20 \" }" ,
"trackingId" : "63319ef9-de0a-4c84-aebd-3585fb4a0cdf" ,
"fingerprint" : "5d51db5a-42b0-4b04-ba88-2c046c982a3a" ,
"meta" : "{ couponSessionExpired: true }" ,
"markAsTest" : "false" ,
"traceId" : "d3b16a92-a8ed-4e6b-8467-844750f78ed5" ,
"automaticTaxesCalculated" : true ,
"taxCalculationProvider" : "taxjar" ,
"createdBy" : "user123"
}
422 - Unprocessable Entity
Ejemplo
curl -X GET 'https://services.leadconnectorhq.com/payments/orders/YOUR_orderId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
const response = await fetch ( 'https://services.leadconnectorhq.com/payments/orders/YOUR_orderId' , {
method: 'GET' ,
headers: {
Authorization: `Bearer ${ process . env . LEADWAY_TOKEN } ` ,
Version: '2021-07-28' ,
},
});
const data = await response . json ();
import os, requests
response = requests.request(
'GET' ,
'https://services.leadconnectorhq.com/payments/orders/YOUR_orderId' ,
headers = {
'Authorization' : f "Bearer { os.environ[ 'LEADWAY_TOKEN' ] } " ,
'Version' : '2021-07-28' ,
},
)
data = response.json()
<? php
$ch = curl_init ( 'https://services.leadconnectorhq.com/payments/orders/YOUR_orderId' );
curl_setopt_array ( $ch , [
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_CUSTOMREQUEST => 'GET' ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv ( 'LEADWAY_TOKEN' ),
'Version: 2021-07-28' ,
],
]);
$data = json_decode ( curl_exec ( $ch ), true );