List Source Object Fields
1 min
GET
https://api.nue.io/v1/stripe/metadata-mapping/sourceObject/{objectName}/fields
Path Parameters
- objectNamestringrequiredExampleDescriptionAllowedCustomerOrder
Responses
200
- FieldMetadata[]
- apiNamestringDescription
- namestringDescription
- typestringDescription
- descriptionstringDescription
- creatablebooleanDescription
- updatablebooleanDescription
- requiredbooleanDescription
- lookupRelationLookupRelation
- referenceTostringDescription
- referenceFieldstringDescription
- relationNamestringDescription
- relationLabelstringDescription
400
- ErrorResponse
- errorobject
- codestringExampleDescription
- messagestringExampleDescription
- detailsstring[]Example
[ "Target field 'oid' is read-only" ]
Description
401
- ErrorResponse
- errorobject
- codestringExampleDescription
- messagestringExampleDescription
- detailsstring[]Example
[ "Target field 'oid' is read-only" ]
Description
curl
curl --request GET \
--url https://api.nue.io/v1/stripe/metadata-mapping/sourceObject/{objectName}/fields \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.nue.io/v1/stripe/metadata-mapping/sourceObject/{objectName}/fields", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.nue.io/v1/stripe/metadata-mapping/sourceObject/{objectName}/fields")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.nue.io/v1/stripe/metadata-mapping/sourceObject/{objectName}/fields"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
200
// Successfully retrieved source object fields
[
{
"apiName": "",
"name": "",
"type": "",
"description": "",
"creatable": false,
"updatable": false,
"required": false,
"lookupRelation": {
"referenceTo": "",
"referenceField": "",
"relationName": "",
"relationLabel": ""
}
}
]GENERATED
// Successfully retrieved source object fields
[
{
"apiName": "",
"name": "",
"type": "",
"description": "",
"creatable": false,
"updatable": false,
"required": false,
"lookupRelation": {
"referenceTo": "",
"referenceField": "",
"relationName": "",
"relationLabel": ""
}
}
]Customer Fields
[
{
"apiName": "billingPostalCode",
"name": "Billing Postal Code",
"type": "text",
"description": "Postal code for billing address",
"creatable": true,
"updatable": true,
"required": false
},
{
"apiName": "billingAccountId",
"name": "Billing Account",
"type": "lookup",
"description": "Reference to billing account",
"creatable": true,
"updatable": true,
"required": false,
"lookupRelation": {
"referenceTo": "Customer",
"referenceField": "id",
"relationName": "billingAccount",
"relationLabel": "Billing Account"
}
}
]400
// Bad Request - Invalid object name
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid mapping configuration",
"details": [
""
]
}
}401
// Unauthorized - Invalid or missing API key
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid mapping configuration",
"details": [
""
]
}
}