Mollie.Orders.Shipments (mollie v0.7.2)

The Shipment API is used to ship order lines created by the Create order.

The word 'shipping' is used in the figurative sense here. It can also mean that a service was provided or digital content was delivered.

Link to this section Summary

Functions

Create a shipment to ship order lines. If an empty array is sent for lines, the entire order will be shipped.

Retrieve a single shipment and the order lines shipped by a shipment’s ID.

Retrieve all shipments for an order.

Update the tracking information of a shipment.

Link to this section Functions

Link to this function

create(client, order_id, body \\ %{})

Specs

create(Mollie.Client.t(), binary(), map()) :: Mollie.response()

Create a shipment to ship order lines. If an empty array is sent for lines, the entire order will be shipped.

Shipment example body

%{
  "lines" => []
}

example

Example

Mollie.Orders.Shipments.create client, "ord_8wmqcHMN4U", shipment_body

More info at: https://docs.mollie.com/reference/v2/shipments-api/create-shipment

Link to this function

find(client, order_id, id, params \\ %{})

Specs

find(Mollie.Client.t(), binary(), binary(), map() | list()) :: Mollie.response()

Retrieve a single shipment and the order lines shipped by a shipment’s ID.

example

Example

Mollie.Orders.Shipments.find client, "ord_8wmqcHMN4U", "shp_3wmsgCJN4U"

More info at: https://docs.mollie.com/reference/v2/shipments-api/get-shipment

Link to this function

list(client, order_id, params \\ %{})

Specs

list(Mollie.Client.t(), binary(), map() | list()) :: Mollie.response()

Retrieve all shipments for an order.

example

Example

Mollie.Orders.Shipments.list client, "ord_8wmqcHMN4U"

More info at: https://docs.mollie.com/reference/v2/shipments-api/list-shipments

Link to this function

update(client, order_id, id, body \\ %{})

Specs

update(Mollie.Client.t(), binary(), binary(), map()) :: Mollie.response()

Update the tracking information of a shipment.

Update example body

%{
  "tracking" => %{
    "carrier" => "PostNL",
    "code" => "3SKABA000000000"
  }
}

example

Example

Mollie.Orders.Shipments.update client, "ord_8wmqcHMN4U", "shp_3wmsgCJN4U", update_body

More info at: https://docs.mollie.com/reference/v2/shipments-api/update-shipment