W Wepaak API v1.3.0
OpenAPI document

Wepaak API

Ship in Mexico from your own system: price a shipment, send us an order, buy a label, and follow it to the door.

Authenticating

Send your key as a bearer token:

Authorization: Bearer wpk_live_…

Keys are created in Wepaak under Connections → API, and shown once. Each key carries a set of scopes; a call outside them answers 403 insufficient_scope.

Test and live

A key is either wpk_test_ or wpk_live_, and the mode comes from the key alone — never from anything you send.

Test keys create real orders you can read back, but no carrier is called, no label is bought, nothing is charged and nobody is emailed. The two worlds do not mix: a test key cannot read, ship or track a live order, and a live key cannot touch a test one. Both answer 404 rather than 403, because telling you something exists but is not yours is itself a leak.

Every rule still runs in test mode — address validation, stock, coverage, tariff limits, your automation rules — so "it worked in test" means something. A test shipment comes back with a TEST… tracking number, and both GET /shipments/{id} and GET /tracking/{tracking_number} resolve it, so you can exercise the whole flow before switching keys. Quotes are the one thing that is NOT simulated: those are real carrier prices, because a sandbox that invented them would be useless for testing what you charge.

Retrying safely

Every write is idempotent on something you already know, so a retry after a timeout is always safe:

CallRepeating it
POST /ordersSame external_id returns the same order
POST /shipmentsSame order_id returns the same shipment — never a second label
POST /webhooksSame URL returns the existing endpoint

The one exception is called out in its own error message: if a label was created but recording it failed, do not retry — contact support with the order id, because retrying would buy a second label.

Rate limits

120 requests per minute per key, and 600 per minute from any one IP address across all keys. Every metered response carries RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset so you can pace yourself rather than discover the limit by being refused. Over it, 429 with Retry-After. /v1/ping, /v1/openapi.json and /v1/docs are not metered, so they carry no RateLimit headers.

Verifying webhooks

Every delivery carries Wepaak-Signature: t=<unix seconds>,v1=<hex>. The hex is the HMAC-SHA256 of the timestamp, a dot and the RAW request body, keyed with the endpoint's secret. Check it before trusting the body, compare in constant time, and refuse a timestamp more than five minutes away. Node:

const crypto = require('crypto');
function verifyWepaak(rawBody, header, secret) {
  const p = Object.fromEntries(String(header).split(',').map((kv) => kv.split('=')));
  if (!p.t || !p.v1 || Math.abs(Date.now() / 1000 - Number(p.t)) > 300) return false;
  const expected = crypto.createHmac('sha256', secret).update(p.t + '.' + rawBody).digest('hex');
  return expected.length === p.v1.length
    && crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(p.v1));
}

PHP:

function wepaak_verify($raw_body, $header, $secret) {
  parse_str(str_replace(',', '&', $header), $p);
  if (empty($p['t']) || empty($p['v1']) || abs(time() - (int) $p['t']) > 300) return false;
  return hash_equals(hash_hmac('sha256', $p['t'] . '.' . $raw_body, $secret), $p['v1']);
}

Use the body exactly as received: parse it as JSON only after the check, because re-serialising changes the bytes and the signature with them.

Webhook deliveries

Each delivery is a POST with a JSON body:

{ "event": "shipment.delivered", "mode": "live",
  "created_at": "2026-11-03T18:20:00.000Z", "data": { … } }

data is per event (see Webhook events). The headers:

HeaderWhat
Wepaak-EventThe event, as in the body
Wepaak-DeliveryThis delivery's id. A retry of the same delivery has the same id
Wepaak-Signaturet=<unix seconds>,v1=<hex>, see above

Answer with any 2xx within 10 seconds to mark it delivered. Anything else, or no answer, is retried 5 minutes, 30 minutes, 2 hours and 6 hours later, then given up; GET /v1/webhooks/{id}/deliveries shows every attempt.

Deduplicate on Wepaak-Delivery. A delivery is sent once when you answer 2xx, but a retry after a timeout on your side reaches you again with the same id. Treat a repeated id as already done.

Requests

Send bodies as JSON with Content-Type: application/json; anything else is refused with 415. Fields we do not know are ignored, not rejected — except on products, inbounds, transfers and returns, which refuse an unknown field with 422 invalid_request naming it, so a change you meant to make is never dropped silently (items on PATCH /v1/transfers/{id}, for example: a transfer's lines cannot change once it exists). Numbers may be sent as numbers or as numeric strings ("15"); both are read the same. The schemas show the number form.

Money

Prices are yours — what you are quoted is what you pay. What we pay a carrier, and which carrier network a rate came through, are not part of this API.

Base URL https://api.wepaak.com
Auth Authorization: Bearer wpk_test_…
Rate limit 120 requests / minute / key
Modes wpk_test_ and wpk_live_
Your first call
curl "https://api.wepaak.com/v1/me" \
  -H "Authorization: Bearer wpk_test_your_key_here"
Response 200
{
  "mode": "test",
  "account_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "scopes": [
    "orders.read",
    "orders.write",
    "shipments.write"
  ]
}

Quickstart

Four calls take you from an empty project to a parcel on its way. Use a test key throughout: test keys create real orders you can read back, but no carrier is called, no label is bought and nothing is charged.

1. Check your key

GET /v1/me

Returns the mode you are in and the scopes you hold. If this fails, nothing below will work — and the reason is here, rather than buried in a later call.

2. Price the shipment

POST /v1/quotes

Send an origin, a destination and the parcel. You get every rate available to your account and a quote_id you can spend for the next 30 minutes. An empty rates list is a real answer: nothing available can carry that parcel there.

3. Send us the order

POST /v1/orders

Your customer, their address, what they bought. Idempotent on external_id, so sending the same order twice returns the first one instead of duplicating it.

4. Buy the label

POST /v1/shipments

Pass the order_id, plus the quote_id and rate_id of the option you showed your customer. Idempotent on order_id: a retry after a timeout returns the shipment you already have and never buys a second label.

The tracking number comes back in the response, and again by webhook as the parcel moves — register an endpoint once and you never have to poll.

The whole flow
# 1. who am I?
curl "https://api.wepaak.com/v1/me" -H "Authorization: Bearer wpk_test_..."

# 2. what does it cost?
curl -X POST "https://api.wepaak.com/v1/quotes" \
  -H "Authorization: Bearer wpk_test_..." \
  -H "Content-Type: application/json" \
  -d '{"address_from":{"postal_code":"44100"},
       "address_to":{"postal_code":"06700"},
       "parcel":{"length_cm":20,"width_cm":15,"height_cm":10,"weight_kg":1.5}}'

# 3. send the order
curl -X POST "https://api.wepaak.com/v1/orders" \
  -H "Authorization: Bearer wpk_test_..." \
  -H "Content-Type: application/json" \
  -d '{"external_id":"1042","customer":{...},"shipping_address":{...}}'

# 4. buy the label
curl -X POST "https://api.wepaak.com/v1/shipments" \
  -H "Authorization: Bearer wpk_test_..." \
  -H "Content-Type: application/json" \
  -d '{"order_id":"...","quote_id":"...","rate_id":"..."}'

Orders

Send us what your customer bought.

GET /v1/orders#

List orders

Scope: orders.read

Newest first. Only orders from this key's mode are listed.

Parameters

FieldType
status string · query
cod_pending ready address_issue stock_issue requires_mapping dispatched cancelled
limit integer · query
offset integer · query

Errors

Status
400

A filter was not understood. A limit above 100 is refused rather than quietly reduced, so you never page past orders without noticing.

401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

curl -X GET "https://api.wepaak.com/v1/orders" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/orders", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/orders");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/orders",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/orders")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "data": [
    {
      "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "mode": "test",
      "source": "woocommerce",
      "external_id": "string",
      "external_number": "string",
      "status": "cod_pending",
      "issues": [
        "string"
      ],
      "payment_type": "prepaid",
      "cod_amount": 1,
      "currency": "MXN",
      "customer": {
        "name": "string",
        "phone": "string",
        "email": "string"
      },
      "shipping_address": {
        "street1": "Av. Vallarta 1234",
        "interior": "Depto 5B",
        "colonia": "Americana",
        "city": "Guadalajara",
        "state": "Jalisco",
        "postal_code": "44160",
        "country_code": "MX",
        "reference": "Portón negro, entre Chapultepec y Colonias"
      },
      "items": [
        {
          "sku": "string",
          "name": "string",
          "quantity": 1,
          "unit_price": 1
        }
      ],
      "assigned_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "carrier": "string",
      "carrier_service": "string",
      "notes": "Imported via API (woocommerce) · State \"Narnia\" not recognised; set to Jalisco from postal code 44160.",
      "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "tracking_number": "string",
      "created_at": "2026-09-08T12:00:00.000Z"
    }
  ],
  "has_more": false,
  "total": 1,
  "limit": 1,
  "offset": 1
}

POST /v1/orders#

Create an order

Scope: orders.write

Idempotent on external_id: sending the same one again returns the order you already created, with 200 instead of 201. No label is bought here and nothing is charged.

Body

FieldType
external_id stringrequired
external_number string
source string

Where this order came from: lowercase letters, digits and underscores, starting with a letter (qa_agent, not qa-agent).

payment_type string
prepaid cod
cod_amount number

Required for a COD order. A COD shipment with no amount is one nobody can settle.

currency string
customer objectrequired
customer.name stringrequired
customer.phone string

The phone of the person receiving the parcel; carriers need it. Without it the order is still created, held as address_issue with address_incomplete:customer_phone in issues, until it is added in Wepaak.

customer.email string
shipping_address objectrequired
shipping_address.street1 stringrequired
shipping_address.interior string
shipping_address.colonia string

Optional, free text: never refused. Filled from the postal code when omitted — most channels have no such field. When the text is clearly one of the colonias of the postal code (e.g. "CD GRANJA"), the label carries its official name ("Ciudad Granja").

shipping_address.city stringrequired
shipping_address.state stringrequired

The state. Its full name is stored, because carriers expect it; a code or common short form (JAL, CDMX, NL, EDOMEX…) is accepted and translated.

Anything else: on a quote it is refused with 422 naming the field. On an order it is not, so a store's order is never lost over a typo: the state is set from the postal code, and the order's notes say what was changed. When the postal code cannot say either, the state is kept as sent and noted, to correct in Wepaak.

shipping_address.postal_code stringrequired
shipping_address.country_code string
shipping_address.reference string
items object[]required

At least one line. Each needs a sku or a name. To ship from a Wepaak warehouse, every line must be the sku of a product in your Wepaak inventory — otherwise the order is held as requires_mapping (see issues on the Order).

If you pack your own orders (your account has no Wepaak warehouse) and none of the lines are products in your Wepaak inventory, the order ships from your own default address, and needs package with all four measurements. Send warehouse_id to choose a different origin.

package object

All four measurements or none. Required later if you pack and ship yourself, since nothing else measures the box. A box over 300 cm a side or 1000 kg is not a parcel: the order is still created, without that box, and is held with the issue package_required until it has a real one.

package.length_cm number
package.width_cm number
package.height_cm number
package.weight_kg number
placed_at string (date-time)
warehouse_id string (uuid)

Which of your warehouses this ships FROM: an id from GET /v1/warehouses. Leave it out and we route the order automatically, closest warehouse with stock first. An order with any item that is not one of your products ships from one of your own warehouses, never a Wepaak one (Wepaak picks by SKU). Send it when you want to choose, and for COD orders, which are not auto-routed. Not together with address_from.

address_from object

Where the parcel is picked up, as an address, instead of warehouse_id. For platforms whose users each ship from their own place. The address is saved as one of your pickup addresses (it appears in GET /v1/warehouses) and reused when the same street, interior and postal code come again, so sending it on every order is fine. The order then ships from it like any order from your own warehouse: send package with all four measurements. Not together with warehouse_id.

address_from.name stringrequired

Contact at the pickup address.

address_from.company string
address_from.phone stringrequired
address_from.email string
address_from.street1 stringrequired

Street and number.

address_from.interior string
address_from.colonia string

Free text, never refused; filled from the postal code when left out.

address_from.city stringrequired
address_from.state stringrequired

Name or abbreviation; stored as the full state name.

address_from.postal_code stringrequired
address_from.country_code string
MX
address_from.reference string

Errors

Status
400

invalid_request: the body is not valid JSON.

401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

415

invalid_request: the body was sent without Content-Type: application/json.

422

Something in the order could not be accepted. field names it.

curl -X POST "https://api.wepaak.com/v1/orders" \
  -H "Authorization: Bearer wpk_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "external_id": "1042",
    "external_number": "#1042",
    "source": "woocommerce",
    "customer": {
      "name": "string"
    },
    "shipping_address": {
      "street1": "Av. Vallarta 1234",
      "interior": "Depto 5B",
      "colonia": "Americana",
      "city": "Guadalajara",
      "state": "Jalisco",
      "postal_code": "44160",
      "country_code": "MX",
      "reference": "Portón negro, entre Chapultepec y Colonias"
    },
    "items": [
      {
        "sku": "string",
        "name": "string",
        "quantity": 1,
        "unit_price": 1
      }
    ],
    "package": {
      "length_cm": 1,
      "width_cm": 1,
      "height_cm": 1,
      "weight_kg": 1
    },
    "address_from": {
      "name": "string",
      "phone": "string",
      "street1": "string",
      "city": "string",
      "state": "string",
      "postal_code": "string"
    }
  }'
const res = await fetch("https://api.wepaak.com/v1/orders", {
  method: "POST",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "external_id": "1042",
    "external_number": "#1042",
    "source": "woocommerce",
    "customer": {
      "name": "string"
    },
    "shipping_address": {
      "street1": "Av. Vallarta 1234",
      "interior": "Depto 5B",
      "colonia": "Americana",
      "city": "Guadalajara",
      "state": "Jalisco",
      "postal_code": "44160",
      "country_code": "MX",
      "reference": "Portón negro, entre Chapultepec y Colonias"
    },
    "items": [
      {
        "sku": "string",
        "name": "string",
        "quantity": 1,
        "unit_price": 1
      }
    ],
    "package": {
      "length_cm": 1,
      "width_cm": 1,
      "height_cm": 1,
      "weight_kg": 1
    },
    "address_from": {
      "name": "string",
      "phone": "string",
      "street1": "string",
      "city": "string",
      "state": "string",
      "postal_code": "string"
    }
  }),
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/orders");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "external_id" => "1042",
    "external_number" => "#1042",
    "source" => "woocommerce",
    "customer" => [
        "name" => "string"
    ],
    "shipping_address" => [
        "street1" => "Av. Vallarta 1234",
        "interior" => "Depto 5B",
        "colonia" => "Americana",
        "city" => "Guadalajara",
        "state" => "Jalisco",
        "postal_code" => "44160",
        "country_code" => "MX",
        "reference" => "Portón negro, entre Chapultepec y Colonias"
    ],
    "items" => [
        [
            "sku" => "string",
            "name" => "string",
            "quantity" => 1,
            "unit_price" => 1
        ]
    ],
    "package" => [
        "length_cm" => 1,
        "width_cm" => 1,
        "height_cm" => 1,
        "weight_kg" => 1
    ],
    "address_from" => [
        "name" => "string",
        "phone" => "string",
        "street1" => "string",
        "city" => "string",
        "state" => "string",
        "postal_code" => "string"
    ]
]));
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
    "https://api.wepaak.com/v1/orders",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
    json={
        "external_id": "1042",
        "external_number": "#1042",
        "source": "woocommerce",
        "customer": {
            "name": "string"
        },
        "shipping_address": {
            "street1": "Av. Vallarta 1234",
            "interior": "Depto 5B",
            "colonia": "Americana",
            "city": "Guadalajara",
            "state": "Jalisco",
            "postal_code": "44160",
            "country_code": "MX",
            "reference": "Portón negro, entre Chapultepec y Colonias"
        },
        "items": [
            {
                "sku": "string",
                "name": "string",
                "quantity": 1,
                "unit_price": 1
            }
        ],
        "package": {
            "length_cm": 1,
            "width_cm": 1,
            "height_cm": 1,
            "weight_kg": 1
        },
        "address_from": {
            "name": "string",
            "phone": "string",
            "street1": "string",
            "city": "string",
            "state": "string",
            "postal_code": "string"
        }
    },
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/orders")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
req["Content-Type"] = "application/json"
req.body = "{\n  \"external_id\": \"1042\",\n  \"external_number\": \"#1042\",\n  \"source\": \"woocommerce\",\n  \"customer\": {\n    \"name\": \"string\"\n  },\n  \"shipping_address\": {\n    \"street1\": \"Av. Vallarta 1234\",\n    \"interior\": \"Depto 5B\",\n    \"colonia\": \"Americana\",\n    \"city\": \"Guadalajara\",\n    \"state\": \"Jalisco\",\n    \"postal_code\": \"44160\",\n    \"country_code\": \"MX\",\n    \"reference\": \"Portón negro, entre Chapultepec y Colonias\"\n  },\n  \"items\": [\n    {\n      \"sku\": \"string\",\n      \"name\": \"string\",\n      \"quantity\": 1,\n      \"unit_price\": 1\n    }\n  ],\n  \"package\": {\n    \"length_cm\": 1,\n    \"width_cm\": 1,\n    \"height_cm\": 1,\n    \"weight_kg\": 1\n  },\n  \"address_from\": {\n    \"name\": \"string\",\n    \"phone\": \"string\",\n    \"street1\": \"string\",\n    \"city\": \"string\",\n    \"state\": \"string\",\n    \"postal_code\": \"string\"\n  }\n}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "mode": "test",
  "source": "woocommerce",
  "external_id": "string",
  "external_number": "string",
  "status": "cod_pending",
  "issues": [
    "string"
  ],
  "payment_type": "prepaid",
  "cod_amount": 1,
  "currency": "MXN",
  "customer": {
    "name": "string",
    "phone": "string",
    "email": "string"
  },
  "shipping_address": {
    "street1": "Av. Vallarta 1234",
    "interior": "Depto 5B",
    "colonia": "Americana",
    "city": "Guadalajara",
    "state": "Jalisco",
    "postal_code": "44160",
    "country_code": "MX",
    "reference": "Portón negro, entre Chapultepec y Colonias"
  },
  "items": [
    {
      "sku": "string",
      "name": "string",
      "quantity": 1,
      "unit_price": 1
    }
  ],
  "assigned_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "carrier": "string",
  "carrier_service": "string",
  "notes": "Imported via API (woocommerce) · State \"Narnia\" not recognised; set to Jalisco from postal code 44160.",
  "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "tracking_number": "string",
  "created_at": "2026-09-08T12:00:00.000Z"
}

