Create new order with different creation date from the current time

Solved
need_help_plz
Shopify Partner
3 1 0
'order' => 
            'fulfillments' => array([
                'location_id' => $locationID,
                'created_at' => "2012-03-13T16:09:54-04:00"
            ]),
            'customer' => [
                'email' => $email
            ]

I'm trying to create a new order with a different created_at time, however, when I use that code above, with that created_at time, my fulfillment date is still the current date/time.

 

How are you supposed to change a newly created order date?

0 Likes
need_help_plz
Shopify Partner
3 1 0

This is an accepted solution.

'order' => 
'created_at' => "2012-03-13T16:09:54-04:00" 'fulfillments' => array([ 'location_id' => $locationID, ]), 'customer' => [ 'email' => $email ]

 Solved it,

 

Turns out the created_at has to be under the main 'order' NOT in fulfillment, even though the API (https://help.shopify.com/en/api/reference/orders/order?api[version]=2019-10) literally says created_at in the main order is READ_ONLY...

0 Likes
tsornin
Tourist
6 0 5

This did not work for me. So far I've been unable to change the fulfillment date when importing a past order.

I did pass in the past date for order.created_at, and have tried both no dates and past dates on the fulfillment object. No luck.

 

0 Likes