How to work with branch parameters: divisionId and divisionNumber
When using the Nova Post API to create or edit shipments, it is important to correctly specify the sending and receiving branches. The parameters used for this are divisionId and divisionNumber. Let's review when and how to use these parameters, as well as how to obtain their values.
What are divisionId and divisionNumber
These parameters are used when creating a new shipment via the API or editing an existing one, to specify the branches from which the shipment will be sent and where it will be delivered.
- 1divisionId – a unique branch identifier that can be obtained from the branch directory.
- 2divisionNumber – the branch number, which can also be obtained from the branch directory.
When to use divisionId and divisionNumber
Both parameters are interchangeable, meaning you can use whichever is more convenient for your case.
- 1divisionId is recommended for use because it is a unique identifier for each branch and ensures accurate linkage to a specific branch.
- 2divisionNumber may not always be unique. For example, branch numbers in Moldova may not be unique.
Recommendations for using divisionId and divisionNumber
- 1Use the divisionId parameter whenever possible, as it is unique and minimizes the risk of errors.
- 2In cases where you use divisionNumber, ensure that the number is unique for the selected country to avoid potential issues.
How to obtain divisionId and divisionNumber
- Example response:
{
"id": 1, // Значення для параметра divisionId
"name": "WROCŁAW 1",
"shortName": "WROCŁAW 1",
"number": "50/1", // Значення для параметра divisionNumber
"countryCode": "PL",
"settlement": {
"id": 26061,
"name": "Wroclaw",
"region": {
"id": 344,
"name": "Wrocław County",
"parent": {
"id": 2,
"name": "Lower Silesian voivodeship"
}
}
},
"address": "50-231, Polska, Województwo dolnośląskie, Wrocław County, Wrocław, Trzebnicka, 50/1A",
"status": "Working",
"divisionCategory": "PostBranch"
}