Metadata
Method allows you to provide arbitrary data upon creation of any Core API resource. This data is referred to as metadata and will be returned as the
Adding metadata to Core API resources is useful if you want to provide additional identifiers that reference specific records or rows in your own database.
metadata
attribute on any Core API resource.Adding metadata to Core API resources is useful if you want to provide additional identifiers that reference specific records or rows in your own database.
Parameters
metadata
object
A valid JSON object that must be less than 1KB in size when serialized.
Optional
Returns
Returns the created resource with the provided metadata object.
- cURL
- Node.js
- Python
curl https://production.methodfi.com/entities \
-X POST \
-H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc" \
-H "Content-Type: application/json" \
-d '{
"type": "individual",
"individual": {
"first_name": "Kevin",
"last_name": "Doyle",
"phone": "+16505555555",
"email": "kevin.doyle@gmail.com",
"dob": "1997-03-18"
},
"metadata": {
"user_id": "usr_jVFNtdlhDQnd92",
"username": "kdoyle",
}
}'
const entity = await method.entities.create({
type: 'individual',
individual: {
first_name: 'Kevin',
last_name: 'Doyle',
phone: '+16505555555',
email: 'kevin.doyle@gmail.com',
dob: '1997-03-18',
},
metadata: {
user_id: 'usr_jVFNtdlhDQnd92',
username: 'kdoyle',
}
});
entity = method.entities.create({
'type': 'individual',
'individual': {
'first_name': 'Kevin',
'last_name': 'Doyle',
'phone': '+16505555555',
'email': 'kevin.doyle@gmail.com',
'dob': '1997-03-18'
},
'metadata': {
'user_id': 'usr_jVFNtdlhDQnd92',
'username': 'kdoyle'
}
})