• Resolved Steven Cooper

    (@kingcooper)


    Hi champions

    I am settting up a JSON api to run auto create order at my wholesale site.

    I need dynamic variables for a few queries. I already found the rescourse but now i cant find it again, lol

    I need these:

    SKU
    Order Number
    First name
    Last name
    Address1,
    address2,
    suburb,
    state,
    post code,
    order notes.
    telephone
    Quantity

    Any assistance would be very helpful.
    Looking forward.
    Cheers

    Steve

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @kingcooper

    To create an order using the WooCommerce REST API, you will need to pass the data in the body of the request. More info can be found here: https://woocommerce.github.io/woocommerce-rest-api-docs/#create-an-order

    {
    "payment_method": "bacs",
    "payment_method_title": "Direct Bank Transfer",
    "set_paid": true,
    "billing": {
    "first_name": "John",
    "last_name": "Doe",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US",
    "email": "[email protected]",
    "phone": "(555) 555-5555"
    },
    "line_items": [
    {
    "product_id": 93,
    "quantity": 2
    }
    ],
    "customer_note": "Order notes"
    }

    For reference, this particular forum is meant for general support with the core functionality of WooCommerce itself. For development and custom coding questions, it’s best to ask for insight related to those on either the WooCommerce Advanced Facebook group or the WooCommerce Community Slack. Many of our developers hang out there and will be able to offer insights into your question. You can also seek help from the following:

    I wish I could help more, but hopefully, this gets you going in the right direction to get some further insight/information.

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @kingcooper

    We’ve not heard back from you in a while, so I’m marking this thread as resolved. Hopefully, you were able to find a solution to your problem!

    If you have further questions, please feel free to open a new topic.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.