# Transaction Response

The response returned by CMS after a request to create a transaction

**Schema Version:** https://json-schema.org/draft/2020-12/schema

## Properties

### cmsReference *(required)*
**Type:** `string`
**Description:** The unique identifier of the transaction within CMS

### reference *(required)*
**Type:** `string`
**Description:** The unique local reference for the request to do a transaction for a specific terminal

### processStatus *(required)*
**Type:** `string`
**Description:** Status indicating if the process may continue or not. APPROVED means the process may continue. ACTION_REQUIRED means that the process may not continue. PENDING means that we have not determined yet if its ok or not to continue, Atlas then needs to check the status of the transaction again later
**Allowed values:** `APPROVED`, `ACTION_REQUIRED`, `PENDING`, `PROVISIONAL`

### unbookingNeedsAttention
**Type:** `string`
**Description:** If one of the declarations within a transaction is send to customs and processed/approved it is not allowed to unbook the transaction without interaction
**Allowed values:** `Y`, `N`

### blendRegistrationRequired
**Type:** `string`
**Description:** If for one of the declarations within a transaction a blend is required, this field returns Y. Otherwise N. If not applicable, null is returned.
**Allowed values:** `Y`, `N`, Null

### checkAlert
**Type:** `string`
**Description:** If check loose of customs status T2 is raised then this element is filled with warning message.

### parcels
**Type:** `array of object`
**Description:** Array of parcels for which action needs to be undertaken by Atlas

#### Array Items
#### cmsReference *(required)*
  **Type:** `string`
  **Description:** The CMS reference for the parcel

#### reference *(required)*
  **Type:** `string`
  **Description:** The local reference for the parcel

#### customsStatus
  **Type:** `string`
  **Description:** Returned if the Customs Status of the parcel needs to be updated
  **Allowed values:** `BONDED`, `EXCISE`, `DOMESTIC`

#### inwardProcessingFlag
  **Type:** `string`
  **Description:** Returned if the inward-processing-flag (IP-flag) needs to be updated
  **Allowed values:** `Y`, `N`

#### commercialPolicyMeasureFlag
  **Type:** `string`
  **Description:** Returned if the commercial-policy-measure-flag (CPM-flag) needs to be updated
  **Allowed values:** `Y`, `N`

#### arc
  **Type:** `string`
  **Description:** The ARC reference received from Customs, for EMCS transactions

#### mailStatus
  **Type:** `string`
  **Description:** This is the status of the email send for a declarations which is related to a parcel.
  **Allowed values:** `PROCESSED`, `NO_MAIL`, `REJECTED`, `PENDING`

#### dispatchCountryCode
  **Type:** `string`
  **Description:** CMS code for the country from where the goods were dispatched

#### origin
  **Type:** `array of object`
  **Description:** Its an array to stay consistent with the request json, but it will always contain only 1 origin object (non-preferential)

##### Array Items
##### type *(required)*
    **Type:** `string`
    **Description:** Indicates if the type of origin
    **Allowed values:** `PREFERENTIAL`, `NON-PREFERENTIAL`

##### countryCode *(required)*
    **Type:** `string`
    **Description:** The code of the origin.

#### customsValue
  **Type:** `object`
  **Description:** The customs value of the parcel

##### marketValue
    **Type:** `object`
    **Description:** Marketvalue section of the parcel

###### 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
      **Allowed values:** `USD`, `EUR`, Null

### errors
**Type:** `array of object`
**Description:** In case of a technical error this object will be displayed

#### Array Items
#### code
  **Type:** `string`
  **Description:** Error code

#### description
  **Type:** `string`
  **Description:** Error message

## Example JSON

```json
{
  "cmsReference": "example_string",
  "reference": "example_string",
  "processStatus": "APPROVED",
  "unbookingNeedsAttention": "Y",
  "blendRegistrationRequired": "Y",
  "checkAlert": "example_string",
  "parcels": [
    {
      "cmsReference": "example_string",
      "reference": "example_string",
      "customsStatus": "BONDED",
      "inwardProcessingFlag": "Y",
      "commercialPolicyMeasureFlag": "Y",
      "arc": "example_string",
      "mailStatus": "PROCESSED",
      "dispatchCountryCode": "example_string",
      "origin": [
        {
          "type": "PREFERENTIAL",
          "countryCode": "example_string"
        }
      ],
      "customsValue": {
        "marketValue": {
          "amount": 42,
          "currency": "USD"
        }
      }
    }
  ],
  "errors": [
    {
      "code": "example_string",
      "description": "example_string"
    }
  ]
}
```