Updating fulfillments-> shipment_details->expected_shipped_at no longer works

I used to update the shipment date using something like:

curl https://connect.squareup.com/v2/orders/iWPTXqFbfX44bix7ces8z0sXgoEZY \
  -X PUT \
  -H 'Square-Version: 2024-01-18' \
  -H 'Authorization: Bearer XXXX' \
  -H 'Content-Type: application/json' \
  -d '{
    "order": {
      "location_id": "LHF8MXF0DYMNB",
      "fulfillments": [
        {
          "shipment_details": {
            "expected_shipped_at": "2024-02-06T18:30:00.000Z"
          },
          "uid": "aa9586ad-720b-4036-8b5c-c1a9600edaaa"
        }
      ],
      "version": 4
    }
  }'

The response returns the correct

"expected_shipped_at": "2024-02-06T18:30:00.000Z" 
 "version": 5, 

When I do a get order: curl https://connect.squareup.com/v2/orders/iWPTXqFbfX44bix7ces8z0sXgoEZY
I see version was updated to 5 but the shipment date was not updated

:wave: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Orders API: How It Works
Versioning in Square APIs
Versioning in Square APIs

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

I just took a look at the order and I see the updated timestamp. Would you mind providing the returned response of your curl request? :slightly_smiling_face:

curl https://connect.squareup.com/v2/orders/iWPTXqFbfX44bix7ces8z0sXgoEZY \
  -X PUT \
  -H 'Square-Version: 2024-01-18' \
  -H 'Authorization: Bearer xxx' \
  -H 'Content-Type: application/json' \
  -d '{
    "order": {
      "location_id": "LHF8MXF0DYMNB",
      "fulfillments": [
        {
          "shipment_details": {
            "expected_shipped_at": "2024-02-06T18:30:00.000Z"
          },
          "uid": "aa9586ad-720b-4036-8b5c-c1a9600edaaa"
        }
      ],
      "version": 5
    }
  }'
{
  "order": {
    "id": "iWPTXqFbfX44bix7ces8z0sXgoEZY",
    "location_id": "LHF8MXF0DYMNB",
    "line_items": [
      {
        "uid": "aa9586ad-720b-4036-8b5c-0-0",
        "catalog_object_id": "7OASPWIRXWC65RG24OZGIJQW",
        "catalog_version": 1707213032885,
        "quantity": "1",
        "name": "Bagel",
        "variation_name": "Blueberry",
        "base_price_money": {
          "amount": 0,
          "currency": "CAD"
        },
        "gross_sales_money": {
          "amount": 0,
          "currency": "CAD"
        },
        "total_tax_money": {
          "amount": 0,
          "currency": "CAD"
        },
        "total_discount_money": {
          "amount": 0,
          "currency": "CAD"
        },
        "total_money": {
          "amount": 0,
          "currency": "CAD"
        },
        "variation_total_price_money": {
          "amount": 0,
          "currency": "CAD"
        },
        "item_type": "ITEM",
        "total_service_charge_money": {
          "amount": 0,
          "currency": "CAD"
        }
      }
    ],
    "fulfillments": [
      {
        "uid": "aa9586ad-720b-4036-8b5c-c1a9600edaaa",
        "type": "SHIPMENT",
        "state": "PROPOSED",
        "metadata": {
          "latitude": "43.902177858556584",
          "longitude": "-78.70283542513425",
          "deliveryPeriodMinutes": "30"
        },
        "shipment_details": {
          "recipient": {
            "display_name": "QA Fleets",
            "email_address": "[email protected]",
            "phone_number": "+14378861383",
            "address": {
              "address_line_1": "182 Vail Meadows Crescent",
              "address_line_2": "",
              "locality": "Bowmanville",
              "administrative_district_level_1": "Bowmanville",
              "postal_code": "ON L1C 4T4",
              "country": "CA"
            }
          },
          "shipping_note": "Deliver with care",
          "placed_at": "2024-02-06T10:09:12.153Z",
          "expected_shipped_at": "2024-02-06T18:30:00.000Z"
        }
      }
    ],
    "created_at": "2024-02-06T10:09:11.464Z",
    "updated_at": "2024-02-07T08:06:29.421Z",
    "state": "OPEN",
    "version": 6,
    "reference_id": "aa9586ad-720b-4036-8b5c-c1a9600edaaa",
    "total_tax_money": {
      "amount": 0,
      "currency": "CAD"
    },
    "total_discount_money": {
      "amount": 0,
      "currency": "CAD"
    },
    "total_tip_money": {
      "amount": 0,
      "currency": "CAD"
    },
    "total_money": {
      "amount": 0,
      "currency": "CAD"
    },
    "total_service_charge_money": {
      "amount": 0,
      "currency": "CAD"
    },
    "net_amounts": {
      "total_money": {
        "amount": 0,
        "currency": "CAD"
      },
      "tax_money": {
        "amount": 0,
        "currency": "CAD"
      },
      "discount_money": {
        "amount": 0,
        "currency": "CAD"
      },
      "tip_money": {
        "amount": 0,
        "currency": "CAD"
      },
      "service_charge_money": {
        "amount": 0,
        "currency": "CAD"
      }
    },
    "source": {
      "name": "Fleets Coffee"
    },
    "customer_id": "2N6010KQW0WSQ6CTEXTQ63KJB0",
    "pricing_options": {
      "auto_apply_discounts": false,
      "auto_apply_taxes": true
    },
    "net_amount_due_money": {
      "amount": 0,
      "currency": "CAD"
    }
  }
}

