Maxmove LogoDocs

Proof of delivery

Get signatures, photos, and signed delivery notes for pickup and dropoff, and store them in your own system.

View as Markdown

When the courier hands over the goods, they collect proof in the Maxmove driver app: a signature, photos, a signed delivery note, or documents, depending on your settings. You get it through one event and one endpoint.

Code examples use BASE_URL and headers from the Quickstart.

  1. Wait for the event

    Maxmove sends delivery.pod_submitted each time the courier submits proof, at pickup and at dropoff, so up to twice per delivery. Polling is not needed.

  2. Fetch the proof

    Call GET /v1/deliveries/{deliveryId}/proof-of-delivery. The response has one checkpoint per handover:

    FieldMeaning
    kindpickup or dropoff.
    recipient_nameWho signed or received the goods, as entered by the courier.
    submitted_atWhen the courier submitted the proof.
    artifacts[]Files with kind (photo, signature, signed_delivery_note, document), file_name, content_type, and download_url.
  3. Download the files right away

    download_url links are short-lived. Download the files when you receive the event and store them yourself. If a link has expired, call the endpoint again for fresh ones.

import { writeFile } from 'node:fs/promises';
 
async function storeProof(deliveryId: string) {
  const res = await fetch(`${BASE_URL}/deliveries/${deliveryId}/proof-of-delivery`, { headers });
  if (res.status === 404) return; // no proof submitted yet
  const proof = await res.json();
 
  for (const checkpoint of proof.checkpoints) {
    for (const artifact of checkpoint.artifacts) {
      if (!artifact.download_url) continue;
      const file = await fetch(artifact.download_url);
      await writeFile(
        `${deliveryId}-${checkpoint.kind}-${artifact.file_name ?? artifact.kind}`,
        Buffer.from(await file.arrayBuffer()),
      );
    }
  }
}

Errors#

StatusCodeMeaning
404no_proof_of_deliveryThe courier has not submitted proof yet.
403pod_not_availableYour plan does not include proof of delivery.
404not_foundNo delivery with this id for your key and mode.

Did this answer your question?