GET /v1/orders/{id}#

Fetch one order

Scope: orders.read

Parameters

FieldType
id string · pathrequired

Errors

Status
401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

curl -X GET "https://api.wepaak.com/v1/orders/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/orders/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/orders/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/orders/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/orders/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "mode": "test",
  "source": "woocommerce",
  "external_id": "string",
  "external_number": "string",
  "status": "cod_pending",
  "issues": [
    "string"
  ],
  "payment_type": "prepaid",
  "cod_amount": 1,
  "currency": "MXN",
  "customer": {
    "name": "string",
    "phone": "string",
    "email": "string"
  },
  "shipping_address": {
    "street1": "Av. Vallarta 1234",
    "interior": "Depto 5B",
    "colonia": "Americana",
    "city": "Guadalajara",
    "state": "Jalisco",
    "postal_code": "44160",
    "country_code": "MX",
    "reference": "Portón negro, entre Chapultepec y Colonias"
  },
  "items": [
    {
      "sku": "string",
      "name": "string",
      "quantity": 1,
      "unit_price": 1
    }
  ],
  "assigned_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "carrier": "string",
  "carrier_service": "string",
  "notes": "Imported via API (woocommerce) · State \"Narnia\" not recognised; set to Jalisco from postal code 44160.",
  "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "tracking_number": "string",
  "created_at": "2026-09-08T12:00:00.000Z"
}

POST /v1/orders/{id}/cancel#

Cancel an order that has not shipped

Scope: orders.write

The same cancellation as in Wepaak: the order is cancelled and the stock it was holding is released. An order that has already shipped answers 409 order_already_dispatched — cancel its shipment instead.

Idempotent. Cancelling an order that is already cancelled returns it again with 200.

Parameters

FieldType
id string · pathrequired

Body

FieldType
reason string

Errors

Status
400

invalid_request: the body is not valid JSON.

401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

409

order_already_dispatched: it has shipped. order_in_warehouse: the warehouse is picking or packing it. label_in_progress: its label is being created right now; try again in a few seconds.

415

invalid_request: the body was sent without Content-Type: application/json.

422

invalid_request: reason is longer than 255 characters.

curl -X POST "https://api.wepaak.com/v1/orders/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel" \
  -H "Authorization: Bearer wpk_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "string"
  }'
const res = await fetch("https://api.wepaak.com/v1/orders/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel", {
  method: "POST",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "reason": "string"
  }),
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/orders/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "reason" => "string"
]));
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
    "https://api.wepaak.com/v1/orders/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
    json={
        "reason": "string"
    },
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/orders/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
req["Content-Type"] = "application/json"
req.body = "{\n  \"reason\": \"string\"\n}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "mode": "test",
  "source": "woocommerce",
  "external_id": "string",
  "external_number": "string",
  "status": "cod_pending",
  "issues": [
    "string"
  ],
  "payment_type": "prepaid",
  "cod_amount": 1,
  "currency": "MXN",
  "customer": {
    "name": "string",
    "phone": "string",
    "email": "string"
  },
  "shipping_address": {
    "street1": "Av. Vallarta 1234",
    "interior": "Depto 5B",
    "colonia": "Americana",
    "city": "Guadalajara",
    "state": "Jalisco",
    "postal_code": "44160",
    "country_code": "MX",
    "reference": "Portón negro, entre Chapultepec y Colonias"
  },
  "items": [
    {
      "sku": "string",
      "name": "string",
      "quantity": 1,
      "unit_price": 1
    }
  ],
  "assigned_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "carrier": "string",
  "carrier_service": "string",
  "notes": "Imported via API (woocommerce) · State \"Narnia\" not recognised; set to Jalisco from postal code 44160.",
  "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "tracking_number": "string",
  "created_at": "2026-09-08T12:00:00.000Z"
}

Quotes

What a shipment will cost, before committing to one.

POST /v1/quotes#

Price a shipment

Scope: catalog.read

Returns every rate available to your account for this route and parcel, along with a quote_id.

Pass that quote_id and a rate_id to POST /v1/shipments to ship the option you showed your customer. Quotes expire after 30 minutes.

An empty rates list is a real answer, not an error: nothing available can carry that parcel to that address. Each service only prices parcels within its own weight and size limits — a parcel above all of them gets rates: [].

A carrier that does not answer in time is not a "no". complete: false says at least one carrier did not answer, so a minute later there may be more options. When that leaves no rates at all, the answer is 503 carrier_unavailable instead of an empty list: try again.

Refused with 422, naming the field: a postal code that does not exist (the same check as GET /v1/coverage), a state we do not recognise, and a parcel above 1,000 kg or 300 cm on any side, which no service carries.

Body

FieldType
address_from objectrequired

Only the postal code is required: a missing city, state or colonia is filled from it. A fuller address can still price better.

address_from.postal_code stringrequired
address_from.country_code string
address_from.street1 string
address_from.colonia string
address_from.city string
address_from.state string
address_to objectrequired

Only the postal code is required: a missing city, state or colonia is filled from it.

address_to.postal_code stringrequired
address_to.country_code string
address_to.street1 string
address_to.colonia string
address_to.city string
address_to.state string
parcel objectrequired
parcel.length_cm numberrequired
parcel.width_cm numberrequired
parcel.height_cm numberrequired
parcel.weight_kg numberrequired

Errors

Status
400

invalid_request: the body is not valid JSON.

401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

415

invalid_request: the body was sent without Content-Type: application/json.

422

The addresses or parcel cannot be priced — an unknown postal code, an unrecognised state, a parcel no service carries. field names the problem.

503

carrier_unavailable: no rates came back because a carrier could not be reached. Not a coverage answer; try again in a minute.

curl -X POST "https://api.wepaak.com/v1/quotes" \
  -H "Authorization: Bearer wpk_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "address_from": {
      "postal_code": "44100"
    },
    "address_to": {
      "postal_code": "45200"
    },
    "parcel": {
      "length_cm": 20,
      "width_cm": 15,
      "height_cm": 10,
      "weight_kg": 1.5
    }
  }'
const res = await fetch("https://api.wepaak.com/v1/quotes", {
  method: "POST",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "address_from": {
      "postal_code": "44100"
    },
    "address_to": {
      "postal_code": "45200"
    },
    "parcel": {
      "length_cm": 20,
      "width_cm": 15,
      "height_cm": 10,
      "weight_kg": 1.5
    }
  }),
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/quotes");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "address_from" => [
        "postal_code" => "44100"
    ],
    "address_to" => [
        "postal_code" => "45200"
    ],
    "parcel" => [
        "length_cm" => 20,
        "width_cm" => 15,
        "height_cm" => 10,
        "weight_kg" => 1.5
    ]
]));
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
    "https://api.wepaak.com/v1/quotes",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
    json={
        "address_from": {
            "postal_code": "44100"
        },
        "address_to": {
            "postal_code": "45200"
        },
        "parcel": {
            "length_cm": 20,
            "width_cm": 15,
            "height_cm": 10,
            "weight_kg": 1.5
        }
    },
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/quotes")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
req["Content-Type"] = "application/json"
req.body = "{\n  \"address_from\": {\n    \"postal_code\": \"44100\"\n  },\n  \"address_to\": {\n    \"postal_code\": \"45200\"\n  },\n  \"parcel\": {\n    \"length_cm\": 20,\n    \"width_cm\": 15,\n    \"height_cm\": 10,\n    \"weight_kg\": 1.5\n  }\n}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "quote_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "mode": "test",
  "expires_at": "2026-09-08T12:00:00.000Z",
  "complete": false,
  "rates": [
    {
      "rate_id": "rate_4e800a8fc898d6a8",
      "carrier": "fedex",
      "carrier_name": "FedEx",
      "service": "ground",
      "service_name": "Express",
      "total": 149,
      "currency": "MXN",
      "estimated_days": 2,
      "cod": false
    }
  ]
}

Shipments

Turn an order into a label.

GET /v1/shipments#

List shipments

Scope: shipments.read

Newest first. Only shipments from this key's mode. Filters are exact matches.

Parameters

FieldType
external_id string · query

Your own order number.

tracking_number string · query
created_from string · query

Inclusive: shipments created at or after this instant.

created_to string · query

Exclusive: shipments created before this instant, so consecutive windows never overlap.

limit integer · query
offset integer · query

Errors

Status
400

A bad filter or a limit above 100.

401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

curl -X GET "https://api.wepaak.com/v1/shipments" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/shipments", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/shipments");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/shipments",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/shipments")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "data": [
    {
      "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "order_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "external_id": "string",
      "mode": "test",
      "status": "created",
      "own_label": false,
      "carrier": "string",
      "service": "string",
      "tracking_number": "string",
      "issues": [
        "string"
      ],
      "created_at": "2026-09-08T12:00:00.000Z"
    }
  ],
  "has_more": false,
  "total": 1,
  "limit": 1,
  "offset": 1
}

POST /v1/shipments#

Ship an order

Scope: shipments.write

Buys the label and charges your wallet.

Idempotent on order_id. An order ships once; asking again returns the shipment that already exists with 200 instead of 201, so a retry after a timeout can never buy a second label.

Allow up to 45 seconds. Buying a label asks the carrier in real time and some carriers answer slowly; set your HTTP timeout to at least 45s. If you time out anyway, repeat the same request: it returns the label if it was bought.

Pass quote_id and rate_id together to ship a specific quoted rate. A quote ships only the route and parcel it priced: the order's destination postal code, weight and box sides (in any order) must match the quoted parcel, or the answer is 422 quote_mismatch naming what differs. An order without a package (one shipped from a Wepaak warehouse, where the box is chosen at packing) is checked on destination and weight only: its weight is its products' weight, each piece at its product's weight in your catalogue, or 0.5 kg for a piece with none (a line that is not one of your products counts as 0.5 kg per unit). From your own warehouse an order needs a package: without one it is refused first, with order_not_shippable (package_required), before any quote is compared.

You can omit both ONLY if the order already has a courier — which means one of your automation rules assigned one when the order arrived. With no such rule there is nothing to ship it with, and this returns 422 carrier_required. If you are integrating for the first time, quote and pass the rate: that is the path that always works.

A pending status means the parcel is queued for pick and pack in a Wepaak warehouse; the label is minted then and reaches you by webhook. Nothing is wrong and there is nothing to retry.

Body

FieldType
order_id string (uuid)required
quote_id string (uuid)

Send with rate_id, or neither.

rate_id string
label_format string

standard prints on an office printer (letter page), thermal on a 4x6 label printer. Left out, your account's print setting in Wepaak is used. Applies to the national carriers; the Wepaak courier always produces its own label.

standard thermal

Errors

Status
400

quote_expired, or a rate_id that is not part of that quote.

401

No key was sent, or it is not valid.

402

insufficient_balance: the balance does not cover this label; the message says how much to add.

403

insufficient_scope, account_under_review (shipments paused while Wepaak reviews the account) or account_not_verified.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

409

The order cannot ship in its current state — cancelled, or not assigned to a warehouse — or order_not_shippable while an earlier request for the same order is still running (retry in a moment: it answers 200 with that shipment).

415

invalid_request: the body was sent without Content-Type: application/json.

422

Something blocks the label: missing package dimensions, a stock shortfall, a rate whose COD setting does not match the order, or quote_mismatch (the quote was for another destination or parcel; field names it).

500

If the message says the label was created but recording it failed, do not retry — contact support with the order id.

curl -X POST "https://api.wepaak.com/v1/shipments" \
  -H "Authorization: Bearer wpk_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "order_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "rate_id": "rate_4e800a8fc898d6a8"
  }'
const res = await fetch("https://api.wepaak.com/v1/shipments", {
  method: "POST",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "order_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "rate_id": "rate_4e800a8fc898d6a8"
  }),
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/shipments");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "order_id" => "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "rate_id" => "rate_4e800a8fc898d6a8"
]));
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
    "https://api.wepaak.com/v1/shipments",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
    json={
        "order_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
        "rate_id": "rate_4e800a8fc898d6a8"
    },
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/shipments")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
req["Content-Type"] = "application/json"
req.body = "{\n  \"order_id\": \"9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33\",\n  \"rate_id\": \"rate_4e800a8fc898d6a8\"\n}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "order_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "external_id": "string",
  "mode": "test",
  "status": "created",
  "own_label": false,
  "carrier": "string",
  "service": "string",
  "tracking_number": "string",
  "issues": [
    "string"
  ],
  "created_at": "2026-09-08T12:00:00.000Z"
}

GET /v1/shipments/{id}/label#

Download the label

Scope: shipments.read

The label as a PDF. For the national carriers, the file the carrier produced, in the format chosen when it was bought (label_format). The Wepaak courier's label is converted to a 4x6 PDF. In the rare case the conversion is unavailable you receive its printable HTML page instead, so check Content-Type.

Test mode: a sample 4x6 PDF marked TEST LABEL, so printing can be built before going live.

Parameters

FieldType
id string · pathrequired

Errors

Status
401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

404

No such shipment, or label_not_available yet.

409

shipment_cancelled: the label must not be used.

503

carrier_unavailable: try again in a few minutes.

curl -X GET "https://api.wepaak.com/v1/shipments/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/label" \
  -H "Authorization: Bearer wpk_test_your_key_here" \
  -o label.pdf
const res = await fetch("https://api.wepaak.com/v1/shipments/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/label", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
require("fs").writeFileSync("label.pdf", Buffer.from(await res.arrayBuffer()));
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/shipments/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/label");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
file_put_contents("label.pdf", curl_exec($ch));
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/shipments/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/label",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
response.raise_for_status()
open("label.pdf", "wb").write(response.content)
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/shipments/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/label")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
raise "HTTP #{res.code}" unless res.code == "200"
File.binwrite("label.pdf", res.body)

GET /v1/shipments/{id}#

Fetch one shipment

Scope: shipments.read

Parameters

FieldType
id string · pathrequired

Errors

Status
401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

curl -X GET "https://api.wepaak.com/v1/shipments/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/shipments/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/shipments/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/shipments/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/shipments/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "order_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "external_id": "string",
  "mode": "test",
  "status": "created",
  "own_label": false,
  "carrier": "string",
  "service": "string",
  "tracking_number": "string",
  "issues": [
    "string"
  ],
  "created_at": "2026-09-08T12:00:00.000Z"
}

POST /v1/shipments/{id}/cancel#

Cancel a shipment

Scope: shipments.write

The same cancellation as in Wepaak, with the same rules: only before the carrier has the parcel, the label is cancelled with the carrier first, and the label price goes back to your wallet.

A late cancellation is reviewed. A label cancelled after the free window answers 202 with status cancellation_requested: Wepaak checks with the carrier before refunding, and you receive shipment.cancelled if it is approved.

Idempotent. A shipment that is already cancelled answers 200 again; nothing is refunded twice.

Shipping the goods again. After a cancellation the order stays dispatched, and POST /v1/shipments for it returns this cancelled shipment: an order ships once. To send the goods again, create a new order (with a new external_id) and ship that.

Test mode: no carrier and no money. The test shipment is cancelled and the test shipment.status_changed and shipment.cancelled webhooks are sent.

Parameters

FieldType
id string · pathrequired

Body

FieldType
reason string

Errors

Status
400

invalid_request: the body is not valid JSON.

401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

409

shipment_not_cancellable: the carrier already has it, or the service cannot be cancelled.

415

invalid_request: the body was sent without Content-Type: application/json.

422

invalid_request: reason is longer than 255 characters.

502

carrier_unavailable: the carrier did not confirm. Nothing changed — retry later.

curl -X POST "https://api.wepaak.com/v1/shipments/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel" \
  -H "Authorization: Bearer wpk_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "string"
  }'
const res = await fetch("https://api.wepaak.com/v1/shipments/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel", {
  method: "POST",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "reason": "string"
  }),
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/shipments/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "reason" => "string"
]));
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
    "https://api.wepaak.com/v1/shipments/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
    json={
        "reason": "string"
    },
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/shipments/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
req["Content-Type"] = "application/json"
req.body = "{\n  \"reason\": \"string\"\n}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)

POST /v1/shipments/{id}/simulate#

Move a test shipment (test keys only)

Scope: shipments.write

Build and test your tracking handling before going live. Moves a TEST shipment to status and sends the webhooks a real move would: always shipment.status_changed, plus shipment.delivered or shipment.cancelled for those. GET /v1/tracking then shows the steps. status_detail ends in "(simulated)".

Two rules are enforced, as for a real parcel: nothing after delivered, returned or cancelled (409 shipment_finished), and cancelled only before picked_up. Any other step may follow any other (created straight to delivered, failed back to in_transit…), so each webhook can be tested on its own; a real parcel usually goes picked_up → in_transit → delivered. A live key answers 403 test_mode_only.

Automatic returns. Moving a cash-on-delivery test shipment to returned opens its cod_rejection return, as a refused COD parcel does live: in_transit, every line of the order, back to the warehouse of the order, with its return.created webhook (test mode, no stock moves). A cancellation return, for a shipment cancelled after pickup, cannot be produced in test mode, because a test shipment is cancellable only before picked_up, as a real one is; it has the same shape, with return_type: cancellation.

Parameters

FieldType
id string · pathrequired

Body

FieldType
status stringrequired
picked_up in_transit delivered returned failed cancelled

Errors

Status
400

invalid_request: the body is not valid JSON.

401

No key was sent, or it is not valid.

403

test_mode_only with a live key, or insufficient_scope.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

409

shipment_finished, or shipment_not_cancellable for cancelled after pickup.

415

invalid_request: the body was sent without Content-Type: application/json.

422

status is not one of the allowed values.

curl -X POST "https://api.wepaak.com/v1/shipments/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/simulate" \
  -H "Authorization: Bearer wpk_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "picked_up"
  }'
const res = await fetch("https://api.wepaak.com/v1/shipments/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/simulate", {
  method: "POST",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "status": "picked_up"
  }),
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/shipments/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/simulate");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "status" => "picked_up"
]));
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
    "https://api.wepaak.com/v1/shipments/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/simulate",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
    json={
        "status": "picked_up"
    },
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/shipments/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/simulate")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
req["Content-Type"] = "application/json"
req.body = "{\n  \"status\": \"picked_up\"\n}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)

Pickups

Have the carrier collect a shipment.

GET /v1/shipments/{id}/pickup-dates#

The carrier’s pickup dates for a shipment

Scope: shipments.read

The days (and hours) the carrier can collect this shipment, as the carrier publishes them. Book one with POST /v1/pickups. carrier_calendar: false means this carrier publishes no calendar: book a weekday (after midday, the next one). A test key gets two simulated weekdays.

