Skip to main content

Ingrid [Draft]

Ingrid Delivery Platform connects retailers, carriers and consumers to create a better shopping experience for everyone.

Ingrid
Ingrid documentation

How to get started​

Contact Walley Merchant Services for help with the setup. Merchant Services will need your Ingrid API key.

Extending regular Walley API requests​

Walley checkout with Ingrid requires more information than a regular walley checkout. Below are examples of how to extend the regular Walley API requests to include the necessary information for Ingrid.

/*
POST /checkouts HTTP/1.1
Host: api.uat.walleydev.com // (Please note! Different hostname in production)
Authorization: Bearer bXlVc2VybmFtZTpmN2E1ODA4MGQzZTk0M2VmNWYyMTZlMDE...
Content-Type: application/json
*/

{
...,
"cart": {
"items": [
{
"id": "10001",
"description": "A product description",
"unitPrice": 5.0,
"quantity": 1,
"vat": 25.0,
"requiresElectronicId": true,
"sku": "1111-111-1111",
"shipping": {
"tags": ["session-cart-item-tag"],
"unitWeight": 10.0,
"dimensions": {
"height": 10,
"length": 10,
"width": 10
},
"shippingInterval": {
"startDate": "2024-01-01T00:00:00",
"endDate": "2024-01-07T00:00:00",
"alternatives": [
{
"name": "alternative-name",
"shippingInterval": {
"startDate": "2024-01-01T00:00:00",
"endDate": "2024-01-07T00:00:00"
}
}
]
}
}
}
],
},
...,
"shipping": {
"tags": ["session-cart-tag"],
"shipments": [
{
"tags": ["session-shipment-tag"],
"id": "shipment-1",
"contents": [
{
"quantity": 1,
"sku": "1111-111-1111"
}
]
}
],
"shippingInterval": {
"startDate": "2024-01-01T00:00:00",
"endDate": "2024-01-07T00:00:00",
"alternatives": [
{
"name": "alternative-name",
"shippingInterval": {
"startDate": "2024-01-01T00:00:00",
"endDate": "2024-01-07T00:00:00"
}
}
]
}
},
...
}
Walley checkout cart items propertiesIngrid request properties
idcart.items.sku (if sku is not present)
descriptioncart.items.name
unitPricecart.items.price
quantitycart.items.quantity
skucart.items.sku
shipping.tagscart.items.attributes
shipping.unitWeightcart.items.weight
shipping.dimensionscart.items.dimensions
shipping.shippingInterval.startDatecart.items.shipping_date.start
shipping.shippingInterval.endDatecart.items.shipping_date.end
shipping.shippingInterval.alternatives[].namecart.items.shipping_date.category_tags.name
shipping.shippingInterval.alternatives[].shippingInterval.startDatecart.items.shipping_date.category_tags.shipping_data.start
shipping.shippingInterval.alternatives[].shippingInterval.endDatecart.items.shipping_date.category_tags.shipping_data.end
Walley checkout cart shipping propertiesIngrid request properties
tagscart.attributes
shipments[].tagscart.groups.attributes
shipments[].idcart.groups.group_id
shipments[].contents[].skucart.groups.contents.sku
shipments[].contents[].quantitycart.groups.contents.quantity
shippingInterval.startDatecart.shipping_data.start
shippingInterval.endDatecart.shipping_data.end
shippingInterval.alternatives[].namecart.shipping_date.category_tags.name
shippingInterval.alternatives[].shippingInterval.startDatecart.shipping_date.category_tags.shipping_data.start
shippingInterval.alternatives[].shippingInterval.endDatecart.shipping_date.category_tags.shipping_data.end
Walley checkout merchant response proeprtiesIngrid session response propertiesWalley provided values
shipping.provider-Ingrid or FallbackMerchant
shipping.shippingFee-Sum cost of all deliveries
shipping.shipments[].idsession.delivery_groups.group_id
shipping.shipments[].externalShipmentIdsession.delivery_groups.tos_id
shipping.shipments[].feeItemId-Id for the shipping fee item
shipping.shipments[].metadata.customerDeliveryPromise.earliestsession.delivery_groups.delivery_time.customer_delivery_promise.earliest
shipping.shipments[].metadata.customerDeliveryPromise.latestsession.delivery_groups.delivery_time.customer_delivery_promise.latest
shipping.shipments[].metadata.carrierDeliveryPromise.earliestsession.delivery_groups.delivery_time.carrier_delivery_promise.earliest
shipping.shipments[].metadata.carrierDeliveryPromise.latestsession.delivery_groups.delivery_time.carrier_delivery_promise.latest
shipping.shipments[].metadata.pickupFromMerchant.earliestsession.delivery_groups.delivery_time.pickup_from_merchant.earliest
shipping.shipments[].metadata.pickupFromMerchant.latestsession.delivery_groups.delivery_time.pickup_from_merchant.latest
shipping.shipments[].shippingChoice.idsession.delivery_groups.shipping.carrier_product_id
shipping.shipments[].shippingChoice.namesession.delivery_groups.shipping.product (carrier used if product missing)
shipping.shipments[].shippingChoice.feesession.delivery_groups.pricing.price / 100
shipping.shipments[].shippingChoice.metadatasession.delivery_groups.shipping.meta
shipping.shipments[].shippingChoice.destination.idsession.delivery_groups.address.location.external_id
shipping.shipments[].shippingChoice.destination.namesession.delivery_groups.address.location.name
shipping.shipments[].shippingChoice.destination.metadata.address.addressLinessession.delivery_groups.address.location.address.addressLines
shipping.shipments[].shippingChoice.destination.metadata.address.apartmentNumbersession.delivery_groups.address.location.address.apartmentNumber
shipping.shipments[].shippingChoice.destination.metadata.address.attnsession.delivery_groups.address.location.address.attn
shipping.shipments[].shippingChoice.destination.metadata.address.careOfsession.delivery_groups.address.location.address.careOf
shipping.shipments[].shippingChoice.destination.metadata.address.citysession.delivery_groups.address.location.address.city
shipping.shipments[].shippingChoice.destination.metadata.address.companyNamesession.delivery_groups.address.location.address.companyName
shipping.shipments[].shippingChoice.destination.metadata.address.countrysession.delivery_groups.address.location.address.country
shipping.shipments[].shippingChoice.destination.metadata.address.firstNamesession.delivery_groups.address.location.address.firstName
shipping.shipments[].shippingChoice.destination.metadata.address.lastNamesession.delivery_groups.address.location.address.lastName
shipping.shipments[].shippingChoice.destination.metadata.address.postalCodesession.delivery_groups.address.location.address.postalCode
shipping.shipments[].shippingChoice.destination.metadata.address.regionsession.delivery_groups.address.location.address.region
shipping.shipments[].shippingChoice.destination.metadata.address.streetsession.delivery_groups.address.location.address.street
shipping.shipments[].shippingChoice.destination.metadata.address.streetNumbersession.delivery_groups.address.location.address.streetNumber
shipping.shipments[].shippingChoice.options[].idsession.delivery_groups[].shipping.delivery_addons[].id
shipping.shipments[].shippingChoice.options[].valuesession.delivery_groups[].shipping.delivery_addons[].external_addon_id
shipping.shipments[].shippingChoice.options[].feesession.delivery_groups[].shipping.pricing.price_components[].value

Fallback strategy​

If, for any reasons, Walley Checkout does not receive any delivery methods from Ingrid, or if there is a problem with establishing an Ingrid session, there is a setting set by Merchant Services help@walley.se for your profile that will decide if the purchase should be stopped or not.

  • true: We will show an error and stop the purchase if we cannot create an ingrid session, or fetch at least one valid delivery method.
  • false: We will allow the customer to complete the purchase, with a fallback shipping cost. This fallback fee amount can be set when initializing the checkout session using the fees.shipping property. If not set then the default is zero.

Client-side event​

A client side event is sent every time the delivery method information is changed. This event can be used to display the most recent delivery information outside Walley Checkout. When this event is received, the information can be fetched by Acquire Checkout Information in the data.shipping object.

// Start listening to the shipping updated event
document.addEventListener("walleyCheckoutShippingUpdated", listener);