Documentation

Overview

The API allows you connect any application with CarrierWave

Getting Started

Download API definitions for Insomnia

Shipments & Tracking

Creating a shipment

curl -X POST https://getcarrierwave.com/api/shipments \
  -H "Authorization: <your-api-key>" \
  -H "Version: 2020-09" \
  -H "Content-Type: application/json" \
  -d '{"tracking": "1Z1234", "reference": "<my-order-id>", "admin_url": "<admin-order-url>", "source": "<name-of-channel>"}'

Creating a batch of shipments

curl -X POST https://getcarrierwave.com/api/shipments \
  -H "Authorization: <your-api-key>" \
  -H "Version: 2020-09" \
  -H "Content-Type: application/json" \
  -d '[{"tracking": "1Z1234"}, {"tracking": "1Z1235"}, {"tracking": "1Z1236"}]'

Listing multiple shipments

curl "https://getcarrierwave.com/api/shipments?carrier=fedex&status=delivered&page=1" \
  -H "Authorization: <your-api-key>" \
  -H "Version: 2020-09" \
  -H "Content-Type: application/json"

Getting a single shipment

curl https://getcarrierwave.com/api/shipments/1Z1234
  -H "Authorization: <your-api-key>" \
  -H "Version: 2020-09" \
  -H "Content-Type: application/json"

Deleting a single shipment

curl -X DELETE https://getcarrierwave.com/api/shipments/1Z1234 \
  -H "Authorization: <your-api-key>" \
  -H "Version: 2020-09" \
  -H "Content-Type: application/json"

Webhooks

Creating a webhook

curl -X POST https://getcarrierwave.com/api/webhooks \
  -H "Authorization: <your-api-key>" \
  -H "Version: 2020-09" \
  -H "Content-Type: application/json" \
  -d '{"topic": "shipment/created", "url": "https://mysite.com/callback"}'

Listing webhooks

curl https://getcarrierwave.com/api/webhooks \
  -H "Authorization: <your-api-key>" \
  -H "Version: 2020-09" \
  -H "Content-Type: application/json"

Deleting a webhook

curl -X DELETE https://getcarrierwave.com/api/webhooks/6ab7ee2e-ece7-11ea-9f04-9cb6d021651f \
  -H "Authorization: <your-api-key>" \
  -H "Version: 2020-09" \
  -H "Content-Type: application/json"