Create a custom object record
object.create(strentity_slug, ObjectCreateParams**kwargs) -> ObjectCreateResponse
POST/v1/objects/{entitySlug}/values
Creates a new record for the specified custom object type.
Create a custom object record
from lightfield import Lightfield
client = Lightfield(
api_key="My API Key",
)
object_create_response = client.object.create(
entity_slug="entitySlug",
fields={
"foo": "string"
},
)
print(object_create_response.id){
"id": "id",
"createdAt": "createdAt",
"fields": {
"foo": {
"value": "string",
"valueType": "ADDRESS"
}
},
"httpLink": "httpLink",
"relationships": {
"foo": {
"cardinality": "cardinality",
"objectType": "objectType",
"values": [
"string"
]
}
},
"updatedAt": "updatedAt",
"externalId": "externalId"
}Returns Examples
{
"id": "id",
"createdAt": "createdAt",
"fields": {
"foo": {
"value": "string",
"valueType": "ADDRESS"
}
},
"httpLink": "httpLink",
"relationships": {
"foo": {
"cardinality": "cardinality",
"objectType": "objectType",
"values": [
"string"
]
}
},
"updatedAt": "updatedAt",
"externalId": "externalId"
}