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