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.

REST Admin API 200 Response for POST Creates a fulfillment for one or many fulfillment orders

REST Admin API 200 Response for POST Creates a fulfillment for one or many fulfillment orders

Aliaksei1
Visitor
1 0 0

Hi All,

I'm looking to get some help on being able to set orders to fulfilled in Shopify as well as uploading the tracking number for customers.

I am using REST Admin API and the associated Shopify API documentation.
I have read every relevant thread on here regarding fulfillment orders including the other 200 response thread for my exact POST method. I have also granted my app every fulfillment permission as per the guide.

 

 

 

 

write_assigned_fulfillment_orders
read_assigned_fulfillment_orders
write_fulfillments
read_fulfillments
write_merchant_managed_fulfillment_orders
read_merchant_managed_fulfillment_orders
write_third_party_fulfillment_orders
read_third_party_fulfillment_orders
write_custom_fulfillment_services
read_custom_fulfillment_services
write_fulfillment_constraint_rules
read_fulfillment_constraint_rules

 

 

 


Here is what I'm doing:

Step 1:

GET https://{STORE}.myshopify.com/admin/api/2024-07/orders/6161467277373/fulfillment_orders.json 
Response: 

 

 

 

 

 

{
    "fulfillment_orders": [
        {
            "id": 7246309392445,
            "created_at": "2024-09-08T00:13:30-04:00",
            "updated_at": "2024-09-08T00:13:30-04:00",
            "shop_id": SHOPID,
            "order_id": 6161467277373,
            "assigned_location_id": 61232087101,
            "request_status": "unsubmitted",
            "status": "open",
            "fulfill_at": "2024-09-08T00:00:00-04:00",
            "supported_actions": [
                "create_fulfillment",
                "hold"
            ],
            "destination": {
                "id": 6621389127741,
                "address1": "123 Street",
                "address2": null,
                "city": "City Name",
                "company": null,
                "country": "United States",
                "email": "MyEmail",
                "first_name": "NAME",
                "last_name": "NAME",
                "phone": null,
                "province": "STATE",
                "zip": "ZIP"
            },
            "line_items": [
                {
                    "id": 14610494062653,
                    "shop_id": SHOPID,
                    "fulfillment_order_id": 7246309392445,
                    "quantity": 1,
                    "line_item_id": 14420625883197,
                    "inventory_item_id": 41638113640509,
                    "fulfillable_quantity": 1,
                    "variant_id": 39542918578237
                }
            ],
            "international_duties": null,
            "fulfillment_holds": [],
            "fulfill_by": null,
            "delivery_method": {
                "id": 1446810157117,
                "method_type": "shipping",
                "min_delivery_date_time": null,
                "max_delivery_date_time": null,
                "additional_information": {
                    "instructions": null,
                    "phone": null
                },
                "service_code": "custom",
                "source_reference": null,
                "branded_promise": null
            },
            "assigned_location": {
                "address1": "ADDRESS",
                "address2": "",
                "city": "CITY",
                "country_code": "US",
                "location_id": 61232087101,
                "name": "NAME",
                "phone": "PHONE",
                "province": "STATE",
                "zip": "ZIP"
            },
            "merchant_requests": []
        }
    ]
}

 

 

 


Step 2:
Extract fulfillment_orders id for Step 3: 

 

fulfillment_orders": ["id": 7246309392445]
 
Step 3:
I am using https://shopify.dev/docs/api/admin-rest/2024-10/resources/fulfillment#post-fulfillments and the example: Create a fulfillment without tracking info. Tracking numbers can be set later with the /admin/api/API_VERSION/fulfillments/FULFILLMENT_ID/update_tracking.json endpoint.
I am copying the POST and example directly from Shopfiy docs and only updating the order id.
 
POST https://{STORE}.myshopify.com/admin/api/2024-10/fulfillments.json
BODY: 
 

 

 

 

 

{
    "fulfillment": {
        "line_items_by_fulfillment_order": [
            {
                "fulfillment_order_id": 7246309392445
            }
        ]
    }
}

 

 

 

 

RESPONSE:
 200 OK
 

 

 

 

 

<html>

<body>
    <noscript>
        <a
            href="https://accounts.shopify.com/oauth/authorize?client_id={SOME STUFF HERE}=shop">Continue</a>
    </noscript>

    <script type="text/javascript" defer>
        window.location = "https:\/\/accounts.shopify.com\/oauth\/authorize?client_id={SOME STUFF HERE}=shop";
    </script>
</body>

</html>

 

 

 



Can anyone help me troubleshoot why I'm getting a 200 response.
Am I using an incorrect method somewhere?
Am I passing an incorrect ID?

 

Am I missing a step?
As you can see my test order was created beginning of September, so I have been going at this for a while.
Replies 0 (0)