For the complete documentation index, see llms.txt. This page is also available as Markdown.

Additional Fields

Retrieve additional fields

get

Extract information about additional fields you set up for your account.

Query parameters
EnabledbooleanOptionalExample: true
RequiredbooleanOptionalExample: true
ApplyTostringOptionalExample: Order
TypestringOptionalExample: [HIDDEN]
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: 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 number
CodestringOptionalExample: A5FD
TypestringOptionalExample: TEXT
ApplyTostringOptionalExample: ORDER
Valuesstring[]OptionalExample: YES
ValidationRulestringOptionalExample: /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
      }
    }
  }
]

Create new additional fields

post
Header parameters
X-Avangate-AuthenticationstringRequiredExample: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
AcceptstringRequiredExample: application/json
Body
ApplyTostringOptionalExample: ORDER
CodestringOptional

Field identifier. Alpha-numeric chars, underscores and dashes.

Example: NewsletterPolicy1234576
LabelstringOptional

Field text.

Example: Do you agree with the new newsletter policy?
TypestringOptionalExample: LISTBOX
ValidationRulestringOptional

The validation rule restricting the type of information shoppers can enter in the additional field during the purchase process.

Example: /rule/
Valuesstring[]Optional

Custom values you control.

Example: YES
Responses
200

OK

No content

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

Get information about an additional field

get
Path parameters
FieldCodestringRequired

Field identifier. Alpha-numeric chars, underscores and dashes.

Example: NewsletterPolicy
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
LabelstringOptionalExample: phone number
CodestringOptionalExample: A5FD
TypestringOptionalExample: TEXT
ApplyTostringOptionalExample: ORDER
Valuesstring[]OptionalExample: YES
ValidationRulestringOptionalExample: /test_rule/
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
    }
  }
}

Retrieve additional field texts and translations

get
Path parameters
FieldCodestringRequired

Field identifier. Alpha-numeric chars, underscores and dashes.

Example: NewsletterPolicy1234576
ISOcodestringRequired

ISO 639-1 two-letter code. Case sensitive.

Example: DE
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
LabelstringOptionalExample: Haben Sie mit dem Newsletter Politik zu?
Valuesstring[]OptionalExample: Ja
LanguagestringOptionalExample: DE
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?