Parameters

FieldType
id string · pathrequired

Errors

Status
401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

curl -X GET "https://api.wepaak.com/v1/shipments/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/pickup-dates" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/shipments/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/pickup-dates", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/shipments/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/pickup-dates");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/shipments/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/pickup-dates",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/shipments/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/pickup-dates")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "carrier_calendar": false,
  "dates": [
    {
      "date": "string",
      "start_hour": "10:00",
      "end_hour": "19:00"
    }
  ]
}

POST /v1/pickups#

Book a carrier pickup

Scope: shipments.write

Asks the carrier to collect a shipment on date (one of GET /v1/shipments/{id}/pickup-dates). The pickup window is the carrier’s for that day. Errors: pickup_date_not_available (422, error.details.available_dates lists the dates the carrier offers), pickup_not_available (422, a drop-off service), pickup_already_scheduled (409), shipment_not_eligible (409), carrier_rejected (422), carrier_unavailable (502/503, try again later). A test key books nothing: it accepts only the dates its pickup-dates lists, and answers status: simulated.

Body

FieldType
shipment_id string (uuid)required
date string (date)required
packages integer
weight_kg number
instructions string

Errors

Status
400

invalid_request: the body is not valid JSON.

401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

409

pickup_already_scheduled: this shipment already has a pickup. shipment_not_eligible: the shipment failed or is being cancelled.

415

invalid_request: the body was sent without Content-Type: application/json.

422

invalid_request (the field is named), pickup_date_not_available (a past date, a weekend, or a day the carrier does not collect: use GET /v1/shipments/{id}/pickup-dates), pickup_not_available (a drop-off service), carrier_rejected.

curl -X POST "https://api.wepaak.com/v1/pickups" \
  -H "Authorization: Bearer wpk_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "date": "2026-11-18"
  }'
const res = await fetch("https://api.wepaak.com/v1/pickups", {
  method: "POST",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "date": "2026-11-18"
  }),
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/pickups");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "shipment_id" => "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "date" => "2026-11-18"
]));
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
    "https://api.wepaak.com/v1/pickups",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
    json={
        "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
        "date": "2026-11-18"
    },
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/pickups")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
req["Content-Type"] = "application/json"
req.body = "{\n  \"shipment_id\": \"9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33\",\n  \"date\": \"2026-11-18\"\n}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 201
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "number": "string",
  "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "carrier": "string",
  "date": "string",
  "time_from": "10:00",
  "time_to": "19:00",
  "status": "string",
  "packages": 1,
  "weight_kg": 1,
  "address": "string",
  "instructions": "string",
  "created_at": "2026-09-08T12:00:00.000Z"
}

GET /v1/pickups#

List your pickups

Scope: shipments.read

Parameters

FieldType
limit integer · query
offset integer · query

Errors

Status
400

invalid_request: limit or offset is not a valid number (the field is named).

401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

curl -X GET "https://api.wepaak.com/v1/pickups" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/pickups", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/pickups");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/pickups",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/pickups")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "data": [
    {
      "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "number": "string",
      "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "carrier": "string",
      "date": "string",
      "time_from": "10:00",
      "time_to": "19:00",
      "status": "string",
      "packages": 1,
      "weight_kg": 1,
      "address": "string",
      "instructions": "string",
      "created_at": "2026-09-08T12:00:00.000Z"
    }
  ],
  "limit": 1,
  "offset": 1
}

GET /v1/pickups/{id}#

Fetch one pickup

Scope: shipments.read

Parameters

FieldType
id string · pathrequired

Errors

Status
401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

curl -X GET "https://api.wepaak.com/v1/pickups/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/pickups/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/pickups/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/pickups/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/pickups/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "number": "string",
  "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "carrier": "string",
  "date": "string",
  "time_from": "10:00",
  "time_to": "19:00",
  "status": "string",
  "packages": 1,
  "weight_kg": 1,
  "address": "string",
  "instructions": "string",
  "created_at": "2026-09-08T12:00:00.000Z"
}

Cash on delivery

Where each COD amount is, the totals, and the payouts that paid them.

GET /v1/cod/balance#

COD totals

Scope: cod.read

How many COD shipments, and how much, are in each status. available_to_pay_out is what could be paid out now, before any charges owed to Wepaak are kept back. Pass pickup_address_id for one client of yours (there is no status filter: every status is returned). A test key never reads real money: it gets empty lists and zero totals, marked test: true (sandbox shipments create no COD records).

Parameters

FieldType
pickup_address_id string · query

Errors

Status
400

invalid_request: a filter is not valid (the field is named).

401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

curl -X GET "https://api.wepaak.com/v1/cod/balance" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/cod/balance", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/cod/balance");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/cod/balance",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/cod/balance")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "currency": "string",
  "totals": {},
  "available_to_pay_out": 1
}

GET /v1/cod/collections#

COD records, one per shipment

Scope: cod.read

Newest dispatch first. Filter by status, shipment, order, your external_id, pickup address (one client of yours) or dispatch date. A test key never reads real money: it gets empty lists and zero totals, marked test: true (sandbox shipments create no COD records).

Parameters

FieldType
status string · query
in_transit collected available paid_out returned
shipment_id string · query
order_id string · query
external_id string · query
pickup_address_id string · query
dispatched_from string · query
dispatched_to string · query

A date includes that whole day; a date-time is inclusive.

limit integer · query
offset integer · query

Errors

Status
400

invalid_request: a filter is not valid (the field is named).

401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

curl -X GET "https://api.wepaak.com/v1/cod/collections" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/cod/collections", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/cod/collections");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/cod/collections",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/cod/collections")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "data": [
    {
      "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "order_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "external_id": "string",
      "tracking_number": "string",
      "carrier": "string",
      "pickup_address_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "status": "in_transit",
      "currency": "MXN",
      "amount": 1,
      "collected": 1,
      "fees": 1,
      "return_cost": 1,
      "net": 1,
      "dispatched_at": "2026-09-08T12:00:00.000Z",
      "delivered_at": "2026-09-08T12:00:00.000Z",
      "available_at": "2026-09-08T12:00:00.000Z",
      "payout": {
        "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
        "number": "string",
        "status": "string"
      }
    }
  ],
  "has_more": false,
  "limit": 1,
  "offset": 1,
  "total": 1
}

GET /v1/cod/collections/{id}#

Fetch one COD record

Scope: cod.read

Parameters

FieldType
id string · pathrequired

Errors

Status
401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

curl -X GET "https://api.wepaak.com/v1/cod/collections/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/cod/collections/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/cod/collections/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/cod/collections/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/cod/collections/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "order_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "external_id": "string",
  "tracking_number": "string",
  "carrier": "string",
  "pickup_address_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "status": "in_transit",
  "currency": "MXN",
  "amount": 1,
  "collected": 1,
  "fees": 1,
  "return_cost": 1,
  "net": 1,
  "dispatched_at": "2026-09-08T12:00:00.000Z",
  "delivered_at": "2026-09-08T12:00:00.000Z",
  "available_at": "2026-09-08T12:00:00.000Z",
  "payout": {
    "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "number": "string",
    "status": "string"
  }
}

GET /v1/cod/payouts#

List payouts

Scope: cod.read

Newest first. A test key never reads real money: it gets empty lists and zero totals, marked test: true (sandbox shipments create no COD records).

Parameters

FieldType
status string · query
requested processing paid failed cancelled
limit integer · query
offset integer · query

Errors

Status
400

invalid_request: a filter is not valid (the field is named).

401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

curl -X GET "https://api.wepaak.com/v1/cod/payouts" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/cod/payouts", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/cod/payouts");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/cod/payouts",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/cod/payouts")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "data": [
    {
      "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "number": "PAY-000123",
      "status": "requested",
      "currency": "MXN",
      "amount": 1,
      "withheld_charges": 1,
      "to_wallet": 1,
      "to_bank": 1,
      "bank_account": {
        "clabe_last4": "string",
        "holder": "string",
        "bank": "string"
      },
      "recipient": {
        "type": "merchant",
        "name": "string",
        "clabe_last4": "string",
        "bank": "string",
        "reference": "string"
      },
      "bank_reference": "string",
      "receipt_available": false,
      "shipment_count": 1,
      "failure_reason": "string",
      "created_at": "2026-09-08T12:00:00.000Z",
      "paid_at": "2026-09-08T12:00:00.000Z",
      "shipments": [
        {
          "collection_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
          "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
          "order_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
          "external_id": "string",
          "tracking_number": "string",
          "amount": 1
        }
      ]
    }
  ],
  "has_more": false,
  "limit": 1,
  "offset": 1,
  "total": 1
}

POST /v1/cod/payouts#

Request a payout to a client of yours

Scope: cod.write

Pays the COD of the shipments listed to the bank account in recipient: your client's. The charges your account owes Wepaak are withheld from it first, as for every payout (withheld_charges; to_bank is what is sent). The shipments are in the payout from this moment (paid_out); Wepaak reviews it and makes the transfer, and cod.payout_updated tells you when it is processing and paid.

All or nothing: if any shipment is not available or is already in a payout, the answer is 422 shipment_not_payable listing each one with its status, and nothing is created.

Send a request_id to make retries safe: the same one again (with the same recipient CLABE and name) returns the same payout with 200, even if it was cancelled since (use a new one for a new payout). The same request_id with another recipient is 409 idempotency_mismatch.

No payout is made while your account's wallet is negative (422 wallet_negative): that balance is owed to Wepaak.

Test keys check everything (the CLABE included) and answer 201 with the payout that would be made, test: true, amounts 0. Nothing is written: sandbox shipments have no COD.

Body

FieldType
shipment_ids string[]required

The shipments whose COD is paid out: the ids GET /v1/cod/collections shows as shipment_id (an order id works too). Every one must be available and in no payout.

recipient objectrequired

The bank account the money goes to: your client's.

recipient.name stringrequired

The account holder, as the bank has it.

recipient.clabe stringrequired

The 18-digit CLABE, as a string. Its check digit is verified: a mistyped CLABE is refused.

recipient.bank string

Optional. When left out it is read from the CLABE's first three digits (null when the bank is not one we know).

reference string

Your id for this client. Shown back on the payout as recipient.reference.

request_id string

Your idempotency key. The same request_id again from your account returns the payout it already made (200), never a second one.

notes string

Errors

Status
400

invalid_request: the body is not valid JSON.

401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

409

payout_conflict: a shipment was taken by another payout meanwhile. idempotency_mismatch: this request_id was used for another recipient. Nothing was created.

415

invalid_request: the body was sent without Content-Type: application/json.

422

invalid_request (the field is named: a CLABE whose check digit does not match, a repeated shipment id, a text field that is not a string…), shipment_not_payable (error.details.shipments), payout_fully_withheld (error.details.collected / owed), payout_zero_amount, wallet_negative (error.details.wallet_balance).

curl -X POST "https://api.wepaak.com/v1/cod/payouts" \
  -H "Authorization: Bearer wpk_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "shipment_ids": [
      "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33"
    ],
    "recipient": {
      "name": "Abarrotes Lupita SA de CV",
      "clabe": "002010077777777771"
    }
  }'
const res = await fetch("https://api.wepaak.com/v1/cod/payouts", {
  method: "POST",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "shipment_ids": [
      "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33"
    ],
    "recipient": {
      "name": "Abarrotes Lupita SA de CV",
      "clabe": "002010077777777771"
    }
  }),
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/cod/payouts");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "shipment_ids" => [
        "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33"
    ],
    "recipient" => [
        "name" => "Abarrotes Lupita SA de CV",
        "clabe" => "002010077777777771"
    ]
]));
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
    "https://api.wepaak.com/v1/cod/payouts",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
    json={
        "shipment_ids": [
            "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33"
        ],
        "recipient": {
            "name": "Abarrotes Lupita SA de CV",
            "clabe": "002010077777777771"
        }
    },
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/cod/payouts")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
req["Content-Type"] = "application/json"
req.body = "{\n  \"shipment_ids\": [\n    \"9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33\"\n  ],\n  \"recipient\": {\n    \"name\": \"Abarrotes Lupita SA de CV\",\n    \"clabe\": \"002010077777777771\"\n  }\n}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "number": "PAY-000123",
  "status": "requested",
  "currency": "MXN",
  "amount": 1,
  "withheld_charges": 1,
  "to_wallet": 1,
  "to_bank": 1,
  "bank_account": {
    "clabe_last4": "string",
    "holder": "string",
    "bank": "string"
  },
  "recipient": {
    "type": "merchant",
    "name": "string",
    "clabe_last4": "string",
    "bank": "string",
    "reference": "string"
  },
  "bank_reference": "string",
  "receipt_available": false,
  "shipment_count": 1,
  "failure_reason": "string",
  "created_at": "2026-09-08T12:00:00.000Z",
  "paid_at": "2026-09-08T12:00:00.000Z",
  "shipments": [
    {
      "collection_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "order_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "external_id": "string",
      "tracking_number": "string",
      "amount": 1
    }
  ]
}

POST /v1/cod/payouts/{id}/cancel#

Cancel a requested payout

Scope: cod.write

Cancels a payout that is still requested and was requested through the API: its shipments are available again (cod.status_changed), the charges it withheld are owed again, and cod.payout_updated says cancelled. Once Wepaak is paying it (processing) it can no longer be cancelled here, nor can a payout your account asked for on the Wepaak website. A test key has no payouts: 404.

Parameters

FieldType
id string · pathrequired

Body

FieldType
reason string

Errors

Status
400

invalid_request: the body is not valid JSON.

401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

409

payout_not_cancellable: it is no longer requested (error.details.status), or it was not requested through the API (error.details.reason: not_requested_through_api).

415

invalid_request: the body was sent without Content-Type: application/json.

422

invalid_request: reason is not text or is longer than 500 characters.

curl -X POST "https://api.wepaak.com/v1/cod/payouts/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel" \
  -H "Authorization: Bearer wpk_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "string"
  }'
const res = await fetch("https://api.wepaak.com/v1/cod/payouts/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel", {
  method: "POST",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "reason": "string"
  }),
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/cod/payouts/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "reason" => "string"
]));
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
    "https://api.wepaak.com/v1/cod/payouts/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
    json={
        "reason": "string"
    },
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/cod/payouts/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
req["Content-Type"] = "application/json"
req.body = "{\n  \"reason\": \"string\"\n}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "number": "PAY-000123",
  "status": "requested",
  "currency": "MXN",
  "amount": 1,
  "withheld_charges": 1,
  "to_wallet": 1,
  "to_bank": 1,
  "bank_account": {
    "clabe_last4": "string",
    "holder": "string",
    "bank": "string"
  },
  "recipient": {
    "type": "merchant",
    "name": "string",
    "clabe_last4": "string",
    "bank": "string",
    "reference": "string"
  },
  "bank_reference": "string",
  "receipt_available": false,
  "shipment_count": 1,
  "failure_reason": "string",
  "created_at": "2026-09-08T12:00:00.000Z",
  "paid_at": "2026-09-08T12:00:00.000Z",
  "shipments": [
    {
      "collection_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "order_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "external_id": "string",
      "tracking_number": "string",
      "amount": 1
    }
  ]
}

GET /v1/cod/payouts/{id}#

Fetch one payout, with its shipments

Scope: cod.read

Parameters

FieldType
id string · pathrequired

Errors

Status
401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

curl -X GET "https://api.wepaak.com/v1/cod/payouts/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/cod/payouts/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/cod/payouts/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/cod/payouts/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/cod/payouts/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "number": "PAY-000123",
  "status": "requested",
  "currency": "MXN",
  "amount": 1,
  "withheld_charges": 1,
  "to_wallet": 1,
  "to_bank": 1,
  "bank_account": {
    "clabe_last4": "string",
    "holder": "string",
    "bank": "string"
  },
  "recipient": {
    "type": "merchant",
    "name": "string",
    "clabe_last4": "string",
    "bank": "string",
    "reference": "string"
  },
  "bank_reference": "string",
  "receipt_available": false,
  "shipment_count": 1,
  "failure_reason": "string",
  "created_at": "2026-09-08T12:00:00.000Z",
  "paid_at": "2026-09-08T12:00:00.000Z",
  "shipments": [
    {
      "collection_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "order_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "external_id": "string",
      "tracking_number": "string",
      "amount": 1
    }
  ]
}

Tracking

Where a parcel is.

GET /v1/tracking/{tracking_number}#

Where a parcel is

Scope: tracking.read

Branch on status, which is ours and stable. status_detail is the carrier's own wording — good to show a customer, unsafe to write code against, because carriers reword it without warning.

An empty events list means we have no step-by-step history for this carrier, not that nothing has happened.

Parameters

FieldType
tracking_number string · pathrequired

Errors

Status
401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

curl -X GET "https://api.wepaak.com/v1/tracking/tracking_number" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/tracking/tracking_number", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/tracking/tracking_number");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/tracking/tracking_number",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/tracking/tracking_number")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "tracking_number": "string",
  "mode": "test",
  "carrier": "string",
  "status": "created",
  "status_detail": "string",
  "order_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "external_id": "string",
  "events": [
    {
      "status": "string",
      "description": "string",
      "note": "string",
      "occurred_at": "2026-09-08T12:00:00.000Z"
    }
  ]
}

Lookups

Postal codes, carriers, and your balance.

GET /v1/coverage#

Look up a postal code

Scope: catalog.read

Validates a Mexican postal code and returns its colonias, city and state — what a checkout needs to prefill an address.

It deliberately does not say which carriers serve the address: that depends on the parcel too, and only a quote can answer it honestly.

Parameters

FieldType
postal_code string · queryrequired

Errors

Status
400

Not a 5-digit postal code.

401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

curl -X GET "https://api.wepaak.com/v1/coverage?postal_code=44160" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/coverage?postal_code=44160", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/coverage?postal_code=44160");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/coverage?postal_code=44160",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/coverage?postal_code=44160")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "postal_code": "string",
  "known": false,
  "state": "string",
  "municipality": "string",
  "city": "string",
  "colonias": [
    {
      "name": "string",
      "type": "string"
    }
  ]
}

GET /v1/carriers#

Carriers available to you

Scope: catalog.read

Only carriers that can actually appear in your quotes — anything disabled platform-wide or by you is left out.

Errors

Status
401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

curl -X GET "https://api.wepaak.com/v1/carriers" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/carriers", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/carriers");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/carriers",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/carriers")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "data": [
    {
      "carrier": "string",
      "name": "string"
    }
  ]
}

GET /v1/wallet#

Your balance

Scope: wallet.read

So you can warn before a shipment fails for want of funds. Test keys see the real balance but never spend it.

