v1

latestOpenAPI 3.0.12026-08-0688138402.2 KB
Shipments

Create a shipment

Creates a new shipment with the provided information.

post/shipments

Request body

test_modeboolean

This option is deprecated and will be removed soon. Please use the Sandbox instead.

own_agreementboolean required

Whether or not the shipment should be booked via your own agreement or Shipmondo's agreement.

customer_numberstring

Customer number for the agreement you wish to use. Mostly used if multiple agreements for the same carrier are set up on the account. Defaults to the agreement that was created first.

label_format'a4_pdf' | '10x19_pdf' | '10x19_png' | '10x19_zpl' | 'compact_png' | 'compact_pdf' | 'compact_zpl'

If label_format is specified, the shipping labels will be included in the response. Defaults to what is setup for the user.

product_codestring required

Product code of the product of the shipment.

service_codesstring required

Comma-separated string of codes of services that are booked with the shipment.

servicesstring

Use service_codes instead.

referencestring

Reference can be printed on the label and transmitted to carriers, when possible.

additional_referencestring

An secondary reference. When possible, it will be transmitted to the carrier and printed on the label

automatic_select_service_pointboolean

Whether or not the system should automatically select the service point closest to the receiver, when required.

contentsstring

General description of the contents of the shipment.

term_of_tradestring

Incoterm for the shipments, e.g., DDP when customs should be paid by the sender.

origin_shipment_idstring

ID of the origin shipment that the shipment is a return for.

service_point_idstring

ID of the service point the shipment should be sent to. Note that the full service point can also be provided in the parties array with type set to service_point.

printboolean

Print the label via the print client. Shipment labels can be sent out to the print queue automatically. Printer and format are specified in the print_at element.

replace_http_status_codeboolean

If replace_http_status_code is set to true, request will have HTTP status 200. The real HTTP status will be included in the response header as X-HTTP-Status-Code. This is to prevent runtime errors in some frameworks and make it possible to read the error messages.

add_barcode_to_labelboolean nullable

Add a Code 128 barcode with the shipment ID on the label. Only applicable for product_codes UNI_AL & UNI_ALP.

Example request

