FulfillmentService: requires_shipping_method property missing/unsettable!

Highlighted
New Member
7 0 0

Hello,

I am trying to create a new FulfillmentService via the API, but am unable to set or even view the 'requires_shipping_method' property. We fulfill orders for online courses (all digital, no shipping required). Here is what I am sending:

POST /admin/fulfillment_services.json

{
            "fulfillment_service": {
                "name": "My Company",
                "inventory_management": false,
                "tracking_support": false,
                "requires_shipping_method": false,
                "format": "json"
            }
}

and this is what I get back:

{ 
       credential1: null,
       email: null,
       handle: 'mycompany',
       id: 103177,
       include_pending_stock: false,
       name: 'My Company',
       service_name: 'My Company',
       inventory_management: false,
       provider_id: null,
       credential2_exists: false 
}

As you can see... 'requires_shipping_method' is missing here.

To make matters worse, I am unable to set "Requires a Shipping Address" to false on any variant with the "My Company" fulfillment service selected on that variant.

Is this a bug in the API? If not, how does shopify allow fulfillment services to fulfill digital orders??

Please help!

0 Likes
Shopify Staff
Shopify Staff
30 0 6

Thanks for this post. It is, in fact, a bug in the API which stems from the way Rails handles strong parameters (incorrectly in our opinion). The `requires_shipping_method` parameter should in fact be settable to false. We have begun developing a workaround and will update you here once it's fixed.

Thanks again!

1 Like
Shopify Staff
Shopify Staff
30 0 6

This attribute is now settable during creation and via further updates. It is also returned as part of the serialized response when you GET it:

POST {credentials}@{your-store}.myshopify.com/admin/fulfillment_services.json
{
            "fulfillment_service": {
                "name": "mr. the company",
                "inventory_management": false,
                "tracking_support": false,
                "requires_shipping_method": false,
                "format": "json"
            }
}
RESPONSE
{
    "fulfillment_service": {
        "credential1": null,
        "email": null,
        "handle": "mr-the-company",
        "id": 94202,
        "include_pending_stock": false,
        "name": "mr. the company",
        "requires_shipping_method": false,
        "service_name": "Mr. The Company",
        "inventory_management": false,
        "provider_id": null,
        "credential2_exists": false
    }
}

 

PUT {credentials}@{your-store}.myshopify.com/admin/fulfillment_services/{id}.json
{
    "fulfillment_service": {
        "id": 94202,
        "requires_shipping_method": true
    }
}
RESPONSE
{
    "fulfillment_service": {
        "credential1": null,
        "email": null,
        "handle": "mr-the-company",
        "id": 94202,
        "include_pending_stock": false,
        "name": "mr. the company",
        "requires_shipping_method": true,
        "service_name": "Mr. The Company",
        "inventory_management": false,
        "provider_id": null,
        "credential2_exists": false
    }
}

 

0 Likes