# Transaction Request

The request expected by CMS to create a transaction

**Schema Version:** https://json-schema.org/draft/2020-12/schema

## Properties

### sourceApplication *(required)*
**Type:** `string`
**Description:** The unique identifier of the source application
**Allowed values:** `ATLAS`, `CTA`

### terminal *(required)*
**Type:** `string`
**Description:** The unique identifier for a terminal

### reference *(required)*
**Type:** `string`
**Description:** The unique local reference for the request to do a declaration for a specific terminal

### displayReference
**Type:** `string`
**Description:** The display value for the unique local reference for the request to do a declaration for a specific terminal

### taxCountry
**Type:** `string`
**Description:** The countrycode for the country where we have to pay national tax for in this case. CMS provides the possible values in an LOV API

### cmsReference
**Type:** `string`
**Description:** The unique cms reference so you can relate to a previous transaction

### overrideCheckAlert
**Type:** `string`
**Description:** Ability to override (ignore) the check alert warning when applicable, so declarations are created.
**Allowed values:** `Y`, `N`

### userId
**Type:** `string`
**Description:** User that called the transaction rest service.

### presentationDateTime
**Type:** `string`
**Description:** Timestamp transaction CMS. Standardized to UTC time format
**Format:** `date-time`
**Pattern:** `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$`

### normalProcedure
**Type:** `string`
**Description:** Indicates if the (Customs) Normal Procedure must be applied for declarations derived from this transaction. Default N.
**Allowed values:** `Y`, `N`

### customsProduct
**Type:** `object`
**Description:** Combines information about the parcels

#### customsValue
  **Type:** `object`
  **Description:** The customs value of the combined parcels

##### invoice
    **Type:** `object`
    **Description:** Filled if the customs value is based on an invoice

###### reference
      **Type:** `string`
      **Description:** the number / name of the invoice

###### amount
      **Type:** `number`
      **Description:** the amount of money invoiced

###### currency
      **Type:** `string`
      **Description:** the currency in which the amount is expressed, for now always use USD
      **Allowed values:** `USD`, `EUR`, Null

###### incotermCode
      **Type:** `string`
      **Description:** Applicable Incoterm, such as CIF or FOB. Default CIF
      **Allowed values:** `CIF`, `FOB`

###### elementsToInclude
      **Type:** `object`
      **Description:** Parts of the invoice which are important to determine customs value

####### freightCostsAmount
        **Type:** `number`
        **Description:** In case seperately indicated, the cost of freight

####### insuranceCostsAmount
        **Type:** `number`
        **Description:** In case seperately indicated, the cost of insurance

##### marketValue
    **Type:** `object`
    **Description:** Filled if the customs value is not based on an invoice

###### amount
      **Type:** `number`
      **Description:** Value of the goods according to current market situation

###### currency
      **Type:** `string`
      **Description:** the currency in which the amount is expressed, for now always use USD
      **Allowed values:** `USD`, `EUR`, Null

#### commodity
  **Type:** `object`
  **Description:** Information about the (end)product used for rebrand

##### code
    **Type:** `string`
    **Description:** The 10-digit taric code of the product

##### description
    **Type:** `string`
    **Description:** Commercial name of the product coming from the Source system

##### reference
    **Type:** `string`
    **Description:** Unique external reference of the product

### activities
**Type:** `array of object`
**Description:** An array with the activity for which the transaction is sent and any activities which might run in parallel

#### Array Items
#### reference
  **Type:** `string`
  **Description:** The unique local reference to the activity

#### displayReference
  **Type:** `string`
  **Description:** The display value for the unique local reference to the activity

#### activityType
  **Type:** `string`
  **Description:** The type of the activity
  **Allowed values:** `MOVEMENT`, `SERVICE`

#### serviceType
  **Type:** `string`
  **Description:** The type of service. Filled when the activityType is SERVICE
  **Allowed values:** `IMPORT`, `REBRAND`, `RENAME`, `DEPARTURE`, `ADMINISTRATIVE_STOCK_TRANSFER`, `TAKE_IN`, `SHIFTING`, `COMMODITY_CODE_CORRECTION`

#### relatedReference
  **Type:** `string`
  **Description:** Filled if it concerns a parallel activity. It holds the unique reference of the activity for which the transaction is sent

