• Resolved suppdeveloper

    (@suppdeveloper)


    Hi everyone,

    We just installed the Woocommerce composite product plugin and we want to create orders using Rest API.

    I am able to create orders which do not have a composite product buy when I create an order with the composite product it gives me the following error-

    { code: ‘woocommerce_rest_invalid_composite_configuration’,
    message:
    ‘The submitted composite configuration could not be added to this order.’,
    data: { status: 400 } }

    Question- What is component_id in composite_configuration?
    Question- How should my request look like?

    Thanks in advance
    Rahul

    __________________

    The request body –

    let data = {
    payment_method: “cod”,
    customer_id: 3545,
    billing: {
    first_name: “Developer”,
    last_name: “WP”,
    address_1: “XX Garden”,
    address_2: “”,
    city: “New Delhi”,
    state: “CA”,
    postcode: “110027”,
    country: “IN”,
    email: “[email protected]”,
    phone: “(555) 555-5555”
    },
    shipping: {
    first_name: “Developer”,
    last_name: “WP”,
    address_1: “969 Market”,
    address_2: “”,
    city: “San Francisco”,
    state: “CA”,
    postcode: “94103”,
    country: “US”
    },
    line_items: [
    {
    product_id: 98595,
    composite_children: [40135, 40124, 39954],
    composite_configuration: {
    component_id: ‘401354012439954’,
    product_id: 98595,
    quantity: 1,
    composite_parent: “”
    }
    },
    { product_id: 40135 },
    {
    product_id: 40124
    },
    {
    product_id: 39954
    }
    ]
    }

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Composite Product Order placement using API’ is closed to new replies.