Marketplaces / BOL Technical Scope [In Progress] / Order Management / Bol Get Shipments

Bol Get Shipments

Summary of Changes: (The purpose of this table is to keep traceability and Product team to highlight the things that were changed into the scope, based on comments or discussions)

Date Version Created / Updated Notes
10/05/2023 v1.0 Bogomil Pavlov First publish
25/08/2023 v1.1 Bogomil Pavlov Added logic for shipment rows
29/08/2023 v1.2 Bogomil Pavlov Both requests are in one cron so the whole flow is changed.

The purpose of this document is to describe how we get FBB orders shipment on Bol.

Since we would like to introduce both Fulfillment methods FBB and FBR for all orders which are shipped from Bol we have to get the shipment details. This happens again in two steps we get the shipment list and then we call each shipment for the rest of the details.

</v1.2>Both request will work together so we will first get the Shipment list then for each shipment id we will get all the details and then we will store the shipping row in Hemi. </v1.2>

Get Shipment List

API Call: GET https://api.bol.com/retailer/shipments We want to get all shipments for only FBB orders thus this request need to call orders with Account Bol > Fulfillment Method = FBB. Please note we want to update all orders which are Partially Shipped or Shipped without shipment rows.

Docs: https://api.bol.com/retailer/public/redoc/v9/retailer.html#operation/get-shipments

Query Parameters

page integer Default: 1 The page to get with a page size of 50.
fulfilment-method string

Default: "FBR" Enum: "FBR" "FBB" The fulfilment method. Fulfilled by the retailer (FBR) or fulfilled by http://bol.com (FBB). | | order-id | string The id of the order. Only valid without fulfilment-method. The default fulfilment-method is ignored. |

Sample Request: GET https://api.bol.com/retailer/shipments?fulfilment-method=FBB We always use fulfilment-method = FBB as query parameter.

<v1.1> We want to make additional validations for the Get Shipment and store Shipment Rows only for the available lines. In order to identify the available lines we have to check the Order Item Line > Fulfilment Status != Fully Shipped. If there is no available lines we skip the order.**</v1.1>**Sample Response:

{
  "shipments": [
    {
      "shipmentId": "541757635",
      "shipmentDateTime": "2018-04-17T10:55:37+02:00",
      "shipmentReference": "BOLCOM001",
      "order": {
        "orderId": "4123456789",
        "orderPlacedDateTime": "2018-04-17T10:55:37+02:00"
      },
      "shipmentItems": [
        {
          "orderItemId": "1234567891",
          "ean": "0000007740404"
        }
      ],
      "transport": {
        "transportId": "312778947"
      }
    }
  ]
}

Mapping: We do not want to store anything in Hemi after this step but just obtain the Shipment Ids so we can continue to the second request.

Get Shipment Id

API Call: GET https://api.bol.com/retailer/shipments/{shipment-id}

Docs: https://api.bol.com/retailer/public/redoc/v9/retailer.html#operation/get-shipments

Query Parameters

Parameter Description Field
shipment-id required
The id of the shipment. From the response of Get Shipment List

Sample Request: https://api.bol.com/retailer/shipments/541757635

Sample Response:

{
  "shipmentId": "541757635",
  "shipmentDateTime": "2018-04-17T10:55:37+02:00",
  "shipmentReference": "BOLCOM001",
  "pickupPoint": true,
  "order": {
    "orderId": "4123456789",
    "orderPlacedDateTime": "2018-04-17T10:55:37+02:00"
  },
  "shipmentDetails": {
    "pickupPointName": "Albert Heijn: UTRECHT",
    "salutation": "MALE",
    "firstName": "Billie",
    "surname": "Jansen",
    "streetName": "Dorpstraat",
    "houseNumber": "1",
    "houseNumberExtension": "B",
    "extraAddressInformation": "Apartment",
    "zipCode": "1111ZZ",
    "city": "Utrecht",
    "countryCode": "NL",
    "email": "billie@verkopen.bol.com",
    "company": "bol.com",
    "deliveryPhoneNumber": "012123456",
    "language": "nl"
  },
  "billingDetails": {
    "salutation": "MALE",
    "firstName": "Billie",
    "surname": "Jansen",
    "streetName": "Dorpstraat",
    "houseNumber": "1",
    "houseNumberExtension": "B",
    "extraAddressInformation": "Apartment",
    "zipCode": "1111ZZ",
    "city": "Utrecht",
    "countryCode": "NL",
    "email": "billie@verkopen.bol.com",
    "company": "bol.com",
    "vatNumber": "NL999999999B99",
    "kvkNumber": "99887766",
    "orderReference": "MijnReferentie"
  },
  "shipmentItems": [
    {
      "orderItemId": "1234567891",
      "fulfilment": {
        "method": "FBR",
        "distributionParty": "RETAILER",
        "latestDeliveryDate": "2017-02-10"
      },
      "offer": {
        "offerId": "6ff736b5-cdd0-4150-8c67-78269ee986f5",
        "reference": "BOLCOM00123"
      },
      "product": {
        "ean": "0000007740404",
        "title": "Product Title"
      },
      "quantity": 10,
      "unitPrice": 12.99,
      "commission": 5
    }
  ],
  "transport": {
    "transportId": "312778947",
    "transporterCode": "TNT",
    "trackAndTrace": "3SBOL0987654321",
    "shippingLabelId": "123456789",
    "transportEvents": [
      {
        "eventCode": "AT_TRANSPORTER",
        "eventDateTime": "2021-07-28T17:21:07+02:00"
      }
    ]
  }
}

Mapping:

Bol Field Hemi Field Comment
shipmentId Order Shipment > ****External Id
shipmentDateTime Order Shipment >Shipment Time
shipmentReference N/A
pickupPoint N/A
order
orderId N/A
orderPlacedDateTime N/A
shipmentDetails
pickupPointName N/A
salutation N/A
firstName N/A
surname N/A
streetName N/A
houseNumber N/A
houseNumberExtension N/A
extraAddressInformation N/A
zipCode N/A
city N/A
countryCode N/A
email N/A
company N/A
deliveryPhoneNumber N/A
language N/A
billingDetails
salutation N/A
firstName N/A
surname N/A
streetName N/A
houseNumber N/A
houseNumberExtension N/A
extraAddressInformation N/A
zipCode N/A
city N/A
countryCode N/A
email N/A
company N/A
vatNumber N/A
kvkNumber N/A
orderReference N/A
shipmentItems
orderItemId Order Shipment Row > Order Item Id Based on the orderItemId we want to map the product Product In Order > Item Order Line ID and get the correct details for Order Shipment Row > Order Item Id
fulfilment
method N/A
distributionParty N/A
latestDeliveryDate N/A
offer
offerId N/A
reference N/A
product
ean N/A
title N/A
quantity Order Shipment Row > Quantity
unitPrice N/A
commission N/A
transport
transportId N/A
transporterCode Order Shipment >Courier
trackAndTrace Order Shipment >Tracking Number
shippingLabelId N/A
transportEvents
eventCode N/A
eventDateTime N/A

Once we get all the details for the shipment we want to update the Order Shipments > Status as “Completed“

If there are any errors we want to store them in Order Error table.

Is this article helpful?
0 0 0