{
  "test_mode": true,
  "product_code": "GLSDK_SD",
  "service_codes": "EMAIL_NT,SMS_NT",
  "reference": "Order 10001",
  "additional_reference": "Invoice 10001",
  "contents": "Goods",
  "term_of_trade": "DAP",
  "origin_shipment_id": "1000001235",
  "parties": [
    {
      "type": "sender",
      "name": "Min Virksomhed ApS",
      "attention": "Lene Hansen",
      "address1": "Hvilehøjvej 25",
      "postal_code": "5220",
      "city": "Odense SØ",
      "country_code": "DK",
      "email": "info@minvirksomhed.dk",
      "phone": "+4570400407",
      "attributes": [
        {
          "name": "vat_no",
          "value": "DK36399066"
        }
      ]
    }
  ],
  "sender": {
    "name": "Min Virksomhed ApS",
    "attention": "Lene Hansen",
    "address1": "Strandvejen 6B",
    "zipcode": "5240",
    "city": "Odense NØ",
    "country_code": "DK",
    "vat_id": "GB018384932372",
    "email": "info@minvirksomhed.dk",
    "mobile": "70400407",
    "telephone": "70400407"
  },
  "receiver": {
    "name": "Lene Hansen",
    "address1": "Skibhusvej 52",
    "zipcode": "5000",
    "city": "Odense C",
    "country_code": "DK",
    "vat_id": "GB018384932372",
    "email": "lene@email.dk",
    "mobile": "12345678",
    "telephone": "12345678",
    "instruction": "Place on the front porch.",
    "date": "2021-10-14",
    "from_time": "08:00",
    "to_time": "16:00",
    "member_id": "1234567890",
    "access_code": "1234"
  },
  "pick_up": {
    "name": "Min Virksomhed A/S",
    "address1": "Hvilehøjvej 25",
    "country_code": "DK",
    "zipcode": "5220",
    "city": "Odense SØ",
    "telephone": "80808080",
    "instruction": "Goods are placed at gate 21",
    "date": "2021-10-13",
    "from_time": "08:00",
    "to_time": "16:00"
  },
  "bill_to": {
    "name": "Min Virksomhed A/S",
    "address1": "Hvilehøjvej 25",
    "zipcode": "5220",
    "city": "Odense SØ",
    "vat_id": "DK12345678",
    "country_code": "DK",
    "telephone": "80808080",
    "mobile": "80808080",
    "email": "jim@minvirksomhed.dk",
    "customer_number": "12345678"
  },
  "service_point": {
    "id": "95558",
    "name": "Påskeløkkens Købmand",
    "address1": "Paaskeløkkevej 11",
    "zipcode": "5000",
    "city": "Odense C",
    "country_code": "DK"
  },
  "return_to": {
    "name": "Min Virksomhed A/S",
    "address1": "Hvilehøjvej 25",
    "zipcode": "5220",
    "city": "Odense SØ",
    "country_code": "DK",
    "telephone": "80808080"
  },
  "service_point_id": "96271",
  "pickup_details": {
    "date": "2021-10-13",
    "from": "08:00:00",
    "to": "16:00:00",
    "instruction": "Goods are placed at gate 21"
  },
  "delivery_details": {
    "date": "2021-10-14",
    "from": "08:00:00",
    "to": "16:00:00",
    "instruction": "Place on the front porch."
  },
  "label_overlay": {
    "barcode": "1234567890123",
    "left_text": "ABC",
    "right_text": "DEF"
  },
  "label_scale": {
    "size": 15.6
  },
  "parcels": [
    {
      "quantity": 1,
      "weight": 1000,
      "length": 20,
      "width": 10,
      "height": 6,
      "volume": 0.012,
      "running_metre": 1.25,
      "description": "Bike accessories",
      "packaging": "PL1",
      "stackable": true,
      "dangerous_goods": [
        {
          "class": "3",
          "un_number": "1202",
          "net_weight": 20100,
          "net_weight_kg": 20.1,
          "gross_weight": 20100,
          "gross_weight_kg": 20.1,
          "quantity": 3,
          "packaging": "drums",
          "description": "DIESEL FUEL, < 62°C (640K)",
          "tunnel_restriction_code": "A",
          "packing_group": "III"
        }
      ],
      "declared_value": {
        "amount": 1250,
        "currency_code": "DKK"
      },
      "attributes": [
        {
          "name": "vat_no",
          "value": "DK36399066"
        }
      ],
      "internal_reference": "parcel-1"
    }
  ],
  "documents": [
    {
      "document_type": "other",
      "signed_id": "eyJf(...)"
    }
  ],
  "print_at": {
    "host_name": "WAREHOUSE-PC",
    "printer_name": "Zebra Zdesigner GK420D",
    "label_format": "10x19_zpl"
  },
  "send_label": {
    "name": "Jim",
    "email": "jim@minvirksomhed.dk",
    "label_format": "a4_pdf"
  },
  "customs": {
    "export_reason": "other",
    "currency_code": "DKK",
    "freight_cost": 100.5,
    "insurance_cost": 50,
    "term_of_trade": "DAP",
    "billed_to_custom_invoice_text": "Key code: ABC123",
    "sender_custom_invoice_text": "Key code: ABC123",
    "receiver_custom_invoice_text": "Key code: ABC123",
    "goods": [
      {
        "quantity": 2,
        "unit": "piece",
        "country_code": "DK",
        "content": "Cotton t-shirt",
        "commodity_code": "6109100010",
        "unit_value": 122.5,
        "unit_weight": 110,
        "attributes": [
          {
            "name": "vat_no",
            "value": "DK36399066"
          }
        ]
      }
    ]
  },
  "cod": {
    "amount": 326,
    "currency_code": "NOK",
    "account_number": "123456789"
  },
  "dfm": {
    "insurance_type": "A",
    "insurance_amount": 1000,
    "dot_type": "DO1",
    "dot_time": "15:00",
    "pallets1": 1,
    "pallets2": 1,
    "pallets4": 1,
    "limited_quantity_weight": 1000,
    "has_dangerous_goods": true
  },
  "carrier_insurance": {
    "amount": 1000,
    "currency_code": "DKK"
  }
}

Response

Successful.

idinteger

ID of the shipment.

created_atstring date-time