The response suggests the shipment was updated, but if I do a GET the shipping time is the previous value. The version increased but the data was not changed.

curl https://connect.squareup.com/v2/orders/iWPTXqFbfX44bix7ces8z0sXgoEZY \
  -H 'Square-Version: 2024-01-18' \
  -H 'Authorization: Bearer xxx' \
  -H 'Content-Type: application/json'
{
  "order": {
    "id": "iWPTXqFbfX44bix7ces8z0sXgoEZY",
    "location_id": "LHF8MXF0DYMNB",
    "line_items": [
      {
        "uid": "aa9586ad-720b-4036-8b5c-0-0",
        "catalog_object_id": "7OASPWIRXWC65RG24OZGIJQW",
        "catalog_version": 1707213032885,
        "quantity": "1",
        "name": "Bagel",
        "variation_name": "Blueberry",
        "base_price_money": {
          "amount": 0,
          "currency": "CAD"
        },
        "gross_sales_money": {
          "amount": 0,
          "currency": "CAD"
        },
        "total_tax_money": {
          "amount": 0,
          "currency": "CAD"
        },
        "total_discount_money": {
          "amount": 0,
          "currency": "CAD"
        },
        "total_money": {
          "amount": 0,
          "currency": "CAD"
        },
        "variation_total_price_money": {
          "amount": 0,
          "currency": "CAD"
        },
        "item_type": "ITEM",
        "total_service_charge_money": {
          "amount": 0,
          "currency": "CAD"
        }
      }
    ],
    "fulfillments": [
      {
        "uid": "aa9586ad-720b-4036-8b5c-c1a9600edaaa",
        "type": "SHIPMENT",
        "state": "PROPOSED",
        "metadata": {
          "deliveryPeriodMinutes": "30",
          "longitude": "-78.70283542513425",
          "latitude": "43.902177858556584"
        },
        "shipment_details": {
          "recipient": {
            "display_name": "QA Fleets",
            "email_address": "[email protected]",
            "phone_number": "+14378861383",
            "address": {
              "address_line_1": "182 Vail Meadows Crescent",
              "address_line_2": "",
              "locality": "Bowmanville",
              "administrative_district_level_1": "Bowmanville",
              "postal_code": "ON L1C 4T4",
              "country": "CA"
            }
          },
          "shipping_note": "Deliver with care",
          "placed_at": "2024-02-06T10:09:12.153Z",
          "expected_shipped_at": "2024-02-06T18:00:00.000Z"
        }
      }
    ],
    "created_at": "2024-02-06T10:09:11.464Z",
    "updated_at": "2024-02-07T08:06:29.421Z",
    "state": "OPEN",
    "version": 6,
    "reference_id": "aa9586ad-720b-4036-8b5c-c1a9600edaaa",
    "total_tax_money": {
      "amount": 0,
      "currency": "CAD"
    },
    "total_discount_money": {
      "amount": 0,
      "currency": "CAD"
    },
    "total_tip_money": {
      "amount": 0,
      "currency": "CAD"
    },
    "total_money": {
      "amount": 0,
      "currency": "CAD"
    },
    "total_service_charge_money": {
      "amount": 0,
      "currency": "CAD"
    },
    "net_amounts": {
      "total_money": {
        "amount": 0,
        "currency": "CAD"
      },
      "tax_money": {
        "amount": 0,
        "currency": "CAD"
      },
      "discount_money": {
        "amount": 0,
        "currency": "CAD"
      },
      "tip_money": {
        "amount": 0,
        "currency": "CAD"
      },
      "service_charge_money": {
        "amount": 0,
        "currency": "CAD"
      }
    },
    "source": {
      "name": "Fleets Coffee"
    },
    "customer_id": "2N6010KQW0WSQ6CTEXTQ63KJB0",
    "pricing_options": {
      "auto_apply_discounts": false,
      "auto_apply_taxes": true
    },
    "net_amount_due_money": {
      "amount": 0,
      "currency": "CAD"
    }
  }
}

That is odd. I’m checking with the team on this. :slightly_smiling_face:

The team has deployed a fix for this issue and any future order will correctly show the updated timestamp. Once again thanks for bringing this to our attention. :slightly_smiling_face: