> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api-docs.papertracc.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api-docs.papertracc.com/_mcp/server.

# Look Up Order

POST https://api.papertracc.com/v1/store/orders/lookup
Content-Type: application/json

Lets a guest check an order with its reference and the email entered at checkout, or with the `key` from the link in the order email. A wrong pair returns `404` without saying which part was wrong.

**Keys:** public key or secret key.

Reference: https://api-docs.papertracc.com/storefront/orders/lookup-order

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.
- `identity` header (required) — The identity for the active workspace.

## Servers

- `https://api.papertracc.com/v1` (Production, default)
- `https://api.papertracc.com/rc-1` (Release Candidate 1)

## Request

### Headers

- `client-ip` (string, optional) — The shopper's IP address. Read only when the request is signed with a secret key, so a server calling on behalf of many shoppers does not share one rate limit. Ignored for public keys.

### Body (application/json)

This endpoint expects a LookupOrderRequest.

- `reference` (string, required) — Order reference from the checkout response or confirmation.
- `email` (string, optional) — The email entered at checkout. Required unless you send `key`.
- `key` (string, optional) — The `key` from the link in the order email, sent instead of `email`. When you pass `order_url` at checkout, the email links there with `reference` and `key` in the query string.

## Response

### 200

Successfully fetched order

- `status` (boolean, required) — Always `true` on success.
- `message` (string, required) — Human-readable outcome.
- `data` (OrderDetail, required)

## Errors

### 400 Bad Request Error

The `channel` header is missing, the body is not valid JSON, or a field failed validation.

- `status` (boolean, required) — Always `false` on a failed request.
- `message` (string, required) — What went wrong, written for the shopper or the developer.
- `error_code` (string, optional) — Present on `402` responses.

### 401 Unauthorized Error

The API key is missing or invalid, the key owner is no longer an active member of the organisation, or the key owner is not a member of the workspace in the `identity` header.

- `status` (boolean, required) — Always `false` on a failed request.
- `message` (string, required) — What went wrong, written for the shopper or the developer.
- `error_code` (string, optional) — Present on `402` responses.

### 402 Payment Required Error

The workspace's subscription plan does not include the Open API.

- `status` (boolean, required) — Always `false` on a failed request.
- `message` (string, required) — What went wrong, written for the shopper or the developer.
- `error_code` (string, optional) — Present on `402` responses.

### 404 Not Found Error

The sales channel, or the record the request names, does not exist or is not published to this channel.

- `status` (boolean, required) — Always `false` on a failed request.
- `message` (string, required) — What went wrong, written for the shopper or the developer.
- `error_code` (string, optional) — Present on `402` responses.

### 429 Too Many Requests Error

Too many attempts from this shopper or on this store. Wait for the time in the message before trying again.

- `status` (boolean, required) — Always `false` on a failed request.
- `message` (string, required) — What went wrong, written for the shopper or the developer.
- `error_code` (string, optional) — Present on `402` responses.

## Types

### OrderDetail

- `reference` (string, required) — Order reference.
- `state` (enum, required) — `RECEIVED` until the merchant confirms it, `CONFIRMED` once confirmed or invoiced, `PAID` once paid in full, `FULFILLED` once the merchant has fulfilled it, `CANCELLED` if the merchant declined or voided it.
  - Allowed values: `RECEIVED`, `CONFIRMED`, `PAID`, `FULFILLED`, `CANCELLED`
- `currency` (string, required) — ISO 4217 code.
- `total` (string, required) — Decimal amount as a string, in the currency shown alongside it.
- `items_count` (integer, required) — Units ordered. A measured line counts as one.
- `created_at` (datetime, required)
- `checkout_reference` (string, required, nullable) — Papertracc Checkout reference for this order's payment. `null` when the order has no payment link.
- `checkout_url` (string, required, nullable) — Page where the shopper pays for the order. Only set while the payment link is open and the order is `RECEIVED` or `CONFIRMED`; show a pay button when it is present.
- `checkout_status` (enum, required) — State of the payment link. `PENDING` until paid, `PARTIALLY_PAID` after a part payment, `COMPLETED` once paid, `EXPIRED` once the link has run out, `CANCELLED` if the order was voided. `null` when the order has no payment link.
  - Allowed values: `PENDING`, `PARTIALLY_PAID`, `COMPLETED`, `EXPIRED`, `CANCELLED`
