# Delivery

The delivery represents goods that are delivered to the warehouse and processed in the inbound process.

# The delivery resource

# JSON object

{
  "id": 21001206,
  "customerId": 1000050,
  "status": "draft",
  "statusInbound": "new",
  "number": "LS010328",
  "numberExternal": null,
  "numberPurchaseOrder": "PO010328",
  "date": "2024-05-13T09:30:00Z",
  "priority": "normal",
  "note": "Unload with care!",
  "attributes": {
    "areaId": "1000175",
    "placeId": "1145046"
  },
  "lineItems": [
    {
      "id": 41005371,
      "status": "new",
      "articleId": 71035893,
      "articleNumber": "A1000-BLUE",
      "articleUnit": "ST",
      "quantity": 5000,
      "serialNumber": null,
      "batchNumber": null,
      "bestBeforeDate": null,
      "handlingUnitNumberExternal": null,
      "note": "Please carry out a random check on 5% of the articles.",
      "createdAt": "2024-05-13T12:11:09Z",
      "updatedAt": "2024-05-13T12:11:09Z"
    }
  ],
  "createdAt": "2024-05-13T12:11:09Z",
  "updatedAt": "2024-05-13T12:11:09Z"
}

# Properties

  • id int32 - read-only
    The unique id of the delivery to identify in the API.

  • customerId int32 - read-only
    The unique id of the customer the delivery belongs to.

  • status string - read-only
    The status of the delivery. Valid values: unknown, error, cancelled, draft, approved, processing or completed.

  • statusInbound string - read-only
    The inbound status of the delivery. Valid values: unknown, error, cancelled, onHold, new, approved, handlingUnitsCreated, unloading or booked.

  • number string (length <= 50) - required
    The unique delivery number to identify from the shop or third party.

  • numberExternal string (length <= 50)
    The external delivery number to identify from the shop or third party.

  • numberPurchaseOrder string (length <= 50)
    The purchase order number to group multiple purchase orders together.

  • date date (ISO 8601) - required
    The delivery date.

  • priority string
    Valid values: low, normal or high.

  • note string (length <= 500)
    Add additional information to the delivery that is displayed in the inbound processes. Like instructions, ...

  • attributes object
    The attribute object.

    • areaId string
      This value is provided by your contact.

    • placeId string
      This value is provided by your contact.

  • lineItems object[]
    The line item object.

    • id int32 - read-only
      The id used to identify the line item in the API.

    • status string - read-only
      The status of the line item. Valid values: unknown, error, cancelled, onHold, new, approved, handlingUnitsCreated, unloading or booked.

    • articleId int32
      The id of the article the line item belongs to.

    • articleNumber string - read-only
      The number of the article the line item belongs to.

    • articleUnit string - read-only
      The quantity unit of the article the line item belongs to.

    • quantity int32
      The quantity of the delivered article.

    • serialNumber string (length <= 50)
      The serial number of the article.

    • batchNumber string (length <= 50)
      The batch number of the article.

    • bestBeforeDate date (ISO 8601)
      The best before date of the article.

    • handlingUnitNumberExternal string (length <= 50)
      The load number of the article.

    • note string (length <= 250)
      Add additional information to the delivery that is displayed in the logistic processes. Like instructions, ...

    • createdAt date (ISO 8601) - read-only
      The date the delivery was created in logistic.cloud.

    • updatedAt date (ISO 8601) - read-only
      The date some data has changed like status, ...

  • createdAt date (ISO 8601) - read-only
    The date the delivery was created in logistic.cloud.

  • updatedAt date (ISO 8601) - read-only
    The date some data has changed like status, ...

# POST - Create a Delivery

Requires scope Delivery.Write

Use this operation to create a delivery draft. Make sure to specify all required parameters.

