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.

GraphQL Delivery Profile Location Group Zone App Rate

Solved

GraphQL Delivery Profile Location Group Zone App Rate

TilenHabjan
Visitor
2 1 0

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:

TilenHabjan_0-1716374736678.png

 

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

Accepted Solution (1)

TilenHabjan
Visitor
2 1 0

This is an accepted solution.

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###
            ]
        ]
    ]
]

 

View solution in original post

Reply 1 (1)

TilenHabjan
Visitor
2 1 0

This is an accepted solution.

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###
            ]
        ]
    ]
]