Preview a data feed URL
POST
/api/v3/curations/data-feeds/preview
const url = 'https://api.tryletterhead.com/api/v3/curations/data-feeds/preview?api=true';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"feedUrl":"https://example.com/api/products.json"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'https://api.tryletterhead.com/api/v3/curations/data-feeds/preview?api=true' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "feedUrl": "https://example.com/api/products.json" }'Test-fetch a JSON data feed URL before saving it: returns how many items it contains and, for the
first item, every flattened field path with a sample value β so a caller can build fieldMappings
for Create a data feed without guessing at the JSON shape.
Authorizations
Section titled βAuthorizations βParameters
Section titled β Parameters βQuery Parameters
Section titled βQuery Parameters β api
required
boolean
Required. Set to true to authenticate with your company API key rather than a signed-in session.
Request Body required
Section titled βRequest Body required β Media type application/json
object
feedUrl
required
string
bearerToken
Plaintext, used only for this one test fetch β not stored.
string
Example
{ "feedUrl": "https://example.com/api/products.json"}Responses
Section titled β Responses β200 OK
Media type application/json
object
items
object
itemCount
integer
fields
Array<object>
object
path
string
sample
string
message
string
total
integer
Example
{ "items": { "itemCount": 214, "fields": [ { "path": "object.name", "sample": "Espresso Blend, 12oz" }, { "path": "object.sku", "sample": "ESP-12OZ" } ] }, "message": "Data feed preview fetched.", "total": 1}Still can’t find what you need? Contact support.