- `expected_on` (date, required, nullable) — Latest date the order was promised to ship by, when it holds backordered, pre-ordered or made-to-order items. `null` when everything ships from stock or no date was promised.
- `fulfilled_at` (datetime, required, nullable) — When the merchant marked the order as fulfilled, for example sent or handed over. `null` until then. The merchant can undo this, so it can go back to `null`.
- `note` (string, required, nullable) — Note the shopper left at checkout.
- `shipping_address` (OrderAddress, required, nullable) — Delivery address given at checkout.
- `lines` (list of OrderLine, required)
- `adjustments` (list of OrderAdjustment, required)
- `fulfilment` (enum, required)
  - Allowed values: `UNFULFILLED`, `PARTIALLY_FULFILLED`, `FULFILLED`
- `delivery` (OrderDelivery, required, nullable) — How the shopper chose to receive the order.
- `deliveries` (list of OrderShipment, required)
- `amount_paid` (string, optional) — Paid so far. Only on orders paid in instalments.
- `instalments` (list of OrderInstalment, optional) — The payment schedule. Only on orders paid in instalments.
- `layaway` (OrderLayaway, optional) — Present on layaway orders.

### OrderAddress

Delivery address given at checkout.

- `line1` (string, required, nullable)
- `line2` (string, required, nullable)
- `city` (string, required, nullable)
- `state` (string, required, nullable)
- `postal_code` (string, required, nullable)
- `country_code` (string, required, nullable)
- `area` (string, required, nullable)
- `landmark` (string, required, nullable)

### OrderLine

- `title` (string, required) — Item name.
- `sku` (string, required)
- `quantity` (string, required) — Decimal quantity as a string.
- `unit` (string, required) — Unit the quantity is counted in.
- `unit_price` (string, required) — Decimal amount as a string, in the currency shown alongside it.
- `discount` (string, required) — Decimal amount as a string, in the currency shown alongside it.
- `tax` (string, required) — Decimal amount as a string, in the currency shown alongside it.
- `total` (string, required) — Decimal amount as a string, in the currency shown alongside it.
- `sell_mode` (enum, required) — `STOCK` for a line sent from stock. Otherwise how the line was promised at checkout: `BACKORDER`, `PREORDER` or `MADE_TO_ORDER`.
  - Allowed values: `STOCK`, `BACKORDER`, `PREORDER`, `MADE_TO_ORDER`
- `ships_on` (date, required, nullable) — Date promised for this line at checkout: the release date for a pre-order, or the order date plus the lead time. `null` for a stock line, or when no date was promised.

### OrderAdjustment

- `name` (string, required) — What the adjustment is, for example a promotion.
- `operation` (enum, required) — Whether it was added to or taken off the total.
  - Allowed values: `ADDITION`, `SUBTRACTION`
- `amount` (string, required) — Decimal amount as a string, in the currency shown alongside it.

### OrderDelivery

How the shopper chose to receive the order.

- `kind` (enum, required)
  - Allowed values: `DELIVERY`, `PICKUP`
- `name` (string, required)
- `fee` (string, required)
- `area` (string, required, nullable)
- `state` (string, required, nullable)
- `promised_from` (date, required, nullable)
- `promised_on` (date, required, nullable)
- `ready_at` (datetime, required, nullable)
- `window` (OrderDeliveryWindow, required, nullable)
- `fee_type` (enum, required)
  - Allowed values: `FLAT`, `LIVE`, `FREE`, `LATER`
- `fee_pending` (boolean, required) — `true` while the merchant still has to set the delivery fee.

### OrderShipment

One delivery or pickup. An order splits into several when items ship at different times, such as a pre-order.

- `reference` (string, required)
- `kind` (enum, required)
  - Allowed values: `DELIVERY`, `PICKUP`
- `status` (enum, required) — `SCHEDULED` waits for its ship date; the rest follow the merchant's progress.
  - Allowed values: `SCHEDULED`, `TO_PACK`, `READY`, `OUT_FOR_DELIVERY`, `FAILED_ATTEMPT`, `DELIVERED`, `READY_FOR_PICKUP`, `COLLECTED`
- `items` (list of OrderShipmentItemsItems, required)
- `ships_on` (date, required, nullable)
- `promised_on` (date, required, nullable)
- `window` (OrderDeliveryWindow, required, nullable)
- `carrier` (string, required, nullable) — Rider or courier name.
- `tracking` (string, required, nullable)
- `completed_at` (datetime, required, nullable)

### OrderInstalment

- `number` (integer, required)
- `due_date` (datetime, required)
- `amount` (string, required)
- `paid` (string, required) — How much of this payment has been made.
- `is_due` (boolean, required) — `true` when this payment is due now.
- `is_overdue` (boolean, required) — `true` when its due date has passed and it isn't fully paid.
- `is_release` (boolean, required) — `true` on the payment after which the goods are released.

### OrderLayaway

Present on layaway orders.

- `release_instalment` (integer, required)
- `release_amount` (string, required) — Total to pay before the goods are released.
- `left_to_release` (string, required) — What's still to pay before the goods are released.

