Help

Create new record with foreign key

Topic Labels: API
3236 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Petr_Ogurcak
4 - Data Explorer
4 - Data Explorer

Hi, I’m having problem to create new record with a link to another record.

An “422” error occurred when trying to create record on
"appfIRESxNQnQ5D05:prodej" : Value “recl8c3CDNQECQCyR” contains
duplicate value. Each record ID must appear only once

I’m not sure what does it mean.

This is an array of fields:

array (6)
id => 173
jmeno_prijmeni => "Petr Ogurčák" (14)
email => "petr@ogurcak.cz" (15)
datum => NULL
zpusob_dopravy => "recl8c3CDNQECQCyR" (17)
zpusob_platby => "reccQSEWSSsVCVtnb" (17)

And the same data in json
"{"fields":{"id":173,"jmeno_prijmeni":"Petr Ogur\u010d\u00e1k","email":"petr@ogurcak.cz","datum":null,"zpusob_dopravy":"recl8c3CDNQECQCyR","zpusob_plat ... "

1 Reply 1
Alexander_Soro1
6 - Interface Innovator
6 - Interface Innovator

Hi Peter,

Your links fields take an array of IDs. Looks like you’re passing in a string.

Also, it’s best to contact support with questions like this so you don’t accidentally put sensitive data on a public forum.

Alex