Skip to content

Instantly share code, notes, and snippets.

@moba
Last active December 9, 2016 18:02
Show Gist options
  • Save moba/49ede85dfb1400e489ff9b206dda728c to your computer and use it in GitHub Desktop.
Save moba/49ede85dfb1400e489ff9b206dda728c to your computer and use it in GitHub Desktop.

I used the Web Developer plugin and https://github.com/JElchison/curl-auth-csrf to investigate the dropscan.de REST API a little:

curl-auth-csrf.py -i https://secure.dropscan.de/login -f form-login -d "user[email]=$EMAIL" -p "user[password]" $URL

URL=https://secure.dropscan.de/scanboxes/[ID?]/mailings.json?filter=received&sort=created_at

[      
  {         
    "barcode": "C00123456",         
    "slug": "[slugID]",         
    "scanbox_id": 3350,         
    "status": "received",         
    "container_mailings_count": null,         
    "created_at": "09.12.2016",         
    "updated_at": "09.12.2016",         
    "envelope_thumbnail_url": "https://thumbnails.dropscan.de/..../C00194321.small.jpg",
    "forwarding_batch_id": null,
    "downloaded_at": null     
  }  
]

URL=https://secure.dropscan.de/scanboxes/[scanboxID]/mailings/[slugID].json

{
  "barcode": "C00123456",
  "slug": "[slugID]",
  "scanbox_id": 3350,
  "status": "received",
  "recipient": {
    "id": 4570,         
    "name": "Receipt Name",
    "scanbox_id": 3350,
    "email": null,
    "removed_at": null,
    "created_at": "2016-07-19T11:46:04.907+02:00",
    "updated_at": "2016-07-19T11:46:04.907+02:00",
    "batch_assignment_enabled": false,
    "alternative_names": null     
  },
  "created_at": "09.12.2016",
  "updated_at": "09.12.2016",
  "envelope_thumbnail_url": "https://thumbnails.dropscan.de/..../C00123456.small.jpg",
  "envelope_url": "https://thumbnails.dropscan.de/..../C00123456.jpg",
  "cover_url": "https://production-mailings.s3.eu-central-1.amazonaws.com/.../C00123456.cover.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA....%2Feu-Token=....&X-Amz- SignedHeaders=host&X-Amz-Signature=...",
  "container_mailings_count": null,
  "forwarding_batch_id": null  
}

URL=https://secure.dropscan.de/scanboxes/[scanboxID]/mailings/[slugID]/scan?src=detail

triggers scan? 

URL=https://secure.dropscan.de/scanboxes/[scanboxID]/mailings.json?filter=scanned&sort=scanned_at

[
  {
    "barcode": "C00123456",
    "slug": "[slugID]",
    "scanbox_id": 3350,
    "status": "scan_requested",
    "container_mailings_count": null,
    "created_at": "09.12.2016",
    "updated_at": "09.12.2016",
    "scan_requested_at": "09.12.2016",
    "envelope_thumbnail_url": "https://thumbnails.dropscan.de/.../C00123456.small.jpg",
    "forwarding_batch_id": null,
    "downloaded_at": null     
  }  
]

URL=https://secure.dropscan.de/scanboxes/[scanboxID]/mailings.json?filter=forwarded&sort=forwarded_at URL=https://secure.dropscan.de/scanboxes/[scanboxID]/mailings.json?filter=destroyed&sort=destroyed_at

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment