Skip to main content
Cost endpoints let you retrieve, create, update, and delete the delivery costs for a specific driver participating in a tender. Costs are organized by product type, CAP codes (domestic) or international zone, and weight ranges. All endpoints are served under the base path /paper-channel-bo/v1.
Authentication uses an API key passed in the x-api-key request header. Read operations require the tender-read permission; write operations require tender-write.

List costs for a driver and tender

GET /paper-channel-bo/v1/{tenderCode}/delivery-driver/{deliveryDriverId}/get-cost Returns a paginated list of all costs for a delivery driver participating in a specific tender.

Path parameters

tenderCode
string
required
The unique code of the tender.
deliveryDriverId
string
required
The unique identifier of the delivery driver.

Query parameters

page
integer
default:"0"
Zero-based page number to retrieve.
size
integer
default:"5"
Number of items per page.

Response

content
CostDTO[]
required
Array of cost records on the current page.
number
integer
required
Current page number.
numberOfElements
integer
required
Number of elements on the current page.
size
integer
required
Page size.
totalElements
integer
required
Total number of cost records across all pages.
totalPages
integer
required
Total number of pages.

Response codes

CodeDescription
200OK
400Bad request
401Unauthorized
403Forbidden
404Driver or tender not found
405Method not allowed
500Internal server error

Example

curl --request GET \
  --url 'https://<host>/paper-channel-bo/v1/AGD-2024-TE/delivery-driver/driver-001/get-cost?page=0&size=10' \
  --header 'x-api-key: <your-api-key>'

Create or update a cost

POST /paper-channel-bo/v1/{tenderCode}/delivery-driver/{deliveryDriverId}/cost Creates a new cost record or updates an existing one for a delivery driver in a specific tender. Requires the tender-write permission.
Provide either cap (for domestic deliveries) or zone (for international deliveries), not both.

Path parameters

tenderCode
string
required
The unique code of the tender.
deliveryDriverId
string
required
The unique identifier of the delivery driver.

Request body

productType
string
required
Product type. One of:
  • AR — Raccomandata A/R
  • 890 — Legge 890
  • RS — Raccomandata Semplice
price
number
required
Base price in euros. Range: 0–999999.
priceAdditional
number
required
Additional per-unit price above the highest weight bracket. Range: 0–999999.
uid
string
Unique identifier of the cost record. Provide to update an existing record; omit to create a new one.
price50
number
Price for shipments up to 50 g. Range: 0–999999.
price100
number
Price for shipments up to 100 g. Range: 0–999999.
price250
number
Price for shipments up to 250 g. Range: 0–999999.
price350
number
Price for shipments up to 350 g. Range: 0–999999.
price1000
number
Price for shipments up to 1000 g. Range: 0–999999.
price2000
number
Price for shipments up to 2000 g. Range: 0–999999.
cap
string[]
List of 5-digit Italian CAP postal codes this cost applies to. Each value must match /^[0-9]{5}$/.
zone
string
International delivery zone. One of ZONE_1, ZONE_2, ZONE_3.

Response codes

CodeDescription
200OK — cost created or updated
400Bad request
401Unauthorized
403Forbidden
404Driver or tender not found
405Method not allowed
500Internal server error

Examples

curl --request POST \
  --url 'https://<host>/paper-channel-bo/v1/AGD-2024-TE/delivery-driver/driver-001/cost' \
  --header 'x-api-key: <your-api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
    "productType": "AR",
    "price": 3.50,
    "price50": 3.50,
    "price100": 4.20,
    "price250": 5.00,
    "price350": 5.80,
    "price1000": 7.50,
    "price2000": 10.00,
    "priceAdditional": 0.50,
    "cap": ["00100", "00118", "00121"]
  }'

Delete a cost

DELETE /paper-channel-bo/v1/{tenderCode}/delivery-driver/{deliveryDriverId}/cost/{uuid} Permanently deletes a cost record associated with a delivery driver and tender. Requires the tender-write permission.
Deletion is irreversible.

Path parameters

tenderCode
string
required
The unique code of the tender.
deliveryDriverId
string
required
The unique identifier of the delivery driver.
uuid
string
required
The unique identifier (uid) of the cost record to delete.

Response codes

CodeDescription
200Cost deleted successfully

Example

curl --request DELETE \
  --url 'https://<host>/paper-channel-bo/v1/AGD-2024-TE/delivery-driver/driver-001/cost/c1a2b3d4-e5f6-7890-abcd-ef1234567890' \
  --header 'x-api-key: <your-api-key>'

Product types reference

ValueDescription
ARRaccomandata A/R (registered mail with return receipt)
890Legge 890 (judicial notification mail)
RSRaccomandata Semplice (simple registered mail)

International zones reference

ValueDescription
ZONE_1International zone 1
ZONE_2International zone 2
ZONE_3International zone 3

Build docs developers (and LLMs) love