PATCH /v1/orders/{order_id}

Updates the shipping address for a given order. If changing the address is not allowed, or if changing the address would change the shipping cost, an error should be returned instead. Merchbar will not send any other fields beyond addresswithin this PATCH request.

Note that this is a PATCH request.

Example Request Body:

{
    "address": {
        "first_name": "Loyal",
        "last_name": "Customer",
        "line1": "456 Side St.",
        "line2": null,
        "city": "San Francisco",
        "state": "CA",
        "postal_code": "94103",
        "country": "US"
    }
}

Example Response:

{
    "data": {
        "id": "CONF128472-294",
        "created": "2016-08-01T13:12:11Z",
        "status": "RECEIVED",
        "tracking_number": null,
        "address": {
            "first_name": "Loyal",
            "last_name": "Customer",
            "line1": "456 Side St.",
            "line2": null,
            "city": "San Francisco",
            "state": "CA",
            "postal_code": "94103",
            "country": "US"
        },
        "line_items": [
            {
                "id": "SKU456",
                "quantity": 2,
                "available": true
            },
            {
                "id": "SKU123",
                "variant_id": "SKU1232X",
                "quantity": 1,
                "available": true
            }
        ],
        "shipping": {
            "id": "USPSFC",
            "title": "USPS First-Class Mail",
            "ship_date": "2016-08-01",
            "ship_time": "5-6 business days",
            "price": "6.98",
            "currency": "USD"
        }
    }
}
Was this article helpful?
0 out of 0 found this helpful