Please contact us if you need access to this
feature.
Create a mapping definition
You create a mapping definition by POSTing tohttps://mappings.us.stedi.com/2021-06-01/mappings
. At the very least, your mapping definition should have a name, mapping type, and a few mapping expressions.
Include a target example
If you want to use the mapping type Merge with target example, then you need to provide a target example. You do this by including a target schema that contains the target example. The following mapping definition provides a default value of0
for the output field total
.
Include a lookup table
You can add one or more lookup tables by providing thelookup_tables
field. Every lookup table must have a name and a set of values.
Response
The response contains a copy of the mapping definition you just created, plus a couple of extra fields.Field | Description |
---|---|
id | The unique identifier for your mapping definition. You need this if you ever want to update, delete, or use your mapping definition. |
created_at | A timestamp indicating when you created this mapping definition. |
updated_at | A timestamp indicating when you last updated this mapping definition. If you’ve never updated the mapping definition, this is the same as created_at. |
Retrieve a mapping definition
You retrieve a mapping definition by GETting it fromhttps://mappings.us.stedi.com/2021-06-01/mappings/mapping_id
. The response is identical to the one you received when you created the mapping definition. In other words, it’s the mapping definition as you specified it, supplemented with the fields id
, created_at
, and updated_at
.
Update a mapping definition
You update a mapping definition by PUTting a new version athttps://mappings.us.stedi.com/2021-06-01/mappings/mapping_id
. You need to specify an entire new mapping definition, so when we talk about updating the mapping definition, we really mean replacing it.
Other than that, updating a mapping definition is the same as creating one: the request body is the same, the response body is the same.
Delete a mapping definition
You delete a mapping definition by DELETEing it athttps://mappings.us.stedi.com/2021-06-01/mappings/mapping_id
. That’s all there is to it, really. You don’t need to provide a request body and the response will be empty as well.
List mapping definitions
You retrieve a list of all your mapping definitions by GETting it fromhttps://mappings.us.stedi.com/2021-06-01/mappings
.
mappings
which contains a list with mapping definitions.
Rate limit
This endpoint is rate-limited to 25 requests per second, per Stedi account.Metadata
The list in the response doesn’t contain complete mapping definitions; only metadata. It includes the fieldsid
, name
, type
, created_at
, and updated_at
, but not the mapping expressions or the schema. If you’re only displaying a list of mapping definitions, this is typically what you want, but should you need the full mapping definitions, you can set the query parameter metadata_only
to false
.
Paging
If you have a lot of mapping definitions, you may not receive them all in one response. In that case, the response will contain a fieldnext_page_token
.
page_token
and you will receive the next few mapping definitions.
next_page_token
shows up in the response, there are more mapping definitions to retrieve.