Errors

Status
401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

curl -X GET "https://api.wepaak.com/v1/wallet" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/wallet", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/wallet");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/wallet",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/wallet")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "balance": 431.68,
  "currency": "MXN",
  "mode": "test"
}

Inventory

Your warehouses, products and stock.

GET /v1/warehouses#

List your warehouses

Scope: inventory.read

Your own warehouses and the Wepaak warehouses that hold your stock. Readable with a test key too: these are your real warehouses, products and stock, and reading changes nothing.

Errors

Status
401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

curl -X GET "https://api.wepaak.com/v1/warehouses" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/warehouses", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/warehouses");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/warehouses",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/warehouses")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "data": [
    {
      "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "name": "string",
      "operated_by": "self",
      "status": "string",
      "is_default": false,
      "test": false,
      "contact": {
        "name": "string",
        "phone": "string",
        "email": "string"
      },
      "address": {
        "street1": "Av. Vallarta 1234",
        "interior": "Depto 5B",
        "colonia": "Americana",
        "city": "Guadalajara",
        "state": "Jalisco",
        "postal_code": "44160",
        "country_code": "MX",
        "reference": "Portón negro, entre Chapultepec y Colonias"
      },
      "created_at": "2026-09-08T12:00:00.000Z"
    }
  ]
}

POST /v1/warehouses#

Add a pickup address

Scope: orders.write

Adds a pickup address you run, for orders that ship from it (warehouse_id on POST /v1/orders). For platforms whose users each ship from their own place. If the same address (street, interior and postal code; case and accents ignored) is already on your account, that one is returned with 200 instead of a duplicate; a new one answers 201. You can also skip this and send address_from on each order. With a test key the address is a test one (test: true): only test keys see it and only test orders ship from it, so trying an integration never adds to your real pickup addresses.

Body

FieldType
label string

How it is named in your list. Default: "<name> — <city> <postal code>".

name stringrequired

Contact at the pickup address.

company string
phone stringrequired
email string
street1 stringrequired

Street and number.

interior string
colonia string

Filled from the postal code when left out.

city stringrequired
state stringrequired

Name or abbreviation; stored as the full state name.

postal_code stringrequired
country_code string
MX
reference string

Errors

Status
400

invalid_request: the body is not valid JSON.

401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

415

invalid_request: the body was sent without Content-Type: application/json.

422

invalid_request: a field is missing or not valid (the field is named), or the postal code is not a real Mexican one.

curl -X POST "https://api.wepaak.com/v1/warehouses" \
  -H "Authorization: Bearer wpk_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "phone": "string",
    "street1": "string",
    "city": "string",
    "state": "string",
    "postal_code": "string"
  }'
const res = await fetch("https://api.wepaak.com/v1/warehouses", {
  method: "POST",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "name": "string",
    "phone": "string",
    "street1": "string",
    "city": "string",
    "state": "string",
    "postal_code": "string"
  }),
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/warehouses");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "name" => "string",
    "phone" => "string",
    "street1" => "string",
    "city" => "string",
    "state" => "string",
    "postal_code" => "string"
]));
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
    "https://api.wepaak.com/v1/warehouses",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
    json={
        "name": "string",
        "phone": "string",
        "street1": "string",
        "city": "string",
        "state": "string",
        "postal_code": "string"
    },
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/warehouses")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
req["Content-Type"] = "application/json"
req.body = "{\n  \"name\": \"string\",\n  \"phone\": \"string\",\n  \"street1\": \"string\",\n  \"city\": \"string\",\n  \"state\": \"string\",\n  \"postal_code\": \"string\"\n}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "name": "string",
  "operated_by": "self",
  "status": "string",
  "is_default": false,
  "test": false,
  "contact": {
    "name": "string",
    "phone": "string",
    "email": "string"
  },
  "address": {
    "street1": "Av. Vallarta 1234",
    "interior": "Depto 5B",
    "colonia": "Americana",
    "city": "Guadalajara",
    "state": "Jalisco",
    "postal_code": "44160",
    "country_code": "MX",
    "reference": "Portón negro, entre Chapultepec y Colonias"
  },
  "created_at": "2026-09-08T12:00:00.000Z"
}

PATCH /v1/warehouses/{id}#

Edit or switch off a pickup address

Scope: orders.write

Changes only the fields you send. status: paused to stop using it, active to use it again. Only addresses you run (operated_by: self) can be changed; a Wepaak warehouse answers 409 not_editable. A required field (name, phone, street1, city, state) cannot be sent empty. Moving or re-activating it onto the address of another of your active ones answers 409 duplicate_address, with that one in error.details.warehouse_id. A test key changes only the test addresses it made: a real one answers 403 live_key_required. An address created through the API can be changed with orders.write; one set up in Wepaak needs a key with inventory.write (otherwise 403 insufficient_scope).

Parameters

FieldType
id string · pathrequired

Body

Errors

Status
400

invalid_request: the body is not valid JSON.

401

No key was sent, or it is not valid.

403

live_key_required: a test key on one of your real pickup addresses. insufficient_scope: the key lacks orders.write, or the address was set up in Wepaak and the key lacks inventory.write.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

409

not_editable: a Wepaak warehouse. duplicate_address: another active one is at that address.

415

invalid_request: the body was sent without Content-Type: application/json.

422

invalid_request: a field is not valid (the field is named), or the postal code is not a real Mexican one.

curl -X PATCH "https://api.wepaak.com/v1/warehouses/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33" \
  -H "Authorization: Bearer wpk_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "active"
  }'
const res = await fetch("https://api.wepaak.com/v1/warehouses/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33", {
  method: "PATCH",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "status": "active"
  }),
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/warehouses/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "status" => "active"
]));
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.patch(
    "https://api.wepaak.com/v1/warehouses/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
    json={
        "status": "active"
    },
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/warehouses/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33")
req = Net::HTTP::Patch.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
req["Content-Type"] = "application/json"
req.body = "{\n  \"status\": \"active\"\n}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "name": "string",
  "operated_by": "self",
  "status": "string",
  "is_default": false,
  "test": false,
  "contact": {
    "name": "string",
    "phone": "string",
    "email": "string"
  },
  "address": {
    "street1": "Av. Vallarta 1234",
    "interior": "Depto 5B",
    "colonia": "Americana",
    "city": "Guadalajara",
    "state": "Jalisco",
    "postal_code": "44160",
    "country_code": "MX",
    "reference": "Portón negro, entre Chapultepec y Colonias"
  },
  "created_at": "2026-09-08T12:00:00.000Z"
}

GET /v1/inventory#

Stock per product and warehouse

Scope: inventory.read

One row per product and warehouse, ordered by SKU. Readable with a test key too: these are your real warehouses, products and stock, and reading changes nothing.

Parameters

FieldType
sku string · query

Only this SKU.

warehouse_id string · query

Only this warehouse.

low_stock boolean · query

true: only rows whose available stock is at or under the product's low-stock threshold.

limit integer · query
offset integer · query

Errors

Status
400

A filter was not understood. field names it. A limit above 100 is refused rather than quietly reduced.

401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

curl -X GET "https://api.wepaak.com/v1/inventory" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/inventory", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/inventory");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/inventory",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/inventory")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "data": [
    {
      "product_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "sku": "string",
      "name": "string",
      "warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "warehouse_name": "string",
      "warehouse_operated_by": "self",
      "on_hand": 1,
      "committed": 1,
      "available": 1,
      "incoming": 1,
      "low_stock_threshold": 1,
      "updated_at": "2026-09-08T12:00:00.000Z"
    }
  ],
  "has_more": false,
  "total": 1,
  "limit": 1,
  "offset": 1
}

GET /v1/products#

List products

Scope: inventory.read

Your catalog, ordered by SKU, with stock totals over every warehouse. Readable with a test key too: these are your real warehouses, products and stock, and reading changes nothing.

Parameters

FieldType
sku string · query

Only this SKU.

limit integer · query
offset integer · query

Errors

Status
400

A filter was not understood. field names it. A limit above 100 is refused rather than quietly reduced.

401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

curl -X GET "https://api.wepaak.com/v1/products" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/products", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/products");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/products",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/products")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "data": [
    {
      "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "sku": "string",
      "name": "string",
      "description": "string",
      "barcode": "string",
      "category": "string",
      "status": "string",
      "weight_kg": 1,
      "dimensions_cm": {
        "length": 1,
        "width": 1,
        "height": 1
      },
      "declared_value": 1,
      "sat_code": "string",
      "manages_expiry": false,
      "low_stock_threshold": 1,
      "stock": {
        "on_hand": 1,
        "committed": 1,
        "available": 1,
        "incoming": 1
      },
      "warehouses": [
        {
          "warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
          "warehouse_name": "string",
          "warehouse_operated_by": "self",
          "on_hand": 1,
          "committed": 1,
          "available": 1,
          "incoming": 1
        }
      ],
      "created_at": "2026-09-08T12:00:00.000Z",
      "updated_at": "2026-09-08T12:00:00.000Z"
    }
  ],
  "has_more": false,
  "total": 1,
  "limit": 1,
  "offset": 1
}

POST /v1/products#

Create a product

Scope: inventory.write

So an inbound can carry a SKU that is new to Wepaak. Idempotent on sku: a SKU you already have returns that product with 200, unchanged (use PATCH to change it). Your catalog is the same in both modes, so this needs a live key: a test key gets 403 live_key_required.

Body

FieldType
sku stringrequired

Unique in your account.

name stringrequired
description string
barcode string

EAN / UPC.

category string
status string
active paused discontinued
declared_value number
weight_kg number
dimensions_cm object
dimensions_cm.length number
dimensions_cm.width number
dimensions_cm.height number
sat_code string
manages_expiry boolean

It has a shelf life: receiving records lot and expiry, and stock leaves soonest-expiry first.

low_stock_threshold integer

Drives GET /v1/inventory?low_stock=true.

Errors

Status
400

invalid_request: the body is not valid JSON.

401

No key was sent, or it is not valid.

403

live_key_required, or insufficient_scope.

409

sku_unavailable: the SKU belongs to a product you removed, or one merged into another.

415

invalid_request: the body was sent without Content-Type: application/json.

422

invalid_request, with field.

curl -X POST "https://api.wepaak.com/v1/products" \
  -H "Authorization: Bearer wpk_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "sku": "string",
    "name": "string",
    "dimensions_cm": {
      "length": 1,
      "width": 1,
      "height": 1
    }
  }'
const res = await fetch("https://api.wepaak.com/v1/products", {
  method: "POST",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "sku": "string",
    "name": "string",
    "dimensions_cm": {
      "length": 1,
      "width": 1,
      "height": 1
    }
  }),
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/products");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "sku" => "string",
    "name" => "string",
    "dimensions_cm" => [
        "length" => 1,
        "width" => 1,
        "height" => 1
    ]
]));
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
    "https://api.wepaak.com/v1/products",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
    json={
        "sku": "string",
        "name": "string",
        "dimensions_cm": {
            "length": 1,
            "width": 1,
            "height": 1
        }
    },
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/products")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
req["Content-Type"] = "application/json"
req.body = "{\n  \"sku\": \"string\",\n  \"name\": \"string\",\n  \"dimensions_cm\": {\n    \"length\": 1,\n    \"width\": 1,\n    \"height\": 1\n  }\n}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "sku": "string",
  "name": "string",
  "description": "string",
  "barcode": "string",
  "category": "string",
  "status": "string",
  "weight_kg": 1,
  "dimensions_cm": {
    "length": 1,
    "width": 1,
    "height": 1
  },
  "declared_value": 1,
  "sat_code": "string",
  "manages_expiry": false,
  "low_stock_threshold": 1,
  "stock": {
    "on_hand": 1,
    "committed": 1,
    "available": 1,
    "incoming": 1
  },
  "warehouses": [
    {
      "warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "warehouse_name": "string",
      "warehouse_operated_by": "self",
      "on_hand": 1,
      "committed": 1,
      "available": 1,
      "incoming": 1
    }
  ],
  "created_at": "2026-09-08T12:00:00.000Z",
  "updated_at": "2026-09-08T12:00:00.000Z"
}

GET /v1/products/{id}#

Fetch one product

Scope: inventory.read

With its stock in each warehouse. Readable with a test key too: these are your real warehouses, products and stock, and reading changes nothing.

Parameters

FieldType
id string · pathrequired

Errors

Status
401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

curl -X GET "https://api.wepaak.com/v1/products/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/products/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/products/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/products/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/products/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "sku": "string",
  "name": "string",
  "description": "string",
  "barcode": "string",
  "category": "string",
  "status": "string",
  "weight_kg": 1,
  "dimensions_cm": {
    "length": 1,
    "width": 1,
    "height": 1
  },
  "declared_value": 1,
  "sat_code": "string",
  "manages_expiry": false,
  "low_stock_threshold": 1,
  "stock": {
    "on_hand": 1,
    "committed": 1,
    "available": 1,
    "incoming": 1
  },
  "warehouses": [
    {
      "warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "warehouse_name": "string",
      "warehouse_operated_by": "self",
      "on_hand": 1,
      "committed": 1,
      "available": 1,
      "incoming": 1
    }
  ],
  "created_at": "2026-09-08T12:00:00.000Z",
  "updated_at": "2026-09-08T12:00:00.000Z"
}

PATCH /v1/products/{id}#

Edit a product

Scope: inventory.write

Send only what changes. Once Wepaak holds the product it measures it, so weight and dimensions can then only change in Wepaak (409 dimensions_locked). Your catalog is the same in both modes, so this needs a live key: a test key gets 403 live_key_required.

Parameters

FieldType
id string · pathrequired

Body

FieldType
sku string

Changing it does not change documents already created.

name string
description string
barcode string

EAN / UPC.

category string
status string
active paused discontinued
declared_value number
weight_kg number
dimensions_cm object
dimensions_cm.length number
dimensions_cm.width number
dimensions_cm.height number
sat_code string
manages_expiry boolean

It has a shelf life: receiving records lot and expiry, and stock leaves soonest-expiry first.

low_stock_threshold integer

Drives GET /v1/inventory?low_stock=true.

Errors

Status
400

invalid_request: the body is not valid JSON.

401

No key was sent, or it is not valid.

403

live_key_required, or insufficient_scope.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

409

sku_taken, sku_unavailable or dimensions_locked.

415

invalid_request: the body was sent without Content-Type: application/json.

422

invalid_request, with field.

curl -X PATCH "https://api.wepaak.com/v1/products/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33" \
  -H "Authorization: Bearer wpk_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "sku": "string",
    "name": "string",
    "description": "string",
    "barcode": "string",
    "category": "string",
    "status": "active",
    "declared_value": 1,
    "weight_kg": 1,
    "dimensions_cm": {
      "length": 1,
      "width": 1,
      "height": 1
    },
    "sat_code": "string",
    "manages_expiry": false,
    "low_stock_threshold": 1
  }'
const res = await fetch("https://api.wepaak.com/v1/products/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33", {
  method: "PATCH",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "sku": "string",
    "name": "string",
    "description": "string",
    "barcode": "string",
    "category": "string",
    "status": "active",
    "declared_value": 1,
    "weight_kg": 1,
    "dimensions_cm": {
      "length": 1,
      "width": 1,
      "height": 1
    },
    "sat_code": "string",
    "manages_expiry": false,
    "low_stock_threshold": 1
  }),
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/products/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "sku" => "string",
    "name" => "string",
    "description" => "string",
    "barcode" => "string",
    "category" => "string",
    "status" => "active",
    "declared_value" => 1,
    "weight_kg" => 1,
    "dimensions_cm" => [
        "length" => 1,
        "width" => 1,
        "height" => 1
    ],
    "sat_code" => "string",
    "manages_expiry" => false,
    "low_stock_threshold" => 1
]));
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.patch(
    "https://api.wepaak.com/v1/products/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
    json={
        "sku": "string",
        "name": "string",
        "description": "string",
        "barcode": "string",
        "category": "string",
        "status": "active",
        "declared_value": 1,
        "weight_kg": 1,
        "dimensions_cm": {
            "length": 1,
            "width": 1,
            "height": 1
        },
        "sat_code": "string",
        "manages_expiry": False,
        "low_stock_threshold": 1
    },
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/products/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33")
req = Net::HTTP::Patch.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
req["Content-Type"] = "application/json"
req.body = "{\n  \"sku\": \"string\",\n  \"name\": \"string\",\n  \"description\": \"string\",\n  \"barcode\": \"string\",\n  \"category\": \"string\",\n  \"status\": \"active\",\n  \"declared_value\": 1,\n  \"weight_kg\": 1,\n  \"dimensions_cm\": {\n    \"length\": 1,\n    \"width\": 1,\n    \"height\": 1\n  },\n  \"sat_code\": \"string\",\n  \"manages_expiry\": false,\n  \"low_stock_threshold\": 1\n}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "sku": "string",
  "name": "string",
  "description": "string",
  "barcode": "string",
  "category": "string",
  "status": "string",
  "weight_kg": 1,
  "dimensions_cm": {
    "length": 1,
    "width": 1,
    "height": 1
  },
  "declared_value": 1,
  "sat_code": "string",
  "manages_expiry": false,
  "low_stock_threshold": 1,
  "stock": {
    "on_hand": 1,
    "committed": 1,
    "available": 1,
    "incoming": 1
  },
  "warehouses": [
    {
      "warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "warehouse_name": "string",
      "warehouse_operated_by": "self",
      "on_hand": 1,
      "committed": 1,
      "available": 1,
      "incoming": 1
    }
  ],
  "created_at": "2026-09-08T12:00:00.000Z",
  "updated_at": "2026-09-08T12:00:00.000Z"
}

GET /v1/products/{id}/movements#

Stock history of a product

Scope: inventory.read

The stock ledger for one product, newest first: receipts, dispatches, transfers, returns, corrections. Readable with a test key too: these are your real warehouses, products and stock, and reading changes nothing.

Parameters

FieldType
id string · pathrequired
warehouse_id string · query

Only this warehouse.

limit integer · query
offset integer · query

Errors

Status
400

A filter was not understood. field names it. A limit above 100 is refused rather than quietly reduced.

401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

curl -X GET "https://api.wepaak.com/v1/products/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/movements" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/products/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/movements", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/products/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/movements");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/products/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/movements",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/products/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/movements")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "data": [
    {
      "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "type": "stock_in",
      "quantity": 1,
      "warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "warehouse_name": "string",
      "reason": "string",
      "document": {
        "type": "inbound",
        "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33"
      },
      "created_at": "2026-09-08T12:00:00.000Z"
    }
  ],
  "has_more": false,
  "total": 1,
  "limit": 1,
  "offset": 1
}