#### executedByExternalCustomsBroker
  **Type:** `string`
  **Description:** Shows if customs import is done by External broker. By default N.
			
#### medium
  **Type:** `array of object`
  **Description:** An array of parcels for the activities

##### Array Items
##### type
    **Type:** `string`
    **Description:** Holds information about the side of the activity. If it concerns a service it will be inStorageUnit
    **Allowed values:** `FROM_STORAGE_UNIT`, `TO_STORAGE_UNIT`, `IN_STORAGE_UNIT`

##### storageUnit
    **Type:** `object`
    **Description:** Information about the storage unit

###### storageUnitReference
      **Type:** `string`
      **Description:** the reference of the storage unit

###### visit
      **Type:** `object`
      **Description:** used if the storage unit is for a visit

####### visitReference
        **Type:** `string`
        **Description:** the local reference of the visit

####### transportMeansReference
        **Type:** `string`
        **Description:** How the visit is identified. In case of vessel/barge is the name, in case of truck its the license plate number

####### transportMeansTypeCode
        **Type:** `string`
        **Description:** The manner in which the transport means is identified, for example via license plate or via barge name.
        **Allowed values:** `RA`, `RO`, `VES`, `BAR`, `PI`, `TANK`, Null

####### transportMeansNationalityCode
        **Type:** `string`
        **Description:** The nationality of the means of transport

####### changedTransportArrangement
        **Type:** `string`
        **Description:** ?

###### tank
      **Type:** `object`
      **Description:** used if the storage unit is for a tank

####### tankName
        **Type:** `string`
        **Description:** the name of the tank

###### parcels
      **Type:** `array of object`
      **Description:** An array of parcels and their properties

####### Array Items
####### reference
        **Type:** `string`
        **Description:** The unique reference of the parcel

####### parentReference
        **Type:** `string`
        **Description:** The unique reference of the parcel from which the current parcel has been made

####### firstTimeArrival
        **Type:** `string`
        **Description:** Did this parcel arrive for the first time, or was it already under our license
        **Allowed values:** `Y`, `N`

####### inwardProcessingFlag
        **Type:** `string`
        **Description:** Has this parcel ever been subject to Inward Processing
        **Allowed values:** `Y`, `N`

####### commercialPolicyMeasureFlag
        **Type:** `string`
        **Description:** Is this parcel subjected to Commercial Policy Measures (CPM)
        **Allowed values:** `Y`, `N`

####### exceptionDocument
        **Type:** `string`
        **Description:** Are there any exception document to take into account
        **Allowed values:** `VAG`

####### parties
        **Type:** `object`

######## customer
          **Type:** `object`
          **Description:** Information about the Customer

######### reference
            **Type:** `string`
            **Description:** Unique identifier for CMS

######### name
            **Type:** `string`
            **Description:** The name/description

######### language
            **Type:** `string`
            **Description:** The language

######### eori
            **Type:** `string`
            **Description:** The unique registration number with EU customs

######### vatNumber
            **Type:** `string`
            **Description:** The identifier used for tax purposes

######### cbsCode
            **Type:** `string`
            **Description:** The code for this party for CBS (Centraal Bureau voor de Statistiek)

######### address
            **Type:** `object`
            **Description:** Address information

########## cityName
              **Type:** `string`
              **Description:** City name

########## countryCode
              **Type:** `string`
              **Description:** Country code in CMS

########## streetName
              **Type:** `string`
              **Description:** Street name

########## postalCode
              **Type:** `string`
              **Description:** Postal code

########## houseNumber
              **Type:** `string`
              **Description:** House number

######## consignee
          **Type:** `object`
          **Description:** Information about the Consignee, the receiver of a shipment

######### reference
            **Type:** `string`
            **Description:** Unique identifier for CMS

######### name
            **Type:** `string`
            **Description:** The name/description

######### eori
            **Type:** `string`
            **Description:** The unique registration number with EU customs

######### language
            **Type:** `string`
            **Description:** The language

######### exciseNumber
            **Type:** `string`
            **Description:** Valid SEED registration number of the authorised warehousekeeper or registered consignee

######### registeredConsigneeFlag
            **Type:** `string`
            **Description:** This indicates if the consignee is a registered consignee or not
            **Allowed values:** `Y`, `N`

