# Visa Travel Notification Service

# Visa Travel Notification API

Incorporate cardholder self-reported travel into your authorization decisions

## Update Travel Itinerary  v1 - Latest

Update Travel Itinerary allows you to update details of existing travel itineraries. A successful response includes confirmation that the update was successful, which user made the update, and when the update occurred. You will use this API when you need to make changes to an existing travel itinerary, such as when a cardholder informs you the plan has changed.

### Request

##### Request Body schema: application/json

|     |     |
| --- | --- |
| departureDate<br>required | string^([0-9]{4}-(0[1-9]{1}|1[0-2]{1})-(0[1-9]{1}|([12][0-9]|3[01]))$<br>The date your cardholder will start their trip. Must be in format YYYY-MM-DD and must not be after the Return Date in the request. |
| destinations<br>required | Array of objects | 
|     |     | 
| --- | --- | 
| country<br>required | string^([0-9]{1,3})$<br>The country where your cardholder will travel. If your cardholder will travel to multiple countries, you can include multiple countries in a single request. Must be a 3 character country code, as specified in the ISO 3166-1. |
| state | string^([A-Z][A-Z])$<br>The state or province where your cardholder will travel… |
| primaryAccountNumbers<br>required | Array of objects | 
|     |     | 
| --- | --- | 
| cardAccountNumber | string^([0-9]{16,19})$<br>Card Account Number holds the numeric PAN and PAN should always be between 16 - 19 digits | 
| returnDate<br>required | string^([0-9]{4}-(0[1-9]{1}|1[0-2]{1})-(0[1-9]{1}|([12][0-9]|3[01]))$<br>The date your cardholder will return from the trip. Must be in format YYYY-MM-DD and must not be before the Departure Date in the request or before the current date. |
| travelItineraryId<br>required | string^([A]?[0-9]{1,19})$<br>Itinerary ID for the travel plan stored in the system. |
| partnerBid | string^([0-9]{8})$<br>Your Visa Business Identifier (BID). This field is required for OBO issuer or third part resellers. |
| userId | string<br>User ID you assigned to identify the cardholder using the service. |

### Responses

#### 200

UpdateTravelItinerary response

##### Response Schema: application/json

|     |     |
| --- | --- |
| failureCode | string<br>Error code specific for CRUD operations |
| failureDescription | string<br>Error description specific for CRUD operations |
| responseCode | string<br>Web service response code |
| responseMessage | string<br>service response text specific for CRUD operations |
| travelItinerary | object<br>An itinerary detail | 
|     |     |     |
| --- | --- |
| departureDate<br>required | string^([0-9]{4}-(0[1-9]{1}|1[0-2]{1})-(0[1-9]{1}|([12][0-9]|3[01]))$<br>The date your cardholder will start their trip. Format is YYYY-MM-DD. |
| destinations<br>required | Array of objects | 
| Array | 
|     |     | 
| --- | --- | 
| country<br>required | string^([0-9]{1,3})$<br>The country where your cardholder will travel. If your cardholder will travel to multiple countries, you can include multiple countries in a single request. Must be a 3 character country code, as specified in the ISO 3166-1. |
| state | string^([A-Z][A-Z])$<br>The state or province where your cardholder will travel… |
| lastUpdatedBy<br>required | string^([A-Z][0-9][a-z]{1,50})$<br>User who updated the itinerary in current state. |
| partnerBid<br>required | string^([0-9]{8})$<br>Your Visa Business Identifier (BID). |
| primaryAccountNumbers<br>required | Array of objects | 
| Array | 
|     |     | 
| --- | --- | 
| cardAccountNumber | string^([0-9]{16,19})$<br>Card Account Number holds the numeric PAN and PAN should always be between 16 - 19 digits | 
| source<br>required | string<br>The source of the travel itinerary in the Visa system. When a travel itinerary is submitted to Visa through the Visa Travel Notification Service, the Source field in the response will be Cardholder Self Reported. |
| travelItineraryId<br>required | string^([A]?[0-9]{1,19})$<br>Itinerary ID for the travel plan stored in the system. |
| lastUpdateTime | string<br>Time in format YYYY-MM-DDTHH:MM:SS. |
| returnDate | string^([0-9]{4}-(0[1-9]{1}|1[0-2]{1})-(0[1-9]{1}|([12][0-9]|3[01]))$<br>The date your cardholder will return from their trip. Format is YYYY-MM-DD. |
| userId | string<br>User ID you assigned to identify the cardholder using the service. |

#### 202

Validation Failures

##### Response Schema: application/json

|     |     |
| --- | --- |
| responseCode<br>required | string<br>Service response code<br>Enum:"0""5""10""15""20"<br>Example: "0" |
| responseMessage<br>required | string<br>Service response text specific for CRUD operations<br>Example: "Successfully processed" |

#### 400

Bad Request

##### Response Schema: application/json

string

#### 403

Forbidden Operation to requested resource

##### Response Schema: application/json

string

#### 404

Server has not found anything matching the request URI

##### Response Schema: application/json

string

#### 500

Temporary Downtime - retry operation after waiting

##### Response Schema: application/json

string

#### 503

Temporary Downtime for maintenance - retry operation after waiting

##### Response Schema: application/json

string

#### Error Codes

| Status | Code | Description |
| --- | --- | --- |
| 503 |  | Temporary Downtime for maintenance - retry operation after waiting |
| 202 | 14 | Account is not valid. |
| 202 | 20 | Validation Failed. [899_CA is not a valid destination.] |
| 202 | 20 | Validation Failed. [Return Date must be after or same as Departure Date] |
| 202 | 5 | Partner BID is not enabled for this service. |
| 202 | 11 | The VDP Application Name is not associated to the Partner BID in the request. Please contact VDP Support. |
| 404 |  | Server has not found anything matching the request URI |
| 403 |  | Forbidden Operation to requested resource |
| 500 |  | Temporary Downtime - retry operation after waiting |
| 400 |  | Bad Request |

put/travelnotificationservice/v1/travelnotification/itinerary

### Request samples

- Payload

application/json

```json
{"updateTravelItinerary": {"returnDate": "2016-04-28","partnerBid": "10074101","travelItineraryId": "2312","destinations": [{"country": "840","state": "CA"}],"primaryAccountNumbers": [{"cardAccountNumber": "4645191800301236"},{"cardAccountNumber": "4645191800301237"}],"departureDate": "2016-04-21","userId": "rajpande"}}
```

### Response samples

- 200
- 202
- 400
- 403
- 404
- 500
- 503

```json
{"updateTravelItineraryResponse": {"responseCode": "0","responseMessage": "Success Transaction","travelItinerary": {"source": "Cardholder Self-Reported","userId": "rajpandey","partnerBid": "10074101","returnDate": "2016-04-28","destinations": [{"state": "CA","country": "840"}],"departureDate": "2016-04-21","lastUpdatedBy": "rajpandey","lastUpdateTime": "2016-04-04","travelItineraryId": "2313","primaryAccountNumbers": [{"cardAccountNumber": "4645191800301236"},{"cardAccountNumber": "4645191800301237"}]}}}
```
