Drop Docs

Create order

Use one unified Orders API regardless of where the customer placed the order. Attach channel and source fields for attribution instead of switching endpoints.

Endpoint

POST /v1/orders

All channels use the same endpoint. Website, app, POS, and marketplace traffic are represented by metadata fields on the order body.

Request body

json
{
  "reference": "ORD-100245",
  "channel": "web",
  "sellerType": "merchant",
  "fulfilmentType": "on_demand",
  "originSystem": "shopify-storefront",
  "serviceType": "EXPRESS",
  "pickup": {
    "storeId": "store_jhb_001"
  },
  "dropoff": {
    "name": "Jane Doe",
    "phone": "+27821234567",
    "addressLine1": "45 Oxford Road",
    "city": "Johannesburg",
    "country": "ZA",
    "latitude": -26.1367,
    "longitude": 28.0416,
    "email": "jane@example.com"
  },
  "package": {
    "size": "SMALL",
    "weightKg": 1.2,
    "category": "food"
  },
  "amount": 99.99,
  "currency": "ZAR",
  "notes": "Leave at reception",
  "metadata": {
    "cart_id": "cart_123",
    "customer_id": "cust_456"
  }
}

cURL example

bash
curl -X POST https://api.dropsa.co.za/v1/orders \
  -H "Authorization: Bearer <access_token>" \
  -H "Idempotency-Key: 3af4c2b7-website-checkout-100245" \
  -H "Content-Type: application/json" \
  -d '{
  "reference": "ORD-100245",
  "channel": "web",
  "sellerType": "merchant",
  "fulfilmentType": "on_demand",
  "originSystem": "shopify-storefront",
  "serviceType": "EXPRESS",
  "pickup": {
    "storeId": "store_jhb_001"
  },
  "dropoff": {
    "name": "Jane Doe",
    "phone": "+27821234567",
    "addressLine1": "45 Oxford Road",
    "city": "Johannesburg",
    "country": "ZA",
    "latitude": -26.1367,
    "longitude": 28.0416,
    "email": "jane@example.com"
  },
  "package": {
    "size": "SMALL",
    "weightKg": 1.2,
    "category": "food"
  },
  "amount": 99.99,
  "currency": "ZAR",
  "notes": "Leave at reception",
  "metadata": {
    "cart_id": "cart_123",
    "customer_id": "cust_456"
  }
}'

Node.js example

js
const response = await fetch("https://api.dropsa.co.za/v1/orders", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <access_token>",
    "Idempotency-Key": "3af4c2b7-website-checkout-100245",
    "Content-Type": "application/json"
  },
  body: JSON.stringify(orderPayload)
});

PHP example

php
$payload = json_encode($orderPayload);

$ch = curl_init("https://api.dropsa.co.za/v1/orders");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer <access_token>",
  "Idempotency-Key: 3af4c2b7-website-checkout-100245",
  "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

Python example

python
import requests

response = requests.post(
    "https://api.dropsa.co.za/v1/orders",
    headers={
        "Authorization": "Bearer <access_token>",
        "Idempotency-Key": "3af4c2b7-website-checkout-100245",
        "Content-Type": "application/json",
    },
    json=order_payload,
)