######### cbsCode
            **Type:** `string`
            **Description:** The code for this party for CBS (Centraal Bureau voor de Statistiek)

######### monthlyStatementApproval
            **Type:** `string`
            **Description:** Indicates if the consignee makes use of monthly statement approval
            **Allowed values:** `Y`, `N`

######### address
            **Type:** `object`
            **Description:** Address information

########## cityName
              **Type:** `string`
              **Description:** City name

########## countryCode
              **Type:** `string`
              **Description:** Country code in CMS

########## streetName
              **Type:** `string`
              **Description:** Street name

########## postalCode
              **Type:** `string`
              **Description:** Postal code

########## houseNumber
              **Type:** `string`
              **Description:** House number

######## consignor
          **Type:** `object`
          **Description:** Information about the Consignor, the sender of a shipment. Not required. If empty, it will be derived from terminal address data

######### reference
            **Type:** `string`
            **Description:** Unique identifier for CMS

######### name
            **Type:** `string`
            **Description:** The name/description

######### eori
            **Type:** `string`
            **Description:** The unique registration number with EU customs

######### language
            **Type:** `string`
            **Description:** The language

######### exciseNumber
            **Type:** `string`
            **Description:** Valid SEED registration number of the authorised warehousekeeper or registered consignor

######### cbsCode
            **Type:** `string`
            **Description:** The code for this party for CBS (Centraal Bureau voor de Statistiek)

######### address
            **Type:** `object`
            **Description:** Address information

########## cityName
              **Type:** `string`
              **Description:** City name

########## countryCode
              **Type:** `string`
              **Description:** Country code in CMS

########## streetName
              **Type:** `string`
              **Description:** Street name

########## postalCode
              **Type:** `string`
              **Description:** Postal code

########## houseNumber
              **Type:** `string`
              **Description:** House number

######## placeOfDispatchTrader
          **Type:** `object`
          **Description:** Information about the party dispatching goods. Not required. If empty, it will be derived from terminal address data.

######### reference
            **Type:** `string`
            **Description:** Unique identifier for CMS

######### name
            **Type:** `string`
            **Description:** The name/description

######### eori
            **Type:** `string`
            **Description:** The unique registration number with EU customs

######### language
            **Type:** `string`
            **Description:** The language

######### referenceOfTaxWarehouse
            **Type:** `string`
            **Description:** Valid SEED registration number of the tax warehouse.

######### locationName
            **Type:** `string`
            **Description:** Name of the physical location at the terminal. Used for SHIFTING service.

######### cbsCode
            **Type:** `string`
            **Description:** The code for this party for CBS (Centraal Bureau voor de Statistiek)

######### address
            **Type:** `object`
            **Description:** Address information

########## cityName
              **Type:** `string`
              **Description:** City name

########## countryCode
              **Type:** `string`
              **Description:** Country code in CMS

########## streetName
              **Type:** `string`
              **Description:** Street name

########## postalCode
              **Type:** `string`
              **Description:** Postal code

########## houseNumber
              **Type:** `string`
              **Description:** House number

######## deliveryPlaceTrader
          **Type:** `object`
          **Description:** Information about the delivery place trader

######### reference
            **Type:** `string`
            **Description:** Unique identifier for CMS

######### name
            **Type:** `string`
            **Description:** The name/description

######### eori
            **Type:** `string`
            **Description:** The unique registration number with EU customs

######### language
            **Type:** `string`
            **Description:** The language

######### referenceOfTaxWarehouse
            **Type:** `string`
            **Description:** Valid SEED registration number of the tax warehouse.

######### locationName
            **Type:** `string`
            **Description:** Name of the physical location at the terminal. Used for SHIFTING service.

######### cbsCode
            **Type:** `string`
            **Description:** The code for this party for CBS (Centraal Bureau voor de Statistiek)

######### address
            **Type:** `object`
            **Description:** Address information

########## cityName
              **Type:** `string`
              **Description:** City name

########## countryCode
              **Type:** `string`
              **Description:** Country code in CMS

########## streetName
              **Type:** `string`
              **Description:** Street name

########## postalCode
              **Type:** `string`
              **Description:** Postal code

########## houseNumber
              **Type:** `string`
              **Description:** House number