Inbounds

Stock you send into a warehouse.

GET /v1/inbounds#

List inbounds

Scope: inbounds.read

Newest first. Only documents from this key's mode are listed: a test key sees what it created in test mode.

Parameters

FieldType
status string · query
scheduled in_transit pending_validation validated with_discrepancy cancelled
warehouse_id string · query

Destination warehouse.

external_id string · query

Your own reference.

limit integer · query
offset integer · query

Errors

Status
400

A filter was not understood. field names it. A limit above 100 is refused rather than quietly reduced.

401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

curl -X GET "https://api.wepaak.com/v1/inbounds" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/inbounds", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/inbounds");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/inbounds",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/inbounds")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "data": [
    {
      "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "mode": "test",
      "number": "ASN-2026-00012",
      "external_id": "string",
      "status": "scheduled",
      "destination_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "destination_warehouse_name": "string",
      "logistics_method": "wepaak_carrier",
      "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "tracking_number": "string",
      "scheduled_date": "2026-09-08T12:00:00.000Z",
      "items": [
        {
          "sku": "string",
          "name": "string",
          "quantity": 1,
          "received": 1,
          "received_good": 1,
          "received_damaged": 1,
          "lot_code": "string",
          "expiry_date": "string"
        }
      ],
      "validated_at": "2026-09-08T12:00:00.000Z",
      "validation_comments": "string",
      "notes": "string",
      "created_at": "2026-09-08T12:00:00.000Z",
      "updated_at": "2026-09-08T12:00:00.000Z"
    }
  ],
  "has_more": false,
  "total": 1,
  "limit": 1,
  "offset": 1
}

POST /v1/inbounds#

Create an inbound

Scope: inbounds.write

Announce goods you are sending into a warehouse. The pieces show as incoming at the destination until it is received. Every SKU must already be one of your products. Idempotent on external_id. With a test key the document is saved in test mode and no stock moves: no incoming, no reservation, nothing received, nothing billed.

Body

FieldType
destination_warehouse_id string (uuid)required

From GET /v1/warehouses.

items object[]required
scheduled_date string (date)

When it should arrive, as YYYY-MM-DD.

logistics_method string

wepaak_carrier: it travels on a Wepaak shipment (link it with shipment_id, now or later).

own_means wepaak_carrier
shipment_id string (uuid)

A shipment of yours that carries it.

tracking_number string
notes string
external_id string

Your own reference, unique in your account and mode. Sending one already used returns that document with 200 instead of creating another.

Errors

Status
400

invalid_request: the body is not valid JSON.

401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

415

invalid_request: the body was sent without Content-Type: application/json.

422

invalid_request (a field, named in field), unknown_warehouse, unknown_sku (field is items[n].sku) or unknown_shipment.

curl -X POST "https://api.wepaak.com/v1/inbounds" \
  -H "Authorization: Bearer wpk_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "destination_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "items": [
      {
        "sku": "string",
        "quantity": 1
      }
    ]
  }'
const res = await fetch("https://api.wepaak.com/v1/inbounds", {
  method: "POST",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "destination_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "items": [
      {
        "sku": "string",
        "quantity": 1
      }
    ]
  }),
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/inbounds");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "destination_warehouse_id" => "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "items" => [
        [
            "sku" => "string",
            "quantity" => 1
        ]
    ]
]));
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
    "https://api.wepaak.com/v1/inbounds",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
    json={
        "destination_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
        "items": [
            {
                "sku": "string",
                "quantity": 1
            }
        ]
    },
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/inbounds")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
req["Content-Type"] = "application/json"
req.body = "{\n  \"destination_warehouse_id\": \"9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33\",\n  \"items\": [\n    {\n      \"sku\": \"string\",\n      \"quantity\": 1\n    }\n  ]\n}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "mode": "test",
  "number": "ASN-2026-00012",
  "external_id": "string",
  "status": "scheduled",
  "destination_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "destination_warehouse_name": "string",
  "logistics_method": "wepaak_carrier",
  "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "tracking_number": "string",
  "scheduled_date": "2026-09-08T12:00:00.000Z",
  "items": [
    {
      "sku": "string",
      "name": "string",
      "quantity": 1,
      "received": 1,
      "received_good": 1,
      "received_damaged": 1,
      "lot_code": "string",
      "expiry_date": "string"
    }
  ],
  "validated_at": "2026-09-08T12:00:00.000Z",
  "validation_comments": "string",
  "notes": "string",
  "created_at": "2026-09-08T12:00:00.000Z",
  "updated_at": "2026-09-08T12:00:00.000Z"
}

GET /v1/inbounds/{id}#

Fetch one inbound

Scope: inbounds.read

An inbound of the other mode answers 404.

Parameters

FieldType
id string · pathrequired

Errors

Status
401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

curl -X GET "https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "mode": "test",
  "number": "ASN-2026-00012",
  "external_id": "string",
  "status": "scheduled",
  "destination_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "destination_warehouse_name": "string",
  "logistics_method": "wepaak_carrier",
  "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "tracking_number": "string",
  "scheduled_date": "2026-09-08T12:00:00.000Z",
  "items": [
    {
      "sku": "string",
      "name": "string",
      "quantity": 1,
      "received": 1,
      "received_good": 1,
      "received_damaged": 1,
      "lot_code": "string",
      "expiry_date": "string"
    }
  ],
  "validated_at": "2026-09-08T12:00:00.000Z",
  "validation_comments": "string",
  "notes": "string",
  "created_at": "2026-09-08T12:00:00.000Z",
  "updated_at": "2026-09-08T12:00:00.000Z"
}

PATCH /v1/inbounds/{id}#

Edit an inbound

Scope: inbounds.write

Send only what changes. items replaces every line and is accepted only while scheduled; the incoming stock follows it. Date, tracking, shipment and notes can change until it is received. status: in_transit tells us the goods are on their way.

Parameters

FieldType
id string · pathrequired

Body

FieldType
items object[]
scheduled_date string (date)
shipment_id string (uuid)
tracking_number string
notes string
status string
in_transit

Errors

Status
400

invalid_request: the body is not valid JSON.

401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

409

invalid_state: it is not in a status that allows this; the message says which it is in.

415

invalid_request: the body was sent without Content-Type: application/json.

422

invalid_request, unknown_sku or unknown_shipment.

curl -X PATCH "https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33" \
  -H "Authorization: Bearer wpk_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {
        "sku": "string",
        "quantity": 1
      }
    ],
    "scheduled_date": "string",
    "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "tracking_number": "string",
    "notes": "string",
    "status": "in_transit"
  }'
const res = await fetch("https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33", {
  method: "PATCH",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "items": [
      {
        "sku": "string",
        "quantity": 1
      }
    ],
    "scheduled_date": "string",
    "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "tracking_number": "string",
    "notes": "string",
    "status": "in_transit"
  }),
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "items" => [
        [
            "sku" => "string",
            "quantity" => 1
        ]
    ],
    "scheduled_date" => "string",
    "shipment_id" => "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "tracking_number" => "string",
    "notes" => "string",
    "status" => "in_transit"
]));
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.patch(
    "https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
    json={
        "items": [
            {
                "sku": "string",
                "quantity": 1
            }
        ],
        "scheduled_date": "string",
        "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
        "tracking_number": "string",
        "notes": "string",
        "status": "in_transit"
    },
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33")
req = Net::HTTP::Patch.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
req["Content-Type"] = "application/json"
req.body = "{\n  \"items\": [\n    {\n      \"sku\": \"string\",\n      \"quantity\": 1\n    }\n  ],\n  \"scheduled_date\": \"string\",\n  \"shipment_id\": \"9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33\",\n  \"tracking_number\": \"string\",\n  \"notes\": \"string\",\n  \"status\": \"in_transit\"\n}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "mode": "test",
  "number": "ASN-2026-00012",
  "external_id": "string",
  "status": "scheduled",
  "destination_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "destination_warehouse_name": "string",
  "logistics_method": "wepaak_carrier",
  "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "tracking_number": "string",
  "scheduled_date": "2026-09-08T12:00:00.000Z",
  "items": [
    {
      "sku": "string",
      "name": "string",
      "quantity": 1,
      "received": 1,
      "received_good": 1,
      "received_damaged": 1,
      "lot_code": "string",
      "expiry_date": "string"
    }
  ],
  "validated_at": "2026-09-08T12:00:00.000Z",
  "validation_comments": "string",
  "notes": "string",
  "created_at": "2026-09-08T12:00:00.000Z",
  "updated_at": "2026-09-08T12:00:00.000Z"
}

POST /v1/inbounds/{id}/cancel#

Cancel an inbound

Scope: inbounds.write

Before it is received. The incoming stock it announced is released. Idempotent: cancelling one already cancelled returns it again with 200.

Parameters

FieldType
id string · pathrequired

Errors

Status
401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

409

invalid_state: it is not in a status that allows this; the message says which it is in.

curl -X POST "https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel", {
  method: "POST",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
    "https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "mode": "test",
  "number": "ASN-2026-00012",
  "external_id": "string",
  "status": "scheduled",
  "destination_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "destination_warehouse_name": "string",
  "logistics_method": "wepaak_carrier",
  "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "tracking_number": "string",
  "scheduled_date": "2026-09-08T12:00:00.000Z",
  "items": [
    {
      "sku": "string",
      "name": "string",
      "quantity": 1,
      "received": 1,
      "received_good": 1,
      "received_damaged": 1,
      "lot_code": "string",
      "expiry_date": "string"
    }
  ],
  "validated_at": "2026-09-08T12:00:00.000Z",
  "validation_comments": "string",
  "notes": "string",
  "created_at": "2026-09-08T12:00:00.000Z",
  "updated_at": "2026-09-08T12:00:00.000Z"
}

POST /v1/inbounds/{id}/receive#

Receive an inbound in your own warehouse

Scope: inbounds.write

Count what arrived, per SKU: good pieces enter stock, damaged ones are recorded and not stocked. A line you leave out arrived as 0. When a line differs from what was expected, the inbound ends as with_discrepancy.

Damaged pieces count as arrived. A line of 2 received as 1 good + 1 damaged matches what was expected, so the inbound is validated, with the damaged piece recorded on the line and kept out of stock. with_discrepancy means a different NUMBER of pieces arrived (good + damaged is not what was expected).

Only for your own warehouses: at a Wepaak warehouse Wepaak counts the goods, and this answers 403 wepaak_only. With a test key nothing enters stock; for a test inbound into a Wepaak warehouse use simulate.

Parameters

FieldType
id string · pathrequired

Body

FieldType
items object[]required

Errors

Status
400

invalid_request: the body is not valid JSON.

401

No key was sent, or it is not valid.

403

wepaak_only: the warehouse is Wepaak's; or insufficient_scope.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

409

already_received, or invalid_state (cancelled).

415

invalid_request: the body was sent without Content-Type: application/json.

422

invalid_request (for example more pieces than expected) or item_not_in_inbound.

curl -X POST "https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/receive" \
  -H "Authorization: Bearer wpk_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {
        "sku": "string",
        "good": 1
      }
    ]
  }'
const res = await fetch("https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/receive", {
  method: "POST",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "items": [
      {
        "sku": "string",
        "good": 1
      }
    ]
  }),
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/receive");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "items" => [
        [
            "sku" => "string",
            "good" => 1
        ]
    ]
]));
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
    "https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/receive",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
    json={
        "items": [
            {
                "sku": "string",
                "good": 1
            }
        ]
    },
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/receive")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
req["Content-Type"] = "application/json"
req.body = "{\n  \"items\": [\n    {\n      \"sku\": \"string\",\n      \"good\": 1\n    }\n  ]\n}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "mode": "test",
  "number": "ASN-2026-00012",
  "external_id": "string",
  "status": "scheduled",
  "destination_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "destination_warehouse_name": "string",
  "logistics_method": "wepaak_carrier",
  "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "tracking_number": "string",
  "scheduled_date": "2026-09-08T12:00:00.000Z",
  "items": [
    {
      "sku": "string",
      "name": "string",
      "quantity": 1,
      "received": 1,
      "received_good": 1,
      "received_damaged": 1,
      "lot_code": "string",
      "expiry_date": "string"
    }
  ],
  "validated_at": "2026-09-08T12:00:00.000Z",
  "validation_comments": "string",
  "notes": "string",
  "created_at": "2026-09-08T12:00:00.000Z",
  "updated_at": "2026-09-08T12:00:00.000Z"
}

GET /v1/inbounds/{id}/packing-list#

Packing list (PDF)

Scope: inbounds.read

The sheet that goes inside the box, in Spanish for the people who open it. The same one the web prints.

Parameters

FieldType
id string · pathrequired

Errors

Status
401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

curl -X GET "https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/packing-list" \
  -H "Authorization: Bearer wpk_test_your_key_here" \
  -o packing-list.pdf
const res = await fetch("https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/packing-list", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
require("fs").writeFileSync("packing-list.pdf", Buffer.from(await res.arrayBuffer()));
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/packing-list");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
file_put_contents("packing-list.pdf", curl_exec($ch));
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/packing-list",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
response.raise_for_status()
open("packing-list.pdf", "wb").write(response.content)
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/packing-list")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
raise "HTTP #{res.code}" unless res.code == "200"
File.binwrite("packing-list.pdf", res.body)

POST /v1/inbounds/{id}/simulate#

Simulate the warehouse (test mode)

Scope: inbounds.write

Test keys only. Moves a test inbound as if its goods travelled and arrived:

  • in_transit: on its way (from scheduled);
  • validated: every line arrived in full and good;
  • with_discrepancy: the first line arrived one piece short.

Nothing moves in stock.

Parameters

FieldType
id string · pathrequired

Body

FieldType
status stringrequired
in_transit validated with_discrepancy

Errors

Status
400

invalid_request: the body is not valid JSON.

401

No key was sent, or it is not valid.

403

test_mode_only with a live key, or insufficient_scope.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

409

invalid_state: it is not in a status that allows this; the message says which it is in.

415

invalid_request: the body was sent without Content-Type: application/json.

422

invalid_request: an unknown status.

curl -X POST "https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/simulate" \
  -H "Authorization: Bearer wpk_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "in_transit"
  }'
const res = await fetch("https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/simulate", {
  method: "POST",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "status": "in_transit"
  }),
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/simulate");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "status" => "in_transit"
]));
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
    "https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/simulate",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
    json={
        "status": "in_transit"
    },
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/inbounds/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/simulate")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
req["Content-Type"] = "application/json"
req.body = "{\n  \"status\": \"in_transit\"\n}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "mode": "test",
  "number": "ASN-2026-00012",
  "external_id": "string",
  "status": "scheduled",
  "destination_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "destination_warehouse_name": "string",
  "logistics_method": "wepaak_carrier",
  "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "tracking_number": "string",
  "scheduled_date": "2026-09-08T12:00:00.000Z",
  "items": [
    {
      "sku": "string",
      "name": "string",
      "quantity": 1,
      "received": 1,
      "received_good": 1,
      "received_damaged": 1,
      "lot_code": "string",
      "expiry_date": "string"
    }
  ],
  "validated_at": "2026-09-08T12:00:00.000Z",
  "validation_comments": "string",
  "notes": "string",
  "created_at": "2026-09-08T12:00:00.000Z",
  "updated_at": "2026-09-08T12:00:00.000Z"
}

Transfers

Stock moved between your warehouses.

GET /v1/transfers#

List transfers

Scope: transfers.read

Newest first. Only documents from this key's mode are listed: a test key sees what it created in test mode.

Parameters

FieldType
status string · query
requested approved in_transit sent received with_discrepancy cancelled
warehouse_id string · query

Origin or destination.

external_id string · query

Your own reference.

limit integer · query
offset integer · query

Errors

Status
400

A filter was not understood. field names it. A limit above 100 is refused rather than quietly reduced.

401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

curl -X GET "https://api.wepaak.com/v1/transfers" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/transfers", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/transfers");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/transfers",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/transfers")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "data": [
    {
      "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "mode": "test",
      "number": "TRF-2026-00007",
      "external_id": "string",
      "status": "requested",
      "origin_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "origin_warehouse_name": "string",
      "destination_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "destination_warehouse_name": "string",
      "requires_approval": false,
      "logistics_method": "string",
      "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "tracking_number": "string",
      "items": [
        {
          "sku": "string",
          "name": "string",
          "quantity": 1,
          "received_quantity": 1
        }
      ],
      "approved_at": "2026-09-08T12:00:00.000Z",
      "shipped_at": "2026-09-08T12:00:00.000Z",
      "received_at": "2026-09-08T12:00:00.000Z",
      "notes": "string",
      "created_at": "2026-09-08T12:00:00.000Z",
      "updated_at": "2026-09-08T12:00:00.000Z"
    }
  ],
  "has_more": false,
  "total": 1,
  "limit": 1,
  "offset": 1
}

POST /v1/transfers#

Create a transfer

Scope: transfers.write

Move stock between two of your warehouses. Refused when the origin does not have the pieces available (on hand minus what is already reserved). From then on they are reserved at the origin and incoming at the destination.

  • Between your own warehouses, or out of a Wepaak warehouse: it starts in_transit.
  • From your own warehouse into a Wepaak warehouse: it starts requested and waits for Wepaak's approval.

Idempotent on external_id. With a test key the document is saved in test mode and no stock moves: no incoming, no reservation, nothing received, nothing billed.

Body

FieldType
origin_warehouse_id string (uuid)required
destination_warehouse_id string (uuid)required
items object[]required
logistics_method string
own_means wepaak_carrier
shipment_id string (uuid)

A shipment of yours that carries it.

tracking_number string
notes string
external_id string

Your own reference, unique in your account and mode. Sending one already used returns that document with 200 instead of creating another.

Errors

Status
400

invalid_request: the body is not valid JSON.

401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

415

invalid_request: the body was sent without Content-Type: application/json.

422

invalid_request (also when origin and destination are the same), unknown_warehouse, unknown_sku, unknown_shipment, or insufficient_stock (field is items[n].quantity).

curl -X POST "https://api.wepaak.com/v1/transfers" \
  -H "Authorization: Bearer wpk_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "origin_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "destination_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "items": [
      {
        "sku": "string",
        "quantity": 1
      }
    ]
  }'