Date and time the shipment was created.

updated_atstring date-time

Date and time the shipment was last updated.

carrier_codestring

Carrier code referring to the carrier of the shipment.

descriptionstring

Text to describe the shipment, which can be used when presenting it.

contentsstring nullable

General description of the contents of the shipment.

term_of_tradestring

Incoterm for the shipments, e.g., DDP when customs should be paid by the sender.

product_idinteger

ID of the product of the shipment.

product_codestring

Product code of the product of the shipment.

service_codesstring

Comma-separated string of codes of services that is booked with the shipment.

servicesstring nullable

Comma-separated string of IDs of services that are booked with the shipment.

customer_numberstring nullable

Customer number of the agreement used to book the shipment. If value is null it is Shipmondo's agreement

pricestring

Price of the shipment including VAT.

referencestring nullable

Sender's reference of the shipment.

additional_referencestring nullable

An secondary reference. When possible, it will be transmitted to the carrier and printed on the label

order_idstring nullable

Order no. from webshop, if shipment is based on an order in Shipmondo.

pkg_nostring

Carrier's shipment number, referring to the whole shipment.

external_pkg_nostring nullable

Package number from an external source.

paperless_tradeboolean

If the shipment is created with paperless trade, then it is not necessary to print out physical proforma invoice.

labelless_codestring nullable

If labelless is supported on the certain shipment by the carrier, then this element will be available with the code that can be written on the parcel.

source_idstring nullable

ID of the source of the shipment from which it has been created.

source_type'manual' | 'imported' | 'fulfillment' | 'return' | 'repurchase' | 'api' | 'address_book'

The type of the source from which the shipment has been created

return_shipment_idstring nullable

ID of the return shipment that has been created for the shipment.

origin_shipment_idstring nullable

ID of the origin shipment that the shipment was created as return for.

waybill_referencestring nullable

Reference of the bulk waybill that the shipment is included in.

Example response

