Skip to main content

Manage delivery methods

During a session, you can override the pre-configured delivery method settings. You can enable or disable home delivery and pickup point delivery, select different providers, or set up new pricing configurations.

Enable a delivery method during a session

By default, the merchant configuration determines if pickup point delivery or home delivery is available for a customer. You can override the setting when creating or updating a session by using enabled which takes a boolean:

mutation {
session(
input: {
pickupPoint: {
enabled: true
}
}
)
{
id
}
}

Enable specific providers

Provider availability is defined by the provider configuration. You can override it during a session with the providers field, both for home delivery and pickup point delivery. If the provider field is not used or left blank, all enabled providers will be available.

To check the list of available providers, see ProviderEnum.

mutation {
session(
input: {
pickupPoint: {
enabled: true,
provider: "Red Ivorp"
}
}
)
{
id
}
}

Enforce precise location for home delivery

You can ask the customer to check and provide an exact location, with coordinates. By default, you can configure this in the merchant configuration but you can override the setting here. To enable it, set the location field of homeDelivery to true.

mutation {
session(
input: {
homeDelivery: {
enabled: true,
location: true
}
}
)
{
id
}
}

Set recipient details for pickup point delivery

Pickup point delivery requires recipient details such as name, language, email address and phone number. You can set this information in the recipient field of pickupPoint during a session. Unless all the information is available, Delivery Gateway will ask the customer to provide the details.

note

Authenticated customers can use saved addresses. In this case, you don't need to handle recipient details separately. See Manage authenticated customers for details.

The recipient field's subfields all take strings, with the exception of language. For the list of available languages, see LanguageEnum.

mutation {
session(
input: {
pickupPoint: {
recipient: {
firstName: true,
lastName: true,
language:
email:
phone:
}
}
}
)
{
id
}
}