Skip to main content

Shipment Collection

GET 

https://api.lochting.com/public/v1/shipments

This call will return a JSON object with shipments.

info

The structure of the weight differs from the New Shipment endpoint. The amount is returned as an object with three different representations.

Request

Query Parameters

    pagination[page] integer

    The page number to retrieve

    Default value: 1
    pagination[size] integer

    The page size (hard limit to 1000)

    Default value: 10

Header Parameters

    Authorization stringrequired
    Example: your-access-token

Responses

OK

Schema
    pagination object

    Pagination

    pageintegerrequired

    Page number

    Example: 1
    sizeintegerrequired

    Page size

    Example: 10
    totalintegerrequired

    Total number of items.

    Example: 1
    items object[]required

    List of items

  • Array [
  • shipmentIdstringrequired

    The id of the shipment, prefixed with shipment- and followed by a 36 characters long UUID.

    Example: shipment-c7d932c1-84e8-410c-a9b2-18bf739d6b8b
    salesChannelIdstringrequired

    The id of the sales channel, prefixed with webshop- or device- and followed by a 36 characters long UUID.

    Example: webshop-03cac0fc-feaf-5bc5-a3d1-8dc5e80ada46
    orderIdstringrequired

    The id of the order, prefixed with order- and followed by a 36 characters long UUID.

    Example: order-c7d932c1-84e8-410c-a9b2-18bf739d6b8b
    customerFirstNamestringrequired

    First name of customer

    Example: John
    customerLastNamestringrequired

    Last name of customer

    Example: Doe
    customerPhonestringrequired

    Phone of customer

    Example: 123456789
    carrierCodestringrequired

    Carrier (currently only bpost)

    Example: bpost
    createdAtstringrequired

    iso datetime (Y-m-d H:i:s)

    Example: 2020-02-28 15:02:11
    updatedAtstringnullable

    iso datetime (Y-m-d H:i:s)

    Example: 2020-02-28 15:02:11
    weight objectrequired

    the weight of the parcel

    amountnumberrequired
    Example: 900
    amountInGramsnumberrequired
    Example: 900
    amountInKilogramsnumberrequired
    Example: 0.9
    statusStatus (string)nullable

    The status of the shipment

    Possible values: [Address invalid, Announced, Announced: not collected, Announcement failed, At customs, At sorting, Awaiting customer pickup, Being announced, Being sorted, Cancellation request, Cancelled, Cancelled upstream, Delivered, Delivery attempt failed, Delivery delayed, Driver en route, En route to sorting center, Error collecting, Exception, No label, Not sorted, Parcel en route, Ready to send, Refused by recipient, Shipment collected by customer, Shipment picked up by driver, Sorted, Unable to deliver The parcel]

    Example: Announced
  • ]
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.lochting.com/public/v1/shipments");
request.Headers.Add("Accept", "application/json");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://api.lochting.com/public/v1
Parameters
— headerrequired
— query
— query
ResponseClear

Click the Send API Request button above and see the response here!