Headless Checkout API - Reference
Overview
Ingrid provides HTTP endpoints returning data in JSON format. We provide you with two environments:
- Stage - is our staging and testing environment where you do all the testing and developing against
- Production - is the production environment that you switch to when itβs time to go live
Object Reference
Addon
An Addon represents an additional service or feature offered with a delivery.
display_name π |
string
required
The display-friendly name of the addon, e.g., "Gift Wrapping", "Leave at Door" |
price π |
string
The price of the addon in minor currency units, e.g., cents |
addon_type π |
The type of the addon |
preselected π |
boolean
Indicates if this addon should be preselected by default |
chosen π |
boolean
Indicates if this addon was chosen |
id π |
string
Unique addon identifier |
Address
Represents an address suitable for delivery.
country_code π |
string
required
Refers to a ISO-3166 alpha 2 country code |
region_code π |
string
Refers to an ISO-3166-2 subdivision code without country_code prefix, e.g., `DC` for Washington DC. Except for countries like MΓ©xico, Hong Kong, etc. Example region for Honk Kong - `Kowloon` |
postal_code π |
string
Refers to a postal code or zipcode |
city π |
string
Refers to a city, postal_town or locality |
address_lines π |
string[]
required
List of strings, each a part of the address, e.g., street name, street number, building name, floor |
coordinates π |
Geolocation of the given address |
street π |
string
Refers to a street or route name |
street_number π |
string
Refers to a street number |
Any
@type π |
string
|
CompleteSessionResponse
Response message for completing a session.
Contact
Contact represents generic contact information.
address π |
Address
required
The physical address of the contact |
email π |
string
The email address of the contact |
phone_number π |
The phone number of the contact, including region and optional extension |
ContactPhoneNumber
A phone number, including region and optional extension.
country_code π |
string
required
The country code where the delivery will occur (ISO 3166-1 alpha-2) |
number π |
string
required
The main phone number, formatted as per the region's conventions |
extension π |
string
An optional phone number extension |
Coordinates
Represents a latitude/longitude pair. Unless specified otherwise, this must conform to the WGS84 standard. Values must be within normalized ranges.
lat π |
number
required
The latitude in degrees. Must be within the range -90.0 to +90.0, inclusive |
lng π |
number
required
The longitude in degrees. Must be within the range -180.0 to +180.0, inclusive |
Delivery
The delivery represents a single delivery of goods to a recipient. It includes information about the goods, the recipient details, the fulfillment methods and the delivery options.
id π |
string
required
The unique identifier of a delivery |
line_items π |
object[]
required
The goods that are to be delivered |
fulfillments π |
object[]
required
The available fulfillments for the delivery |
recipient_contact π |
Contact
required
The recipient's contact information |
attributes π |
string[]
Used to control the behaviour of the filter/price rules. Equivalent of cart_attributes in the `Delivery Checkout` API |
delivery_categories π |
object[]
The available delivery categories for this delivery |
tos_id π |
string
ID of the TOS, only present for the session `complete` and `get` calls |
DeliveryCategory
The DeliveryCategory represents a grouping of delivery options that share the same type and other characteristics.
id π |
string
required
The unique identifier of a delivery category |
external_id π |
string
The external identifier of a category, used for integration purposes |
delivery_type π |
DeliveryCategoryDeliveryType
required
The delivery type associated with this category |
display_name π |
string
required
A human-readable name of the category, which will be presented to the customer |
sort_order π |
integer
required
Defines the order in which the category will be presented to the customer |
options_source π |
DeliveryCategoryOptionsSource
required
The source of delivery options for this category |
delivery_options π |
object[]
required
The delivery options available within this category |
addons π |
object[]
Add-ons that are available for this category, e.g., gift wrapping, insurance |
preselected π |
boolean
Indicates if this category should be preselected by default |
chosen π |
boolean
Indicates if this category was chosen by the user |
warehouse π |
Information about the warehouse that the category is assigned to |
DeliveryCategoryWarehouse
Information about a warehouse. All this data is stored in the site configuration.
id π |
string
required
Unique identifier of the warehouse |
address π |
Address
required
The address of the warehouse |
DeliveryChoice
The DeliveryChoice represents what option is selected for the given delivery.
delivery_id π |
string
required
The unique identifier of the delivery |
option_id π |
string
required
The selected delivery option |
addon_ids π |
string[]
The selected delivery addons, if applicable |
DeliveryOption
The DeliveryOption represents the details of a specific delivery option.
id π |
string
required
The unique identifier of the delivery option |
carrier π |
DeliveryOptionCarrier
required
Information about the carrier responsible for this delivery |
pickup_location π |
The pickup location for this delivery option, if applicable |
etd π |
ETD
required
The ETD for this option |
preselected π |
boolean
Indicates if this delivery option should be preselected by default |
chosen π |
boolean
Indicates if this delivery option was chosen by the customer |
expire_time π |
string
The expiration timestamp in UTC of the delivery option |
price π |
string
required
Price associated with the delivery option in minor currency units, e.g., cents |
DeliveryOptionCarrier
The Carrier contains details about the shipping carrier associated with this delivery option.
name π |
string
required
The name of the carrier company, e.g., "DHL", "FedEx" |
product_name π |
string
required
The product or service level name provided by the carrier, e.g., "Parcel", "Standard") |
product_id π |
string
required
The product or service level identifier provided by the carrier, e.g., "dhl-par", "ups-std") |
sort_order π |
integer
The original sort order assigned by the carrier |
meta π |
hash
Carrier-specific metadata |
external_id π |
string
required
Merchant-specific carrier product identifier |
DeliveryServiceCompleteSessionBody
Request message for completing a session.
delivery_choices π |
object[]
List of choices for the given deliveries |
Distance
Generic distance
meters π |
string
Approximate distance in meters |
minutes π |
string
Approximate duration in minutes |
ETD
ETD stands for Estimated Time of Delivery.
relative π |
Estimate expressed as a range of time units |
absolute π |
Estimate expressed as a range of timestamps |
custom π |
Estimate expressed as a custom text |
ETDAbsolute
Absolute represents an ETD as a single or pair of timestamps.
earliest_time π |
string
The earliest possible delivery time. If unspecified, delivery is considered tp be immediate |
latest_time π |
string
The latest possible delivery time. If unspecified, there is no guaranteed maximum time |
ETDCustom
Custom represents an ETD in a human-readable text format.
text π |
string
required
Description in a text form, e.g., "Before Christmas", "Same day if ordered before 2PM" |
ETDRelative
Relative represents an ETD as a range of time units.
unit π |
ETDTimeUnit
required
The unit of time used by the ETD range |
earliest π |
integer
The minimum number of time units. If unspecified, there is no lower bound |
latest π |
integer
Maximum number of time units. If unspecified, there is no upper bound |
Fulfillment
A Fulfillment details when a delivery can be fulfilled.
readiness π |
FulfillmentReadiness
required
The time window when the goods will be ready for shipment |
FulfillmentReadiness
Readiness specifies a time range when the goods will be ready for shipment.
earliest_time π |
string
required
The earliest timestamp when the goods will be ready for shipment |
latest_time π |
string
The latest timestamp when the goods will be ready for shipment. If not specified, the goods will be ready indefinitely after start_time |
LineItem
Represents a single item.
sku π |
string
required
The unique item identifier of the item |
title π |
string
required
The item name or title, which is suitable for presentation to the customer |
quantity π |
integer
required
Total quantity of the item |
weight π |
integer
Weight of a single item in grams, must be greater than 0 |
dimensions π |
Dimensions of the item |
discount π |
string
Non-negative discount applied to the item, or items. Unit is cents |
price π |
string
required
Non-negative price of a single item after applying discounts. Unit is cents |
image_uri π |
string
URI of the product image, e.g., thumbnail |
attributes π |
string[]
Used to control the behaviour of the filter/price rules. Equivalent of cart_items_attributes in the `Delivery Checkout` API |
LineItemDimensions
Represents the dimensions of the item.
height π |
integer
required
Height of the item in millimeters, must be greater than 0 |
length π |
integer
required
Length of the item in millimeters, must be greater than 0 |
width π |
integer
required
Width of the item in millimeters, must be greater than 0 |
PickupLocation
The PickupLocation represents a physical location from which a delivery can be retrieved.
id π |
string
required
Internal location identifier, used within the system |
external_id π |
string
required
External identifier provided by the merchant or carrier |
location_type π |
The type of the pickup location, e.g., LOCKER, STORE |
title π |
string
required
The title of the location displayed to the customer |
visiting_contact π |
Contact information when visiting the location for retrieving a package |
delivery_contact π |
Contact information for delivery to the pickup location |
operational_hours π |
Operational hours of the pickup location. If none are provided, the location is available at all times |
sections π |
object[]
Additional informational sections about the pickup location |
distances π |
The distances to the pickup location, e.g., walking or driving |
PickupLocationDistances
Distances define the walking and driving distances to the pickup location.
walking π |
The walking distance to the pickup location |
driving π |
The driving distance to the pickup location |
PickupLocationOperationalHours
OperationalHours define when the pickup location is operating.
monday π |
string[]
Opening hours for Monday |
tuesday π |
string[]
Opening hours for Tuesday |
wednesday π |
string[]
Opening hours for Wednesday |
thursday π |
string[]
Opening hours for Thursday |
friday π |
string[]
Opening hours for Friday |
saturday π |
string[]
Opening hours for Saturday |
sunday π |
string[]
Opening hours for Sunday |
free_text π |
string[]
Free-text operational hours for fallback |
PickupLocationSection
Section provides extra information about the pickup location.
title π |
string
required
The title of the section displayed to the customer |
columns π |
object[]
required
The columns of items in the section |
SectionColumn
Column contains a list of items displayed in a single section column.
items π |
object[]
required
The items within the column |
SectionItem
Item represents a single piece of information in a section.
icon_uri π |
string
The URI for the item's icon |
text π |
string
The text description of the item |
link_uri π |
string
The URI for a link associated with the item |
Session
A Session is the primary resource for handling the delivery options and the customer lifecycle.
name π |
string
The resource name of the session. Format: sessions/{session_id} |
state π |
The state of the session |
purchase π |
SessionPurchase
required
The purchase for the given session |
deliveries π |
object[]
required
The deliveries included in this session |
create_time π |
string
The timestamp when the session was created |
update_time π |
string
The timestamp when the session was last updated |
etag π |
string
The current etag of the session. If an etag is provided and does not match the current etag of the session, updates and completion will be blocked and an ABORTED error will be returned |
SessionPurchase
Purchase describes purchase experience. Q(grigagod): shoud we stick to a main cart concept?.
country_code π |
string
required
The country code where the delivery will occur (ISO 3166-1 alpha-2) |
currency_code π |
string
required
The currency code for the transaction (ISO 4217) |
total_discount π |
string
The total discount applied to the purchase (non-negative, in cents) |
total_value π |
string
The total value of the purchase after discounts are applied (non-negative, in cents) |
vouchers π |
string[]
List of vouchers |
locales π |
string[]
Locales list defined as lc-CC compliant with ISO 3166-1, in order of preference(first supported one will be chosen) |