> For the complete documentation index, see [llms.txt](https://api-portal.novapost.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-portal.novapost.com/changelog-1/documentation/the-method-of-calculating-the-cost-of-delivery-1.md).

# The method of calculating the cost of delivery

### General Information <a href="#general-information" id="general-information"></a>

| **Method name**  | The method of calculating the cost of delivery                                                                                                                                                                                                                                                                 |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Direction**    | UA-EU (US)                                                                                                                                                                                                                                                                                                     |
| **HTTP Method**  | POST                                                                                                                                                                                                                                                                                                           |
| **Route(s)**     | <p><code>.../ui/v.1.0/shipments/calculations</code></p><p><code>.../v.1.0/shipments/calculations</code></p><p><code>.../ui/site/v.1.0/shipments/delivery-calculations</code></p><p><code>.../ui/v.1.0/shipments/delivery-calculations</code></p><p><code>.../mobileapp/v.1.1/shipments/calculations</code></p> |
| **Autorization** | `Authorization: Bearer jwt-token…`                                                                                                                                                                                                                                                                             |
| **Related Task** | [APIGW-1256: \[API GW\] Розрахунок вартості оплати митних платежів відправником (DDP) // -->PayerFeesCustoms Done](https://novaposhta.atlassian.net/browse/APIGW-1256)                                                                                                                                         |

### Description <a href="#description" id="description"></a>

The method allows users to receive information about the cost of delivery, the cost of paying for customs services, and the cost of other related services.

### Request and response parameters <a href="#request-and-response-parameters" id="request-and-response-parameters"></a>

Request .../v.1.0/shipments/calculationsResponse .../v.1.0/shipments/calculations

### Changes in the method <a href="#changes-in-the-method" id="changes-in-the-method"></a>

**Previous version**

`{     "payerType": "Sender",     "currency": "USD",     "incoterm": "DDP",     "cost": 90,     "invoice": {} -- not used ///`

**Current version**

`{payerType": "Sender",     "invoice": { "incoterm": "DDP", "currency": "USD", "payerFeesCustoms": "Sender", "cost": 101 /// } ///`

&#x20;

If you want to use parameter “incoterm” = “DDP”, you need to specify parameters "currency", "cost". Otherwise, “incoterm” = “DDP” will be ignored.

### Chema  <a href="#chema" id="chema"></a>

| **Field**               | **Type**        | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                                                                                                        |
| ----------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| **status**              | enum            | <p>Status of shipment</p><p><strong>Allowed</strong>: ReadyToShip</p>                                                                                                                                                                                                                                                                                                                                                                                                           |                                                                                                        |
| **payerType**           | enum            | <p>Identifies who is responsible for the payment of delivery services. Determines which party bears the cost: Sender, Recipient, or ThirdPerson. Required payerContractNumber for shipments within Europe or from Europe to Ukraine.</p><p><strong>Allowed</strong>: Sender┃Recipient┃ThirdPerson</p><p><em>\* for route</em> <code>/shipments/delivery-calculations</code> <em>- the request response will always return</em> <code>payerType</code> = <code>Sender</code></p> |                                                                                                        |
| **payerContractNumber** | string          | Required when payerType is ThirdPerson for shipments within Europe or from Europe to Ukraine. Specifies the contract number of the third-party payer (e.g., CNPP-00001797).                                                                                                                                                                                                                                                                                                     |                                                                                                        |
| **invoice**             | object          | Informatoin for calculating shipping costs and customs payments                                                                                                                                                                                                                                                                                                                                                                                                                 |                                                                                                        |
| **incoterm**            | enum            | <p>Type of tax calculation.</p><p><strong>Example</strong>: DAP                                                                                                                                                                                                                                                                                                                                                                                                                 | DDP.</p><ul><li><em>DAP - Delivered At Place</em></li><li><em>DDP - Delivered Duty Paid</em></li></ul> |
| **currency**            | enum            | Сurrency code                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |                                                                                                        |
| **cost**                | number          | <p>Declared value of shipment for customs duty deduction. Also indicates maximum compensation in case of loss/damage.</p><p>Requiered if <strong>incoterm</strong> = “DDP”</p><p><strong>Limit</strong>: Min. 1</p>                                                                                                                                                                                                                                                             |                                                                                                        |
| **payerFeesCustoms**    | enum            | <p>Identifies who is responsible for the customs payments. Determines which party bears the cost: Sender, Recipient, or ThirdPerson.</p><p><strong>Allowed</strong>: Sender┃Recipient┃ThirdPerson</p>                                                                                                                                                                                                                                                                           |                                                                                                        |
| **parcels**             | array of object | An array of parcel objects representing distinct packages within the shipment, including dimensions, weight, and details for delivery cost calculation.                                                                                                                                                                                                                                                                                                                         |                                                                                                        |
| **cargoCategory**       | enum            | <p>Specifies the type of shipment. Categories: parcel, documents, cargo. Affects shipping method, cost, and documentation.</p><p><strong>Allowed</strong>: parcel┃documents┃cargo</p>                                                                                                                                                                                                                                                                                           |                                                                                                        |
| **insuranceCost**       | number          | <p>Declared value of shipment for insurance coverage. Indicates maximum compensation in case of loss/damage.</p><p><strong>Constraints</strong>: Min 1</p>                                                                                                                                                                                                                                                                                                                      |                                                                                                        |
| **rowNumber**           | integer         | <p>Sequential identifier for each parcel in the shipment.</p><p>If only one parcel, value = 1.</p><p><strong>Constraints</strong>: Min 1</p>                                                                                                                                                                                                                                                                                                                                    |                                                                                                        |
| **width**               | integer         | <p>Parcel width in millimeters. Used to calculate volume.</p><p><strong>Constraints</strong>: Min 1</p>                                                                                                                                                                                                                                                                                                                                                                         |                                                                                                        |
| **length**              | integer         | <p>Parcel length in millimeters. Used to calculate volume.</p><p><strong>Constraints</strong>: Min 1</p>                                                                                                                                                                                                                                                                                                                                                                        |                                                                                                        |
| **height**              | integer         | <p>Parcel height in millimeters. Used to calculate volume.</p><p><strong>Constraints</strong>: Min 1</p>                                                                                                                                                                                                                                                                                                                                                                        |                                                                                                        |
| **actualWeight**        | integer         | <p>Real parcel weight in grams. Round to nearest 10 g before sending.</p><p><strong>Constraints</strong>: Min 1┃Max 2147483647</p>                                                                                                                                                                                                                                                                                                                                              |                                                                                                        |
| **sender**              | object          | Information about the sender. Includes origin details, affects logistics and cost calculations.                                                                                                                                                                                                                                                                                                                                                                                 |                                                                                                        |
| **divisionNumber**      | string┃null     | Optional sender post office division number. Interchangeable with divisionId/ postCode                                                                                                                                                                                                                                                                                                                                                                                          |                                                                                                        |
| **divisionId**          | integer┃null    | Optional sender division code. Interchangeable with divisionNumber / postCode                                                                                                                                                                                                                                                                                                                                                                                                   |                                                                                                        |
| **addressParts**        | object          | Required when shipping from an address. Contains detailed address components.                                                                                                                                                                                                                                                                                                                                                                                                   |                                                                                                        |
| **postCode**            | string          | <p>Postal/ZIP code of sender.</p><p><strong>Constraints</strong>: Max 10 chars</p>                                                                                                                                                                                                                                                                                                                                                                                              |                                                                                                        |
| **recipient**           | object          | Information about the party receiving the shipment.                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                                        |
| **countryCode**         | string          | <p>ISO 3166-1 Alpha-2 code for recipient’s country.</p><p><strong>Pattern</strong>: ^\[A-Z]{2}$</p>                                                                                                                                                                                                                                                                                                                                                                             |                                                                                                        |
| **divisionNumber**      | string┃null     | Optional recipient post office division number. Interchangeable with divisionId / postCode                                                                                                                                                                                                                                                                                                                                                                                      |                                                                                                        |
| **divisionId**          | integer┃null    | Optional recipient division code. Interchangeable with divisionNumber / postCode                                                                                                                                                                                                                                                                                                                                                                                                |                                                                                                        |
| **addressParts**        | object          | Required when delivering to a specific address. Contains detailed address fields.                                                                                                                                                                                                                                                                                                                                                                                               |                                                                                                        |
| **postCode**            | string          | <p>Postal/ZIP code for recipient.</p><p><strong>Constraints</strong>: Max 10 chars</p>                                                                                                                                                                                                                                                                                                                                                                                          |                                                                                                        |

### Acceptable HTTP status codes response <a href="#acceptable-http-status-codes-response" id="acceptable-http-status-codes-response"></a>

| **HTTP-code** | **Status**           | **Description**                                                                |
| ------------- | -------------------- | ------------------------------------------------------------------------------ |
| 200           | OK                   | Request successful. The server has responded as required.                      |
| 422           | Unprocessable entity | The request was well-formed but had semantic errors + the reason for the error |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api-portal.novapost.com/changelog-1/documentation/the-method-of-calculating-the-cost-of-delivery-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