curl -X POST \
  'https://{domain}.logistic.cloud/api/{version}/deliveries' \
  -H 'X-API-KEY: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
        "customerId": 1000050,
        "number": "LS010328",
        "numberExternal": null,
        "numberPurchaseOrder": "PO123456",
        "date": "2024-05-13T09:30:00Z",
        "note": "Unload with care!",
        "attributes": {
          "areaId": "1000175",
          "placeId": "1145046"
        },
        "lineItems": [
          {
            "articleId": 71035893,
            "quantity": 5000,
            "serialNumber": null,
            "batchNumber": null,
            "bestBeforeDate": null,
            "handlingUnitNumberExternal": null,
            "note": "Please carry out a random check on 5% of the articles.",
          }
        ]
      }'

# Examples

Create a delivery with the minimum required information. See the Properties section for more details.

curl -X POST \
  'https://{domain}.logistic.cloud/api/{version}/deliveries' \
  -H 'X-API-KEY: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
        "customerId": 1000050,
        "number": "LS010328",
        "date": "2024-05-13T09:30:00Z",
        "attributes": {
          "areaId": "1000175",
          "placeId": "1145046"
        },
        "lineItems": [
          {
            "articleId": 71035893,
            "quantity": 5000
          }
        ]
      }'

External handling units are received, stored and later shipped as is. This example contains two external handling units 0033245687899 and 0033245688756 with the same article and quantity but different batch numbers.

curl -X POST \
  'https://{domain}.logistic.cloud/api/{version}/deliveries' \
  -H 'X-API-KEY: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
        "customerId": 1000050,
        "number": "LS010328",
        "date": "2024-05-13T09:30:00Z",
        "attributes": {
          "areaId": "1000175",
          "placeId": "1145046"
        },
        "lineItems": [
          {
            "articleId": 71035893,
            "quantity": 5000,
            "batchNumber": "2024-03",
            "handlingUnitNumberExternal": "0033245687899"
          },
          {
            "articleId": 71035893,
            "quantity": 5000,
            "batchNumber": "2024-04",
            "handlingUnitNumberExternal": "0033245688756"
          }
        ]
      }'

Responses

  • 201 - Created
    The delivery was created successfully. Returns the created delivery resource.

  • 400 - Bad Request
    Returns a problem details JSON object. More info can be found here.

# GET - Retrieve a list of delieveries

Requires scope Delivery.Read or Delivery.Write

Use this operation to retrieve a list of deliveries that meet the specified criteria. This endpoint implements pagination. Click here to learn more.

curl -X GET \
  'https://{domain}.logistic.cloud/api/{version}/deliveries' \
  -H 'X-API-KEY: YOUR_API_KEY'

Parameters

  • ids string
    Retrieve only deliveries specified by a comma-separated list of order ids.

  • status string - read-only
    Filter deliveries by their status. Allowed values are: unknown, error, cancelled, draft, approved, processing or completed.

  • statusInbound string - read-only
    Filter deliveries by their processing status. Allowed values are: unknown, error, cancelled, onHold, new, approved, handlingUnitsCreated, unloading or booked.

  • number string
    Filter deliveries by their exact number.

  • numberExternal string
    Filter deliveries by their exact external number.

  • numberPurchaseOrder string
    Filter deliveries by their exact purchase order number.

  • priority string
    Filter deliveries by their priority. Allowed values are: low, normal or high.

  • createdAtMin date (ISO 8601)
    Show deliveries last created after a specific date.

  • createdAtMax date (ISO 8601)
    Show deliveries last created before a specific date.

  • updatedAtMin date (ISO 8601)
    Show deliveries last updated after a specific date.

  • updatedAtMax date (ISO 8601)
    Show deliveries last updated before a specific date.

  • page int32 (default: 0)
    The page number that contains the results. If not specified the first page will be returned.

  • pageSize int32 (default: 50)
    The maximum number of results returned per page. Value must be between 1 and 250.

Responses

  • 200 - OK
    Returns a list of delivery resources.

# Examples

List all deliveries with the status draft.

curl -X GET \
  'https://{domain}.logistic.cloud/api/{version}/deliveries?status=draft' \
  -H 'X-API-KEY: YOUR_API_KEY'
curl -X GET \
  'https://{domain}.logistic.cloud/api/{version}/deliveries?number=LS010328' \
  -H 'X-API-KEY: YOUR_API_KEY'

