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

# Get Sales Document

GET https://api.npretail.app/{tenant}/{environment}/{company}/ecommerce/documents/{documentId}

Reference: https://docs.navipartner.com/apis/api-reference/sales-documents/ecommerce/get-sales-document

## 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)
- `documentId` (UUID, required)

## Response

### 200

- `externalNo` (string, required)
- `id` (UUID, required)
- `documentType` (enum, required)
  - Allowed values: `order`, `returnOrder`
- `creationStatus` (enum, required)
  - Allowed values: `created`, `error`, `canceled`, `pending`
- `postingStatus` (enum, required)
  - Allowed values: `partiallyInvoiced`, `invoiced`, `pending`
- `currencyCode` (string, required)
- `currencyExchangeRate` (double, required)
- `externalDocumentNo` (string, required)
- `locationCode` (string, required)
- `yourReference` (string, required)
- `languageTag` (string, required)
- `pricesExcludingVat` (boolean, required)
- `ticketReservationToken` (string, required)
- `captureProcessingStatus` (enum, required)
  - Allowed values: `error`, `partiallyProcessed`, `processed`, `pending`
- `lastCaptureErrorMessage` (string, required)
- `createdAt` (datetime, required)
- `createdDocumentNo` (string, required)
- `postedDocumentNos` (list of string, required)
- `sellToCustomer` (SalesDocumentSellToCustomerDTO, required)
- `shipToCustomer` (SalesDocumentShipToCustomerDTO, required)
- `shipment` (SalesDocumentShipmentDTO, required)
- `comments` (list of SalesDocumentCommentsDTO, required)
- `salesDocumentLines` (list of SalesDocumentLinesDTO, required)
- `payments` (list of SalesDocumentPaymentsDTO, optional) — Present on Get Sales Document when the document has payment lines. Never present on Find Sales Documents hits, which carry no payment details.
- `dimensions` (list of SalesDocumentDimensionDTO, optional) — List of dimensions stored on the document header, as supplied when the document was created or added by an extension to the incoming document. This is the document's own dimension set, not the effective set the created sales header posts with: dimensions that come from default dimension setup are not included, and neither are dimensions an extension put directly on the created sales header.
- `customFields` (SalesDocumentCustomFieldsRequest, optional) — This section allows you to add custom fields as key-value pairs. You can handle these fields by subscribing to our extension publishers and implementing custom serialization logic.

## Types

### SalesDocumentSellToCustomerDTO

- `no` (string, required)
- `name` (string, required)
- `name2` (string, required)
- `address` (string, required)
- `address2` (string, required)
- `postCode` (string, required)
- `county` (string, required)
- `city` (string, required)
- `countryCode` (string, required)
- `contact` (string, required)
- `email` (string, required)
- `phone` (string, required)
- `ean` (string, required)
- `vatRegistrationNo` (string, required)
- `invoiceEmail` (string, required)
- `customerTemplate` (string, required)
- `configurationTemplate` (string, required)

### SalesDocumentShipToCustomerDTO

- `name` (string, required)
- `name2` (string, required)
- `address` (string, required)
- `address2` (string, required)
- `postCode` (string, required)
- `county` (string, required)
- `city` (string, required)
- `countryCode` (string, required)
- `contact` (string, required)

### SalesDocumentShipmentDTO

- `shipmentMethod` (string, required)
- `shipmentService` (string, required)

### SalesDocumentCommentsDTO

- `id` (UUID, required)
- `comment` (string, required)

### SalesDocumentLinesDTO

- `id` (UUID, required)
- `type` (enum, required)
  - Allowed values: `item`, `comment`, `shipmentFee`, `paymentFee`, `voucher`
- `no` (string, required)
- `variantCode` (string, required)
- `barcodeNo` (string, required)
- `description` (string, required)
- `unitPrice` (double, required)
- `quantity` (double, required)
- `unitOfMeasure` (string, required)
- `vatPercent` (double, required)
- `lineAmount` (double, required)
- `requestedDeliveryDate` (date, required)
- `invoicedQuantity` (double, required)
- `invoicedAmount` (double, required)
- `captured` (boolean, required)
- `virtualItemProcessStatus` (enum, required)
  - Allowed values: ``, `processed`, `error`
- `virtualItemProcessErrorMessage` (string, required)
- `attractionWalletProcessStatus` (enum, required)
  - Allowed values: ``, `processed`, `error`
