> This page is for API Reference.

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

# List External POS Sales

GET https://api.npretail.app/{tenant}/{environment}/{company}/pos/externalsale

Reference: https://docs.navipartner.com/apis/api-reference/pos/externalsale/list-external-pos-sales

## Authentication

- `x-np-api-key` header (required) — API Key authentication via header

## Request

### Path parameters

- `tenant` (string, required) — Your Entra Tenant ID. [More details.](/paths#1-tenant)
- `environment` (string, required) — Your Business Central Environment. [More details.](/paths#2-environment)
- `company` (string, required) — Your Business Central Company. [More details.](/paths#3-company)

### Query parameters

- `posUnit` (string, optional)
- `receiptNo` (string, optional)
- `pageSize` (integer, optional)
- `pageKey` (string, optional)

## Response

### 200

- `morePages` (boolean, required)
- `nextPageKey` (string, required)
- `nextPageURL` (string, required)
- `data` (list of ExternalPOSSale, required)

## Types

### ExternalPOSSale

- `saleId` (UUID, required)
- `startedAt` (datetime, required)
- `posStore` (string, required)
- `posUnit` (string, required)
- `pricesIncludeVAT` (boolean, required)
- `convertedToPOSEntry` (boolean, required)
- `saleLines` (list of ExternalPOSSaleLine, required)
- `paymentLines` (list of ExternalPOSPaymentLine, required)
- `receiptNo` (string, optional) — Determines the receipt number that is known by the customer. If omitted the system will generate one for you.
- `salespersonCode` (string, optional) — Determines the code of the salesperson performing the external sale. If omitted the system will attempt to use the one assigned to the API user.
- `customerId` (UUID, optional)
- `externalDocumentNo` (string, optional) — Determines the external document number of the sale. This could for example be a web order ID that the external sale was converted into.
- `posEntryId` (UUID, optional) — Determines the POS Entry Id that the external sale was converted to. Not included if the sale is not yet converted.

### ExternalPOSSaleLine

- `lineId` (UUID, required)
- `type` (enum, required)
  - Allowed values: `Item`, `Item Category`, `BOM List`, `Customer Deposit`, `Comment`, `Rounding`, `G/L Payment`, `Issue Voucher`
- `code` (string, required) — The identifier for the sales line being added. This can for example be an item number or an item reference.
- `qty` (double, required)
- `unitPrice` (double, required)
- `vatPercent` (double, required)
- `amount` (double, required)
- `amountIncludingVAT` (double, required)
- `discountAmount` (double, required)
- `description` (string, required)
- `variantCode` (string, optional)
- `discountType` (enum, optional)
  - Allowed values: `Campaign`, `Mix`, `Quantity`, `Manual`, `BOM List`, `Rounding`, `Combination`, `Customer`
- `unitOfMeasureCode` (string, optional)
- `description2` (string, optional)
- `returnReasonCode` (string, optional)

### ExternalPOSPaymentLine

- `lineId` (UUID, required)
- `paymentMethodCode` (string, required)
- `description` (string, required)
- `amountIncludingVAT` (double, required)
- `currencyAmount` (double, optional) — If the payment is done in a different currency than the one of the sale, then the amount paid in the foreign currency should be provided in this field.

## Examples

**Response**

```json
{
  "morePages": true,
  "nextPageKey": "eyJ2aWV3IjoiVkVSU0lPTigxKSBTT1JUSU5HKEZpZWxkMSkgV0hFUkUoRmllbGQxMD0xKDAxKSkiLCJpbmRleEZpZWxkcyI6eyIxIjoiMiJ9fQ==",
  "nextPageURL": "https://api.npretail.app/tenant/env/company/pos/externalsale?pageSize=1&pageKey=eyJ2aWV3IjoiVkVSU0lPTigxKSBTT1JUSU5HKEZpZWxkMSkgV0hFUkUoRmllbGQxMD0xKDAxKSkiLCJpbmRleEZpZWxkcyI6eyIxIjoiMiJ9fQ==",
  "data": [
    {
      "saleId": "4ca28ccc-e84b-4788-973c-c8ce5a59383b",
      "startedAt": "2024-01-01T10:00:00Z",
      "posStore": "01",
      "posUnit": "0101",
      "pricesIncludeVAT": true,
      "convertedToPOSEntry": true,
      "saleLines": [
        {
          "lineId": "43aef219-60d9-4827-9e3e-4cc63b420548",
          "type": "Item",
          "code": "ITEM-01",
          "qty": 1,
          "unitPrice": 100,
          "vatPercent": 25,
          "amount": 80,
          "amountIncludingVAT": 100,
          "discountAmount": 0,
          "description": "Super awesome item"
        }
      ],
      "paymentLines": [
        {
          "lineId": "f77b05de-cf16-461a-b330-15188b34b6fd",
          "paymentMethodCode": "CASH",
          "description": "Cash payment",
          "amountIncludingVAT": 100
        }
      ],
      "receiptNo": "123ABCD",
      "salespersonCode": "1234",
      "customerId": "0053e689-81bb-403d-be15-e05332ceb85f",
      "posEntryId": "e3ddb678-30e8-45e3-9e88-96d7cf703ac1"
    }
  ]
}
```

**SDK Code**

```python ExampleExternalPOSSales
import requests

url = "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./pos/externalsale"

headers = {"x-np-api-key": "<NaviPartner API Key>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript ExampleExternalPOSSales
const url = 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./pos/externalsale';
const options = {method: 'GET', headers: {'x-np-api-key': '<NaviPartner API Key>'}};

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

```go ExampleExternalPOSSales
package main

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

func main() {

	url := "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./pos/externalsale"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-np-api-key", "<NaviPartner API Key>")

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

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

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

}
```

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

url = URI("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./pos/externalsale")

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

request = Net::HTTP::Get.new(url)
request["x-np-api-key"] = '<NaviPartner API Key>'

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

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

HttpResponse<String> response = Unirest.get("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./pos/externalsale")
  .header("x-np-api-key", "<NaviPartner API Key>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./pos/externalsale', [
  'headers' => [
    'x-np-api-key' => '<NaviPartner API Key>',
  ],
]);

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

```csharp ExampleExternalPOSSales
using RestSharp;

var client = new RestClient("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./pos/externalsale");
var request = new RestRequest(Method.GET);
request.AddHeader("x-np-api-key", "<NaviPartner API Key>");
IRestResponse response = client.Execute(request);
```

```swift ExampleExternalPOSSales
import Foundation

let headers = ["x-np-api-key": "<NaviPartner API Key>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./pos/externalsale")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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()
```