v1

latestOpenAPI 3.1.0Proprietary2026-07-24710198.3 KB
Address Validation

Get Address Form

Review this information carefully if you are planning to integrate Envia in multiple countries. Address structure may vary depending on the country the package is being shipped from. It can be by zipcode or city/locality. Use this to get the required fields and validation rules for address forms.

get/generic-form

Query parameters

country_code'US' | 'MX' | 'CA' | 'CO' | 'IN' | 'CL' | 'GT' | 'BR' | 'AR' | 'PE' required
Example:MX

Two-digit country code

form'address_info' | 'billing_info' required
Example:address_info

Form type

Response

Successful response

fieldIdstring

Field identifier

fieldNamestring

Field name

fieldLabelstring

Field label

fieldLabelLangstring

Localized field label

fieldType'text' | 'select' | 'number' | 'email'

Field type

fieldPlaceholderstring

Field placeholder

fieldPlaceholderLangstring

Localized field placeholder

fieldIconstring

Field icon class

dataTypestring

Data type

visibleboolean

Whether the field is visible

size'S' | 'M' | 'L' | 'XL'

Field size

geocodesboolean

Whether the field supports geocoding

Example response

[
  {
    "fieldId": "address1",
    "fieldName": "street",
    "fieldLabel": "Address1",
    "fieldLabelLang": "createLabel.addressInfo.street",
    "fieldType": "text",
    "fieldPlaceholder": "Address1",
    "fieldPlaceholderLang": "createLabel.addressInfo.street",
    "fieldIcon": "fas fa-map-marker-alt",
    "dataType": "string",
    "visible": true,
    "size": "L",
    "rules": {
      "required": true,
      "min": "2",
      "max": "50",
      "validationType": "street"
    },
    "on_change": [
      {
        "condition": "/(^[0-9]{5})$/",
        "action": "request",
        "url": "https://geocodes.envia.com/zipcode/{{values.country}}/{{values.postal_code}}",
        "name": "geocodes"
      }
    ]
  }
]