# Transaction Request JSON Schema

**Title:** Transaction Request  
**Description:** The request expected by CMS to create a transaction

## Properties

### sourceApplication
- **Description:** The unique identifier of the source application
- **Type:** string
- **Enum:** `["ATLAS"]`

### terminal
- **Description:** The unique identifier for a terminal
- **Type:** string

### reference
- **Description:** The unique local reference for the request to do a declaration for a specific terminal
- **Type:** string

### displayReference
- **Description:** The display value for the unique local reference for the request to do a declaration for a specific terminal
- **Type:** string

### taxCountry
- **Description:** The country code for the country where national tax is paid. CMS provides possible values in an LOV API
- **Type:** string

### cmsReference
- **Description:** The unique CMS reference to relate to a previous transaction
- **Type:** string

### customsProduct
- **Description:** Combines information about the parcels
- **Type:** object

#### customsProduct.customsValue
- **Description:** The customs value of the combined parcels
- **Type:** object

##### customsValue.invoice
- **Description:** Filled if the customs value is based on an invoice
- **Type:** object
  - **reference:** (string) the number/name of the invoice
  - **amount:** (number) the amount of money invoiced
  - **currency:** (string) the currency, use "USD" or "EUR"
  - **incotermCode:** (string) Applicable Incoterm, such as "CIF" or "FOB"
  - **elementsToInclude:** (object)
    - **freightCostsAmount:** (number) cost of freight
    - **insuranceCostsAmount:** (number) cost of insurance

##### customsValue.marketValue
- **Description:** Filled if the customs value is not based on an invoice
- **Type:** object
  - **amount:** (number) Value of the goods according to current market situation
  - **currency:** (string) the currency, use "USD" or "EUR"

### activities
- **Description:** An array with the activity for which the transaction is sent and any activities which might run in parallel
- **Type:** array of objects

#### activities[].properties
- **reference:** (string) The unique local reference to the activity
- **displayReference:** (string) The display value for the unique local reference to the activity
- **activityType:** (string) "MOVEMENT" or "SERVICE"
- **serviceType:** (string) "IMPORT", "BLEND", "DEPARTURE", or null
- **relatedReference:** (string) Reference of the related activity
- **medium:** (array) Array of parcels for the activities

##### medium[].properties
- **type:** (string) "FROM_STORAGE_UNIT", "TO_STORAGE_UNIT", "IN_STORAGE_UNIT"
- **storageUnit:** (object) Information about the storage unit
  - **storageUnitReference:** (string)
  - **visit:** (object) Visit details
  - **tank:** (object) Tank details
  - **parcels:** (array) Array of parcels and their properties

###### parcels[].properties
- **reference:** (string) Unique reference of the parcel
- **parentReference:** (string) Reference of the parent parcel
- **firstTimeArrival:** (string) "Y" or "N"
- **inwardProcessingFlag:** (string) "Y" or "N"
- **exceptionDocument:** (string) "VAG"
- **parties:** (object) Information about involved parties (customer, consignee, consignor, etc.)
- **location:** (object) Information about the location of the goods
- **exportCountryCode:** (string) Country code from which goods were exported
- **destinationCountryCode:** (string) Country code where goods are destined
- **dispatchCountryCode:** (string) Country code from where goods were dispatched
- **origin:** (array) Origin information
- **commodity:** (object) Product information
- **customsValue:** (object) Customs value of the parcel
- **customsStatus:** (string) Standardized customs status
- **cargoDocuments:** (object) Cargo documents for customs declarations
- **unNumber:** (string)
- **quantities:** (object) Quantities information

---

**Note:**  
This is a summary of the main structure and fields. For detailed nested properties and enumerations, refer to the JSON schema file.