These are chat archives for collectiveaccess/support

15th
Apr 2016
PMassoels
@PMassoels
Apr 15 2016 13:43
Hi all :)
I'm trying to add representations using the api, anyone that can help me with that?
PMassoels
@PMassoels
Apr 15 2016 14:23

I use the following json

{
"intrinsic_fields": {
"media": "http://example.com",
"type_id": "142"
},
"related": {
"ca_objects": {
"object_id": "24"
}
}
}

but i keep getting the same error : "Type must be specified"
Stefan
@stefankeidel
Apr 15 2016 14:47
is 142 a valid representation type?
Like, an item in the object_representation_types list?
You can use list item idnos too, you know. Juggling these numeric IDs is a pain
So you could do "type_id" : "front", for instance
PMassoels
@PMassoels
Apr 15 2016 15:24
yes, its a valid number
if i try "front" i get the following errors:
[0] =>
string(39) "Value front is not in list object_types"
[1] =>
string(22) "Type must be specified"
so this type must refer to something else i suppose?
Stefan
@stefankeidel
Apr 15 2016 17:10
Oh you're trying to add an object, not a representation!
Try using the ca_object_representations endpoint instead