example-data.com
Menu
Browse docs and collections

shipments

shipments

Page 13 of 23.

Overview

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/shipments?limit=25"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/shipments?limit=25"
);
const { data, meta } = await res.json();

TypeScript example

// Download once: mkdir -p types && curl -o types/shipments.d.ts https://example-data.com/types/shipments.d.ts
import type { Shipment, ListEnvelope } from "./types/shipments";

const res = await fetch(
  "https://example-data.com/api/v1/shipments?limit=25"
);
const { data, meta } = (await res.json()) as ListEnvelope<Shipment>;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/shipments",
    params={"limit": 25},
)
data = res.json()

Response

{
  "data": [
    {
      "id": 289,
      "orderId": 543,
      "carrier": "fedex",
      "trackingNumber": "28UQ2VFSC51HSMPI",
      "status": "delivered",
      "shippedAt": "2024-07-08T01:30:45.076Z",
      "deliveredAt": "2024-07-16T00:20:30.114Z",
      "estimatedDeliveryAt": "2024-07-15T03:33:44.014Z",
      "createdAt": "2024-07-08T01:30:45.076Z"
    },
    {
      "id": 290,
      "orderId": 546,
      "carrier": "fedex",
      "trackingNumber": "QDBQ6YMT193R6SES",
      "status": "delivered",
      "shippedAt": "2024-07-06T02:48:25.771Z",
      "deliveredAt": "2024-07-12T01:03:43.022Z",
      "estimatedDeliveryAt": "2024-07-08T21:34:06.982Z",
      "createdAt": "2024-07-06T02:48:25.771Z"
    },
    {
      "id": 291,
      "orderId": 547,
      "carrier": "fedex",
      "trackingNumber": "VVK9Y3W6XI0YJXDT",
      "status": "in_transit",
      "shippedAt": "2025-02-02T08:06:18.069Z",
      "deliveredAt": null,
      "estimatedDeliveryAt": "2025-02-10T11:37:47.598Z",
      "createdAt": "2025-02-02T08:06:18.069Z"
    }
  ],
  "meta": {
    "page": 13,
    "limit": 24,
    "total": 531,
    "totalPages": 23
  },
  "links": {
    "self": "/api/v1/shipments?page=13&limit=24",
    "first": "/api/v1/shipments?page=1&limit=24",
    "last": "/api/v1/shipments?page=23&limit=24",
    "next": "/api/v1/shipments?page=14&limit=24",
    "prev": "/api/v1/shipments?page=12&limit=24"
  }
}