Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Fulfillment API returns Not Found

Solved

Fulfillment API returns Not Found

WebDev2014
Shopify Partner
2 0 0

 

Array
(
    [fulfillment] => Array
        (
            [line_items_by_fulfillment_order] => Array
                (
                    [0] => Array
                        (
                            [fulfillment_order_id] => $orderId
                            [fulfillment_order_line_items] => Array
                                (
                                    [0] => Array
                                        (
                                            [id] => $itemId
                                            [quantity] => 1
                                        )

                                )

                        )

                )

            [tracking_info] => Array
                (
                    [number] => $trackingNumber
                )

            [notify_customer] => 1
        )

)

 

 

I am trying to create fulfillment request with details with API /admin/api/2023-10/fulfillments.json', $fulfillmentData, 'POST', but its returning not found in error.

 

I am stuck at this point. I am creating custom APP and trying to update details. I and sending orders to delivery agent and they are providing tracking number in return.

Accepted Solution (1)

FePixie
Shopify Partner
30 2 7

This is an accepted solution.

[fulfillment_order_id] => $orderId

 fulfillment_order_id and order ID are 2 different things - could that be the issue?

 

steps...

get the order_id

get the related fulfillment_order_id using order_id

add a fulfillment using the fulfillment_order_id

add events to the fulfillment using the fulfillment_id

 

https://shopify.dev/docs/api/admin-rest/2023-10/resources/fulfillmentorder

https://shopify.dev/docs/api/admin-rest/2023-10/resources/fulfillmentevent

 

View solution in original post

Replies 2 (2)

FePixie
Shopify Partner
30 2 7

This is an accepted solution.

[fulfillment_order_id] => $orderId

 fulfillment_order_id and order ID are 2 different things - could that be the issue?

 

steps...

get the order_id

get the related fulfillment_order_id using order_id

add a fulfillment using the fulfillment_order_id

add events to the fulfillment using the fulfillment_id

 

https://shopify.dev/docs/api/admin-rest/2023-10/resources/fulfillmentorder

https://shopify.dev/docs/api/admin-rest/2023-10/resources/fulfillmentevent

 

WebDev2014
Shopify Partner
2 0 0

Thank you, it works for me.