All dates are handled in UTC. To get the deliveries you need to pass in the updatedAtMin and updatedAtMax with the correct timezone. The values must also be url encoded. Please be aware that all dates in the results will be returned in UTC.

curl -X GET \
  'https://{domain}.logistic.cloud/api/{version}/deliveries?updatedAtMin=2024-06-20T12:48:48%2B02:00&updatedAtMax=2024-06-30T23:59:59%2B02:00' \
  -H 'X-API-KEY: YOUR_API_KEY'

# GET - Retrieve a specific delivery

Requires scope Delivery.Read or Delivery.Write

Use this operation to retrieve a delivery by specifying the id.

curl -X GET \
  'https://{domain}.logistic.cloud/api/{version}/deliveries/{id}' \
  -H 'X-API-KEY: YOUR_API_KEY'

Parameters

  • id int32 - required
    The delivery id.

Responses

  • 200 - OK
    Returns the specific delivery resource.

  • 404 - Not Found
    The delivery does not exist or you don't have access to it.

# PUT - Update a delivery

Requires scope Delivery.Write

Use this operation to update or replace properties of a delivery and its line items if the delivery is in status draft. After approving a delivery the delivery line items cannot be updated anymore. All properties within the delivery head can still be updated until the delivery is completed.

curl -X PUT \
  'https://{domain}.logistic.cloud/api/{version}/deliveries/{id}' \
  -H 'X-API-KEY: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
        "customerId": 1000050,
        "number": "LS010328",
        "numberExternal": "LSEX010328",
        "numberPurchaseOrder": "PO010328",
        "date": "2024-05-13T09:30:00Z",
        "priority": "high",
        "note": null,
        "attributes": {
          "areaId": "1000175",
          "placeId": "1145046"
        },
        "lineItems": [
          {
            "articleId": 71035893,
            "quantity": 5000,
            "serialNumber": null,
            "batchNumber": null,
            "loadNumberExternal": null,
            "note": "Please carry out a random check on 5% of the articles."
          }
        ]
      }'

Parameters

  • id int32 - required
    The delivery id.

Responses

  • 200 - OK
    The delivery was updated successfully. Returns the updated order.

  • 400 - Bad Request
    Returns a problem details JSON object. More info can be found here.

  • 404 - Not Found
    The delivery was not found or you don't have access to it.

# Examples

Replace the line items of a delivery with three new line items.

curl -X PUT \
  'https://{domain}.logistic.cloud/api/{version}/deliveries/{id}' \
  -H 'X-API-KEY: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
        "customerId": 1000050,
        "number": "LS010328",
        "date": "2024-05-13T09:30:00Z",
        "attributes": {
          "areaId": "1000175",
          "placeId": "1145046"
        },
        "lineItems": [
          {
            "articleId": 71035893,
            "quantity": 5500
          },
          {
            "articleId": 71035893,
            "quantity": 5500
          },
          {
            "articleId": 71035893,
            "quantity": 5500
          }
        ]
      }'

If the delivery has status approved the line items cannot be updated any more. To update the delivery data itself the line items must be set to null.

curl -X PUT \
  'https://{domain}.logistic.cloud/api/{version}/deliveries/{id}' \
  -H 'X-API-KEY: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
        "customerId": 1000050,
        "number": "LS010328",
        "date": "2024-05-13T09:30:00Z",
        "priority": "high",
        "attributes": {
          "areaId": "1000175",
          "placeId": "1145046"
        },
        "lineItems": null
      }'

# POST - Approve a delivery

Requires scope Delivery.Write

Use this operation to approve a delivery. Approving a delivery marks it as ready to be processed. After approving a delivery the delivery line items cannot be updated anymore.

curl -X POST \
  'https://{domain}.logistic.cloud/api/{version}/deliveries/{id}/approve' \
  -H 'X-API-KEY: YOUR_API_KEY'
  

Parameters

  • id int32 - required
    The delivery id.

Responses

  • 204 - No Content
    The order was approved successfully.

  • 400 - Bad Request
    Returns a problem details JSON object. More info can be found here.