Create a country
post
/services/rest/connect/v1.4/countries
Request
The details about the countries and provinces which are used to maintain accurate address information for the organizations and contacts in Oracle B2C Service.
Root Schema : countries
Type:
object
The details about the countries and provinces which are used to maintain accurate address information for the organizations and contacts in Oracle B2C Service.
Show Source
-
abbreviation(optional):
string
Maximum Length:
3
Pattern:^[A-Z]{2,3}$
The two or three character abbreviation for the country. For example, USA. -
createdTime(optional):
string
The date and time when the country was created. This attribute is read-only.
-
displayOrder(optional):
integer
Minimum Value:
1
Maximum Value:2147483647
The position of the country in the Countries/Provinces tree and drop-down menu. -
id(optional):
integer
Minimum Value:
1
Maximum Value:9.223372036854776E18
The unique identifier of the country. -
iSOCode(optional):
string
Maximum Length:
2
Pattern:^[A-Z]{2}$
The ISO 3166 country code. -
lookupName(optional):
string
Maximum Length:
255
The name used to look up the country. -
name(optional):
string
Maximum Length:
80
A list of labels or names used for this country on each unique interface. -
names(optional):
object countries-names
The language-specific strings used for localization of fields. The label text cannot be empty or null. The labels are assembled in a list associated with a particular text field.
-
phoneCode(optional):
string
Maximum Length:
10
Pattern:^[][+0-9a-zA-Z[:blank:].,()#-/]*$
The international telephone code for the country. This is used by the Click-to-Dial feature. -
phoneMask(optional):
string
Maximum Length:
80
Pattern:^(([U|L|M][#|A|L|C])|(F.))+$
The string having twice the number of characters in the phone number. Two characters are needed to represent every digit or character in the phone number. The first character of the mask describes the target character and the second constrains its type. -
postalMask(optional):
string
Maximum Length:
20
Pattern:^(([U|L|M][#|A|L|C])|(F.))+$
The string having twice the number of characters in the target postal code. Two characters are needed to represent every digit or character in the postal code. The first character of the mask describes the target character and the second constrains its type. -
provinces(optional):
object countries-provinces
The information about the provinces in the Countries/Provinces customizable menu.
-
updatedTime(optional):
string
The date and time when the country was last updated. This attribute is read-only.
Nested Schema : countries-names
Type:
object
The language-specific strings used for localization of fields. The label text cannot be empty or null. The labels are assembled in a list associated with a particular text field.
Show Source
-
labelText(optional):
string
Maximum Length:
80
The language-specific label text. The value cannot be null or empty. -
language(optional):
object namedIDs-countries-names-language
An ID which has an associated name string. These IDs can be set by either value or name. If the name cannot uniquely determine the value, an error is generated.
Nested Schema : countries-provinces
Type:
object
The information about the provinces in the Countries/Provinces customizable menu.
Show Source
-
displayOrder(optional):
integer
Minimum Value:
1
Maximum Value:32767
The display position relative to other provinces associated with the same country. -
id(optional):
integer
Minimum Value:
1
Maximum Value:9.223372036854776E18
The unique identifier of the province. -
name(optional):
string
Maximum Length:
255
The name of the province in the language of the current interface. This attribute is read-only. -
names(optional):
object countries-provinces-names
The language-specific strings used for localization of fields. The label text cannot be empty or null. The labels are assembled in a list associated with a particular text field.
Nested Schema : namedIDs-countries-names-language
Type:
object
An ID which has an associated name string. These IDs can be set by either value or name. If the name cannot uniquely determine the value, an error is generated.
Show Source
-
id(optional):
integer
Minimum Value:
0
ID value -
lookupName(optional):
string
Maximum Length:
255
Name used to lookup this object
Nested Schema : countries-provinces-names
Type:
object
The language-specific strings used for localization of fields. The label text cannot be empty or null. The labels are assembled in a list associated with a particular text field.
Show Source
-
labelText(optional):
string
Maximum Length:
80
The language-specific label text. The value cannot be null or empty. -
language(optional):
object namedIDs-countries-provinces-names-language
An ID which has an associated name string. These IDs can be set by either value or name. If the name cannot uniquely determine the value, an error is generated.
Nested Schema : namedIDs-countries-provinces-names-language
Type:
object
An ID which has an associated name string. These IDs can be set by either value or name. If the name cannot uniquely determine the value, an error is generated.
Show Source
-
id(optional):
integer
Minimum Value:
0
ID value -
lookupName(optional):
string
Maximum Length:
255
Name used to lookup this object
Response
Default Response
Root Schema : countries
Type:
object
The details about the countries and provinces which are used to maintain accurate address information for the organizations and contacts in Oracle B2C Service.
Show Source
-
abbreviation(optional):
string
Maximum Length:
3
Pattern:^[A-Z]{2,3}$
The two or three character abbreviation for the country. For example, USA. -
createdTime(optional):
string
The date and time when the country was created. This attribute is read-only.
-
displayOrder(optional):
integer
Minimum Value:
1
Maximum Value:2147483647
The position of the country in the Countries/Provinces tree and drop-down menu. -
id(optional):
integer
Minimum Value:
1
Maximum Value:9.223372036854776E18
The unique identifier of the country. -
iSOCode(optional):
string
Maximum Length:
2
Pattern:^[A-Z]{2}$
The ISO 3166 country code. -
lookupName(optional):
string
Maximum Length:
255
The name used to look up the country. -
name(optional):
string
Maximum Length:
80
A list of labels or names used for this country on each unique interface. -
names(optional):
object countries-names
The language-specific strings used for localization of fields. The label text cannot be empty or null. The labels are assembled in a list associated with a particular text field.
-
phoneCode(optional):
string
Maximum Length:
10
Pattern:^[][+0-9a-zA-Z[:blank:].,()#-/]*$
The international telephone code for the country. This is used by the Click-to-Dial feature. -
phoneMask(optional):
string
Maximum Length:
80
Pattern:^(([U|L|M][#|A|L|C])|(F.))+$
The string having twice the number of characters in the phone number. Two characters are needed to represent every digit or character in the phone number. The first character of the mask describes the target character and the second constrains its type. -
postalMask(optional):
string
Maximum Length:
20
Pattern:^(([U|L|M][#|A|L|C])|(F.))+$
The string having twice the number of characters in the target postal code. Two characters are needed to represent every digit or character in the postal code. The first character of the mask describes the target character and the second constrains its type. -
provinces(optional):
object countries-provinces
The information about the provinces in the Countries/Provinces customizable menu.
-
updatedTime(optional):
string
The date and time when the country was last updated. This attribute is read-only.
Nested Schema : countries-names
Type:
object
The language-specific strings used for localization of fields. The label text cannot be empty or null. The labels are assembled in a list associated with a particular text field.
Show Source
-
labelText(optional):
string
Maximum Length:
80
The language-specific label text. The value cannot be null or empty. -
language(optional):
object namedIDs-countries-names-language
An ID which has an associated name string. These IDs can be set by either value or name. If the name cannot uniquely determine the value, an error is generated.
Nested Schema : countries-provinces
Type:
object
The information about the provinces in the Countries/Provinces customizable menu.
Show Source
-
displayOrder(optional):
integer
Minimum Value:
1
Maximum Value:32767
The display position relative to other provinces associated with the same country. -
id(optional):
integer
Minimum Value:
1
Maximum Value:9.223372036854776E18
The unique identifier of the province. -
name(optional):
string
Maximum Length:
255
The name of the province in the language of the current interface. This attribute is read-only. -
names(optional):
object countries-provinces-names
The language-specific strings used for localization of fields. The label text cannot be empty or null. The labels are assembled in a list associated with a particular text field.
Nested Schema : namedIDs-countries-names-language
Type:
object
An ID which has an associated name string. These IDs can be set by either value or name. If the name cannot uniquely determine the value, an error is generated.
Show Source
-
id(optional):
integer
Minimum Value:
0
ID value -
lookupName(optional):
string
Maximum Length:
255
Name used to lookup this object
Nested Schema : countries-provinces-names
Type:
object
The language-specific strings used for localization of fields. The label text cannot be empty or null. The labels are assembled in a list associated with a particular text field.
Show Source
-
labelText(optional):
string
Maximum Length:
80
The language-specific label text. The value cannot be null or empty. -
language(optional):
object namedIDs-countries-provinces-names-language
An ID which has an associated name string. These IDs can be set by either value or name. If the name cannot uniquely determine the value, an error is generated.
Nested Schema : namedIDs-countries-provinces-names-language
Type:
object
An ID which has an associated name string. These IDs can be set by either value or name. If the name cannot uniquely determine the value, an error is generated.
Show Source
-
id(optional):
integer
Minimum Value:
0
ID value -
lookupName(optional):
string
Maximum Length:
255
Name used to lookup this object
Examples
Use POST with the following syntax to create a new country object:
https://your_site_interface/services/rest/connect/version/countries
Request URI example
https://mysite.example.com/services/rest/connect/v1.4/countries
Request body example
{
"abbreviation": "PW",
"iSOCode": "PW",
"names": [
{
"labelText": "Palau",
"language": {
"id": 1}
}
]
}
Note:
Theabbreviation
,
ISOCode
, and
names
fields are required for countries.
Response body example
{
"id": 6,
"lookupName": "PW",
"abbreviation": "PW",
"displayOrder": 6,
"iSOCode": "PW",
"name": "Palau",
"names": {
"links": [
{
"rel": "self",
"href": "https://mysite.example.com/services/rest/connect/v1.4/countries/6/names"
}
]
},
"provinces": {
"links": [
{
"rel": "self",
"href": "https://mysite.example.com/services/rest/connect/v1.4/countries/6/provinces"
}
]
},
"links": [
{
"rel": "self",
"href": "https://mysite.example.com/services/rest/connect/v1.4/countries/6"
},
{
"rel": "canonical",
"href": "https://mysite.example.com/services/rest/connect/v1.4/countries/6"
},
{
"rel": "describedby",
"href": "https://mysite.example.com/services/rest/connect/v1.4/metadata-catalog/countries",
"mediaType": "application/schema+json"
}
]
}