Consignment import service

Imports consignments

Create and close consignments

Imports consignment data with all associated receptacle and mail item information.

Access to this method is authorized by the Import consignments operation.

The API can import outbound receptacles. These must be closed and already exist in IPS.

The API can import receptacles in transit. These may or may not already exist in IPS.

The consignment update process is not supported. Consignments have to be manually reopened, modified and closed in IPS.

Values set by IPS during import

The following consignment and receptacle values in the IPS tables are automatically set by IPS during import:

Consignment level
  • The GUID
  • The postal status set to NULL
  • The state indicator set to 62 (closed)
  • The event type set to 301 (Close consignment (Otb))
  • The conveyance type is automatically set by IPS based on the mail category of the dispatch:
    • If mail category is A or D then conveyance type = P
    • If mail category is B or C then conveyance type = N
  • The number of receptacles
Receptacle level
  • The state indicator set to 22 (closed)
  • The event type is set to 105 (Change receptacle consignment (Otb))

Triggers

The import of a consignment triggers the creation of:

  • Accounting dispatch and transit segment information (if the selected route has a closed transit point)
  • 'Events' information
  • PRECON EDI messages (if activated in the EDI exchanges configuration)
  • CARDIT EDI messages (if activated in the EDI exchanges configuration)

Error

In addition to the standard error codes described in Response codes, the IPS API returns a 404 error code for specific error cases, with additional error information as listed in the table below.

Code Description
1 Mandatory data is missing from the consignment.
2 A property value in the request contains an invalid value or is in the wrong format.
3 Reference data not found.
4 The request contains inconsistent data. For example, if trying to send a receptacle to the wrong destination office.
5 No transport found for the consignment.
6 The route exists but is not compatible.
7 Data already exists in the database.
8 Failure storing the consignment.
9 The request body does not match the specified structure.
10 Unexpected error handled by the API.
11 Error returned from internal IPS business process.
Securityips_token
Request
query Parameters
returnDocuments
string <boolean>

Default value false

useAlternateRoutes
string <boolean>

Default value false. Enables the use of routes marked as alternate.

Request Body schema: application/json
ConsignmentId
string <= 12 characters ^[A-z0-9]{12}$

Consignment identifier. Format must be compliant with S32 UPU standard

ConsignmentSealNumber
string^[A-z0-9]{15}$
ConsignmentMailCategory
required
string <= 1 characters ^[A-z0-9]{1}$
ConsignmentConveyanceType
required
string <= 1 characters ^[A-z0-9]{1}$
ConsignmentDepartureDate
required
string <date-time>

Earliest possible departure date/local time of the consignment

ConsignmentEMSInd
string <= 1 characters

1-True, 0-False False if this property is missing in the request.

Enum: "0" "1"
ConsignmentRouteScheduleIdentifier
string <= 36 characters ^[A-z0-9]{36}$

Unique identifier of the route schedule (GUID or, in a future IPS release, user friendly route schedule identifier). If omitted, IPS will look for the earliest suitable route schedule after the specified departure date and time.

ConsignmentOriginOffice
required
string <= 6 characters ^[A-z0-9]{6}$
ConsignmentDestinationOffice
required
string <= 6 characters ^[A-z0-9]{6}$
ConsignmentComments
string <= 256 characters ^[A-z0-9]{256}$
ConsignmentTransitOnlyInd
string <= 1 characters

1-True, 0-False False if this property is missing in the request.

Enum: "0" "1"
ConsignmentContainerId
string <= 35 characters ^[A-z0-9]{35}$
required
Array of objects (Receptacles)
Responses
200

Success

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

post/ConsignmentImportService.svc/rest/consignment
Request samples
application/json
{
  • "ConsignmentId": "PTLISL000002",
  • "ConsignmentSealNumber": "string",
  • "ConsignmentMailCategory": "s",
  • "ConsignmentConveyanceType": "s",
  • "ConsignmentDepartureDate": "2020-06-30 00:00",
  • "ConsignmentEMSInd": "0",
  • "ConsignmentRouteScheduleIdentifier": "8E98516B-1864-4B86-AB45-1CB92117D60D",
  • "ConsignmentOriginOffice": "string",
  • "ConsignmentDestinationOffice": "string",
  • "ConsignmentComments": "string",
  • "ConsignmentTransitOnlyInd": "0",
  • "ConsignmentContainerId": "string",
  • "Receptacles": [
    ]
}
Response samples
application/json
{
  • "Consignment": {
    }
}