### OrderDeliveryWindow

- `date` (date, required)
- `from` (string, required, nullable)
- `to` (string, required, nullable)

### OrderShipmentItemsItems

- `sku` (string, required)
- `title` (string, required)
- `quantity` (string, required)

## Examples

**Request**

```json
{
  "reference": "QUO-0042"
}
```

**Response**

```json
{
  "status": true,
  "message": "Successfully fetched order",
  "data": {
    "reference": "QUO-0042",
    "state": "RECEIVED",
    "currency": "NGN",
    "total": "50000.00",
    "items_count": 1,
    "created_at": "2024-01-15T09:30:00Z",
    "checkout_reference": "pt_cPySEZ66jKqbI5cQ",
    "checkout_url": "https://checkout.papertracc.com/pt_cPySEZ66jKqbI5cQ",
    "checkout_status": "PENDING",
    "expected_on": "2026-11-08",
    "fulfilled_at": "2026-11-03T14:30:00Z",
    "note": "string",
    "shipping_address": {
      "line1": "string",
      "line2": "string",
      "city": "string",
      "state": "string",
      "postal_code": "string",
      "country_code": "string",
      "area": "string",
      "landmark": "string"
    },
    "lines": [
      {
        "title": "Silk scarf - Blue",
        "sku": "string",
        "quantity": "2",
        "unit": "EACH",
        "unit_price": "25000.00",
        "discount": "0.00",
        "tax": "0.00",
        "total": "50000.00",
        "sell_mode": "STOCK",
        "ships_on": "2026-11-08"
      }
    ],
    "adjustments": [
      {
        "name": "Launch week",
        "operation": "ADDITION",
        "amount": "5000.00"
      }
    ],
    "fulfilment": "UNFULFILLED",
    "delivery": {
      "kind": "DELIVERY",
      "name": "Same day",
      "fee": "6000.00",
      "area": "string",
      "state": "string",
      "promised_from": "2023-01-15",
      "promised_on": "2023-01-15",
      "ready_at": "2024-01-15T09:30:00Z",
      "window": {
        "date": "2023-01-15",
        "from": "string",
        "to": "string"
      },
      "fee_type": "FLAT",
      "fee_pending": true
    },
    "deliveries": [
      {
        "reference": "SO-10431-1",
        "kind": "DELIVERY",
        "status": "SCHEDULED",
        "items": [
          {
            "sku": "string",
            "title": "string",
            "quantity": "string"
          }
        ],
        "ships_on": "2023-01-15",
        "promised_on": "2023-01-15",
        "window": {
          "date": "2023-01-15",
          "from": "string",
          "to": "string"
        },
        "carrier": "string",
        "tracking": "string",
        "completed_at": "2024-01-15T09:30:00Z"
      }
    ],
    "amount_paid": "35000.00",
    "instalments": [
      {
        "number": 1,
        "due_date": "2024-01-15T09:30:00Z",
        "amount": "35000.00",
        "paid": "35000.00",
        "is_due": true,
        "is_overdue": true,
        "is_release": true
      }
    ],
    "layaway": {
      "release_instalment": 2,
      "release_amount": "70000.00",
      "left_to_release": "35000.00"
    }
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.papertracc.com/v1/store/orders/lookup"

payload = { "reference": "QUO-0042" }
headers = {
    "channel": "channel",
    "Authorization": "Bearer <apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.papertracc.com/v1/store/orders/lookup';
const options = {
  method: 'POST',
  headers: {
    channel: 'channel',
    Authorization: 'Bearer <apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"reference":"QUO-0042"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.papertracc.com/v1/store/orders/lookup"

	payload := strings.NewReader("{\n  \"reference\": \"QUO-0042\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("channel", "channel")
	req.Header.Add("Authorization", "Bearer <apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.papertracc.com/v1/store/orders/lookup")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["channel"] = 'channel'
request["Authorization"] = 'Bearer <apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"reference\": \"QUO-0042\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.papertracc.com/v1/store/orders/lookup")
  .header("channel", "channel")
  .header("Authorization", "Bearer <apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"reference\": \"QUO-0042\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.papertracc.com/v1/store/orders/lookup', [
  'body' => '{
  "reference": "QUO-0042"
}',
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
    'Content-Type' => 'application/json',
    'channel' => 'channel',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.papertracc.com/v1/store/orders/lookup");
var request = new RestRequest(Method.POST);
request.AddHeader("channel", "channel");
request.AddHeader("Authorization", "Bearer <apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"reference\": \"QUO-0042\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "channel": "channel",
  "Authorization": "Bearer <apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["reference": "QUO-0042"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.papertracc.com/v1/store/orders/lookup")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```