addCountries
post
/ccadmin/v1/countries/addCountries
Add all the specified countries along with specified regions
Request
Supported Media Types
- application/json
Root Schema : addCountries_request
Type:
Show Source
object
-
countries(optional):
array countries
The list of countries to be added.
Example:
{
"countries":[
{
"regions":[
{
"regionCode":"CA-AB",
"displayName":"Alberta",
"abbreviation":"AB"
},
{
"regionCode":"CA-BC",
"displayName":"British Columbia",
"abbreviation":"BC"
},
{
"regionCode":"CA-MB",
"displayName":"Manitoba",
"abbreviation":"MB"
},
{
"regionCode":"CA-NB",
"displayName":"New Brunswick",
"abbreviation":"NB"
},
{
"regionCode":"CA-NL",
"displayName":"Newfoundland and Labrador",
"abbreviation":"NL"
},
{
"regionCode":"CA-NT",
"displayName":"Northwest Territories",
"abbreviation":"NT"
},
{
"regionCode":"CA-NS",
"displayName":"Nova Scotia",
"abbreviation":"NS"
},
{
"regionCode":"CA-NU",
"displayName":"Nunavut",
"abbreviation":"NU"
},
{
"regionCode":"CA-ON",
"displayName":"Ontario",
"abbreviation":"ON"
},
{
"regionCode":"CA-PE",
"displayName":"Prince Edward Island",
"abbreviation":"PE"
},
{
"regionCode":"CA-QC",
"displayName":"Quebec",
"abbreviation":"QC"
},
{
"regionCode":"CA-SK",
"displayName":"Saskatchewan",
"abbreviation":"SK"
},
{
"regionCode":"CA-YT",
"displayName":"Yukon",
"abbreviation":"YT"
}
],
"countryCode":"CA",
"displayName":"Canada"
},
{
"regions":[
{
"regionCode":"IN-AN",
"displayName":"Andaman and Nicobar Islands",
"abbreviation":"AN"
},
{
"regionCode":"IN-AP",
"displayName":"Andhra Pradesh",
"abbreviation":"AP"
},
{
"regionCode":"IN-AR",
"displayName":"Arunachal Pradesh",
"abbreviation":"AR"
},
{
"regionCode":"IN-AS",
"displayName":"Assam",
"abbreviation":"AS"
},
{
"regionCode":"IN-BR",
"displayName":"Bihar",
"abbreviation":"BR"
},
{
"regionCode":"IN-CH",
"displayName":"Chandigarh",
"abbreviation":"CH"
},
{
"regionCode":"IN-CT",
"displayName":"Chhattisgarh",
"abbreviation":"CT"
},
{
"regionCode":"IN-DN",
"displayName":"Dadra and Nagar Haveli",
"abbreviation":"DN"
},
{
"regionCode":"IN-DD",
"displayName":"Daman and Diu",
"abbreviation":"DD"
},
{
"regionCode":"IN-DL",
"displayName":"Delhi",
"abbreviation":"DL"
},
{
"regionCode":"IN-GA",
"displayName":"Goa",
"abbreviation":"GA"
},
{
"regionCode":"IN-GJ",
"displayName":"Gujarat",
"abbreviation":"GJ"
},
{
"regionCode":"IN-HR",
"displayName":"Haryana",
"abbreviation":"HR"
},
{
"regionCode":"IN-HP",
"displayName":"Himachal Pradesh",
"abbreviation":"HP"
},
{
"regionCode":"IN-JK",
"displayName":"Jammu and Kashmir",
"abbreviation":"JK"
},
{
"regionCode":"IN-JH",
"displayName":"Jharkhand",
"abbreviation":"JH"
},
{
"regionCode":"IN-KA",
"displayName":"Karnataka",
"abbreviation":"KA"
},
{
"regionCode":"IN-KL",
"displayName":"Kerala",
"abbreviation":"KL"
},
{
"regionCode":"IN-LD",
"displayName":"Lakshadweep",
"abbreviation":"LD"
},
{
"regionCode":"IN-MP",
"displayName":"Madhya Pradesh",
"abbreviation":"MP"
},
{
"regionCode":"IN-MH",
"displayName":"Maharashtra",
"abbreviation":"MH"
},
{
"regionCode":"IN-MN",
"displayName":"Manipur",
"abbreviation":"MN"
},
{
"regionCode":"IN-ML",
"displayName":"Meghalaya",
"abbreviation":"ML"
},
{
"regionCode":"IN-MZ",
"displayName":"Mizoram",
"abbreviation":"MZ"
},
{
"regionCode":"IN-NL",
"displayName":"Nagaland",
"abbreviation":"NL"
},
{
"regionCode":"IN-OR",
"displayName":"Orissa",
"abbreviation":"OR"
},
{
"regionCode":"IN-PY",
"displayName":"Pondicherry",
"abbreviation":"PY"
},
{
"regionCode":"IN-PB",
"displayName":"Punjab",
"abbreviation":"PB"
},
{
"regionCode":"IN-RJ",
"displayName":"Rajasthan",
"abbreviation":"RJ"
},
{
"regionCode":"IN-SK",
"displayName":"Sikkim",
"abbreviation":"SK"
},
{
"regionCode":"IN-TN",
"displayName":"Tamil Nadu",
"abbreviation":"TN"
},
{
"regionCode":"IN-TR",
"displayName":"Tripura",
"abbreviation":"TR"
},
{
"regionCode":"IN-UT",
"displayName":"Uttarakhand",
"abbreviation":"UT"
},
{
"regionCode":"IN-UP",
"displayName":"Uttar Pradesh",
"abbreviation":"UP"
},
{
"regionCode":"IN-WB",
"displayName":"West Bengal",
"abbreviation":"WB"
}
],
"countryCode":"IN",
"displayName":"India"
}
]
}
Nested Schema : items
Type:
Show Source
object
-
countryCode(optional):
string
The country code of the country item.
-
displayName(optional):
string
Localized country name
-
regions(optional):
array regions
The list of regions for particular country.
Nested Schema : items
Type:
Show Source
object
-
abbreviation(optional):
string
The region code in abbreviated form. Usually a 2 letter country code
-
displayName(optional):
string
Localized region name.
-
regionCode(optional):
string
The region code (normally its ISO 3166-2 code).
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : addCountries_response
Type:
Show Source
object
-
countries(optional):
array countries
The list of countries to be added.
Nested Schema : items
Type:
Show Source
object
-
countryCode(optional):
string
The country code of the country item.
-
displayName(optional):
string
Localized country name
-
regions(optional):
array regions
The list of regions for particular country.
Nested Schema : items
Type:
Show Source
object
-
abbreviation(optional):
string
The region code in abbreviated form. Usually a 2 letter country code
-
displayName(optional):
string
Localized region name.
-
regionCode(optional):
string
The region code (normally its ISO 3166-2 code).
Example Response (application/json)
[
[
{
"regions":[
{
"regionCode":"CA-AB",
"displayName":"Alberta",
"repositoryId":"CA-AB",
"abbreviation":"AB"
},
{
"regionCode":"CA-BC",
"displayName":"British Columbia",
"repositoryId":"CA-BC",
"abbreviation":"BC"
},
{
"regionCode":"CA-MB",
"displayName":"Manitoba",
"repositoryId":"CA-MB",
"abbreviation":"MB"
},
{
"regionCode":"CA-NB",
"displayName":"New Brunswick",
"repositoryId":"CA-NB",
"abbreviation":"NB"
},
{
"regionCode":"CA-NL",
"displayName":"Newfoundland and Labrador",
"repositoryId":"CA-NL",
"abbreviation":"NL"
},
{
"regionCode":"CA-NT",
"displayName":"Northwest Territories",
"repositoryId":"CA-NT",
"abbreviation":"NT"
},
{
"regionCode":"CA-NS",
"displayName":"Nova Scotia",
"repositoryId":"CA-NS",
"abbreviation":"NS"
},
{
"regionCode":"CA-NU",
"displayName":"Nunavut",
"repositoryId":"CA-NU",
"abbreviation":"NU"
},
{
"regionCode":"CA-ON",
"displayName":"Ontario",
"repositoryId":"CA-ON",
"abbreviation":"ON"
},
{
"regionCode":"CA-PE",
"displayName":"Prince Edward Island",
"repositoryId":"CA-PE",
"abbreviation":"PE"
},
{
"regionCode":"CA-QC",
"displayName":"Quebec",
"repositoryId":"CA-QC",
"abbreviation":"QC"
},
{
"regionCode":"CA-SK",
"displayName":"Saskatchewan",
"repositoryId":"CA-SK",
"abbreviation":"SK"
},
{
"regionCode":"CA-YT",
"displayName":"Yukon",
"repositoryId":"CA-YT",
"abbreviation":"YT"
}
],
"countryCode":"CA",
"displayName":"Canada",
"repositoryId":"CA"
},
{
"regions":[
{
"regionCode":"IN-AN",
"displayName":"Andaman and Nicobar Islands",
"repositoryId":"IN-AN",
"abbreviation":"AN"
},
{
"regionCode":"IN-AP",
"displayName":"Andhra Pradesh",
"repositoryId":"IN-AP",
"abbreviation":"AP"
},
{
"regionCode":"IN-AR",
"displayName":"Arunachal Pradesh",
"repositoryId":"IN-AR",
"abbreviation":"AR"
},
{
"regionCode":"IN-AS",
"displayName":"Assam",
"repositoryId":"IN-AS",
"abbreviation":"AS"
},
{
"regionCode":"IN-BR",
"displayName":"Bihar",
"repositoryId":"IN-BR",
"abbreviation":"BR"
},
{
"regionCode":"IN-CH",
"displayName":"Chandigarh",
"repositoryId":"IN-CH",
"abbreviation":"CH"
},
{
"regionCode":"IN-CT",
"displayName":"Chhattisgarh",
"repositoryId":"IN-CT",
"abbreviation":"CT"
},
{
"regionCode":"IN-DN",
"displayName":"Dadra and Nagar Haveli",
"repositoryId":"IN-DN",
"abbreviation":"DN"
},
{
"regionCode":"IN-DD",
"displayName":"Daman and Diu",
"repositoryId":"IN-DD",
"abbreviation":"DD"
},
{
"regionCode":"IN-DL",
"displayName":"Delhi",
"repositoryId":"IN-DL",
"abbreviation":"DL"
},
{
"regionCode":"IN-GA",
"displayName":"Goa",
"repositoryId":"IN-GA",
"abbreviation":"GA"
},
{
"regionCode":"IN-GJ",
"displayName":"Gujarat",
"repositoryId":"IN-GJ",
"abbreviation":"GJ"
},
{
"regionCode":"IN-HR",
"displayName":"Haryana",
"repositoryId":"IN-HR",
"abbreviation":"HR"
},
{
"regionCode":"IN-HP",
"displayName":"Himachal Pradesh",
"repositoryId":"IN-HP",
"abbreviation":"HP"
},
{
"regionCode":"IN-JK",
"displayName":"Jammu and Kashmir",
"repositoryId":"IN-JK",
"abbreviation":"JK"
},
{
"regionCode":"IN-JH",
"displayName":"Jharkhand",
"repositoryId":"IN-JH",
"abbreviation":"JH"
},
{
"regionCode":"IN-KA",
"displayName":"Karnataka",
"repositoryId":"IN-KA",
"abbreviation":"KA"
},
{
"regionCode":"IN-KL",
"displayName":"Kerala",
"repositoryId":"IN-KL",
"abbreviation":"KL"
},
{
"regionCode":"IN-LD",
"displayName":"Lakshadweep",
"repositoryId":"IN-LD",
"abbreviation":"LD"
},
{
"regionCode":"IN-MP",
"displayName":"Madhya Pradesh",
"repositoryId":"IN-MP",
"abbreviation":"MP"
},
{
"regionCode":"IN-MH",
"displayName":"Maharashtra",
"repositoryId":"IN-MH",
"abbreviation":"MH"
},
{
"regionCode":"IN-MN",
"displayName":"Manipur",
"repositoryId":"IN-MN",
"abbreviation":"MN"
},
{
"regionCode":"IN-ML",
"displayName":"Meghalaya",
"repositoryId":"IN-ML",
"abbreviation":"ML"
},
{
"regionCode":"IN-MZ",
"displayName":"Mizoram",
"repositoryId":"IN-MZ",
"abbreviation":"MZ"
},
{
"regionCode":"IN-NL",
"displayName":"Nagaland",
"repositoryId":"IN-NL",
"abbreviation":"NL"
},
{
"regionCode":"IN-OR",
"displayName":"Orissa",
"repositoryId":"IN-OR",
"abbreviation":"OR"
},
{
"regionCode":"IN-PY",
"displayName":"Pondicherry",
"repositoryId":"IN-PY",
"abbreviation":"PY"
},
{
"regionCode":"IN-PB",
"displayName":"Punjab",
"repositoryId":"IN-PB",
"abbreviation":"PB"
},
{
"regionCode":"IN-RJ",
"displayName":"Rajasthan",
"repositoryId":"IN-RJ",
"abbreviation":"RJ"
},
{
"regionCode":"IN-SK",
"displayName":"Sikkim",
"repositoryId":"IN-SK",
"abbreviation":"SK"
},
{
"regionCode":"IN-TN",
"displayName":"Tamil Nadu",
"repositoryId":"IN-TN",
"abbreviation":"TN"
},
{
"regionCode":"IN-TR",
"displayName":"Tripura",
"repositoryId":"IN-TR",
"abbreviation":"TR"
},
{
"regionCode":"IN-UT",
"displayName":"Uttarakhand",
"repositoryId":"IN-UT",
"abbreviation":"UT"
},
{
"regionCode":"IN-UP",
"displayName":"Uttar Pradesh",
"repositoryId":"IN-UP",
"abbreviation":"UP"
},
{
"regionCode":"IN-WB",
"displayName":"West Bengal",
"repositoryId":"IN-WB",
"abbreviation":"WB"
}
],
"countryCode":"IN",
"displayName":"India",
"repositoryId":"IN"
}
]
]
Default Response
The error response.
The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud:
|Error Code|Description|
|------------------|------------------|
|19000|The country code is either invalid or not configured : {id}|
|80066|Country {id} already exists|
|80060|Invalid input|
|80062|Invalid input. {key} key must be specified with valid value|
|80059|Invalid input. {key} key must be specified with list of countries along with their details|
|80068|Invalid abbreviation : {abbreviation}. Abbreviation must match the region abbreviation value specified in region code : {regionId}|
|80069|Invalid region code : {regionId}. Region code must start with country code : {countryId}-|
Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code