Mappings
GetMapping
Parameters
^([A-Z0-9]+)$
Example
UpdateMapping
Parameters
^([A-Z0-9]+)$
Request body
application/json
A list of lookup tables that the mapping expressions in this mapping definition can use.
A lookup table is often used to convert a value from one format to another. For example, you can have a list of currencies with a short name, a full name, and a symbol for each currency, like this:
code | full name | symbol |
---|---|---|
USD | U.S. dollar | $ |
CAD | Canadian dollar | $ |
EUR | Euro | € |
$lookupTable
function to convert a value from one format to the other.LookupTable
objects. {
"total": item.quantity * item.unit_price,
"currency": item.currency,
"product": product.id
}
The JSONata document must be converted to a string, so in practice, it doesn't look like the above; it looks like this:
"{ \"total\": item.quantity * item.unit_price, \"currency\": item.currency, \"product\": product.id }"
MappingSource
object. The mapping type, which determines the fields that show up in the output.
Mapping type | Description |
---|---|
only_mapped_keys | Output fields are created based on the mapping expressions only. |
merge_with_target_example | Output fields are copied from the target example, and created based on the mapping expressions. If both the target example and a mapping expression produce the same field, the field from the mapping expression takes precedence. Providing a target schema with a default document is mandatory. |
pass_through | Output fields are copied from the input, and created based on the mapping expressions. If both the input and a mapping expression produce the same field, the field from the mapping expression takes precedence. |
Possible values
only_mapped_keys
merge_with_target_example
pass_through
mapping_type
is set to merge_with_target_example
, the values in this document are used as defaults, i.e. if a mapping expressions doesn't produce a value for a given field, the default value is used. For the mapping type merge_with_target_example
, providing a target schema with a default document is mandatory. For all other mapping types, the default document is ignored and the entire target schema is optional.merge_with_target_example
, there's no benefit to including a target schema.MappingTarget
object. Example
DeleteMapping
Parameters
^([A-Z0-9]+)$
Example
ListMappings
metadata_only
query parameter.Parameters
content
, or lookup tables. If false, each mapping will contain all available fields. The metadata fields are id
, name
, type
, connection
(both in source
and target
), created_at
, and updated_at
.next_page_token
-field you received in your last response.next_page_token
that will allow you to retrieve them.Example
CreateMapping
Request body
application/json
A list of lookup tables that the mapping expressions in this mapping definition can use.
A lookup table is often used to convert a value from one format to another. For example, you can have a list of currencies with a short name, a full name, and a symbol for each currency, like this:
code | full name | symbol |
---|---|---|
USD | U.S. dollar | $ |
CAD | Canadian dollar | $ |
EUR | Euro | € |
$lookupTable
function to convert a value from one format to the other.LookupTable
objects. {
"total": item.quantity * item.unit_price,
"currency": item.currency,
"product": product.id
}
The JSONata document must be converted to a string, so in practice, it doesn't look like the above; it looks like this:
"{ \"total\": item.quantity * item.unit_price, \"currency\": item.currency, \"product\": product.id }"
MappingSource
object. The mapping type, which determines the fields that show up in the output.
Mapping type | Description |
---|---|
only_mapped_keys | Output fields are created based on the mapping expressions only. |
merge_with_target_example | Output fields are copied from the target example, and created based on the mapping expressions. If both the target example and a mapping expression produce the same field, the field from the mapping expression takes precedence. Providing a target schema with a default document is mandatory. |
pass_through | Output fields are copied from the input, and created based on the mapping expressions. If both the input and a mapping expression produce the same field, the field from the mapping expression takes precedence. |
Possible values
only_mapped_keys
merge_with_target_example
pass_through
mapping_type
is set to merge_with_target_example
, the values in this document are used as defaults, i.e. if a mapping expressions doesn't produce a value for a given field, the default value is used. For the mapping type merge_with_target_example
, providing a target schema with a default document is mandatory. For all other mapping types, the default document is ignored and the entire target schema is optional.merge_with_target_example
, there's no benefit to including a target schema.MappingTarget
object. Example
MapDocument
Parameters
^([A-Z0-9]+)$
Validation mode, when not provided - no validation of input and output is applied.
Value | Description |
---|---|
strict | JSON Schema validation is applied to the input JSON and the output JSON using source and target JSON Schema. |
Possible values
strict
Request body
application/json
The body of the request should be the JSON you want to map. It can take any shape as long as it is valid JSON.Requiredunknown
Example
Feedback
Have an idea for something we could improve? Page not clear? We love feedback - send us a message.