Created with Sketch.
Created with Sketch.
Checkout 3.0

Shipping broker – Api

Shipping service is an additional checkout funcionality and have it’s own custom swagger. The API calls that have extended shipping information are initializePayment and updateItems. In both this calls new sections for shippingParameters and shippingSettings has been added.

See Swagger documentation for shipping broker.

Default shipping method
It’s possible to send in a default shipping item in initilaziePayment request with notes parameter: “SHI001”. This item is replaced with choosen shipping method but in case of Ingrid service outage we add this default shipping method to the purchase. Replaced shipping item contains “SHI002” and is stored in notes.

ShippingParameters

heightinteger optional
Height of the item in millimeters.
length
integer optional
Length of the item in millimeters
widthinteger optional
Width of the item in millimeters
weightinteger optional
Weight of the item in grams. Can be used by the shipping rule engine to calculate the best shipping option. Example `1000` is 1 kg and `10` is 0,01 kg.
attributesstring[] optional
Attributes of the Cart. Cart level attributes are specific to the cart or for the full cart contents. Ingrid Delivery Checkout can set varied delivery scenarios based on such attributes. Ex. [“PRIO”, “AB-testID”]

ShippingSettings

vouchersstring[] optional
Vouchers that can be used in price/filter rules.
attributesstring[] optional
Attributes of the Cart. Cart level attributes are specific to the cart or for the full cart contents. Ingrid Delivery Checkout can set varied delivery scenarios based on such attributes. Ex. [“PRIO”, “AB-testID”]
Initialize payment example:
{ 
    "checkoutSetup": {
        "language": "English",
        "mode": "B2C",
    },
   "items": [
        {
            "description": "Custom item",
            "amount": 590,
            "taxCode": "tax46",
            "taxAmount": 2,
            "notes": "Notes",
            "quantity": 1,
            "articleNumber": "ASDASD87",
            "shippingParameters": {
                "height": 200,
                "length": 500,
                "width": 50,
                "weight": 50,
                "attributes": [
                    "string"
                ]
            },
        {
            "description": "Default shipping",
            "amount": 55,
            "taxCode": "tax46",
            "taxAmount": 2,
            "notes": "SHI001",
            "quantity": 1,
        }
    ],
    "shippingSettings": {
        "vouchers": [
            "string"
        ],
        "attributes": [
            "string"
        ]
    }
}