Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

190
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda