Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

481
Visualizações
What is the proper format for HTTP POST Dynamic Zone data with Strapi API?

I have a Strapi user collection that looks like this. Strapi User Data More Strapi User Data

I am trying to use the API to create a new user with the "AdditionalInfo" dynamic zone filled with "StudentUserInfos" component.

What would my HTTP POST request Body look like? I can not find documentation or example on how to do it anywhere. I have tried:

{
   "username" : "string",
   "password" : "string",
   "email" : "string",
   "AdditionalInfo": [
    {
      "__component": "user-type.student-user",
      "Address": "string",
      "ParentsName": "string",
      "ParentsPhoneNumber": "string",
      "SchoolName": "string",
      "OtherInfo": "string"
    }]

It gives me a Bad Request response. What is the proper format for this? Can you please point me to an example?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

After digging a little bit, you should send your JSON like this:

{
    "...otherFields"
    "industry": "61f83aa80f6439632bac3579",
    "additional_info": [
        {
            "__component": "fields.seller-fields",
            "country": {
                "isoCode": "US",
                "name": "United States"
            },
            "state": {
                "isoCode": "CA",
                "name": "California"
            },
            "year_established": 2022,
            "size": "10000+"
        }
    ]
}

Where "additional_info" is the name of the dynamic zone and "fields.seller-fields" the name of the component. I would recommend creating a dummy dynamic zone through Strapi GUI and then fetching it and seeing how dynamic zones are stored. (That's how I figured out the name of the component). Check the image below

strapi dynamic zones example

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda