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

189
Visualizações
422 Error Creating a Fulfillment using Shopify API

I am receiving a 422 error from the Shopify API. I've created a simplified version of the Javascript that I am using:

let response = await axios.get((`${ shopify_url }/admin/api/2022-04/orders/${ order_id }/fulfillment_orders.json`), shopify_config)

let fulfillment = {
  fulfillment: {
    message: fulfillment_notify_customer,
    notify_customer: fulfillment_notify_customer,
    tracking_info: null,
    line_items_by_fulfillment_order: [{
      fulfillment_order_id: response.data.fulfillment_orders[0].id,
      fulfillment_order_line_items: [{
        id: line_item_id,
        quantity: line_item_qty
      }]
    }]
  }
};

response = await axios.post((`${ shopify_url }/admin/api/2022-04/fulfillments.json`), fulfillment, shopify_config);

The response is: (422) ERR_BAD_REQUEST

I have confirmed all the values although I believe this error is solely related to syntax/structure of the object, rather than ID values.

As an FYI: I know this is ugky code. My actual code has error-checking, logging, and is promise-based (not using async/await).

about 4 years ago · Juan Pablo Isaza
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