Accounting dispatch service

Imports and retrieves accounting dispatches

Get accounting dispatch data

Retrieves accounting dispatch data.

Access to this method is authorized by the Retrieve accounting dispatches operation.

This API method corresponds to the accounting dispatch import interface. The structure of this request body corresponds to the element of the interface XML schema. For more information, see the IPS Import/Export Administration Guide.

List of search parameters (in URL query string format, combined in a logical AND).

Securityips_token
Request
query Parameters
dispatchId
string

S8 standard identifier.

If specified, the only other parameters you can specify are dispatchDateFrom, dispatchDateTo, receiptDateFrom, receiptDateTo and year (all optional)

dispatchPid
string

GUID

If specified, no other parameters are allowed

originCountry
string

Two character country code, not needed if origin operator is specified

originOperator
string

Three character operator code

destinationCountry
string

Two character country code, not needed if destination operator is specified

destinationOperator
string

Two character operator code

originOffice
string

Six character office code from UPU code list 108

destinationOffice
string

Six character office code from UPU code list 108

mailCategory
string

Mail category A, B, C or D

Enum: "A" "B" "C" "D"
mailClass
string

Mail class U, C or E, not needed if the mail subclass is specified

Enum: "U" "C" "E"
mailSubClass
string

Value from UPU code list 117

state
string

Code from IPS table C_STATE_INS

dispatchDateFrom
string <date>

Dispatches with dispatch date on or after this date, in format YYYY-MM-DD

If no Dispatch ID or Dispatch PID is specified, then one or more of the dispatchDateFrom, dispatchDateTo, receiptDateFrom, receiptDateTo or year must be provided

Cannot combine with year parameter.

dispatchDateTo
string <date>

Dispatches with dispatch date on or before this date, in format YYYY-MM-DD

If no Dispatch ID or Dispatch PID is specified, then one or more of the dispatchDateFrom, dispatchDateTo, receiptDateFrom, receiptDateTo or year must be provided

Cannot combine with year parameter.

receiptDateFrom
string <date>

Dispatches with receipt date on or after this date, in format YYYY-MM-DD

If no Dispatch ID or Dispatch PID is specified, then one or more of the dispatchDateFrom, dispatchDateTo, receiptDateFrom, receiptDateTo or year must be provided

receiptDateTo
string <date>

Dispatches with receipt date on or before this date, in format YYYY-MM-DD

If no Dispatch ID or Dispatch PID is specified, then one or more of the dispatchDateFrom, dispatchDateTo, receiptDateFrom, receiptDateTo or year must be provided

lastEventGMTFrom
string <date-time>

Dispatches with last event on or after this date and time, in format YYYY-MM-DDThh:mm:ss.sss

lastEventGMTTo
string <date-time>

Dispatches with last event before this date and time, in format YYYY-MM-DDThh:mm:ss.sss

lastEventCaptureGMTFrom
string <date-time>

Dispatches with last event capture date on or after this date and time, in format YYYY-MM-DDThh:mm:ss.sss

lastEventCaptureGMTTo
string <date-time>

Dispatches with last event capture date before this date and time, in format YYYY-MM-DDThh:mm:ss.sss

serialNumberFrom
number [ 1 .. 9999 ]

Dispatches with serial number equal to or greater than this value, integer from 0001-9999

serialNumberTo
number [ 1 .. 9999 ]

Dispatches with serial number equal to or less than this value, integer from 0001-9999

Year
string

Format: YYYY

Dispatches with dispatch date in the specified year.

Cannot combine with parameters dispatchDateFrom and dispatchDateTo

includeHistory
boolean

Includes historic accounting dispatch records

Example: includeHistory=true
returnOnlyValidated
boolean

If true then we restrict the results to only validated dispatches

Example: returnOnlyValidated=true
Responses
200

Success

400

Bad Request

401

Unauthorized

500

Internal Server Error

get/AccountingDispatchService.svc/rest/accountingdispatches
Response samples
application/json
{
  • "AccountingDispatch": [
    ]
}