- `attractionWalletProcessErrorMessage` (string, required)
- `ticketReservationLineId` (UUID, required)
- `membershipId` (UUID, required)
- `membershipOperation` (string, required)
- `memberFirstName` (string, required)
- `memberLastName` (string, required)
- `memberMiddleName` (string, required)
- `memberEmail` (string, required)
- `memberPhoneNo` (string, required)
- `memberBirthday` (date, required)
- `memberGender` (string, required)
- `memberAddress` (string, required)
- `memberCity` (string, required)
- `memberCountry` (string, required)
- `memberPostCode` (string, required)
- `memberNewsletter` (string, required)
- `memberGdprApproval` (string, required)
- `membershipActivationDate` (date, required)
- `subscription` (boolean, required)
- `externalLineId` (string, optional)
- `parentExternalLineId` (string, optional)
- `dimensions` (list of SalesDocumentDimensionDTO, optional) — List of dimensions stored on this line, as supplied when the document was created or added by an extension to the incoming line. This is the line's own dimension set, not the effective set the created sales line posts with: dimensions inherited from the document header or from default dimension setup are not included, and neither are dimensions an extension put directly on the created sales line.
- `issuedAssets` (list of IssuedAssetDTO, optional) — Array of issued assets linked to this sales line. When a single asset is present, the legacy fields on the sales line are still populated to maintain backward compatibility with existing integrations. However, the `issuedAssets` array is the primary and recommended data source and supports multiple assets per line.
- `customFields` (SalesDocumentCustomFieldsRequest, optional) — This section allows you to add custom fields as key-value pairs. You can handle these fields by subscribing to our extension publishers and implementing custom serialization logic.

### SalesDocumentPaymentsDTO

- `id` (UUID, required)
- `paymentMethodType` (enum, required)
  - Allowed values: `paymentGateway`, `voucher`
- `externalPaymentMethodCode` (string, required)
- `externalPaymentType` (string, required)
- `paymentReference` (string, required)
- `paymentAmount` (double, required)
- `parToken` (string, required)
- `pspToken` (string, required)
- `cardBrand` (string, required)
- `maskedCardNumber` (string, required)
- `cardExpiryDate` (string, required)
- `cardAliasToken` (string, required) — Max. length 80 symbols.
- `capturedPaymentAmount` (double, required)
- `customFields` (SalesDocumentCustomFieldsRequest, optional) — This section allows you to add custom fields as key-value pairs. You can handle these fields by subscribing to our extension publishers and implementing custom serialization logic.

### SalesDocumentDimensionDTO

- `code` (string, required)
- `valueCode` (string, required)

### SalesDocumentCustomFieldsRequest

- `myCustomField1` (string, optional)
- `myCustomField2` (string, optional)

### IssuedAssetDTO

- `id` (UUID, required) — System ID of the asset.
- `type` (enum, required)
  - Allowed values: `wallet`, `ticket`, `voucher`, `coupon`, `membership`
- `referenceNo` (string, required) — Asset reference number based on type.

## Examples

**Response**

