Skip to content
PEWES ENERGY

PEWES ENERGY for business

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

  1. 01Become a reseller by booking a call. Your level switches on when it ends.
  2. 02In your account, open Reseller, add a card on file and turn the API on.
  3. 03Copy the key. It is shown once, and you can create a new one at any time.
  4. 04Call the API from your shop, or install the WooCommerce plugin and paste the key.
Base URL
https://pewesenergy.com/api/reseller/v1

This 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.

Header
Authorization: Bearer pwsr_3f9c2d...

Endpoints

  • GET/meYour company, reseller level and the card orders are charged to.
  • GET/productsEvery can with its SKU, retail price, your price and stock.
  • POST/ordersCreate a dropship order. Charged to your card on file straight away.
  • GET/orders?reference=1234Find orders by your own reference. Also accepts limit, up to 100.
  • GET/orders/{id}One order with its status, totals and tracking once shipped.
GET /products
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.

Request
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."
  }'
Response
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
  }
}
Node.js
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

pending
Created, waiting for the charge to finish.
processing
Paid. We are packing it.
completed
Shipped to your customer.
failed
The charge failed. Retry with the same Idempotency-Key.
on-hold
Paused by our team, usually an address we need to confirm.
cancelled
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.

Body
{ "error": { "code": "unknown_sku", "message": "Unknown SKU PEWES-EXAMPLE." } }
StatusCodesMeaning
400invalid_json, missing_idempotency_keyThe request body or headers are malformed.
401unauthorizedThe key is missing, wrong, revoked, or the API is turned off.
402no_payment_method, payment_failedThere is no card on file, or the card was declined. The order stays failed and a retry with the same key charges it again.
403not_resellerThe account no longer has a reseller level.
404not_foundUnknown endpoint or an order that is not yours.
409out_of_stock, in_progressA can is out of stock, or the same Idempotency-Key is still being processed.
422unknown_sku, invalid_items, invalid_quantity, invalid_shippingThe 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. 1. Download the plugin and upload it in Plugins, Add New, Upload Plugin.
  2. 2. Open WooCommerce, PEWES Dropship, paste your key and test the connection.
  3. 3. Sync the catalogue, then import the cans as draft products or give your own products the PEWES SKUs.
  4. 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.