Field Mapping
Map API response fields to YOOtheme source fields
Field Mapping
Field mapping defines how API response data becomes available in YOOtheme Pro's dynamic content system.
How Field Mapping Works
- API returns JSON data
- You define which fields to extract
- API Mapper makes those fields available as YOOtheme sources
- You use them in your page builder elements
Adding Fields
- Open your connection settings
- Go to the Fields section
- Click Add Field
- Configure the field:
- Name: Display name in YOOtheme (e.g., "Product Title")
- Path: JSON path to the data (e.g.,
titleorproduct.name) - Type: Data type (Text, Number, Image, etc.)
Field Types
| Type | Use For | Example |
|---|---|---|
| Text | Strings, descriptions | Product name, article body |
| Number | Numeric values | Price, quantity, ID |
| Image | Image URLs | Product image, thumbnail |
| Link | URLs | Product link, website |
| Date | Date/time values | Published date, event date |
| Boolean | True/false values | In stock, featured |
JSON Path Syntax
Simple Paths
For top-level fields:
- Path:
title→ "My Product" - Path:
price→ 29.99
Nested Paths
For nested objects, use dot notation:
- Path:
product.name→ "Widget" - Path:
product.details.sku→ "WGT-001"
Array Items
For arrays, API Mapper automatically iterates:
- Path:
items[].name→ Available for each item - Path:
items[].price→ Available for each item
JMESPath Transforms (Pro)
Pro Feature
JMESPath transforms require a Pro or Developer license.
For complex data transformations, use JMESPath expressions:
Field Limits
Best Practices
- Use descriptive names - "Product Price" is better than "price"
- Match types correctly - Use Number for prices, not Text
- Keep it minimal - Only map fields you actually need
- Test your paths - Use the connection tester to verify
Troubleshooting
Field shows empty in YOOtheme
- Verify the JSON path is correct
- Check if the field exists in the API response
- Ensure the field type matches the data
"Invalid path" error
- Check for typos in the path
- Verify the JSON structure with the connection tester
Next Steps
Was this page helpful?