POST
/v1/orders/{orderId}/trackingPOST /v1/orders/{orderId}/tracking
Scopes: orders:tracking:writeorders:shipments:write
Requires scope: orders:tracking:write, orders:shipments:write.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
orderId | path | integer<int32> | yes |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
trackingNumber | string | no | |
carrier | string | no | |
shippingMethod | string | no | |
cost | number<double> | no | |
shippedDate | string | no | |
items | AddTrackingItem[] | no |
Response (200)
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | no | |
message | string | no |
Examples
import { SolidCommerceClient } from '@solidcommerce/sdk';
const client = new SolidCommerceClient({
apiKey: process.env.SOLIDCOMMERCE_API_KEY!,
});
const { data, error } = await client.raw.POST('/v1/orders/{orderId}/tracking', {
// params: { path: { id: '...' }, query: { limit: 25 } },
// body: { /* request body */ },
});
if (error) throw error;
console.log(data);