######## exporter
          **Type:** `object`
          **Description:** Information about the exporter. Not required. If empty, it will be derived from the Seller-, or from the Customer address data.

######### reference
            **Type:** `string`
            **Description:** Unique identifier for CMS

######### name
            **Type:** `string`
            **Description:** The name/description

######### eori
            **Type:** `string`
            **Description:** The unique registration number with EU customs

######### language
            **Type:** `string`
            **Description:** The language

######### cbsCode
            **Type:** `string`
            **Description:** The code for this party for CBS (Centraal Bureau voor de Statistiek)

######### address
            **Type:** `object`
            **Description:** Address information

########## cityName
              **Type:** `string`
              **Description:** City name

########## countryCode
              **Type:** `string`
              **Description:** Country code in CMS

########## streetName
              **Type:** `string`
              **Description:** Street name

########## postalCode
              **Type:** `string`
              **Description:** Postal code

########## houseNumber
              **Type:** `string`
              **Description:** House number

######## seller
          **Type:** `object`
          **Description:** Information about the seller

######### reference
            **Type:** `string`
            **Description:** Unique identifier for CMS

######### name
            **Type:** `string`
            **Description:** The name/description

######### eori
            **Type:** `string`
            **Description:** The unique registration number with EU customs

######### language
            **Type:** `string`
            **Description:** The language

######### cbsCode
            **Type:** `string`
            **Description:** The code for this party for CBS (Centraal Bureau voor de Statistiek)

######### address
            **Type:** `object`
            **Description:** Address information

########## cityName
              **Type:** `string`
              **Description:** City name

########## countryCode
              **Type:** `string`
              **Description:** Country code in CMS

########## streetName
              **Type:** `string`
              **Description:** Street name

########## postalCode
              **Type:** `string`
              **Description:** Postal code

########## houseNumber
              **Type:** `string`
              **Description:** House number

####### location
        **Type:** `object`
        **Description:** Information about the location of the goods

######## language
          **Type:** `string`
          **Description:** Language used at the location of the goods

######## address
          **Type:** `object`
          **Description:** Address information about location of the goods

######### cityName
            **Type:** `string`
            **Description:** City name

######### countryCode
            **Type:** `string`
            **Description:** Country code in CMS

######### streetName
            **Type:** `string`
            **Description:** Street name

######### postalCode
            **Type:** `string`
            **Description:** Postal code

######### houseNumber
            **Type:** `string`
            **Description:** House number

####### destinationCountryCode
        **Type:** `string`
        **Description:** CMS code for the country where the goods are destined for

####### dispatchCountryCode
        **Type:** `string`
        **Description:** CMS code for the country from where the goods were dispatched

####### exitOffice
        **Type:** `object`
        **Description:** the exitOffice will overwrite the default exit Office of a terminal

######## reference
          **Type:** `string`
          **Description:** Unique identifier for CMS

######## name
          **Type:** `string`
          **Description:** The name/description

######## id
          **Type:** `string`
          **Description:** The unique ID of the exit office according the code list of customs offices:  CL294

####### origin
        **Type:** `array of object`
        **Description:** Information about the origin

######## Array Items
######## type
          **Type:** `string`
          **Description:** Indicates if the type of origin
          **Allowed values:** `PREFERENTIAL`, `NON-PREFERENTIAL`

######## countryCode
          **Type:** `string`
          **Description:** The code of the origin. CMS provides an LOV via API with possible values

####### commodity
        **Type:** `object`
        **Description:** Information about the product

######## code
          **Type:** `string`
          **Description:** The 10-digit taric code of the product

######## description
          **Type:** `string`
          **Description:** Commercial name of the product coming from the Source system

######## reference
          **Type:** `string`
          **Description:** Unique external reference of the product

####### customsValue
        **Type:** `object`
        **Description:** The customs value of the parcel

######## marketValue
          **Type:** `object`
          **Description:** Filled if the customs value is not based on an invoice

######### amount
            **Type:** `number`
            **Description:** Value of the goods according to current market situation

######### currency
            **Type:** `string`
            **Description:** the currency in which the amount is expressed, for now always use USD
            **Allowed values:** `USD`, `EUR`, Null

####### customsStatus
        **Type:** `string`
        **Description:** The standardized customs status of the goods
        **Allowed values:** `BONDED`, `EXCISE`, `DOMESTIC`

