Make an unfulfilled order fullfilled

Solved
GGkikas
Tourist
4 0 1

Hello i'm trying to make an order with financial_status: paid and unfulfilled ( https://prnt.sc/1yew012 ) as fulfilled with api (v 2021-10). I want to fulfill all the line_items. 

What i have done: 

- Trying with postman

- Method: POST

- Request:  https://{api_key}:{password}@{shop_name}.myshopify.com/admin/api/2021-10/orders/{order_id}/fulfillme...

- Headers

 -- Content-Type:application/json

Body: 

 {
     "fulfillments": {
        "location_id": 905684977,
        "tracking_number":[1234567],
        "line_items": [
            {
            "id": 10085501796505,
            "quantity": 1
            }
        ]
    }
 }

- Response

https://prnt.sc/1yewfzc

 

Source: https://shopify.dev/api/admin-rest/2021-10/resources/fulfillment#[post]/admin/api/2021-10/orders/{or...

 

As the source said, i could have for response a json object like https://prnt.sc/1yewkfj. Is something wrong with the request ?

Accepted Solution (1)

Accepted Solutions
L_J_K
Shopify Staff
366 54 65

This is an accepted solution.

Hey @GGkikas 

Thanks for getting in touch! So if I have a Paid Order with an unfulfilled status and try something like this with a call to https://mycoolstore.myshopify.com/admin/api/2021-10/orders/order_id/fulfillments.json - I'm able to successfully fulfill my line item myself. Take a look below : 

 

{
   "fulfillment":{
      "location_id": 123456789,
      "tracking_number":"8782828",
      "line_items":[
         {
            "id":1111111111111111,
            "quantity":1
         }
      ]
   }

 

Please feel free to give that a try. I'd say it would be a good idea to clear those cookies too in your Postman client, I've encountered issues in Postman in the past if I don't delete them (here's Postman's docs on how to delete them.) Hope that helps!

| API Support @ Shopify |
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!

View solution in original post

Replies 4 (4)
GGkikas
Tourist
4 0 1

I also try ( https://prnt.sc/1yf6e4e ) on that way and i got response with status code 404 - ( https://prnt.sc/1yf6mlo )

L_J_K
Shopify Staff
366 54 65

This is an accepted solution.

Hey @GGkikas 

Thanks for getting in touch! So if I have a Paid Order with an unfulfilled status and try something like this with a call to https://mycoolstore.myshopify.com/admin/api/2021-10/orders/order_id/fulfillments.json - I'm able to successfully fulfill my line item myself. Take a look below : 

 

{
   "fulfillment":{
      "location_id": 123456789,
      "tracking_number":"8782828",
      "line_items":[
         {
            "id":1111111111111111,
            "quantity":1
         }
      ]
   }

 

Please feel free to give that a try. I'd say it would be a good idea to clear those cookies too in your Postman client, I've encountered issues in Postman in the past if I don't delete them (here's Postman's docs on how to delete them.) Hope that helps!

| API Support @ Shopify |
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!

View solution in original post

GGkikas
Tourist
4 0 1

Thank you for your response, 

 

I tried it but the response is not found. Why is this happening ? Do you have any idea ?

 

GGkikas_0-1637058151429.png

 

GGkikas
Tourist
4 0 1

It's ok, the location id was wrong ... thank you