Reseller API.
Sell PEWES on your own site and let us do the shipping. Your shop sends the order, we charge your card on file at your reseller price, pack the parcel with no PEWES prices in the box and ship it to your customer. You invoice your customer, we invoice you.
Getting started
- Become a reseller by booking a call. Your level switches on when it ends.
- In your account, open Reseller, add a card on file and turn the API on.
- Copy the key. It is shown once, and you can create a new one at any time.
- Call the API from your shop, or install the WooCommerce plugin and paste the key.
https://pewesenergy.com/api/reseller/v1This storefront is a demonstration. Payments run in Stripe test mode and every response carries the header X-PEWES-Mode: test. Nothing is shipped.
Authentication
Send your key in the Authorization header on every request. Keys start with pwsr_. Keep them on your server, never in a browser, and create a new one from your account if a key leaks: the old one stops working at once.
Authorization: Bearer pwsr_3f9c2d...Endpoints
/meYour company, reseller level and the card orders are charged to./productsEvery can with its SKU, retail price, your price and stock./ordersCreate a dropship order. Charged to your card on file straight away./orders?reference=1234Find orders by your own reference. Also accepts limit, up to 100./orders/{id}One order with its status, totals and tracking once shipped.
curl https://pewesenergy.com/api/reseller/v1/products -H "Authorization: Bearer pwsr_your_key"
{
"products": [
{
"sku": "PEWES-GRAPE-MADNESS-STD",
"productId": 51,
"variationId": 88,
"name": "Grape Madness",
"option": "Standard",
"image": "https://pewesenergy.com/2026/09/grape-madness.webp",
"basePrice": 2.49,
"price": 1.67,
"currency": "EUR",
"inStock": true
}
]
}Creating orders
Items are matched by SKU and priced at your level. Delivery is calculated from the shipping country with the same rates as the store, free from 200 euro of goods. The order is charged to your card on file before the response returns.
curl -X POST https://pewesenergy.com/api/reseller/v1/orders \
-H "Authorization: Bearer pwsr_your_key" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: myshop.ro:1234" \
-d '{
"reference": "1234",
"items": [
{ "sku": "PEWES-GRAPE-MADNESS-STD", "quantity": 48 },
{ "sku": "PEWES-PEACHES-ZERO", "quantity": 24 }
],
"shipping": {
"first_name": "Ana",
"last_name": "Popescu",
"company": "",
"address_1": "Strada Lalelelor 12",
"address_2": "Ap. 4",
"city": "Cluj-Napoca",
"state": "CJ",
"postcode": "400000",
"country": "RO",
"phone": "+40712345678",
"email": "ana@example.com"
},
"note": "Leave with the reception if nobody answers."
}'HTTP/1.1 201 Created
{
"order": {
"id": 901,
"number": "901",
"reference": "1234",
"status": "processing",
"paid": true,
"currency": "EUR",
"goods": 120.13,
"shipping": 12,
"total": 132.13,
"createdAt": "2026-09-17T10:42:11+00:00",
"items": [
{ "sku": "PEWES-GRAPE-MADNESS-STD", "name": "Grape Madness", "quantity": 48, "unitPrice": 1.67, "total": 80.09 },
{ "sku": "PEWES-PEACHES-ZERO", "name": "Peaches", "quantity": 24, "unitPrice": 1.67, "total": 40.04 }
],
"tracking": null
}
}const response = await fetch('https://pewesenergy.com/api/reseller/v1/orders', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.PEWES_API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': `myshop.ro:${order.id}`,
},
body: JSON.stringify(payload),
});
if (response.status === 402) {
const { error } = await response.json();
notifyTeam(error.message);
}Retries
Every POST needs an Idempotency-Key header, one per order in your shop, for example your domain and order number. Sending the same key again never creates a second order: you get the original back with status 200. If the card was declined, fix the card and retry with the same key to charge the same order again.
Statuses
- Created, waiting for the charge to finish.
- Paid. We are packing it.
- Shipped to your customer.
- The charge failed. Retry with the same Idempotency-Key.
- Paused by our team, usually an address we need to confirm.
- Cancelled by our team. We contact you before we cancel a paid order.
Errors
Errors use the HTTP status and a JSON body with a stable code and a readable message.
{ "error": { "code": "unknown_sku", "message": "Unknown SKU PEWES-EXAMPLE." } }| Status | Codes | Meaning |
|---|---|---|
| 400 | invalid_json, missing_idempotency_key | The request body or headers are malformed. |
| 401 | unauthorized | The key is missing, wrong, revoked, or the API is turned off. |
| 402 | no_payment_method, payment_failed | There is no card on file, or the card was declined. The order stays failed and a retry with the same key charges it again. |
| 403 | not_reseller | The account no longer has a reseller level. |
| 404 | not_found | Unknown endpoint or an order that is not yours. |
| 409 | out_of_stock, in_progress | A can is out of stock, or the same Idempotency-Key is still being processed. |
| 422 | unknown_sku, invalid_items, invalid_quantity, invalid_shipping | The order content does not validate. The message names the field. |
WooCommerce plugin
Running WordPress? The PEWES Dropship plugin does all of the above for you. Orders that contain PEWES SKUs are sent as soon as they reach Processing, failed sends retry on their own, and the order screen shows the PEWES status and cost.
- 1. Download the plugin and upload it in Plugins, Add New, Upload Plugin.
- 2. Open WooCommerce, PEWES Dropship, paste your key and test the connection.
- 3. Sync the catalogue, then import the cans as draft products or give your own products the PEWES SKUs.
- 4. Publish, set your retail prices, and sell.
Requires WordPress 6.0, WooCommerce 7.0 and PHP 7.4 or newer. Version 1.0.0.