const res = await fetch("https://api.wepaak.com/v1/transfers", {
  method: "POST",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "origin_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "destination_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "items": [
      {
        "sku": "string",
        "quantity": 1
      }
    ]
  }),
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/transfers");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "origin_warehouse_id" => "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "destination_warehouse_id" => "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "items" => [
        [
            "sku" => "string",
            "quantity" => 1
        ]
    ]
]));
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
    "https://api.wepaak.com/v1/transfers",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
    json={
        "origin_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
        "destination_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
        "items": [
            {
                "sku": "string",
                "quantity": 1
            }
        ]
    },
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/transfers")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
req["Content-Type"] = "application/json"
req.body = "{\n  \"origin_warehouse_id\": \"9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33\",\n  \"destination_warehouse_id\": \"9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33\",\n  \"items\": [\n    {\n      \"sku\": \"string\",\n      \"quantity\": 1\n    }\n  ]\n}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "mode": "test",
  "number": "TRF-2026-00007",
  "external_id": "string",
  "status": "requested",
  "origin_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "origin_warehouse_name": "string",
  "destination_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "destination_warehouse_name": "string",
  "requires_approval": false,
  "logistics_method": "string",
  "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "tracking_number": "string",
  "items": [
    {
      "sku": "string",
      "name": "string",
      "quantity": 1,
      "received_quantity": 1
    }
  ],
  "approved_at": "2026-09-08T12:00:00.000Z",
  "shipped_at": "2026-09-08T12:00:00.000Z",
  "received_at": "2026-09-08T12:00:00.000Z",
  "notes": "string",
  "created_at": "2026-09-08T12:00:00.000Z",
  "updated_at": "2026-09-08T12:00:00.000Z"
}

GET /v1/transfers/{id}#

Fetch one transfer

Scope: transfers.read

A transfer of the other mode answers 404.

Parameters

FieldType
id string · pathrequired

Errors

Status
401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

curl -X GET "https://api.wepaak.com/v1/transfers/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/transfers/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/transfers/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/transfers/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/transfers/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "mode": "test",
  "number": "TRF-2026-00007",
  "external_id": "string",
  "status": "requested",
  "origin_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "origin_warehouse_name": "string",
  "destination_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "destination_warehouse_name": "string",
  "requires_approval": false,
  "logistics_method": "string",
  "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "tracking_number": "string",
  "items": [
    {
      "sku": "string",
      "name": "string",
      "quantity": 1,
      "received_quantity": 1
    }
  ],
  "approved_at": "2026-09-08T12:00:00.000Z",
  "shipped_at": "2026-09-08T12:00:00.000Z",
  "received_at": "2026-09-08T12:00:00.000Z",
  "notes": "string",
  "created_at": "2026-09-08T12:00:00.000Z",
  "updated_at": "2026-09-08T12:00:00.000Z"
}

PATCH /v1/transfers/{id}#

Edit a transfer

Scope: transfers.write

The shipment carrying it, its tracking number, notes. Warehouses and lines cannot change: cancel it and create another.

Parameters

FieldType
id string · pathrequired

Body

FieldType
shipment_id string (uuid)
tracking_number string
notes string

Errors

Status
400

invalid_request: the body is not valid JSON.

401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

409

invalid_state: it is not in a status that allows this; the message says which it is in.

415

invalid_request: the body was sent without Content-Type: application/json.

422

invalid_request or unknown_shipment.

curl -X PATCH "https://api.wepaak.com/v1/transfers/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33" \
  -H "Authorization: Bearer wpk_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "tracking_number": "string",
    "notes": "string"
  }'
const res = await fetch("https://api.wepaak.com/v1/transfers/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33", {
  method: "PATCH",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "tracking_number": "string",
    "notes": "string"
  }),
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/transfers/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "shipment_id" => "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "tracking_number" => "string",
    "notes" => "string"
]));
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.patch(
    "https://api.wepaak.com/v1/transfers/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
    json={
        "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
        "tracking_number": "string",
        "notes": "string"
    },
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/transfers/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33")
req = Net::HTTP::Patch.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
req["Content-Type"] = "application/json"
req.body = "{\n  \"shipment_id\": \"9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33\",\n  \"tracking_number\": \"string\",\n  \"notes\": \"string\"\n}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "mode": "test",
  "number": "TRF-2026-00007",
  "external_id": "string",
  "status": "requested",
  "origin_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "origin_warehouse_name": "string",
  "destination_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "destination_warehouse_name": "string",
  "requires_approval": false,
  "logistics_method": "string",
  "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "tracking_number": "string",
  "items": [
    {
      "sku": "string",
      "name": "string",
      "quantity": 1,
      "received_quantity": 1
    }
  ],
  "approved_at": "2026-09-08T12:00:00.000Z",
  "shipped_at": "2026-09-08T12:00:00.000Z",
  "received_at": "2026-09-08T12:00:00.000Z",
  "notes": "string",
  "created_at": "2026-09-08T12:00:00.000Z",
  "updated_at": "2026-09-08T12:00:00.000Z"
}

POST /v1/transfers/{id}/cancel#

Cancel a transfer

Scope: transfers.write

Before it ships. The reservation at the origin and the incoming stock at the destination are released. Idempotent.

Parameters

FieldType
id string · pathrequired

Errors

Status
401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

409

invalid_state: it is not in a status that allows this; the message says which it is in.

curl -X POST "https://api.wepaak.com/v1/transfers/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/transfers/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel", {
  method: "POST",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/transfers/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
    "https://api.wepaak.com/v1/transfers/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/transfers/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "mode": "test",
  "number": "TRF-2026-00007",
  "external_id": "string",
  "status": "requested",
  "origin_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "origin_warehouse_name": "string",
  "destination_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "destination_warehouse_name": "string",
  "requires_approval": false,
  "logistics_method": "string",
  "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "tracking_number": "string",
  "items": [
    {
      "sku": "string",
      "name": "string",
      "quantity": 1,
      "received_quantity": 1
    }
  ],
  "approved_at": "2026-09-08T12:00:00.000Z",
  "shipped_at": "2026-09-08T12:00:00.000Z",
  "received_at": "2026-09-08T12:00:00.000Z",
  "notes": "string",
  "created_at": "2026-09-08T12:00:00.000Z",
  "updated_at": "2026-09-08T12:00:00.000Z"
}

POST /v1/transfers/{id}/receive#

Receive a transfer in your own warehouse

Scope: transfers.write

How many pieces of each SKU arrived; a line you leave out arrived as 0. They enter stock at the destination, and the origin gives up what it sent. When a line differs from what was sent, it ends with_discrepancy.

Only into your own warehouses: Wepaak receives at its own (403 wepaak_only). A transfer leaving a Wepaak warehouse can be received once Wepaak has shipped it (shipped_at is set).

Parameters

FieldType
id string · pathrequired

Body

FieldType
items object[]required

Errors

Status
400

invalid_request: the body is not valid JSON.

401

No key was sent, or it is not valid.

403

wepaak_only: the destination is a Wepaak warehouse; or insufficient_scope.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

409

already_received, or invalid_state (waiting for approval, or not shipped by Wepaak yet).

415

invalid_request: the body was sent without Content-Type: application/json.

422

invalid_request (for example more pieces than were sent) or item_not_in_transfer.

curl -X POST "https://api.wepaak.com/v1/transfers/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/receive" \
  -H "Authorization: Bearer wpk_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {
        "sku": "string",
        "received": 1
      }
    ]
  }'
const res = await fetch("https://api.wepaak.com/v1/transfers/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/receive", {
  method: "POST",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "items": [
      {
        "sku": "string",
        "received": 1
      }
    ]
  }),
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/transfers/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/receive");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "items" => [
        [
            "sku" => "string",
            "received" => 1
        ]
    ]
]));
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
    "https://api.wepaak.com/v1/transfers/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/receive",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
    json={
        "items": [
            {
                "sku": "string",
                "received": 1
            }
        ]
    },
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/transfers/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/receive")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
req["Content-Type"] = "application/json"
req.body = "{\n  \"items\": [\n    {\n      \"sku\": \"string\",\n      \"received\": 1\n    }\n  ]\n}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "mode": "test",
  "number": "TRF-2026-00007",
  "external_id": "string",
  "status": "requested",
  "origin_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "origin_warehouse_name": "string",
  "destination_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "destination_warehouse_name": "string",
  "requires_approval": false,
  "logistics_method": "string",
  "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "tracking_number": "string",
  "items": [
    {
      "sku": "string",
      "name": "string",
      "quantity": 1,
      "received_quantity": 1
    }
  ],
  "approved_at": "2026-09-08T12:00:00.000Z",
  "shipped_at": "2026-09-08T12:00:00.000Z",
  "received_at": "2026-09-08T12:00:00.000Z",
  "notes": "string",
  "created_at": "2026-09-08T12:00:00.000Z",
  "updated_at": "2026-09-08T12:00:00.000Z"
}

POST /v1/transfers/{id}/simulate#

Simulate Wepaak and the warehouses (test mode)

Scope: transfers.write

Test keys only. Moves a test transfer:

  • approved: Wepaak approves a transfer into its warehouse (from requested);
  • shipped: it leaves the origin (sent, with shipped_at set);
  • received: every line arrived in full;
  • with_discrepancy: the first line arrived one piece short.

Nothing moves in stock.

Parameters

FieldType
id string · pathrequired

Body

FieldType
status stringrequired
approved shipped received with_discrepancy

Errors

Status
400

invalid_request: the body is not valid JSON.

401

No key was sent, or it is not valid.

403

test_mode_only with a live key, or insufficient_scope.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

409

invalid_state: it is not in a status that allows this; the message says which it is in.

415

invalid_request: the body was sent without Content-Type: application/json.

422

invalid_request: an unknown status.

curl -X POST "https://api.wepaak.com/v1/transfers/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/simulate" \
  -H "Authorization: Bearer wpk_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "approved"
  }'
const res = await fetch("https://api.wepaak.com/v1/transfers/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/simulate", {
  method: "POST",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "status": "approved"
  }),
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/transfers/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/simulate");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "status" => "approved"
]));
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
    "https://api.wepaak.com/v1/transfers/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/simulate",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
    json={
        "status": "approved"
    },
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/transfers/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/simulate")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
req["Content-Type"] = "application/json"
req.body = "{\n  \"status\": \"approved\"\n}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "mode": "test",
  "number": "TRF-2026-00007",
  "external_id": "string",
  "status": "requested",
  "origin_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "origin_warehouse_name": "string",
  "destination_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "destination_warehouse_name": "string",
  "requires_approval": false,
  "logistics_method": "string",
  "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "tracking_number": "string",
  "items": [
    {
      "sku": "string",
      "name": "string",
      "quantity": 1,
      "received_quantity": 1
    }
  ],
  "approved_at": "2026-09-08T12:00:00.000Z",
  "shipped_at": "2026-09-08T12:00:00.000Z",
  "received_at": "2026-09-08T12:00:00.000Z",
  "notes": "string",
  "created_at": "2026-09-08T12:00:00.000Z",
  "updated_at": "2026-09-08T12:00:00.000Z"
}

Returns

Goods coming back, including the automatic ones.

GET /v1/returns#

List returns

Scope: returns.read

Newest first, including the returns created automatically (COD rejected, cancelled after pickup). Only documents from this key's mode are listed: a test key sees what it created in test mode.

Parameters

FieldType
type string · query
cod_rejection cancellation post_delivery
status string · query
requested label_generated in_transit received pending_approval graded restocked written_off cancelled
order_id string · query

Returns of this order.

warehouse_id string · query

Destination warehouse.

external_id string · query

Your own reference.

limit integer · query
offset integer · query

Errors

Status
400

A filter was not understood. field names it. A limit above 100 is refused rather than quietly reduced.

401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

curl -X GET "https://api.wepaak.com/v1/returns" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/returns", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/returns");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/returns",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/returns")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "data": [
    {
      "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "mode": "test",
      "number": "RET-2026-00031",
      "external_id": "string",
      "type": "cod_rejection",
      "status": "requested",
      "order_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "destination_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "destination_warehouse_name": "string",
      "logistics_method": "string",
      "return_shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "return_tracking_number": "string",
      "reason": "string",
      "items": [
        {
          "sku": "string",
          "name": "string",
          "quantity": 1,
          "good": 1,
          "damaged": 1,
          "missing": 1,
          "restocked": 1,
          "written_off": 1,
          "grade": "A",
          "note": "string"
        }
      ],
      "received_at": "2026-09-08T12:00:00.000Z",
      "graded_at": "2026-09-08T12:00:00.000Z",
      "notes": "string",
      "created_at": "2026-09-08T12:00:00.000Z",
      "updated_at": "2026-09-08T12:00:00.000Z"
    }
  ],
  "has_more": false,
  "total": 1,
  "limit": 1,
  "offset": 1
}

POST /v1/returns#

Open a return after delivery

Scope: returns.write

For goods a customer sends back after delivery. Name the order (order_id) or the shipment that delivered it (shipment_id, the id POST /v1/shipments answered with): every line must be on that order.

How many: the cap is per order, not per return. Every return of the order that is not cancelled counts, automatic ones too, so two returns of 1 on a 2-unit order leave no room for a third (quantity_exceeds_order).

When: the order must have shipped (order_not_shipped otherwise). Delivery is not required: tracking can lag behind the customer.

The pieces show as incoming at the warehouse until it arrives, which defaults to the warehouse the order shipped from.

Returns for refused cash-on-delivery parcels and for shipments cancelled after pickup are created automatically; you do not open those.

Idempotent on external_id. With a test key the document is saved in test mode and no stock moves: no incoming, no reservation, nothing received, nothing billed. A test key can only return a test order.

Body

FieldType
order_id string (uuid)

The order. Send this or shipment_id.

shipment_id string (uuid)

The shipment that delivered it. Send this or order_id.

items object[]required
reason string
destination_warehouse_id string (uuid)

Where it goes back to. Defaults to the warehouse the order shipped from.

return_tracking_number string

The tracking number of the parcel coming back, if it has one.

external_id string

Your own reference, unique in your account and mode. Sending one already used returns that document with 200 instead of creating another.

Errors

Status
400

invalid_request: the body is not valid JSON.

401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

415

invalid_request: the body was sent without Content-Type: application/json.

422

invalid_request, unknown_order, order_not_shipped, unknown_warehouse, unknown_sku, item_not_in_order or quantity_exceeds_order (field names the line).

curl -X POST "https://api.wepaak.com/v1/returns" \
  -H "Authorization: Bearer wpk_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {
        "sku": "string",
        "quantity": 1
      }
    ]
  }'
const res = await fetch("https://api.wepaak.com/v1/returns", {
  method: "POST",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "items": [
      {
        "sku": "string",
        "quantity": 1
      }
    ]
  }),
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/returns");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "items" => [
        [
            "sku" => "string",
            "quantity" => 1
        ]
    ]
]));
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
    "https://api.wepaak.com/v1/returns",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
    json={
        "items": [
            {
                "sku": "string",
                "quantity": 1
            }
        ]
    },
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/returns")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
req["Content-Type"] = "application/json"
req.body = "{\n  \"items\": [\n    {\n      \"sku\": \"string\",\n      \"quantity\": 1\n    }\n  ]\n}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "mode": "test",
  "number": "RET-2026-00031",
  "external_id": "string",
  "type": "cod_rejection",
  "status": "requested",
  "order_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "destination_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "destination_warehouse_name": "string",
  "logistics_method": "string",
  "return_shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "return_tracking_number": "string",
  "reason": "string",
  "items": [
    {
      "sku": "string",
      "name": "string",
      "quantity": 1,
      "good": 1,
      "damaged": 1,
      "missing": 1,
      "restocked": 1,
      "written_off": 1,
      "grade": "A",
      "note": "string"
    }
  ],
  "received_at": "2026-09-08T12:00:00.000Z",
  "graded_at": "2026-09-08T12:00:00.000Z",
  "notes": "string",
  "created_at": "2026-09-08T12:00:00.000Z",
  "updated_at": "2026-09-08T12:00:00.000Z"
}

GET /v1/returns/{id}#

Fetch one return

Scope: returns.read

A return of the other mode answers 404.

Parameters

FieldType
id string · pathrequired

Errors

Status
401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

curl -X GET "https://api.wepaak.com/v1/returns/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/returns/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/returns/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/returns/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/returns/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "mode": "test",
  "number": "RET-2026-00031",
  "external_id": "string",
  "type": "cod_rejection",
  "status": "requested",
  "order_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "destination_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "destination_warehouse_name": "string",
  "logistics_method": "string",
  "return_shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "return_tracking_number": "string",
  "reason": "string",
  "items": [
    {
      "sku": "string",
      "name": "string",
      "quantity": 1,
      "good": 1,
      "damaged": 1,
      "missing": 1,
      "restocked": 1,
      "written_off": 1,
      "grade": "A",
      "note": "string"
    }
  ],
  "received_at": "2026-09-08T12:00:00.000Z",
  "graded_at": "2026-09-08T12:00:00.000Z",
  "notes": "string",
  "created_at": "2026-09-08T12:00:00.000Z",
  "updated_at": "2026-09-08T12:00:00.000Z"
}

POST /v1/returns/{id}/decision#

Decide on damaged pieces

Scope: returns.write

For a return in pending_approval: put the damaged pieces back in stock (restock) or write them off (trash). The good pieces went back into stock when the return was checked. The return ends restocked, written_off, or graded when it is a mix.

Parameters

FieldType
id string · pathrequired

Body

FieldType
decision stringrequired
restock trash
reason string

Errors

Status
400

invalid_request: the body is not valid JSON.

401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

409

invalid_state: it is not waiting for a decision.

415

invalid_request: the body was sent without Content-Type: application/json.

422

invalid_request.

curl -X POST "https://api.wepaak.com/v1/returns/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/decision" \
  -H "Authorization: Bearer wpk_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "decision": "restock"
  }'
const res = await fetch("https://api.wepaak.com/v1/returns/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/decision", {
  method: "POST",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "decision": "restock"
  }),
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/returns/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/decision");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "decision" => "restock"
]));
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
    "https://api.wepaak.com/v1/returns/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/decision",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
    json={
        "decision": "restock"
    },
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/returns/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/decision")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
req["Content-Type"] = "application/json"
req.body = "{\n  \"decision\": \"restock\"\n}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "mode": "test",
  "number": "RET-2026-00031",
  "external_id": "string",
  "type": "cod_rejection",
  "status": "requested",
  "order_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "destination_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "destination_warehouse_name": "string",
  "logistics_method": "string",
  "return_shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "return_tracking_number": "string",
  "reason": "string",
  "items": [
    {
      "sku": "string",
      "name": "string",
      "quantity": 1,
      "good": 1,
      "damaged": 1,
      "missing": 1,
      "restocked": 1,
      "written_off": 1,
      "grade": "A",
      "note": "string"
    }
  ],
  "received_at": "2026-09-08T12:00:00.000Z",
  "graded_at": "2026-09-08T12:00:00.000Z",
  "notes": "string",
  "created_at": "2026-09-08T12:00:00.000Z",
  "updated_at": "2026-09-08T12:00:00.000Z"
}

