Registration of sending parcels from your sender's address
The Courier pickup feature allows sending parcels directly from an address. Through the API, clients can create requests for courier pickup, manage visit time intervals, cancel, and edit requests.
This article outlines the key aspects of working with courier pickup through the API.
Courier pickup methods in API
POST /pickups:
Create a courier call request
Response: ID of the created request with the status Draft. While in Draft status, the request can be deleted if the courier call is no longer needed.
Parameters:
- 1address: Courier call address (sender's address)
- 2pickedTimeFrom and pickedTimeTo: Time interval for courier arrival
- 3contactPhone and contactName: Sender's contact details
POST /pickups/{id}/shipments:
Add parcels to a courier call request
Parameters:
- 1Array of shipment IDs: shipmentId[]
Conditions:
- 1Shipments must have the status ReadyToShip.
- 2All parcels in the same request must have the same sender's address.
- 3Each parcel can only be added to one courier call request.
PUT /pickups/{id}/status:
Change the status of a request
Response: Confirmation of status change.
- 1Changes the request status to Created, confirming readiness for execution.
This is possible if the request contains at least one shipment, and all shipments in the request have the status Paid or ContractAfterPayment. - 2Changes the request status from Created to ClientCanceled if it needs to be canceled.
POST /time-intervals/find:
Retrieve available time intervals for a courier visit
Response: Array of available intervals.
Parameters:
- 1address: Courier call address (sender's address)
- 2country: Country of dispatch
- 3type: Same-day courier call (PickupDayToDay ) or next-day courier call (PickupNextDay)
Limitations: Same-day courier call (PickupDayToDay) is currently operational in Warsaw. New cities and countries are being added.
In other cities and countries, next-day courier call (PickupNextDay) is available.
GET /pickups/{id}/shipments:
Retrieve a list of parcels added to a courier call request
Response: List of all shipments added to a specific courier call request.
DEL /pickups/{id}/shipments:
Remove parcels from a request
Parameters:
- 1Array of shipment IDs.
Conditions:
- 1The request must be in the Draft status.
DEL /pickups/{id}:
Delete a courier call request
Conditions:
- 1Deletes the request entirely if it is in the Draft status.
- 2Requests in the Created status cannot be deleted but must be canceled by changing the status to ClientCanceled.
GET /pickups:
Track the status of current courier call requests
Response: a list of requests with their statuses: Draft, Created, ClientCanceled etc.
Courier pickup API workflow
- 1Creating a courier pickup request
The client uses the POST /pickups method to create a new courier call request. At this stage, the request is assigned the status Draft. While in this status, the client can:- 1.1Add or remove parcels.
- 1.2Modify the address or time intervals.
- 2Adding parcels to a courier pickup request
Parcels are added using the POST /pickups/{id}/shipments method. The client provides an array of shipment IDs to be added.
Limitations:- 2.1Parcels must have the status ReadyToShip.
- 2.2Parcels with a different sender's address cannot be added.
- 3Specifying the Date/Time of courier arrival
After adding parcels, the client must specify the date and time for the courier's visit:- 3.1Use POST /time-intervals/find to retrieve available time intervals and select a convenient one.
- 3.2The selected interval is passed as parameters pickedTimeFrom and pickedTimeTo.
- 4Changing the Request Status
Once all parcels are added, the client updates the request status to Created using PUT /pickups/{id}/status. In this status, the request awaits processing by the courier.
Limitations:- 4.1Shipments must have the status Paid or ContractAfterPayment.
- 4.2Paid or ContractAfterPayment. The request can no longer be modified, except for updating the time interval.
- 5Viewing requests
The client can retrieve a list of their requests using the GET /pickups method. The response includes the current status of each request.
Request statuses:- 5.1Draft: Initial status of the request. In this status, the client can add or remove parcels.
- 5.2Created: The request is ready for processing by the courier.
- 5.3AppointedCourier: A courier has been assigned to the request.
- 5.4InProgress: The courier is en route to the sender's address.
- 5.5ReceivedByCourier: The courier has collected the parcels from the sender and is delivering them to the branch.
- 5.6Done: The courier has completed the request, and the parcels have been delivered to the branch.
- 5.7ClientCanceled: The request was canceled by the client.
- 5.8NotCompleted: The courier canceled the request due to the inability to collect the parcels (e.g., parcels were not ready).
- 5.9Deleted: The request has been removed from the system.
Each parcel in a courier call request has an individual status, reflecting its current state during the pickup process (pickup_shipments[...]).
Parcel statuses:
- 1Added: The parcel has been added to the request. Available only when the request status is Draft. This is the initial status for each parcel added to the request.
- 2Accepted: The parcel has been successfully accepted by the courier. Applicable only to requests with the status AppointedCourier or InProgress.
- 3NotReady: The parcel was removed from the request because it was not ready for dispatch. This status can only be set by the courier and is available for requests with the status AppointedCourier or InProgress.
- 4NotPacked: The parcel was not properly packed for handover to the courier. This status can only be set by the courier and is available in requests with the status AppointedCourier or InProgress.
- 5ClientCanceled: The parcel was removed from the request at the client's initiative. Available for requests with any status except Draft and Deleted.
- 6Deleted: The parcel has been removed from the courier call request. Available only in requests with the status Draft. Deleted parcels can be restored to the Added status.
- 6Cancellation and Deletion
- 6.1To cancel a request in the Created status, the client changes its status to ClientCanceled using the PUT /pickups/{id}/status.
- 6.2To delete a request in the Draft status, the DEL /pickups/{id} method is used.
Limitations and Key Points
- 1Adding and removing parcels is only possible for requests in the Draft status.
- 2Requests in the Created status or higher cannot be modified, only canceled, except for updating the time interval.
- 3The sender's address for all parcels in a courier call request must be identical, except for the Note field.
- 4Time intervals must be selected using the available slots. Same-day time intervals (PickupDayToDay) are not available for all cities. New cities are added progressively.
- 5When making changes to a courier call request, the lockVersion field value must be incremented by one.
Detailed API method documentation can be found in the Nova Post API documentation.