####### cargoDocuments
        **Type:** `array of object`
        **Description:** Cargo documents to needed for the customs declarations

######## Array Items
######## type
          **Type:** `string`
          **Description:** The type of the document
          **Allowed values:** `MANIFEST_INFO`, `B_L`, `AGRIM`, `AT_R`, `EUR_1`, `EUR_MED`, `INVOICE`, `ORIG_DECL`, `INF3`, `STAT_ON_ORIG`, `T2L_F`, `T2L`, `E_AD`, `T1`, `T2`, `EVIDENCE`

######## reference
          **Type:** `string`
          **Description:** The name/number/identication of the document

####### unNumber
        **Type:** `string`
        **Description:** United Nations Dangerous Goods Identifier (UNDG)

####### quantities
        **Type:** `array of object`
        **Description:** The quantities related to the parcel

######## Array Items
######## type
          **Type:** `string`
          **Description:** The type of quantity
          **Allowed values:** `PLANNED`, `ACTUAL`

######## kgv
          **Type:** `number`
          **Description:** quantity in kilograms in vacuum

######## kga
          **Type:** `number`
          **Description:** quantity in kilograms in air

######## gma
          **Type:** `number`
          **Description:** quantity in kilograms in air, with decimals

######## gmv
          **Type:** `number`
          **Description:** quantity in kilograms in vacuum, with decimals 

######## l15
          **Type:** `number`
          **Description:** quantity in liters at 15 degrees celcius

######## l20
          **Type:** `number`
          **Description:** quantity in liters at 20 degrees celcius

######## ml5
          **Type:** `number`
          **Description:** quantity in liters at 15 degrees celcius, with decimals
		  
######## alcPerc
          **Type:** `number`
          **Description:** the alcohol percentage. Percentage of ethanol

####### density
        **Type:** `object`
        **Description:** Information about the density of a parcel

######## value
          **Type:** `number`
          **Description:** Value of the density 5,2

######## uom
          **Type:** `string`
          **Description:** The  Unit of Measure D15 (15 vac), D1A (15 air)
          **Allowed values:** `D15`, `D1A`

## Example JSON