{
  "id": 1168,
  "created_at": "2017-06-16T06:25:44.557Z",
  "updated_at": "2017-06-16T06:25:44.557Z",
  "carrier_code": "gls",
  "description": "ShopDelivery",
  "contents": "Goods",
  "term_of_trade": "DAP",
  "product_id": 64,
  "product_code": "GLSDK_SD",
  "service_codes": "EMAIL_NT,SMS_NT",
  "services": "23,24",
  "price": "42.5",
  "reference": "5678123",
  "additional_reference": "Invoice 10001",
  "order_id": "5678123",
  "pkg_no": "6064518784",
  "external_pkg_no": "123-4567-890",
  "parties": [
    {
      "type": "sender",
      "name": "Min Virksomhed ApS",
      "attention": "Lene Hansen",
      "address1": "Hvilehøjvej 25",
      "postal_code": "5220",
      "city": "Odense SØ",
      "country_code": "DK",
      "email": "info@minvirksomhed.dk",
      "phone": "+4570400407",
      "attributes": [
        {
          "name": "vat_no",
          "value": "DK36399066"
        }
      ]
    }
  ],
  "receiver": {
    "name": "Lene Hansen",
    "address1": "Skibhusvej 52",
    "zipcode": "5000",
    "city": "Odense C",
    "country_code": "DK",
    "email": "lene@email.dk",
    "vat_id": "DK12345678",
    "mobile": "12345678",
    "telephone": "12345678",
    "instruction": "Place on the front porch.",
    "access_code": "4231",
    "date": "2021-10-14",
    "from_time": "08:00",
    "to_time": "16:00",
    "member_id": "a1b2c3"
  },
  "sender": {
    "name": "Min Virksomhed ApS",
    "attention": "Lene Hansen",
    "address1": "Strandvejen 6B",
    "address2": "Stuen",
    "zipcode": "5240",
    "city": "Odense NØ",
    "country_code": "DK",
    "vat_id": "5323471",
    "email": "info@minvirksomhed.dk",
    "mobile": "70400407",
    "telephone": "70400407"
  },
  "parcels": [
    {
      "quantity": 1,
      "weight": 1000,
      "weight_kg": "10.9",
      "pkg_no": "1064548752",
      "pkg_nos": [
        "1064548752"
      ],
      "external_pkg_no": "123-4567-890",
      "length": 20,
      "width": 10,
      "height": 6,
      "volume": 0.012,
      "running_metre": 1.25,
      "content": "Bike accessories",
      "packaging": "PL1",
      "stackable": true,
      "internal_reference": "parcel-1",
      "labelless_code": "123-456-789",
      "dangerous_goods": [
        {
          "class": "3",
          "un_number": "1202",
          "net_weight": 20100,
          "net_weight_kg": 20.1,
          "gross_weight": 20100,
          "gross_weight_kg": 20.1,
          "quantity": 3,
          "packaging": "drums",
          "description": "DIESEL FUEL, < 62°C (640K)",
          "tunnel_restriction_code": "A",
          "packing_group": "III"
        }
      ],
      "declared_value": {
        "amount": 1250,
        "currency_code": "DKK"
      },
      "attributes": [
        {
          "name": "vat_no",
          "value": "DK36399066"
        }
      ],
      "gls_colli_id": "123-456-789"
    }
  ],
  "customs": {
    "export_reason": "other",
    "term_of_trade": "DAP",
    "declared_value": "1000.00",
    "currency_code": "DKK",
    "contents": "Goods",
    "duty_account_number": "Goods",
    "goods": [
      {
        "quantity": 2,
        "unit": "piece",
        "country_code": "DK",
        "content": "Cotton t-shirt",
        "commodity_code": "6109100010",
        "unit_value": 122.5,
        "unit_weight": 110,
        "attributes": [
          {
            "name": "vat_no",
            "value": "DK36399066"
          }
        ]
      }
    ],
    "billed_to_custom_invoice_text": "Key code: ABC123",
    "sender_custom_invoice_text": "Key code: ABC123",
    "receiver_custom_invoice_text": "Key code: ABC123"
  },
  "service_point": {
    "id": "95558",
    "name": "Påskeløkkens Købmand",
    "address1": "Paaskeløkkevej 11",
    "zipcode": "5000",
    "city": "Odense C",
    "country_code": "DK",
    "shipping_agent": "gls"
  },
  "pick_up": {
    "name": "Min Virksomhed A/S",
    "address1": "Hvilehøjvej 25",
    "country_code": "DK",
    "zipcode": "5220",
    "city": "Odense SØ",
    "telephone": "80808080",
    "instruction": "Goods are placed at gate 21",
    "date": "2021-10-13",
    "from_time": "08:00",
    "to_time": "16:00"
  },
  "bill_to": {
    "name": "Min Virksomhed A/S",
    "address1": "Hvilehøjvej 25",
    "zipcode": "5220",
    "city": "Odense SØ",
    "country_code": "DK",
    "vat_id": "DK12345678",
    "telephone": "80808080",
    "mobile": "80808080",
    "email": "jim@minvirksomhed.dk",
    "customer_number": "12345678"
  },
  "dfm": {
    "insurance_type": "A",
    "insurance_amount": 1000,
    "dot_type": "DO1",
    "dot_time": "15:00",
    "pallets1": 1,
    "pallets2": 1,
    "pallets4": 1,
    "limited_quantity_weight": 1000,
    "has_dangerous_goods": true
  },
  "labelless_code": "123-4567-890",
  "source_id": "1000001234",
  "source_type": "manual",
  "return_shipment_id": "1000001234",
  "origin_shipment_id": "1000001235",
  "carrier_insurance": {
    "amount": 1000,
    "currency_code": "DKK"
  },
  "insurance": {
    "amount": 1000,
    "currency_code": "DKK"
  },
  "label_overlay": {
    "barcode": "1234567890123",
    "left_text": "ABC",
    "right_text": "DEF"
  },
  "waybill_reference": "CS000000000NO",
  "pickup_details": {
    "date": "2021-10-13",
    "from": "08:00:00",
    "to": "16:00:00",
    "instruction": "Goods are placed at gate 21"
  },
  "delivery_details": {
    "date": "2021-10-14",
    "from": "08:00:00",
    "to": "16:00:00",
    "instruction": "Place on the front porch."
  },
  "labels": [
    {
      "base64": "JVBERi0xLjYKJf//////AAAA(...)lJUVPRg==",
      "file_format": "pdf"
    }
  ]
}