POST /v1/returns/{id}/cancel#

Cancel a return

Scope: returns.write

Only a return you opened (post_delivery), before it arrives. Its incoming stock is released. Automatic returns are real parcels on their way back and cannot be cancelled. Idempotent.

Parameters

FieldType
id string · pathrequired

Errors

Status
401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

409

invalid_state: it is not in a status that allows this; the message says which it is in.

curl -X POST "https://api.wepaak.com/v1/returns/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/returns/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel", {
  method: "POST",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/returns/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
    "https://api.wepaak.com/v1/returns/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/returns/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/cancel")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "mode": "test",
  "number": "RET-2026-00031",
  "external_id": "string",
  "type": "cod_rejection",
  "status": "requested",
  "order_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "destination_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "destination_warehouse_name": "string",
  "logistics_method": "string",
  "return_shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "return_tracking_number": "string",
  "reason": "string",
  "items": [
    {
      "sku": "string",
      "name": "string",
      "quantity": 1,
      "good": 1,
      "damaged": 1,
      "missing": 1,
      "restocked": 1,
      "written_off": 1,
      "grade": "A",
      "note": "string"
    }
  ],
  "received_at": "2026-09-08T12:00:00.000Z",
  "graded_at": "2026-09-08T12:00:00.000Z",
  "notes": "string",
  "created_at": "2026-09-08T12:00:00.000Z",
  "updated_at": "2026-09-08T12:00:00.000Z"
}

POST /v1/returns/{id}/simulate#

Simulate the warehouse (test mode)

Scope: returns.write

Test keys only. Moves a test return as if it travelled and was checked:

  • in_transit: on its way back;
  • restocked: everything arrived good;
  • pending_approval: one piece of the first line arrived damaged and waits for your decision.

Nothing moves in stock.

Parameters

FieldType
id string · pathrequired

Body

FieldType
status stringrequired
in_transit restocked pending_approval

Errors

Status
400

invalid_request: the body is not valid JSON.

401

No key was sent, or it is not valid.

403

test_mode_only with a live key, or insufficient_scope.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

409

invalid_state: it is not in a status that allows this; the message says which it is in.

415

invalid_request: the body was sent without Content-Type: application/json.

422

invalid_request: an unknown status.

curl -X POST "https://api.wepaak.com/v1/returns/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/simulate" \
  -H "Authorization: Bearer wpk_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "in_transit"
  }'
const res = await fetch("https://api.wepaak.com/v1/returns/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/simulate", {
  method: "POST",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "status": "in_transit"
  }),
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/returns/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/simulate");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "status" => "in_transit"
]));
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
    "https://api.wepaak.com/v1/returns/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/simulate",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
    json={
        "status": "in_transit"
    },
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/returns/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/simulate")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
req["Content-Type"] = "application/json"
req.body = "{\n  \"status\": \"in_transit\"\n}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "mode": "test",
  "number": "RET-2026-00031",
  "external_id": "string",
  "type": "cod_rejection",
  "status": "requested",
  "order_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "destination_warehouse_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "destination_warehouse_name": "string",
  "logistics_method": "string",
  "return_shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "return_tracking_number": "string",
  "reason": "string",
  "items": [
    {
      "sku": "string",
      "name": "string",
      "quantity": 1,
      "good": 1,
      "damaged": 1,
      "missing": 1,
      "restocked": 1,
      "written_off": 1,
      "grade": "A",
      "note": "string"
    }
  ],
  "received_at": "2026-09-08T12:00:00.000Z",
  "graded_at": "2026-09-08T12:00:00.000Z",
  "notes": "string",
  "created_at": "2026-09-08T12:00:00.000Z",
  "updated_at": "2026-09-08T12:00:00.000Z"
}

Webhooks

Be told when something happens, instead of asking.

POST /v1/webhooks#

Register an endpoint

Scope: webhooks.manage

We POST to your URL when something happens. Idempotent on the URL: registering the same one twice returns the existing endpoint rather than delivering every event to you twice.

The signing secret is shown once, here. Verify it on every delivery: we send Wepaak-Signature: t=<unix>,v1=<hex>, where the hex is HMAC-SHA256 of "<t>.<raw body>" using that secret. Compare in constant time, and reject a timestamp too far from now.

Body

FieldType
url string (uri)required

Must be https:// and must resolve to a public address. Loopback, private (10/172.16/192.168), link-local and cloud-metadata addresses are refused, at registration and again on every delivery. Redirects are followed at most 3 hops and each hop is checked the same way.

events string[]

Leave empty to receive everything, except cod.* and wallet.low_balance, which come only when named. Naming an event needs the key to hold its read scope: order.* and shipment.* any of orders.read, shipments.read, tracking.read; pickup.* shipments.read; wallet.* wallet.read; inbound.* inbounds.read; transfer.* transfers.read; return.* returns.read; cod.* cod.read. Otherwise 403 insufficient_scope.

Errors

Status
400

invalid_request: the body is not valid JSON.

401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

415

invalid_request: the body was sent without Content-Type: application/json.

422

The URL is not https, or an event name is not one we send.

curl -X POST "https://api.wepaak.com/v1/webhooks" \
  -H "Authorization: Bearer wpk_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "events": [
      "order.dispatched"
    ]
  }'
const res = await fetch("https://api.wepaak.com/v1/webhooks", {
  method: "POST",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "url": "https://example.com",
    "events": [
      "order.dispatched"
    ]
  }),
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/webhooks");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "url" => "https://example.com",
    "events" => [
        "order.dispatched"
    ]
]));
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
    "https://api.wepaak.com/v1/webhooks",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
    json={
        "url": "https://example.com",
        "events": [
            "order.dispatched"
        ]
    },
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/webhooks")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
req["Content-Type"] = "application/json"
req.body = "{\n  \"url\": \"https://example.com\",\n  \"events\": [\n    \"order.dispatched\"\n  ]\n}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)

GET /v1/webhooks#

List your endpoints

Scope: webhooks.manage

Endpoints for this key's mode. Secrets are not included — they exist only in the response that created them.

Errors

Status
401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

curl -X GET "https://api.wepaak.com/v1/webhooks" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/webhooks", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/webhooks");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/webhooks",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/webhooks")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "data": [
    {
      "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "url": "string",
      "events": [
        "string"
      ],
      "mode": "test",
      "active": false,
      "secret": "whsec_…",
      "created_at": "2026-09-08T12:00:00.000Z"
    }
  ]
}

DELETE /v1/webhooks/{id}#

Remove an endpoint

Scope: webhooks.manage

Parameters

FieldType
id string · pathrequired

Errors

Status
401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

curl -X DELETE "https://api.wepaak.com/v1/webhooks/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/webhooks/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33", {
  method: "DELETE",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/webhooks/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE); // 204 = removed
curl_close($ch);
import requests
response = requests.delete(
    "https://api.wepaak.com/v1/webhooks/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
response.raise_for_status()  # 204, no body
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/webhooks/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33")
req = Net::HTTP::Delete.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
raise "HTTP #{res.code}" unless res.code == "204"

GET /v1/webhooks/{id}/deliveries#

Delivery log

Scope: webhooks.manage

What we sent, what you answered, and how many attempts it took. The first place to look when an endpoint is not receiving.

Parameters

FieldType
id string · pathrequired

Errors

Status
401

No key was sent, or it is not valid.

403

This key does not carry the scope this call requires.

404

No such resource for this key — including one that belongs to another account, or to the other mode.

curl -X GET "https://api.wepaak.com/v1/webhooks/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/deliveries" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/webhooks/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/deliveries", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/webhooks/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/deliveries");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/webhooks/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/deliveries",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/webhooks/9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33/deliveries")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "data": [
    {
      "id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
      "event": "order.dispatched",
      "status": "delivered",
      "attempts": 1,
      "response_status": 1,
      "error": "string",
      "delivered_at": "2026-09-08T12:00:00.000Z",
      "created_at": "2026-09-08T12:00:00.000Z"
    }
  ]
}

Account

Who this key belongs to.

GET /v1/ping#

Liveness check

Unauthenticated on purpose: it proves the connection itself works, separately from whether your key does.

No credential required

