Additional Fields
Extract information about additional fields you set up for your account.
Query parameters
EnabledbooleanOptionalExample:
trueRequiredbooleanOptionalExample:
trueApplyTostringOptionalExample:
OrderTypestringOptionalExample:
[HIDDEN]Header parameters
X-Avangate-AuthenticationstringRequiredExample:
Authentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"Acceptstring · enumRequiredDefault:
application/jsonExample: application/jsonPossible values: Responses
200
Get information about additional fields
application/json
LabelstringOptionalExample:
phone numberCodestringOptionalExample:
A5FDTypestringOptionalExample:
TEXTApplyTostringOptionalExample:
ORDERValuesstring[]OptionalExample:
YESValidationRulestringOptionalExample:
/test_rule/get/additionalfields/
GET /rest/6.0/additionalfields/ HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Accept: application/json
200
Get information about additional fields
[
{
"Label": "phone number",
"Code": "A5FD",
"Type": "TEXT",
"ApplyTo": "ORDER",
"Values": [
"YES"
],
"ValidationRule": "/test_rule/",
"Translations": {
"en": {
"Label": "request example",
"Values": [
"OK"
],
"Language": "EN"
},
"fr": {
"Label": "request example",
"Values": [
"OK"
],
"Language": "EN"
}
},
"Display": {
"0": {
"Type": "Order",
"Active": false,
"Required": false
},
"1": {
"Type": "Order",
"Active": false,
"Required": false
}
}
}
]Header parameters
X-Avangate-AuthenticationstringRequiredExample:
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"AcceptstringRequiredExample:
application/jsonBody
ApplyTostringOptionalExample:
ORDERCodestringOptionalExample:
Field identifier. Alpha-numeric chars, underscores and dashes.
NewsletterPolicy1234576LabelstringOptionalExample:
Field text.
Do you agree with the new newsletter policy?TypestringOptionalExample:
LISTBOXValidationRulestringOptionalExample:
The validation rule restricting the type of information shoppers can enter in the additional field during the purchase process.
/rule/Valuesstring[]OptionalExample:
Custom values you control.
YESResponses
200
OK
No content
400
Invalid data
application/json
post/additionalfields/
POST /rest/6.0/additionalfields/ HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Accept: application/json
Content-Type: application/json
Content-Length: 380
{
"ApplyTo": "ORDER",
"Code": "NewsletterPolicy1234576",
"Label": "Do you agree with the new newsletter policy?",
"Translations": {
"de": {
"Label": "Haben Sie mit dem Newsletter Politik zu?",
"Language": "DE",
"Values": [
"Ja"
]
},
"fr": {
"Label": "Êtes-vous d'accord avec la politique de la newsletter?",
"Language": "FR",
"Values": [
"Oui"
]
}
},
"Type": "LISTBOX",
"ValidationRule": "/rule/",
"Values": [
"YES"
]
}No content
Path parameters
FieldCodestringRequiredExample:
Field identifier. Alpha-numeric chars, underscores and dashes.
NewsletterPolicyHeader parameters
Acceptstring · enumRequiredDefault:
application/jsonExample: application/jsonPossible values: X-Avangate-AuthenticationstringRequiredExample:
Authentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"Responses
200
OK
application/json
LabelstringOptionalExample:
phone numberCodestringOptionalExample:
A5FDTypestringOptionalExample:
TEXTApplyTostringOptionalExample:
ORDERValuesstring[]OptionalExample:
YESValidationRulestringOptionalExample:
/test_rule/400
Invalid data
application/json
get/additionalfields/{FieldCode}/
GET /rest/6.0/additionalfields/{FieldCode}/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
{
"Label": "phone number",
"Code": "A5FD",
"Type": "TEXT",
"ApplyTo": "ORDER",
"Values": [
"YES"
],
"ValidationRule": "/test_rule/",
"Translations": {
"en": {
"Label": "request example",
"Values": [
"OK"
],
"Language": "EN"
},
"fr": {
"Label": "request example",
"Values": [
"OK"
],
"Language": "EN"
}
},
"Display": {
"0": {
"Type": "Order",
"Active": false,
"Required": false
},
"1": {
"Type": "Order",
"Active": false,
"Required": false
}
}
}Path parameters
FieldCodestringRequiredExample:
Field identifier. Alpha-numeric chars, underscores and dashes.
NewsletterPolicy1234576ISOcodestringRequiredExample:
ISO 639-1 two-letter code. Case sensitive.
DEHeader parameters
Acceptstring · enumRequiredDefault:
application/jsonExample: application/jsonPossible values: X-Avangate-AuthenticationstringRequiredExample:
Authentication header
code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"Responses
200
OK
application/json
LabelstringOptionalExample:
Haben Sie mit dem Newsletter Politik zu?Valuesstring[]OptionalExample:
JaLanguagestringOptionalExample:
DE400
Invalid data
application/json
get/additionalfields/{FieldCode}/translations/{ISOcode}/
GET /rest/6.0/additionalfields/{FieldCode}/translations/{ISOcode}/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
{
"Label": "Haben Sie mit dem Newsletter Politik zu?",
"Values": [
"Ja"
],
"Language": "DE"
}Last updated
Was this helpful?