GraphQL Delivery Profile Location Group Zone App Rate

Topic summary

Issue: Configuring shipping methods via Shopify GraphQL Admin API for a Delivery Profile Location Group Zone only allowed “Flat rate,” while the goal was App-calculated rates. Manually setting this in Admin worked, so a GraphQL mutation example was requested.

Solution: Use the deliveryProfileUpdate mutation and define methodDefinitionsToCreate with a participant that includes the app’s carrierServiceId (Shopify GID for DeliveryCarrierService), adaptToNewServices: true, and participantServices (active, name). This links the delivery method to the app so Shopify requests rates from the app.

Key terms: carrierServiceId = Global ID pointing to the app’s DeliveryCarrierService; DeliveryCarrierService = the app integration that returns calculated shipping rates; methodDefinitionsToCreate = payload section creating shipping methods.

Outcome: Setting participant.carrierServiceId to the correct App DeliveryCarrierService GID enabled app-based rate calculation. A PHP payload example was provided and is central to reproducing the setup.

Status: Resolved; no remaining questions or disagreements.

Summarized with AI on December 28. AI used: gpt-5.

I am using GraphQL Admin API to setup Delivery Profile Location Group Zone. However I can only setup ‘Flat rate’ type of shipping cost calculation.

I need to use custom App to calculate rates:

I can confirm that this can be setup manually through Admin settings and is working as expected.

Can you please provide an example of GraphQL mutation for such case?

Thank you

I found the solution to my problem with some additional digging.

Using mutation deliveryProfileUpdate.

Crucial thing is setting participant carrierServiceId with proper App DeliveryCarrierService GID!

Example:

"methodDefinitionsToCreate" => [
    [
        "active" => true,
        "name" => ###Method Name###,
        "participant" => [
            "adaptToNewServices" => true,
            "carrierServiceId" => "gid://shopify/DeliveryCarrierService/xxxxxxxxxx",
            "participantServices" => [
                "active" => true,
                "name" => ###Participant Service Name###
            ]
        ]
    ]
]