Import accounting dispatch data

Imports accounting dispatch data. If the dispatch does not exist, it is created; if it exists, it is updated.

Access to this method is authorized by the Import accounting dispatches operation.

This API method corresponds to the accounting dispatch import interface. The structure of this request body corresponds to the <AccDispatch> element of the interface XML schema and the validation performed is the same as that applied to accounting dispatches imported using the interface. For more information, see the IPS Import/Export Administration Guide.

For a 400 error response, error codes are included to give more information, as in the following example:

  Errors : [
    Error : {
      Message : "Invalid destination office (FKAA)",
      Code : 2
    },
    Error : {
      Message : "Invalid transit country (GX)",
      Code : 2
    },
    Error : {
      Message : "Bad dispatch date format (Monday 2019)",
      Code : 3
    },
  ]
}

The codes indicate the general type of error:

  1. The JSON request body cannot be parsed
  2. A reference data value is not valid
  3. A supplied value is not in the correct format
Securityips_token
Request
Request Body schema: application/json
DispatchId
required
string <= 20 characters ^[A-z0-9]{20}$

Dispatch identifier. S8 UPU standard dispatch ID

ExternalID
string <= 64 characters ^[A-z0-9]{64}$

ID for dispatch used in other systems, only, not used in IPS

ReceiptDt
string <date>

Date of arrival

DispatchDt
required
string <date>

Date of departure

Flights
string <= 512 characters

Taken flights in IATA format (carrier code (space) 4 digit carrier transport number); segments are separated with /

DispPreviousNo
integer

Previous dispatch number

TotalNoBags
integer

Number of included receptacles

TotalNoItems
integer

Total number of items

ReturnedBags
integer

Number of returned bags

TotalWeightGross
number <float> ^[0-9]{7}\.[0-9]{2}$

Total of gross weight

TotalWeightNet
number <float> ^[0-9]{7}\.[0-9]{2}$

Total of net weight

OriginalInd
string <= 1 characters

'1' when original document, '0' when substitute

Enum: "0" "1"
ExpressInd
string <= 1 characters

1 = contains express mail

Enum: "0" "1"
TrialNoteInd
string <= 1 characters

1 when a trial note (CN44) is attached to the document

Enum: "0" "1"
ClosedMailInd
string <= 1 characters

1 = contains closed transit

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

Free text information

ProductTypeCD
string <= 1 characters ^[A-z0-9]{1}$

Dispatch product type. Need to be a valid product type code

DuplicateNo
integer

Identification of several dispatches with same bar code

ActualNoBags
integer

Identifies the real number of receptacles that have been received for the current dispatch

CustomerReceptaclesInd
string <= 1 characters

'1' when containing customer receptacles

'0' otherwise

Enum: "0" "1"
ClearExistingStreams
string <= 1 characters

1 when existing stream have to be marked as deleted 0 (default) no deletion

Enum: "0" "1"
Array of objects (AccDispatchStreams)
object (AccDispatchEvent)
Array of objects (AccDispatchTransitLeg)
Array of objects (CN65Docs)
Array of objects (TEMSADecManifestRow)
Responses
200

Success

400

Bad Request

401

Unauthorized

500

Internal Server Error

post/AccountingDispatchService.svc/rest/accountingdispatches
Request samples
application/json
{
  • "AccDispatchStreams": [
    ],
  • "ClosedMailInd": "0",
  • "CustomerReceptaclesInd": "0",
  • "DispatchDt": "2022-11-10",
  • "DispatchId": "PLWAWACZPRGBAUN30296",
  • "AccDispatchEvent": {
    },
  • "ExpressInd": "0",
  • "Flights": "D5 00X1",
  • "OriginalInd": "1",
  • "TotalNoBags": 1,
  • "TotalWeightGross": 6.6,
  • "TotalWeightNet": 6.6,
  • "TrialNoteInd": "0"
}
Response samples
application/json
{
  • "AccountingDispatch": {
    }
}