The "Order Fulfillment" API facilitates the process of fulfilling an order.
POST https://services.leadconnectorhq.com/payments/orders/{orderId}/fulfillments
Authorization
Path parameters
Body
trackings (object[], required): Fulfillment tracking information
trackingNumber (string): Tracking number provided by the shipping carrier Example: 40012345678
shippingCarrier (string): Shipping carrier name Example: FedEx
trackingUrl (string): Tracking URL Example: https://www.fedex.com/wtrk/track/?trknbr=40012345678
items (object[], required): Fulfilled items
priceId (string, required): The id of product price Example: 6578278e879ad2646715ba9c
qty (number, required): The no of quantity of the item Example: 1
Responses
200 - Successful response
status (boolean, required): Status of api action Example: True
data (object, required): fulfillment data
400 - Bad Request
401 - Unauthorized
422 - Unprocessable Entity
Example
curl -X POST 'https://services.leadconnectorhq.com/payments/orders/YOUR_orderId/fulfillments' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"trackings": [
{
"trackingNumber": "40012345678",
"shippingCarrier": "FedEx",
"trackingUrl": "https://www.fedex.com/wtrk/track/?trknbr=40012345678"
}
],
"items": [
{
"priceId": "6578278e879ad2646715ba9c",
"qty": 1
}
],
"notifyCustomer": true
}'
const response = await fetch('https://services.leadconnectorhq.com/payments/orders/YOUR_orderId/fulfillments', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account", "trackings": [{"trackingNumber": "40012345678", "shippingCarrier": "FedEx", "trackingUrl": "https://www.fedex.com/wtrk/track/?trknbr=40012345678"}], "items": [{"priceId": "6578278e879ad2646715ba9c", "qty": 1}], "notifyCustomer": true}),
});
const data = await response.json();
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/payments/orders/YOUR_orderId/fulfillments',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account", "trackings": [{"trackingNumber": "40012345678", "shippingCarrier": "FedEx", "trackingUrl": "https://www.fedex.com/wtrk/track/?trknbr=40012345678"}], "items": [{"priceId": "6578278e879ad2646715ba9c", "qty": 1}], "notifyCustomer": true},
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/payments/orders/YOUR_orderId/fulfillments');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account', 'trackings': [{'trackingNumber': '40012345678', 'shippingCarrier': 'FedEx', 'trackingUrl': 'https://www.fedex.com/wtrk/track/?trknbr=40012345678'}], 'items': [{'priceId': '6578278e879ad2646715ba9c', 'qty': 1}], 'notifyCustomer': true}),
]);
$data = json_decode(curl_exec($ch), true);