---
schema_version: "1"
id: fae20d30569035a7e60add6c86ba1b78ebbd25afafa439b218be4e10c94345f0
title: Structure Data Using properties and additionalProperties
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/external_services_schema_def_properties_additional_properties.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.external_services_schema_def_properties_additional_properties.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 91bdb698a3de9e0754cbc70f39abcef636219fc9c0dd7b3e2abeb82c4552d9f2
description: In an Open API specification, the properties keyword defines one or more properties on an object including the property name and data type. The additionalProperties keyword gives you the flexibility to add additional properties with an undefined schema. The named properties are accessible as Apex properties with a matching data type. The additionalProperties in the spec are accessible in Apex as a Map property.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# Structure Data Using properties and additionalProperties

In an Open API specification, the properties keyword defines one or more properties on an object including the property name and data type. The additionalProperties keyword gives you the flexibility to add additional properties with an undefined schema. The named properties are accessible as Apex properties with a matching data type. The additionalProperties in the spec are accessible in Apex as a Map property.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr></tbody></table>

- The `properties` and `additionalProperties` under an OpenAPI schema directive show as formal object properties and as a dictionary property. If declared under a property or additionalProperties type, then the OpenAPI parser ignores one or the other. The registration process doesn't throw an error.
- OpenAPI named `properties` are properties in Apex with the same name and property data type.
- OpenAPI `additionalProperties` are grouped as the Apex property with name _properties_ and type _Map<String, Type>_, where _Type_ is the declared `additionalProperties` type. The Map property type is a collection of key-value pairs.
- OpenAPI `additionalProperties` are always declared as an Apex object map property, even if it could be declared as a standalone Apex Map type. The result is consistently handled named object properties defined together with `additionalProperties`.
- OpenAPI `properties` and `additionalProperties` can both be declared under an OpenAPI parameter schema or schema in the definitions section. The OpenAPI parser ignores either `properties` or `additionalProperties` if declared as an object property type. An object property type must only define named `properties` or `additionalProperties`, but not both. To work around, place the object property definition as a named schema under definitions and reference it by name.
- The OpenAPI parser doesn't differentiate between literal declarations or untyped schemas. Declarations like `additionalProperties: true`, `additionalProperties: false`, or `additionalProperties: {}` are interpreted as untyped. Untyped `additionalProperties` are ignored. There isn't a workaround to define `additionalProperties` that can be of any type.
- Flow doesn't allow access or manipulation of Apex object types with Map properties, but transparently preserves the content when assigned to variables of the same Apex object type. To manipulate map data structure in flow, call an Apex invocable action that can access the map data structure. For an example with External Service maps in action, see Example 9 in [External Services OpenAPI 2.0 Schema](https://help.salesforce.com/s/articleView?id=platform.external_services_schema_examples.htm&release=264.0.0&type=5 "This section features External Services OpenAPI 2.0 schema examples.").
- In any external service registration you create in system version 7 and later, you can define a property with a name that begins with a number. When that property is accessed in Flow or Apex code, the encoding process adjusts the name of the property.
    
    ```
    {
      "UserAvatarUrls": {
    	"type": "object",
    	"properties": {
      	  "24x24": {
        	    "type": "string",
        	    "description": "The URL of the user's 24x24 pixel avatar.",
        	    "format": "uri"
      	},
      	  "32x32": {
        	    "type": "string",
        	    "description": "The URL of the user's 32x32 pixel avatar.",
        	    "format": "uri"
      	},
      	  "16x16": {
        	    "type": "string",
        	    "description": "The URL of the user's 16x16 pixel avatar.",
        	    "format": "uri"
      	},
      	  "48x48": {
        	    "type": "string",
        	    "description": "The URL of the user's 48x48 pixel avatar.",
        	    "format": "uri"
      	}
        }
      }
    }
    ```

#### See Also

- [_Apex Developer Guide_: Apex Properties](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_properties.htm)