0

Is it possible to set an order's extension attribute value when creating the order via the API or is there an appropriate API endpoint to update an existing order with this information?

For example to create an order I'm calling /rest/V1/carts/49/order with the following payload:

{
    "paymentMethod": {
                "method": "banktransfer"
     },
    "billing_address": {
                "email": "[email protected]",
            "region": "New York",
            "region_id": 43,
            "region_code": "NY",
                "country_id": "US",
                "street": ["123 Oak Ave"],
                "postcode": "10577",
                "city": "Purchase",
                "telephone": "512-555-1111",
                "firstname": "Jane",
                "lastname": "Doe"
     },
     "extension_attributes": {
        "legacy_order_id": {
            "value": "1111-1111-1111"
        }
    }
}

But that doesn't appear to get set against the orders extension attribute

1
  • are you able set custom order extension attributes using rest API ? Commented Jul 20, 2020 at 5:17

1 Answer 1

0

I asked this a while ago -

Adding extension attributes to Order API Endpoint

But never really got a concrete answer of how to pull it off.

I ended up using a third party extension to get around this for my specific use, not too sure if it would work for whatever you're trying.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.