```json
{
  "sourceApplication": "ATLAS",
  "terminal": "example_string",
  "reference": "example_string",
  "displayReference": "example_string",
  "taxCountry": "example_string",
  "cmsReference": "example_string",
  "overrideCheckAlert": "Y",
  "userId": "example_string",
  "presentationDateTime": "2023-12-01T10:00:00Z",
  "normalProcedure": "Y",
  "customsProduct": {
    "customsValue": {
      "invoice": {
        "reference": "example_string",
        "amount": 42,
        "currency": "USD",
        "incotermCode": "CIF",
        "elementsToInclude": {
          "freightCostsAmount": 42,
          "insuranceCostsAmount": 42
        }
      },
      "marketValue": {
        "amount": 42,
        "currency": "USD"
      }
    },
    "commodity": {
      "code": "example_string",
      "description": "example_string",
      "reference": "example_string"
    }
  },
  "activities": [
    {
      "reference": "example_string",
      "displayReference": "example_string",
      "activityType": "MOVEMENT",
      "serviceType": "IMPORT",
      "relatedReference": "example_string",
      "medium": [
        {
          "type": "FROM_STORAGE_UNIT",
          "storageUnit": {
            "storageUnitReference": "example_string",
            "visit": {
              "visitReference": "example_string",
              "transportMeansReference": "example_string",
              "transportMeansTypeCode": "RA",
              "transportMeansNationalityCode": "example_string",
              "changedTransportArrangement": "example_string"
            },
            "tank": {
              "tankName": "example_string"
            },
            "parcels": [
              {
                "reference": "example_string",
                "parentReference": "example_string",
                "inwardProcessingFlag": "Y",
                "commercialPolicyMeasureFlag": "Y",
                "exceptionDocument": "VAG",
                "parties": {
                  "customer": {
                    "reference": "example_string",
                    "name": "example_string",
                    "language": "example_string",
                    "eori": "example_string",
                    "vatNumber": "example_string",
                    "cbsCode": "example_string",
                    "address": {
                      "cityName": "example_string",
                      "countryCode": "example_string",
                      "streetName": "example_string",
                      "postalCode": "example_string",
                      "houseNumber": "example_string"
                    }
                  },
                  "consignee": {
                    "reference": "example_string",
                    "name": "example_string",
                    "eori": "example_string",
                    "language": "example_string",
                    "exciseNumber": "example_string",
                    "registeredConsigneeFlag": "N",
                    "cbsCode": "example_string",
                    "monthlyStatementApproval": "Y",
                    "address": {
                      "cityName": "example_string",
                      "countryCode": "example_string",
                      "streetName": "example_string",
                      "postalCode": "example_string",
                      "houseNumber": "example_string"
                    }
                  },
                  "consignor": {
                    "reference": "example_string",
                    "name": "example_string",
                    "eori": "example_string",
                    "language": "example_string",
                    "exciseNumber": "example_string",
                    "cbsCode": "example_string",
                    "address": {
                      "cityName": "example_string",
                      "countryCode": "example_string",
                      "streetName": "example_string",
                      "postalCode": "example_string",
                      "houseNumber": "example_string"
                    }
                  },
                  "placeOfDispatchTrader": {
                    "reference": "example_string",
                    "name": "example_string",
                    "eori": "example_string",
                    "language": "example_string",
                    "referenceOfTaxWarehouse": "example_string",
                    "locationName": "example_string",
                    "cbsCode": "example_string",
                    "address": {
                      "cityName": "example_string",
                      "countryCode": "example_string",
                      "streetName": "example_string",
                      "postalCode": "example_string",
                      "houseNumber": "example_string"
                    }
                  },
                  "deliveryPlaceTrader": {
                    "reference": "example_string",
                    "name": "example_string",
                    "eori": "example_string",
                    "language": "example_string",
                    "referenceOfTaxWarehouse": "example_string",
                    "locationName": "example_string",
                    "cbsCode": "example_string",
                    "address": {
                      "cityName": "example_string",
                      "countryCode": "example_string",
                      "streetName": "example_string",
                      "postalCode": "example_string",
                      "houseNumber": "example_string"
                    }
                  },
                  "exporter": {
                    "reference": "example_string",
                    "name": "example_string",
                    "eori": "example_string",
                    "language": "example_string",
                    "cbsCode": "example_string",
                    "address": {
                      "cityName": "example_string",
                      "countryCode": "example_string",
                      "streetName": "example_string",
                      "postalCode": "example_string",
                      "houseNumber": "example_string"
                    }
                  },
                  "seller": {
                    "reference": "example_string",
                    "name": "example_string",
                    "eori": "example_string",
                    "language": "example_string",
                    "cbsCode": "example_string",
                    "address": {
                      "cityName": "example_string",
                      "countryCode": "example_string",
                      "streetName": "example_string",
                      "postalCode": "example_string",
                      "houseNumber": "example_string"
                    }
                  }
                },
                "location": {
                  "language": "example_string",
                  "address": {
                    "cityName": "example_string",
                    "countryCode": "example_string",
                    "streetName": "example_string",
                    "postalCode": "example_string",
                    "houseNumber": "example_string"
                  }
                },
                "destinationCountryCode": "example_string",
                "dispatchCountryCode": "example_string",
                "exitOffice": {
                  "reference": "example_string",
                  "name": "example_string",
                  "id": "example_string"
                },
                "origin": [
                  {
                    "type": "PREFERENTIAL",
                    "countryCode": "example_string"
                  }
                ],
                "commodity": {
                  "code": "example_string",
                  "description": "example_string",
                  "reference": "example_string"
                },
                "customsValue": {
                  "marketValue": {
                    "amount": 42,
                    "currency": "USD"
                  }
                },
                "customsStatus": "BONDED",
                "cargoDocuments": [
                  {
                    "type": "MANIFEST_INFO",
                    "reference": "example_string"
                  }
                ],
                "unNumber": "example_string",
                "quantities": [
                  {
                    "type": "PLANNED",
                    "kgv": 42,
                    "kga": 42,
                    "gma": 42.345,
                    "gmv": 42.345,
                    "l15": 42,
                    "l20": 42,
                    "ml5": 0.5,
                    "alcPerc": 42
                  }
                ],
                "density": {
                  "value": 42,
                  "uom": "D15"
                }
              }
            ]
          }
        }
      ]
    }
  ]
}
```