测试模式——不会从任何真实银行卡扣款。
DeliverPoint
🌐 ZH
登录
此语言由我们自己的翻译模型翻译,并经我们的团队校正,尚未经过母语人士审校。如有不清楚之处,请切换到英语或法语。

API

适用于您公司账户的 REST API。使用密钥进行身份验证:Authorization: Bearer <key>。

curl -H "Authorization: Bearer otk_…" -H "Content-Type: application/json" -H "Idempotency-Key: order-1001" \
-d '{"external_id":"order-1001","date":"2026-11-06","address":"123 Queen St W","city":"Toronto","province":"ON","postal":"M5H 2M9","packages":2}' \
https://app.deliverpoint.app/account/api/v1/jobs

Webhook signature: X-Tracker-Signature: t=<unix>,v1=hex(HMAC_SHA256(secret, "<t>.<raw body>")). openapi.json

OpenAPI

{
  "openapi": "3.0.3",
  "info": {
    "title": "DeliverPoint Company API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://app.deliverpoint.app/account/api/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "key": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "JobInput": {
        "type": "object",
        "required": [
          "date",
          "address"
        ],
        "properties": {
          "external_id": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "address": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "province": {
            "type": "string",
            "example": "ON"
          },
          "postal": {
            "type": "string",
            "example": "M5V 2T6"
          },
          "recipient": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "packages": {
            "type": "integer"
          },
          "window_start": {
            "type": "string",
            "pattern": "^(([01]?[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?|24:00(:00)?)$",
            "example": "09:00"
          },
          "window_end": {
            "type": "string",
            "pattern": "^(([01]?[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?|24:00(:00)?)$",
            "example": "12:00",
            "description": "Local 24 h time, after window_start"
          },
          "notes": {
            "type": "string"
          }
        }
      },
      "RouteInput": {
        "type": "object",
        "required": [
          "date"
        ],
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "name": {
            "type": "string"
          },
          "driver_id": {
            "type": "integer"
          },
          "vehicle_id": {
            "type": "integer"
          },
          "dispatch": {
            "type": "boolean",
            "description": "Send the route to the driver app now"
          },
          "stops": {
            "type": "array",
            "maxItems": 2000,
            "items": {
              "type": "object",
              "required": [
                "address"
              ],
              "properties": {
                "address": {
                  "type": "string"
                },
                "unit": {
                  "type": "string"
                },
                "city": {
                  "type": "string"
                },
                "province": {
                  "type": "string",
                  "enum": [
                    "AB",
                    "BC",
                    "MB",
                    "NB",
                    "NL",
                    "NS",
                    "NT",
                    "NU",
                    "ON",
                    "PE",
                    "QC",
                    "SK",
                    "YT"
                  ]
                },
                "postal": {
                  "type": "string"
                },
                "recipient": {
                  "type": "string"
                },
                "phone": {
                  "type": "string"
                },
                "notes": {
                  "type": "string"
                },
                "customer": {
                  "type": "string"
                },
                "shipper_email": {
                  "type": "string"
                },
                "external_id": {
                  "type": "string"
                },
                "window_start": {
                  "type": "string",
                  "pattern": "^(([01]?[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?|24:00(:00)?)$",
                  "example": "09:00"
                },
                "window_end": {
                  "type": "string",
                  "pattern": "^(([01]?[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?|24:00(:00)?)$",
                  "example": "12:00",
                  "description": "Local 24 h time, after window_start"
                },
                "lat": {
                  "type": "number"
                },
                "lon": {
                  "type": "number",
                  "description": "Send both or neither; without them our geocoder places the stop"
                },
                "cod_amount": {
                  "type": "number",
                  "description": "CAD to collect at the door"
                },
                "parcels": {
                  "type": "array",
                  "maxItems": 999,
                  "items": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "description": "Barcode / tracking number; empty = numbered label R<route>-S<stop>-<n>"
                          },
                          "description": {
                            "type": "string",
                            "maxLength": 80,
                            "description": "Item name shown to the driver, e.g. \"Queen bed - box 1/3\""
                          },
                          "size": {
                            "type": "string",
                            "maxLength": 30
                          },
                          "weight_kg": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 5000
                          },
                          "volume_m3": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 500
                          },
                          "flags": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "cod",
                                "cold",
                                "fragile",
                                "heavy"
                              ]
                            }
                          }
                        }
                      }
                    ]
                  },
                  "description": "No parcels = one numbered label"
                }
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "key": []
    }
  ],
  "paths": {
    "/jobs": {
      "get": {
        "summary": "List jobs, oldest first, in pages (follow next_after or the Link rel=\"next\" header)",
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "assigned",
                "delivered",
                "failed",
                "canceled"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 1000
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "next_after of the previous page",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ]
      },
      "post": {
        "summary": "Create a job (send Idempotency-Key to retry safely)",
        "description": "A retry with the same Idempotency-Key and the same body returns the first answer and creates nothing. Keys are scoped to the company and endpoint. The same key with a different body returns 422 idempotency_key_reused (use a new key for a new request).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JobInput"
              }
            }
          }
        }
      }
    },
    "/jobs/{id}": {
      "get": {
        "summary": "Get a job"
      },
      "patch": {
        "summary": "Update fields, assign (driver_id) or set status (delivered/failed/canceled + reason)",
        "description": "A delivered or canceled job is final: sending the same status again returns it unchanged (no new event); any other change returns 409 final_state."
      },
      "delete": {
        "summary": "Cancel a job (again on a canceled job: unchanged, no new event)"
      }
    },
    "/routes": {
      "get": {
        "summary": "List routes, oldest first, in pages (same limit/after/next_after/has_more as /jobs)",
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 500
            }
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ]
      },
      "post": {
        "summary": "Create a route with its stops and parcels in one call (send Idempotency-Key to retry safely)",
        "description": "All or nothing: any invalid field answers 422 {\"error\", \"field\"} and nothing is written. A retry with the same Idempotency-Key and the same body returns the first answer and creates nothing. Keys are scoped to the company and endpoint. The same key with a different body returns 422 idempotency_key_reused (use a new key for a new request).",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RouteInput"
              }
            }
          }
        }
      }
    },
    "/drivers": {
      "get": {
        "summary": "List drivers of the company"
      }
    },
    "/webhooks/test": {
      "post": {
        "summary": "Send a ping event to every endpoint"
      }
    },
    "/routes/{id}": {
      "get": {
        "summary": "Get a route with stops, parcels, POD and pin status"
      }
    },
    "/addresses": {
      "get": {
        "summary": "Address book: one row per building with visits / delivered / failed (q= search, problems=1), newest visit first, in pages (follow next_after or the Link rel=\"next\" header)",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "problems",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 200
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "next_after of the previous page (opaque string)",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/addresses/{id}": {
      "get": {
        "summary": "One building: notebook (notes, access codes) + every visit across days with POD details"
      }
    },
    "/pay/statement": {
      "get": {
        "summary": "Driver pay statement from your pay rules: per route-day, delivered stop, failed attempt and delivered parcel; nothing per km or per hour (from=, to= dates)"
      }
    },
    "/invoices": {
      "get": {
        "summary": "Client invoices issued in the cabinet (frozen lines, taxes, stop ids), newest first, in pages",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 500
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "next_after of the previous page",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ]
      }
    }
  },
  "x-webhooks": {
    "events": [
      "job.created",
      "job.assigned",
      "job.delivered",
      "job.failed",
      "job.canceled",
      "route.dispatched",
      "route.started",
      "route.finished",
      "parcel.exception",
      "pod.media",
      "driver.offline",
      "driver.back"
    ],
    "signature": "X-Tracker-Signature: t=<unix>,v1=hex(HMAC_SHA256(secret, \"<t>.<raw body>\"))",
    "retries": "up to 6 attempts: after 1, 5, 25, 125, 625 minutes"
  }
}