```json
{
  "externalNo": "WEBP000000001",
  "id": "4ca28ccc-e84b-4788-973c-c8ce5a59383b",
  "documentType": "order",
  "creationStatus": "created",
  "postingStatus": "invoiced",
  "currencyCode": "DKK",
  "currencyExchangeRate": 1,
  "externalDocumentNo": "WEBORD-123",
  "locationCode": "",
  "yourReference": "REF-789",
  "languageTag": "da-DK",
  "pricesExcludingVat": false,
  "ticketReservationToken": "ABC123456DEF789GHI",
  "captureProcessingStatus": "pending",
  "lastCaptureErrorMessage": "",
  "createdAt": "2026-09-09T08:14:22Z",
  "createdDocumentNo": "SO-104213",
  "postedDocumentNos": [
    "PSI-100871"
  ],
  "sellToCustomer": {
    "no": "CUST-10001",
    "name": "Acme Corporation",
    "name2": "Corporation",
    "address": "123 Main Street",
    "address2": "Suite 400",
    "postCode": "10001",
    "county": "New York",
    "city": "New York",
    "countryCode": "US",
    "contact": "Jane Doe",
    "email": "jane.doe@acme.com",
    "phone": "+1-555-123-4567",
    "ean": "1234567890123",
    "vatRegistrationNo": "US123456789",
    "invoiceEmail": "invoices@acme.com",
    "customerTemplate": "DOMESTIC",
    "configurationTemplate": "CUST000001"
  },
  "shipToCustomer": {
    "name": "John Smith",
    "name2": "Smith Enterprises",
    "address": "456 Shipping Avenue",
    "address2": "Floor 2",
    "postCode": "10002",
    "county": "New York",
    "city": "New York City",
    "countryCode": "US",
    "contact": "John Smith"
  },
  "shipment": {
    "shipmentMethod": "",
    "shipmentService": ""
  },
  "comments": [
    {
      "id": "59a2cbc4-503d-f011-a8fe-b571460f09c4",
      "comment": "This is a comment."
    }
  ],
  "salesDocumentLines": [
    {
      "id": "241e349d-2a3e-f011-a8fe-b571460f09c4",
      "type": "item",
      "no": "1100",
      "variantCode": "",
      "barcodeNo": "",
      "description": "test item",
      "unitPrice": 2000,
      "quantity": 2,
      "unitOfMeasure": "",
      "vatPercent": 25,
      "lineAmount": 2000,
      "requestedDeliveryDate": "2025-06-01",
      "invoicedQuantity": 0,
      "invoicedAmount": 0,
      "captured": true,
      "virtualItemProcessStatus": "processed",
      "virtualItemProcessErrorMessage": "",
      "attractionWalletProcessStatus": "processed",
      "attractionWalletProcessErrorMessage": "",
      "ticketReservationLineId": "bbe793c7-2489-43b7-ab77-23577d59ae71",
      "membershipId": "3a8b7c47-3228-4985-8bf0-bba09653f063",
      "membershipOperation": "renewMembership",
      "memberFirstName": "Jane",
      "memberLastName": "Doe",
      "memberMiddleName": "",
      "memberEmail": "jane.doe@example.com",
      "memberPhoneNo": "",
      "memberBirthday": "1985-04-12",
      "memberGender": "female",
      "memberAddress": "",
      "memberCity": "",
      "memberCountry": "",
      "memberPostCode": "",
      "memberNewsletter": "yes",
      "memberGdprApproval": "accepted",
      "membershipActivationDate": "2027-01-01",
      "subscription": false,
      "externalLineId": "ABCDEFGH-1234567890",
      "parentExternalLineId": "",
      "dimensions": [
        {
          "code": "PROJECT",
          "valueCode": "P-001"
        }
      ],
      "issuedAssets": [
        {
          "id": "8f9c2e1d-3a5b-4c6d-7e8f-9a0b1c2d3e4f",
          "type": "voucher",
          "referenceNo": "V-2807000107658"
        },
        {
          "id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
          "type": "coupon",
          "referenceNo": "C-123456"
        }
      ],
      "customFields": {
        "myCustomField1": "myCustomField1Value",
        "myCustomField2": "myCustomField2Value"
      }
    }
  ],
  "payments": [
    {
      "id": "3c4543d0-d43e-f011-a8fe-b571460f09c4",
      "paymentMethodType": "paymentGateway",
      "externalPaymentMethodCode": "adyen_cc",
      "externalPaymentType": "mc",
      "paymentReference": "Z3ZR6HT5BNVPZQT5",
      "paymentAmount": 2000,
      "parToken": "",
      "pspToken": "",
      "cardBrand": "",
      "maskedCardNumber": "",
      "cardExpiryDate": "",
      "cardAliasToken": "",
      "capturedPaymentAmount": 0,
      "customFields": {
        "myCustomField1": "myCustomField1Value",
        "myCustomField2": "myCustomField2Value"
      }
    },
    {
      "id": "be02c86c-44fb-4c59-8dd2-84bfa136be93",
      "paymentMethodType": "voucher",
      "externalPaymentMethodCode": "",
      "externalPaymentType": "",
      "paymentReference": "2807000107658",
      "paymentAmount": 500,
      "parToken": "",
      "pspToken": "",
      "cardBrand": "",
      "maskedCardNumber": "",
      "cardExpiryDate": "",
      "cardAliasToken": "",
      "capturedPaymentAmount": 0,
      "customFields": {
        "myCustomField1": "myCustomField1Value",
        "myCustomField2": "myCustomField2Value"
      }
    }
  ],
  "dimensions": [
    {
      "code": "DEPARTMENT",
      "valueCode": "SALES"
    },
    {
      "code": "PROJECT",
      "valueCode": "P-001"
    }
  ],
  "customFields": {
    "myCustomField1": "myCustomField1Value",
    "myCustomField2": "myCustomField2Value"
  }
}
```

**SDK Code**

```python Example Sales Document Response
import requests

url = "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./ecommerce/documents/e2cfea9f-385e-4d83-8b50-42256885b03a"

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

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

print(response.json())
```

```javascript Example Sales Document Response
const url = 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./ecommerce/documents/e2cfea9f-385e-4d83-8b50-42256885b03a';
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 Example Sales Document Response
package main

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

func main() {

	url := "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./ecommerce/documents/e2cfea9f-385e-4d83-8b50-42256885b03a"

	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 Example Sales Document Response
require 'uri'
require 'net/http'

url = URI("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./ecommerce/documents/e2cfea9f-385e-4d83-8b50-42256885b03a")

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 Example Sales Document Response
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./ecommerce/documents/e2cfea9f-385e-4d83-8b50-42256885b03a")
  .header("x-np-api-key", "<NaviPartner API Key>")
  .asString();
```

```php Example Sales Document Response
<?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./ecommerce/documents/e2cfea9f-385e-4d83-8b50-42256885b03a', [
  'headers' => [
    'x-np-api-key' => '<NaviPartner API Key>',
  ],
]);

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

```csharp Example Sales Document Response
using RestSharp;

var client = new RestClient("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./ecommerce/documents/e2cfea9f-385e-4d83-8b50-42256885b03a");
var request = new RestRequest(Method.GET);
request.AddHeader("x-np-api-key", "<NaviPartner API Key>");
IRestResponse response = client.Execute(request);
```

```swift Example Sales Document Response
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./ecommerce/documents/e2cfea9f-385e-4d83-8b50-42256885b03a")! 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()
```