Create extraction template
POST
/api/v1/extraction-mappings
const url = 'https://api.yggy.tech/api/v1/extraction-mappings';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","description":"example","format":"csv","mappingJson":"example","schemaHeaders":["example"],"customInstructions":"example"}'};
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.yggy.tech/api/v1/extraction-mappings \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "description": "example", "format": "csv", "mappingJson": "example", "schemaHeaders": [ "example" ], "customInstructions": "example" }'Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ” Media type application/json
object
name
required
string
description
string
format
required
string
mappingJson
required
string
schemaHeaders
Array<string>
customInstructions
string
Responses
Section titled “ Responses ”Template created
Media type application/json
object
id
required
string
externalId
required
string
name
required
string
description
string
format
required
string
mappingJson
required
string
schemaHeaders
Array<string>
customInstructions
string
isTemplate
required
boolean
builtIn
required
boolean
createdAt
string
updatedAt
string
Example generated
{ "id": "example", "externalId": "example", "name": "example", "description": "example", "format": "example", "mappingJson": "example", "schemaHeaders": [ "example" ], "customInstructions": "example", "isTemplate": true, "builtIn": true, "createdAt": "example", "updatedAt": "example"}Invalid input
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}