curl -X GET "https://api.wepaak.com/v1/ping"
const res = await fetch("https://api.wepaak.com/v1/ping", {
  method: "GET",
  headers: {
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/ping");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/ping",
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/ping")
req = Net::HTTP::Get.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "ok": true,
  "service": "wepaak-public-api",
  "version": "1.3.0"
}

GET /v1/openapi.json#

This document

The machine-readable contract, served by the same deployment that answers the calls — so it cannot describe a version that is not running. Import it into Postman or any client generator.

No credential required

curl -X GET "https://api.wepaak.com/v1/openapi.json"
const res = await fetch("https://api.wepaak.com/v1/openapi.json", {
  method: "GET",
  headers: {
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/openapi.json");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/openapi.json",
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/openapi.json")
req = Net::HTTP::Get.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)

GET /v1/docs#

This reference, as a page

The human-readable version of the same document.

No credential required

curl -X GET "https://api.wepaak.com/v1/docs"
const res = await fetch("https://api.wepaak.com/v1/docs", {
  method: "GET",
  headers: {
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/docs");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/docs",
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/docs")
req = Net::HTTP::Get.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)

POST /v1/connect/exchange#

Exchange a connect code for a key

For connectors — a plugin, an app, an integration installed by someone else's merchants — that need a key without asking the merchant to copy one.

Send the merchant to https://envios.wepaak.com/connect/authorize with your client, a redirect_uri, a random state, and a code_challenge (the base64url SHA-256 of a random verifier you keep). They sign in and approve; we send their browser back to your redirect_uri with a code. Your server then calls this endpoint with that code and the verifier, and receives the key.

Unauthenticated because the caller has no key yet — that is the point. The code is single-use, expires in ten minutes, and a wrong verifier consumes it rather than allowing another attempt, so a leaked redirect URL alone is worth nothing.

There is no client secret, deliberately: a connector distributed to strangers cannot keep one.

No credential required

Body

FieldType
code stringrequired
code_verifier stringrequired

The random string whose SHA-256 you sent as code_challenge.

Errors

Status
400

invalid_grant — the code is unknown, expired, already used, or the verifier did not match. Start the flow again.

415

invalid_request: the body was sent without Content-Type: application/json.

curl -X POST "https://api.wepaak.com/v1/connect/exchange" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "wpkc_…",
    "code_verifier": "string"
  }'
const res = await fetch("https://api.wepaak.com/v1/connect/exchange", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "code": "wpkc_…",
    "code_verifier": "string"
  }),
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/connect/exchange");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    "code" => "wpkc_…",
    "code_verifier" => "string"
]));
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.post(
    "https://api.wepaak.com/v1/connect/exchange",
    json={
        "code": "wpkc_…",
        "code_verifier": "string"
    },
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/connect/exchange")
req = Net::HTTP::Post.new(uri)
req["Content-Type"] = "application/json"
req.body = "{\n  \"code\": \"wpkc_…\",\n  \"code_verifier\": \"string\"\n}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 201
{
  "key": "wpk_live_…",
  "mode": "test",
  "scopes": [
    "string"
  ],
  "account_email": "string"
}

GET /v1/me#

Who this key is

The first call to make: confirms your key works, which mode it is in and what it may do — before you write any real integration code.

Errors

Status
401

No key was sent, or it is not valid.

curl -X GET "https://api.wepaak.com/v1/me" \
  -H "Authorization: Bearer wpk_test_your_key_here"
const res = await fetch("https://api.wepaak.com/v1/me", {
  method: "GET",
  headers: {
    "Authorization": "Bearer wpk_test_your_key_here",
  },
});
const data = await res.json();
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.wepaak.com/v1/me");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer wpk_test_your_key_here",
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
import requests
response = requests.get(
    "https://api.wepaak.com/v1/me",
    headers={"Authorization": "Bearer wpk_test_your_key_here"},
)
data = response.json()
require 'net/http'
require 'json'
uri = URI("https://api.wepaak.com/v1/me")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer wpk_test_your_key_here"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }
data = JSON.parse(res.body)
Response 200
{
  "mode": "test",
  "account_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
  "scopes": [
    "string"
  ]
}

Errors

Every failure has the same shape, so one handler covers all of them. code is stable forever once published — branch on it, never on message.

CodeStatusWhenRetry?
missing_api_key 401 No Authorization header, or not a bearer token. No — send the key.
invalid_api_key 401 The key is unknown, malformed, or has been revoked. No — issue a new key.
insufficient_scope 403 The key is valid but was not granted the scope this call needs. No — create a key with the scope.
not_found 404 No such resource for this key. Also returned for a resource that belongs to another account, or to the other mode — telling you it exists would itself be a leak. No.
invalid_request 400 The request could not be read — a body that is not valid JSON, a bad filter, a limit above 100. No — fix the request. `field` names the offender when there is one.
invalid_request 415 A body was sent without `Content-Type: application/json`. No — send JSON with that header.
invalid_request 422 The request parsed but the values cannot be accepted — a malformed postal code, a missing colonia. No — fix the value in `field`.
quote_expired 400 The `quote_id` is unknown or older than 30 minutes. Request a new quote, then ship that.
quote_mismatch 422 The quote was for another destination postal code, weight or box than the order ships. `field` names what differs. Quote again with the order's real destination and package, then ship that quote.
rate_not_applicable 422 A COD rate was used for a prepaid order, or the reverse. No — pick a rate whose `cod` matches the order.
order_cancelled 409 The order was cancelled and cannot ship. No.
order_not_shippable 409 The order is not in a state that can produce a label. After resolving what `issues` lists on the order.
order_not_shippable 422 Something concrete blocks the label: missing package dimensions, a stock shortfall. After fixing the cause.
insufficient_balance 402 The account balance does not cover this label. The message says how much to add. After topping up the wallet in Wepaak.
account_under_review 403 National shipments for this account are paused while Wepaak reviews it. No — contact Wepaak support.
account_not_verified 403 The account must be verified before shipping with this carrier. After completing verification in the Wepaak dashboard.
own_label_missing 422 The order ships on your own label (bought elsewhere) and no label PDF is matched to it yet. No label is bought for it. After uploading and matching the label in Wepaak (Orders > My own labels).
own_label_not_shippable 422 The order is set to ship on your own label, but it is cash on delivery or not shipped from a Wepaak warehouse, which an own label cannot do. After turning the own label off in Wepaak, or making the order prepaid.
own_label 409 A label download or a cancel for a parcel that shipped on your own label. Wepaak did not buy that label: it is the PDF you uploaded, and the carrier is yours. Never: use your own label, and cancel with your carrier.
order_in_warehouse 409 A cancel for an order the warehouse is already picking or packing: its stock may be off the shelf and its label bought. Never through the API. Contact Wepaak support.
label_in_progress 409 A cancel for an order whose label is being created at that moment (a POST /v1/shipments for it has not answered yet). Yes, a few seconds later. By then the order has shipped (cancel its shipment) or is cancellable again.
cod_requires_wepaak 422 A cash on delivery order is set to a carrier other than Wepaak, the only one that collects cash. Ship it with a Wepaak COD rate (quote_id + rate_id), or make the order prepaid.
carrier_no_coverage 422 The order ships from a Wepaak warehouse with the Wepaak courier, and the courier does not deliver to (or from) one of the route's postal codes. Nothing is picked or bought. Quote again (POST /v1/quotes) and ship with another carrier's quote_id + rate_id.
rate_unavailable 422 The carrier chosen for the order has no rate for this parcel and route right now. Quote again (POST /v1/quotes) and ship with quote_id + rate_id.
carrier_required 422 No courier is selected for this order. Happens when no automation rule assigned one, which is the normal case for a brand-new account. Send `quote_id` and `rate_id` from POST /v1/quotes, or set up an automation rule that assigns a courier.
warehouse_required 409 The order is not assigned to a warehouse, so nothing knows where it ships from. COD orders are not auto-routed, so send `warehouse_id` on POST /v1/orders for those. Checked AFTER the courier: a COD order with neither a warehouse nor a quoted rate answers `422 carrier_required` first. After assigning one.
order_already_dispatched 409 POST /v1/orders/{id}/cancel on an order that has already shipped. No — cancel its shipment with POST /v1/shipments/{id}/cancel.
shipment_not_cancellable 409 The carrier already has the parcel (collected, in transit, delivered), or the carrier service cannot be cancelled once the label exists. No.
shipment_finished 409 Test mode: simulating a step after `delivered`, `returned` or `cancelled`. No — ship a new test order.
carrier_unavailable 502 A carrier did not answer as needed. **502:** it did not confirm a cancellation; nothing was changed and nothing was refunded. **503** (next row): it could not be reached, for a cancellation, a label, or a quote that came back empty because of it. Yes — in a few minutes.
carrier_unavailable 503 A carrier could not be reached: a cancellation, a label, or a quote that came back with no rates because a carrier did not answer (not a coverage answer). Yes — in a minute or two.
test_mode_only 403 POST /v1/shipments/{id}/simulate with a live key. No — use a test key; a live shipment moves when its carrier moves it.
label_not_available 404 The carrier has not produced the label yet (it can take a few seconds after the shipment is created). Yes — in a minute.
shipment_cancelled 409 Asking for the label of a cancelled shipment. No — the label must not be used.
invalid_grant 400 On POST /v1/connect/exchange: the code is unknown, expired, already used, or the PKCE verifier did not match. No — start the connect flow again.
shipment_not_payable 422 POST /v1/cod/payouts: a shipment is not `available`, is already in a payout, or is unknown to this key. `error.details.shipments` lists each one with its status now (`not_found` for an unknown id). Nothing is created. No — leave those shipments out, or wait until they are `available`.
payout_fully_withheld 422 POST /v1/cod/payouts: the charges your account owes Wepaak take all of what these shipments collected, so nothing would be paid. `error.details` has `collected` and `owed`. After the charges are paid, or with more shipments.
payout_zero_amount 422 POST /v1/cod/payouts: the shipments add up to $0.00. No.
payout_conflict 409 POST /v1/cod/payouts: a shipment was taken by another payout while this one was being made. Nothing is created. Yes — after reading the shipments' status again.
payout_not_cancellable 409 POST /v1/cod/payouts/{id}/cancel on a payout that is no longer `requested` (Wepaak is already paying it, or it is paid, failed or cancelled), or that was not requested through the API (`error.details.reason` is `not_requested_through_api`). `error.details.status` says which status it has. No — contact Wepaak support.
wallet_negative 422 POST /v1/cod/payouts while your account's wallet is below zero: that is money your account owes Wepaak, so no payout is made until it is paid back. `error.details.wallet_balance` has the balance. Nothing is created. After topping the wallet up to zero or more.
idempotency_mismatch 409 POST /v1/cod/payouts with a `request_id` already used for a payout to another recipient (a different `recipient.clabe` or `recipient.name`). Nothing is created; the earlier payout is unchanged. No — use a new `request_id` for a new payout.
rate_limit_exceeded 429 More than 120 requests in a minute for this key. Yes — after `Retry-After` seconds.
internal_error 500 Something failed on our side. Usually yes. The ONE exception is called out in its own message: if a label was created but recording it failed, do NOT retry — contact support with the order id, because retrying would buy a second label.
unknown_warehouse 422 A warehouse id that is not one of yours. No — use an id from GET /v1/warehouses.
unknown_sku 422 A line names a SKU that is not one of your products. `field` is the line, as `items[2].sku`. No — create the product first, or fix the SKU.
unknown_order 422 A return names an order or shipment that is not yours, or is of the other mode. No.
unknown_shipment 422 A shipment id that is not one of yours. No.
item_not_in_order 422 A return line for a SKU the original order did not have. No.
quantity_exceeds_order 422 A return line for more pieces than the order had, counting its other returns that are not cancelled. No.
order_not_shipped 422 A return for an order that has not shipped. Once it ships.
item_not_in_inbound 422 Receiving a SKU the inbound does not have. No.
item_not_in_transfer 422 Receiving a SKU the transfer does not have. No.
live_key_required 403 Creating or editing a product with a test key: the catalog is real in both modes. Also editing one of your real pickup addresses with a test key. No — use a live key.
sku_taken 409 Changing a product's SKU to one another of your products has. No.
sku_unavailable 409 The SKU belongs to a product you removed, or one merged into another product. No — restore it in Wepaak, use the product it was merged into, or pick another SKU.
dimensions_locked 409 Changing the weight or dimensions of a product Wepaak holds: Wepaak measures it. No — they change in Wepaak.
insufficient_stock 422 Not enough available stock at the origin for a transfer. After stock arrives.
wepaak_only 403 Something Wepaak does at its own warehouses: receiving an inbound or approving a transfer there. No — Wepaak does it; you get the result.
already_received 409 Receiving an inbound a second time. No — it is done; read it.
invalid_state 409 An inbound, transfer or return not in a status that allows the call (for example cancelling one already received). The message says which status it is in. No.
Error shape
{
  "error": {
    "code": "insufficient_scope",
    "message": "This API key does not have the \"shipments.write\" scope required for this request.",
    "field": null,
    "doc_url": "https://api.wepaak.com/v1/docs#insufficient_scope"
  }
}

Webhooks

Register an endpoint and we POST to it when something happens, so you never poll. Every delivery has the same envelope:

{
  "event": "order.dispatched",
  "mode": "test",
  "created_at": "2026-09-08T12:00:00.000Z",
  "data": { ... }
}

Verifying a delivery

Every request carries a signature header:

Wepaak-Signature: t=1757337600,v1=5257a869e7ecebeda32affa62cdca3fa…

The hex is HMAC-SHA256 of the string "<t>.<raw request body>", using the signing secret shown once when you registered the endpoint. Compute it over the raw body, before any JSON parsing — re-serialising changes the bytes, and the signature will never match. Compare in constant time, and reject a timestamp far from now, or a captured delivery can be replayed at you forever.

Retries

A delivery is retried with backoff until your endpoint answers 2xx. Any 2xx counts and the body is ignored. Deliveries and their attempts are listed in Wepaak under Connections → Webhooks, which is the first place to look when an endpoint is not receiving.

order.dispatched

A label exists. The tracking number is available and, for a self-ship order, so is the label PDF.

Sent in test and live.

Payload
{
  "event": "order.dispatched",
  "mode": "test",
  "created_at": "2026-09-08T12:00:00.000Z",
  "data": {
    "order_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "source": "woocommerce",
    "external_id": "1042",
    "status": "dispatched",
    "tracking_number": "794658123456",
    "carrier": "fedex",
    "label_url": "https://api.wepaak.com/v1/shipments/4f2a8c60-91d7-4e35-8a1b-0c5d3e9f7a22/label"
  }
}

shipment.status_changed

The carrier moved the parcel. Branch on `status` — the same values as GET /v1/tracking: created, picked_up, in_transit, delivered, returned, cancelled, failed, unknown. `status_detail` is the carrier's own wording, for display only.

Sent in live, and test via POST /v1/shipments/{id}/simulate.

Payload
{
  "event": "shipment.status_changed",
  "mode": "live",
  "created_at": "2026-09-08T12:00:00.000Z",
  "data": {
    "shipment_id": "4f2a8c60-91d7-4e35-8a1b-0c5d3e9f7a22",
    "tracking_number": "794658123456",
    "order_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "source": "woocommerce",
    "external_id": "1042",
    "carrier": "fedex",
    "status": "in_transit",
    "previous_status": "picked_up",
    "status_detail": "In Transit"
  }
}

shipment.delivered

Terminal. Sent alongside the status change, so a connector marking an order complete need not string-match our status vocabulary.

Sent in live, and test via POST /v1/shipments/{id}/simulate.

Payload
{
  "event": "shipment.delivered",
  "mode": "live",
  "created_at": "2026-09-08T12:00:00.000Z",
  "data": {
    "shipment_id": "4f2a8c60-91d7-4e35-8a1b-0c5d3e9f7a22",
    "tracking_number": "794658123456",
    "order_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "source": "woocommerce",
    "external_id": "1042",
    "carrier": "fedex",
    "status": "delivered",
    "previous_status": "in_transit",
    "status_detail": "Delivered"
  }
}

shipment.cancelled

Terminal. The parcel will not be delivered.

Sent in live, and test via POST /v1/shipments/{id}/simulate.

Payload
{
  "event": "shipment.cancelled",
  "mode": "live",
  "created_at": "2026-09-08T12:00:00.000Z",
  "data": {
    "shipment_id": "4f2a8c60-91d7-4e35-8a1b-0c5d3e9f7a22",
    "tracking_number": "794658123456",
    "order_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "source": "woocommerce",
    "external_id": "1042",
    "carrier": "fedex",
    "status": "cancelled",
    "previous_status": "created",
    "status_detail": "Cancelled"
  }
}

wallet.low_balance

A label bought through the API took your balance below your alert threshold — the low-balance alert you set in Wepaak, or 100 MXN without one. Sent once per crossing, not on every label after it; top up before labels start answering 402.

Sent in live only.

Payload
{
  "event": "wallet.low_balance",
  "mode": "live",
  "created_at": "2026-09-08T12:00:00.000Z",
  "data": {
    "balance": 84.5,
    "threshold": 100,
    "currency": "MXN"
  }
}

pickup.created

A carrier pickup was booked: through POST /v1/pickups, or by you on the Collections page.

Sent in live only (a test key books nothing).

Payload
{
  "event": "pickup.created",
  "mode": "live",
  "created_at": "2026-09-08T12:00:00.000Z",
  "data": {
    "id": "5d1e7c2a-3b4f-4a6e-9c8d-1f2e3a4b5c6d",
    "number": "COL-2026-00042",
    "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "carrier": "estafeta",
    "date": "2026-11-18",
    "time_from": "10:00",
    "time_to": "19:00",
    "status": "scheduled",
    "packages": 1,
    "weight_kg": 2.5,
    "address": "Av. Juárez 10, Centro, Guadalajara, Jalisco 44100",
    "instructions": null,
    "created_at": "2026-11-17T16:02:11.000Z"
  }
}

pickup.updated

A pickup’s status, date or hours changed (rescheduled, or the carrier’s status synced). `previous_status` and `previous_date` say what it was.

Sent in live only.

Payload
{
  "event": "pickup.updated",
  "mode": "live",
  "created_at": "2026-09-08T12:00:00.000Z",
  "data": {
    "id": "5d1e7c2a-3b4f-4a6e-9c8d-1f2e3a4b5c6d",
    "number": "COL-2026-00042",
    "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "carrier": "estafeta",
    "date": "2026-11-19",
    "time_from": "10:00",
    "time_to": "19:00",
    "status": "rescheduled",
    "packages": 1,
    "weight_kg": 2.5,
    "address": "Av. Juárez 10, Centro, Guadalajara, Jalisco 44100",
    "instructions": null,
    "created_at": "2026-11-17T16:02:11.000Z",
    "previous_status": "scheduled",
    "previous_date": "2026-11-18"
  }
}

pickup.cancelled

A pickup was cancelled. It is then gone from GET /v1/pickups, so this event is how you learn of it. Book another with POST /v1/pickups if the parcel still needs collecting.

Sent in live only.

Payload
{
  "event": "pickup.cancelled",
  "mode": "live",
  "created_at": "2026-09-08T12:00:00.000Z",
  "data": {
    "id": "5d1e7c2a-3b4f-4a6e-9c8d-1f2e3a4b5c6d",
    "number": "COL-2026-00042",
    "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "carrier": "estafeta",
    "date": "2026-11-18",
    "time_from": "10:00",
    "time_to": "19:00",
    "status": "cancelled",
    "packages": 1,
    "weight_kg": 2.5,
    "address": "Av. Juárez 10, Centro, Guadalajara, Jalisco 44100",
    "instructions": null,
    "created_at": "2026-11-17T16:02:11.000Z",
    "previous_status": "scheduled"
  }
}

cod.status_changed

A shipment’s cash on delivery moved: `collected` (the carrier holds it), `available` (it can be paid out), `paid_out` (included in a payout), `returned` (nothing to pay), or back to `available` when its payout was cancelled. `previous_status` says what it was. **Only sent to an endpoint that lists this event by name** (an endpoint registered for every event does not get it), and registering it needs a key with the `cod.read` scope.

Sent in live only (sandbox shipments create no COD records).

Payload
{
  "event": "cod.status_changed",
  "mode": "live",
  "created_at": "2026-09-08T12:00:00.000Z",
  "data": {
    "id": "7a1c2e3d-4b5f-4c6d-8e9f-0a1b2c3d4e5f",
    "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "order_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "external_id": "1042",
    "tracking_number": "WPK-2026-16041",
    "carrier": "wepaak",
    "pickup_address_id": "3f2a1b0c-9d8e-4f7a-8b6c-5d4e3f2a1b0c",
    "status": "available",
    "currency": "MXN",
    "amount": 850,
    "collected": 850,
    "fees": 0,
    "return_cost": 0,
    "net": 850,
    "dispatched_at": "2026-11-14T15:00:00.000Z",
    "delivered_at": "2026-11-15T19:20:00.000Z",
    "available_at": "2026-11-15T19:20:00.000Z",
    "payout": null,
    "previous_status": "in_transit"
  }
}

cod.payout_updated

A COD payout was requested, is being processed, was paid, failed or was cancelled. Carries the shipments it covers (at most 500; `shipments_truncated` is then true and GET /v1/cod/payouts/{id} has them all) and `previous_status`. **Only sent to an endpoint that lists this event by name** (an endpoint registered for every event does not get it), and registering it needs a key with the `cod.read` scope.

Sent in live only.

Payload
{
  "event": "cod.payout_updated",
  "mode": "live",
  "created_at": "2026-09-08T12:00:00.000Z",
  "data": {
    "id": "1e2d3c4b-5a69-4788-9a0b-1c2d3e4f5a6b",
    "number": "PAY-000123",
    "status": "paid",
    "currency": "MXN",
    "amount": 850,
    "withheld_charges": 0,
    "to_wallet": 0,
    "to_bank": 850,
    "bank_account": {
      "clabe_last4": "7891",
      "holder": "Comercio Ejemplo",
      "bank": "BBVA"
    },
    "recipient": {
      "type": "integrator_client",
      "name": "Comercio Ejemplo",
      "clabe_last4": "7891",
      "bank": "BBVA",
      "reference": "cliente-0042"
    },
    "bank_reference": "SPEI-123456",
    "receipt_available": true,
    "shipment_count": 1,
    "failure_reason": null,
    "created_at": "2026-11-16T10:00:00.000Z",
    "paid_at": "2026-11-17T12:00:00.000Z",
    "shipments": [
      {
        "collection_id": "7a1c2e3d-4b5f-4c6d-8e9f-0a1b2c3d4e5f",
        "shipment_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
        "order_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
        "external_id": "1042",
        "tracking_number": "WPK-2026-16041",
        "amount": 850
      }
    ],
    "previous_status": "processing"
  }
}

inbound.received

An inbound was received and counted, by Wepaak at its warehouses or by you at your own. `status` is `validated`, or `with_discrepancy` when a line differs; per line, `received_good` entered stock and `received_damaged` did not.

Sent in live, and test via the matching POST …/simulate (or the test document's own calls).

Payload
{
  "event": "inbound.received",
  "mode": "live",
  "created_at": "2026-09-08T12:00:00.000Z",
  "data": {
    "id": "6d0f3b1a-2c4e-4f8a-9b7d-1e5c3a9f0b42",
    "mode": "live",
    "number": "ASN-2026-00012",
    "external_id": "PO-7781",
    "status": "with_discrepancy",
    "destination_warehouse_id": "0b8e2f4c-6a1d-4c3e-8f5b-9d2a7c1e4f60",
    "items": [
      {
        "sku": "MUG-01",
        "quantity": 50,
        "received": 48,
        "received_good": 46,
        "received_damaged": 2
      }
    ],
    "validated_at": "2026-11-04T16:20:00Z",
    "previous_status": "in_transit"
  }
}

inbound.status_changed

Any other move of an inbound: `in_transit`, or `cancelled` (its incoming stock is released).

Sent in live, and test via the matching POST …/simulate (or the test document's own calls).

Payload
{
  "event": "inbound.status_changed",
  "mode": "live",
  "created_at": "2026-09-08T12:00:00.000Z",
  "data": {
    "id": "6d0f3b1a-2c4e-4f8a-9b7d-1e5c3a9f0b42",
    "mode": "live",
    "number": "ASN-2026-00012",
    "external_id": "PO-7781",
    "status": "in_transit",
    "destination_warehouse_id": "0b8e2f4c-6a1d-4c3e-8f5b-9d2a7c1e4f60",
    "items": [
      {
        "sku": "MUG-01",
        "quantity": 50,
        "received": null
      }
    ],
    "validated_at": null,
    "previous_status": "scheduled"
  }
}

transfer.status_changed

A transfer moved: approved by Wepaak (`requested` → `in_transit`), rejected or cancelled (`cancelled`), received (`received` or `with_discrepancy`). When it **ships** from a Wepaak warehouse it becomes `sent`, with `shipped_at` set.

Sent in live, and test via the matching POST …/simulate (or the test document's own calls).

Payload
{
  "event": "transfer.status_changed",
  "mode": "live",
  "created_at": "2026-09-08T12:00:00.000Z",
  "data": {
    "id": "9a4c2e7f-1b3d-4e5a-8c6f-2d0b9e7a1c35",
    "mode": "live",
    "number": "TRF-2026-00007",
    "status": "in_transit",
    "origin_warehouse_id": "0b8e2f4c-6a1d-4c3e-8f5b-9d2a7c1e4f60",
    "destination_warehouse_id": "3e1a7c5b-9d2f-4b6e-8a0c-5f4d2b8e1a97",
    "items": [
      {
        "sku": "MUG-01",
        "quantity": 20,
        "received_quantity": null
      }
    ],
    "approved_at": "2026-11-04T10:00:00Z",
    "shipped_at": null,
    "previous_status": "requested"
  }
}

return.created

A return exists. Most come **automatically**: a cash-on-delivery parcel the buyer refused (`cod_rejection`), or a shipment cancelled after pickup (`cancellation`). Also sent for the ones you open (`post_delivery`).

Sent in live, and test via the matching POST …/simulate (or the test document's own calls).

Payload
{
  "event": "return.created",
  "mode": "live",
  "created_at": "2026-09-08T12:00:00.000Z",
  "data": {
    "id": "2f7b9d1c-4a6e-4c8b-9e3f-7a1d5c0b8e24",
    "mode": "live",
    "number": "RET-2026-00031",
    "type": "cod_rejection",
    "status": "in_transit",
    "order_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "shipment_id": "4f2a8c60-91d7-4e35-8a1b-0c5d3e9f7a22",
    "items": [
      {
        "sku": "MUG-01",
        "quantity": 1,
        "good": null,
        "damaged": null,
        "missing": null
      }
    ],
    "previous_status": null
  }
}

return.awaiting_decision

The return was checked and some pieces arrived damaged. The good ones are back in stock; the damaged ones wait for you: POST /v1/returns/{id}/decision with `restock` or `trash`.

Sent in live, and test via the matching POST …/simulate (or the test document's own calls).

Payload
{
  "event": "return.awaiting_decision",
  "mode": "live",
  "created_at": "2026-09-08T12:00:00.000Z",
  "data": {
    "id": "2f7b9d1c-4a6e-4c8b-9e3f-7a1d5c0b8e24",
    "mode": "live",
    "number": "RET-2026-00031",
    "type": "cod_rejection",
    "status": "pending_approval",
    "order_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "shipment_id": "4f2a8c60-91d7-4e35-8a1b-0c5d3e9f7a22",
    "items": [
      {
        "sku": "MUG-01",
        "quantity": 3,
        "good": 2,
        "damaged": 1,
        "missing": 0
      }
    ],
    "previous_status": "in_transit"
  }
}

return.status_changed

Any other move of a return: `in_transit`, `received`, `restocked`, `written_off`, `graded` (a mix), or `cancelled`.

Sent in live, and test via the matching POST …/simulate (or the test document's own calls).

Payload
{
  "event": "return.status_changed",
  "mode": "live",
  "created_at": "2026-09-08T12:00:00.000Z",
  "data": {
    "id": "2f7b9d1c-4a6e-4c8b-9e3f-7a1d5c0b8e24",
    "mode": "live",
    "number": "RET-2026-00031",
    "type": "cod_rejection",
    "status": "restocked",
    "order_id": "9c1b0f2e-5a3d-4c11-9f8a-2b7e6d4a1c33",
    "shipment_id": "4f2a8c60-91d7-4e35-8a1b-0c5d3e9f7a22",
    "items": [
      {
        "sku": "MUG-01",
        "quantity": 1,
        "good": 1,
        "damaged": 0,
        "missing": 0,
        "restocked": 1
      }
    ],
    "previous_status": "in_transit"
  }
}