# Create order fulfillment

POST https://services.leadconnectorhq.com/payments/orders/{orderId}/fulfillments

The "Order Fulfillment" API facilitates the process of fulfilling an order.

## Authentication

Send `Authorization: Bearer <token>` using:

- **Sub-Account token: OAuth access token or Private Integration Token.** Scopes: `payments/orders.write`

## Parameters

### Header Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `Version` | string | Yes | API Version |

### Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `orderId` | string | Yes | ID of the order that needs to be returned |

## OpenAPI Specification

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "LeadConnector API",
    "version": "v3"
  },
  "servers": [
    {
      "url": "https://services.leadconnectorhq.com"
    }
  ],
  "paths": {
    "/payments/orders/{orderId}/fulfillments": {
      "post": {
        "summary": "Create order fulfillment",
        "operationId": "createOrderFulfillment",
        "description": "The \"Order Fulfillment\" API facilitates the process of fulfilling an order.",
        "parameters": [
          {
            "name": "Version",
            "in": "header",
            "description": "API Version",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "v3"
              ]
            }
          },
          {
            "name": "orderId",
            "required": true,
            "in": "path",
            "description": "ID of the order that needs to be returned",
            "schema": {
              "example": "653f5e0cde5a1314e62a837c",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFulfillmentDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateFulfillmentResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedDTO"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnprocessableDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Location-Access": [
              "payments/orders.write"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account.",
        "type": "http"
      },
      "Agency-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency (OR) Private Integration Token of Agency.",
        "type": "http"
      },
      "Agency-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency.",
        "type": "http"
      }
    },
    "schemas": {
      "CreateFulfillmentDto": {
        "type": "object",
        "properties": {
          "altId": {
            "type": "string",
            "description": "Location Id or Agency Id",
            "example": "6578278e879ad2646715ba9c"
          },
          "altType": {
            "type": "string",
            "enum": [
              "location"
            ]
          },
          "trackings": {
            "description": "Fulfillment tracking information",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "trackingNumber": {
                  "type": "string",
                  "description": "Tracking number provided by the shipping carrier",
                  "example": "40012345678"
                },
                "shippingCarrier": {
                  "type": "string",
                  "description": "Shipping carrier name",
                  "example": "FedEx"
                },
                "trackingUrl": {
                  "type": "string",
                  "description": "Tracking URL",
                  "example": "https://www.fedex.com/wtrk/track/?trknbr=40012345678"
                }
              },
              "title": "FulfillmentTracking"
            }
          },
          "items": {
            "description": "Fulfilled items",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "priceId": {
                  "type": "string",
                  "description": "The id of product price",
                  "example": "6578278e879ad2646715ba9c"
                },
                "qty": {
                  "type": "number",
                  "description": "The no of quantity of the item",
                  "example": 1
                }
              },
              "required": [
                "priceId",
                "qty"
              ],
              "title": "FulfillmentItems"
            }
          },
          "notifyCustomer": {
            "type": "boolean",
            "description": "Need to send a notification to customer",
            "example": true
          }
        },
        "required": [
          "altId",
          "altType",
          "trackings",
          "items",
          "notifyCustomer"
        ],
        "title": "CreateFulfillmentDto"
      },
      "CreateFulfillmentResponseDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "boolean",
            "description": "Status of api action",
            "example": true
          },
          "data": {
            "description": "fulfillment data",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "altId": {
                    "type": "string",
                    "description": "Location Id or Agency Id",
                    "example": "6578278e879ad2646715ba9c"
                  },
                  "altType": {
                    "type": "string",
                    "enum": [
                      "location"
                    ]
                  },
                  "trackings": {
                    "description": "Fulfillment tracking information",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "trackingNumber": {
                          "type": "string",
                          "description": "Tracking number provided by the shipping carrier",
                          "example": "40012345678"
                        },
                        "shippingCarrier": {
                          "type": "string",
                          "description": "Shipping carrier name",
                          "example": "FedEx"
                        },
                        "trackingUrl": {
                          "type": "string",
                          "description": "Tracking URL",
                          "example": "https://www.fedex.com/wtrk/track/?trknbr=40012345678"
                        }
                      },
                      "title": "FulfillmentTracking"
                    }
                  },
                  "_id": {
                    "type": "string",
                    "description": "The unique identifier for the fulfillment item.",
                    "example": "655b33a82209e60b6adb87a5"
                  },
                  "items": {
                    "description": "Fulfilled items",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "_id": {
                          "type": "string",
                          "description": "The id of product price",
                          "example": "6578278e879ad2646715ba9c"
                        },
                        "name": {
                          "type": "string",
                          "description": "Name",
                          "example": "Iphone 15 pro"
                        },
                        "product": {
                          "description": "Product details",
                          "allOf": [
                            {
                              "type": "object",
                              "properties": {
                                "_id": {
                                  "type": "string",
                                  "description": "The unique identifier for the product.",
                                  "example": "655b33a82209e60b6adb87a5"
                                },
                                "description": {
                                  "type": "string",
                                  "description": "product description",
                                  "example": "This is a really awesome product"
                                },
                                "variants": {
                                  "description": "An array of variants for the product.",
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "description": "A unique identifier for the variant.",
                                        "example": "38s63qmxfr4"
                                      },
                                      "name": {
                                        "type": "string",
                                        "description": "The name of the variant.",
                                        "example": "Size"
                                      },
                                      "options": {
                                        "description": "An array of options for the variant.",
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string",
                                              "description": "The unique identifier for the option.",
                                              "example": "h4z7u0im2q8"
                                            },
                                            "name": {
                                              "type": "string",
                                              "description": "The name of the option.",
                                              "example": "XL"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "name"
                                          ],
                                          "title": "ProductVariantOptionDto"
                                        }
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "name",
                                      "options"
                                    ],
                                    "title": "ProductVariantDto"
                                  }
                                },
                                "locationId": {
                                  "type": "string",
                                  "description": "The unique identifier for the location.",
                                  "example": "3SwdhCsvxI8Au3KsPJt6"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "The name of the product.",
                                  "example": "Awesome Product"
                                },
                                "productType": {
                                  "type": "string",
                                  "description": "The type of the product (e.g., PHYSICAL).",
                                  "example": "PHYSICAL"
                                },
                                "availableInStore": {
                                  "type": "boolean",
                                  "description": "Indicates whether the product is available in-store.",
                                  "example": true
                                },
                                "createdAt": {
                                  "format": "date-time",
                                  "type": "string",
                                  "description": "The creation timestamp of the product.",
                                  "example": "2023-11-20T10:23:36.515Z"
                                },
                                "updatedAt": {
                                  "format": "date-time",
                                  "type": "string",
                                  "description": "The last update timestamp of the product.",
                                  "example": "2024-01-23T09:57:04.846Z"
                                },
                                "statementDescriptor": {
                                  "type": "string",
                                  "description": "The statement descriptor for the product.",
                                  "example": "abcde"
                                },
                                "image": {
                                  "type": "string",
                                  "description": "The URL for the product image.",
                                  "example": "https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/65af8d5df88bdb4b1022ee90.png"
                                },
                                "collectionIds": {
                                  "description": "An array of category Ids for the product",
                                  "example": [
                                    "65d71377c326ea78e1c47df5",
                                    "65d71377c326ea78e1c47d34"
                                  ],
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "isTaxesEnabled": {
                                  "type": "boolean",
                                  "description": "The field indicates whether taxes are enabled for the product or not.",
                                  "example": true,
                                  "default": false
                                },
                                "taxes": {
                                  "description": "An array of ids of Taxes attached to the Product. If the expand query includes tax, the taxes will be of type `ProductTaxDto`. Please refer to the `ProductTaxDto` for additional details.",
                                  "example": [
                                    "654492a4e6bef380114de15a"
                                  ],
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "automaticTaxCategoryId": {
                                  "type": "string",
                                  "description": "Tax category ID for Automatic taxes calculation.",
                                  "example": "65d71377c326ea78e1c47df5"
                                },
                                "label": {
                                  "description": "The Product label details",
                                  "allOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "title": {
                                          "type": "string",
                                          "description": "The content for the product label.",
                                          "example": "Featured"
                                        },
                                        "startDate": {
                                          "type": "string",
                                          "description": "Start date in YYYY-MM-DDTHH:mm:ssZ format",
                                          "example": "2024-06-26T05:43:35.000Z"
                                        },
                                        "endDate": {
                                          "type": "string",
                                          "description": "Start date in YYYY-MM-DDTHH:mm:ssZ format",
                                          "example": "2024-06-30T05:43:39.000Z"
                                        }
                                      },
                                      "required": [
                                        "title"
                                      ],
                                      "title": "ProductLabelDto"
                                    }
                                  ]
                                },
                                "slug": {
                                  "type": "string",
                                  "description": "The slug of the product by which the product will be navigated",
                                  "example": "washing-machine"
                                }
                              },
                              "required": [
                                "_id",
                                "locationId",
                                "name",
                                "productType",
                                "createdAt",
                                "updatedAt"
                              ],
                              "title": "DefaultProductResponseDto"
                            }
                          ]
                        },
                        "price": {
                          "description": "Price details",
                          "allOf": [
                            {
                              "type": "object",
                              "properties": {
                                "_id": {
                                  "type": "string",
                                  "description": "The unique identifier for the price.",
                                  "example": "655b33aa2209e60b6adb87a7"
                                },
                                "membershipOffers": {
                                  "description": "An array of membership offers associated with the price.",
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "label": {
                                        "type": "string",
                                        "description": "Membership offer label",
                                        "example": "top_50"
                                      },
                                      "value": {
                                        "type": "string",
                                        "description": "Membership offer label",
                                        "example": "50"
                                      },
                                      "_id": {
                                        "type": "string",
                                        "description": "The unique identifier for the membership offer.",
                                        "example": "655b33aa2209e60b6adb87a7"
                                      }
                                    },
                                    "required": [
                                      "label",
                                      "value",
                                      "_id"
                                    ],
                                    "title": "MembershipOfferDto"
                                  }
                                },
                                "variantOptionIds": {
                                  "description": "An array of variant option IDs associated with the price.",
                                  "example": [
                                    "h4z7u0im2q8",
                                    "h3nst2ltsnn"
                                  ],
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "locationId": {
                                  "type": "string",
                                  "description": "The unique identifier for the location.",
                                  "example": "3SwdhCsvxI8Au3KsPJt6"
                                },
                                "product": {
                                  "type": "string",
                                  "description": "The unique identifier for the associated product.",
                                  "example": "655b33a82209e60b6adb87a5"
                                },
                                "userId": {
                                  "type": "string",
                                  "description": "The unique identifier for the user.",
                                  "example": "6YAtzfzpmHAdj0e8GkKp"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "The name of the price.",
                                  "example": "Red / S"
                                },
                                "type": {
                                  "type": "string",
                                  "description": "The type of the price (e.g., one_time).",
                                  "example": "one_time",
                                  "enum": [
                                    "one_time",
                                    "recurring"
                                  ]
                                },
                                "currency": {
                                  "type": "string",
                                  "description": "The currency code for the price.",
                                  "example": "INR"
                                },
                                "amount": {
                                  "type": "number",
                                  "description": "The amount of the price.",
                                  "example": 199999
                                },
                                "recurring": {
                                  "description": "The recurring details of the price (if type is recurring).",
                                  "allOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "interval": {
                                          "type": "string",
                                          "description": "The interval at which the recurring event occurs.",
                                          "example": "day",
                                          "enum": [
                                            "day",
                                            "month",
                                            "week",
                                            "year"
                                          ]
                                        },
                                        "intervalCount": {
                                          "type": "number",
                                          "description": "The number of intervals between each occurrence of the event.",
                                          "example": 1
                                        }
                                      },
                                      "required": [
                                        "interval",
                                        "intervalCount"
                                      ],
                                      "title": "RecurringDto"
                                    }
                                  ]
                                },
                                "createdAt": {
                                  "format": "date-time",
                                  "type": "string",
                                  "description": "The creation timestamp of the price.",
                                  "example": "2023-11-20T10:23:38.645Z"
                                },
                                "updatedAt": {
                                  "format": "date-time",
                                  "type": "string",
                                  "description": "The last update timestamp of the price.",
                                  "example": "2024-01-23T09:57:04.852Z"
                                },
                                "compareAtPrice": {
                                  "type": "number",
                                  "description": "The compare-at price for comparison purposes.",
                                  "example": 2000000
                                },
                                "trackInventory": {
                                  "type": "boolean",
                                  "description": "Indicates whether inventory tracking is enabled.",
                                  "example": null
                                },
                                "availableQuantity": {
                                  "type": "number",
                                  "description": "Available inventory stock quantity",
                                  "example": 5
                                },
                                "allowOutOfStockPurchases": {
                                  "type": "boolean",
                                  "description": "Continue selling when out of stock",
                                  "example": true
                                }
                              },
                              "required": [
                                "_id",
                                "name",
                                "type",
                                "currency",
                                "amount"
                              ],
                              "title": "DefaultPriceResponseDto"
                            }
                          ]
                        },
                        "qty": {
                          "type": "number",
                          "description": "The no of quantity of the current fulfilled item",
                          "example": 1
                        }
                      },
                      "required": [
                        "_id",
                        "name",
                        "product",
                        "price",
                        "qty"
                      ],
                      "title": "FulfilledItem"
                    }
                  },
                  "createdAt": {
                    "type": "string",
                    "description": "created at",
                    "example": "2023-12-12T09:27:42.355Z"
                  },
                  "updatedAt": {
                    "type": "string",
                    "description": "updated at",
                    "example": "2023-12-12T09:27:42.355Z"
                  }
                },
                "required": [
                  "altId",
                  "altType",
                  "trackings",
                  "_id",
                  "items",
                  "createdAt",
                  "updatedAt"
                ],
                "title": "FulfillmentSchema"
              }
            ]
          }
        },
        "required": [
          "status",
          "data"
        ],
        "title": "CreateFulfillmentResponseDto"
      },
      "BadRequestDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 400
          },
          "message": {
            "type": "string",
            "example": "Bad Request"
          }
        },
        "title": "BadRequestDTO"
      },
      "UnauthorizedDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 401
          },
          "message": {
            "type": "string",
            "example": "Invalid token: access token is invalid"
          },
          "error": {
            "type": "string",
            "example": "Unauthorized"
          }
        },
        "title": "UnauthorizedDTO"
      },
      "UnprocessableDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 422
          },
          "message": {
            "example": [
              "Unprocessable Entity"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "error": {
            "type": "string",
            "example": "Unprocessable Entity"
          }
        },
        "title": "UnprocessableDTO"
      }
    }
  }
}
```

## Code Examples

**cURL**

```bash
curl -L -X POST 'https://services.leadconnectorhq.com/payments/orders/<orderId>/fulfillments' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Version: v3' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "altId": "6578278e879ad2646715ba9c",
  "trackings": [
    {
      "trackingNumber": "40012345678",
      "shippingCarrier": "FedEx",
      "trackingUrl": "https://www.fedex.com/wtrk/track/?trknbr=40012345678"
    }
  ],
  "items": [
    {
      "priceId": "6578278e879ad2646715ba9c",
      "qty": 1
    }
  ],
  "notifyCustomer": true
}'
```

**Node.js**

```javascript
const options = {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <TOKEN>',
    Version: 'v3',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
      "altId": "6578278e879ad2646715ba9c",
      "trackings": [
        {
          "trackingNumber": "40012345678",
          "shippingCarrier": "FedEx",
          "trackingUrl": "https://www.fedex.com/wtrk/track/?trknbr=40012345678"
        }
      ],
      "items": [
        {
          "priceId": "6578278e879ad2646715ba9c",
          "qty": 1
        }
      ],
      "notifyCustomer": true
  })
};

try {
  const response = await fetch('https://services.leadconnectorhq.com/payments/orders/<orderId>/fulfillments', options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**Python**

```python
import requests

url = "https://services.leadconnectorhq.com/payments/orders/{orderId}/fulfillments"

headers = {
    "Authorization": "Bearer <TOKEN>",
    "Version": "v3"
}

payload = {
    "altId": "6578278e879ad2646715ba9c",
    "trackings": [
        {
            "trackingNumber": "40012345678",
            "shippingCarrier": "FedEx",
            "trackingUrl": "https://www.fedex.com/wtrk/track/?trknbr=40012345678"
        }
    ],
    "items": [
        {
            "priceId": "6578278e879ad2646715ba9c",
            "qty": 1
        }
    ],
    "notifyCustomer": true
}

response = requests.post(url, json=payload, headers=headers)
print(response.json())
```

**PHP**

```php
<?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://services.leadconnectorhq.com/payments/orders/<orderId>/fulfillments',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer <TOKEN>',
    'Version: v3',
    'Content-Type: application/json',
  ],
  CURLOPT_POSTFIELDS => '{
  "altId": "6578278e879ad2646715ba9c",
  "trackings": [
    {
      "trackingNumber": "40012345678",
      "shippingCarrier": "FedEx",
      "trackingUrl": "https://www.fedex.com/wtrk/track/?trknbr=40012345678"
    }
  ],
  "items": [
    {
      "priceId": "6578278e879ad2646715ba9c",
      "qty": 1
    }
  ],
  "notifyCustomer": true
}',
]);

$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

**Java**

```java
HttpResponse<String> response = Unirest
  .post("https://services.leadconnectorhq.com/payments/orders/<orderId>/fulfillments")
  .header("Authorization", "Bearer <TOKEN>")
  .header("Version", "v3")
  .header("Content-Type", "application/json")
  .body("{\"altId\":\"6578278e879ad2646715ba9c\",\"trackings\":[{\"trackingNumber\":\"40012345678\",\"shippingCarrier\":\"FedEx\",\"trackingUrl\":\"https://www.fedex.com/wtrk/track/?trknbr=40012345678\"}],\"items\":[{\"priceId\":\"6578278e879ad2646715ba9c\",\"qty\":1}],\"notifyCustomer\":true}")
  .asString();
```

**Go**

```go
package main

import (
  "fmt"
  "net/http"
  "io"
  "strings"
)

func main() {
  url := "https://services.leadconnectorhq.com/payments/orders/<orderId>/fulfillments"
  payload := strings.NewReader(`{
  "altId": "6578278e879ad2646715ba9c",
  "trackings": [
    {
      "trackingNumber": "40012345678",
      "shippingCarrier": "FedEx",
      "trackingUrl": "https://www.fedex.com/wtrk/track/?trknbr=40012345678"
    }
  ],
  "items": [
    {
      "priceId": "6578278e879ad2646715ba9c",
      "qty": 1
    }
  ],
  "notifyCustomer": true
}`)
  req, _ := http.NewRequest("POST", url, payload)
  req.Header.Add("Authorization", "Bearer <TOKEN>")
  req.Header.Add("Version", "v3")

  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)
  fmt.Println(string(body))
}
```

**Ruby**

```ruby
require 'uri'
require 'net/http'

url = URI("https://services.leadconnectorhq.com/payments/orders/<orderId>/fulfillments")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <TOKEN>"
request["Version"] = "v3"
request["Content-Type"] = "application/json"
request.body = '{
  "altId": "6578278e879ad2646715ba9c",
  "trackings": [
    {
      "trackingNumber": "40012345678",
      "shippingCarrier": "FedEx",
      "trackingUrl": "https://www.fedex.com/wtrk/track/?trknbr=40012345678"
    }
  ],
  "items": [
    {
      "priceId": "6578278e879ad2646715ba9c",
      "qty": 1
    }
  ],
  "notifyCustomer": true
}'

response = http.request(request)
puts response.read_body
```

**PowerShell**

```powershell
$headers = @{
  "Authorization" = "Bearer <TOKEN>"
  "Version" = "v3"
}

$body = '{
  "altId": "6578278e879ad2646715ba9c",
  "trackings": [
    {
      "trackingNumber": "40012345678",
      "shippingCarrier": "FedEx",
      "trackingUrl": "https://www.fedex.com/wtrk/track/?trknbr=40012345678"
    }
  ],
  "items": [
    {
      "priceId": "6578278e879ad2646715ba9c",
      "qty": 1
    }
  ],
  "notifyCustomer": true
}'

$response = Invoke-RestMethod -Uri 'https://services.leadconnectorhq.com/payments/orders/<orderId>/fulfillments' -Method 'POST' -Headers $headers -Body $body -ContentType 'application/json'
$response | ConvertTo-Json
```
