menu

Order: Parcel Locker -> Address


play_arrow
pause
play_arrow
stop

Creating a shipping order from parcel locker to address.

Here is the recomended approach to arrange a shipping order  from parcel locker to address:

0 Get Rates You can optionally make a Get Rates request, typically you can make it during the checkout process in a shopping cart when the origin and destination of the parcel, as well as its weight and size, are already known.

  • You can specify "parcel_locker-address" as the delivery type to ensure that only carriers offering this specific type of delivery are returned in response. As you get the responce, you can offer the delivery options to your client with the name of the delivery option, price, and delivery time.
  • Additionally you can determine if a carrier supports shipments from Parcel Locker to Address  by examining the Get Rates response. If the carrier has both "collection_target": "parcel_locker" and "destination_target": "address" listed, it indicates that the carrier can handle shipments from Parcel Locker to a specified Address.
  • When shipping from a parcel locker, you must specify the parcel_locker code, which you can obtain from a Get Rates request.
  • The Get Rates response includes a "nearest_parcel_locker_codes" container, which lists the nearest parcel lockers based on the provided postcode.
  • If you provide precise longitude and latitude coordinates, the nearest_parcel_locker_codes  container will contain the closest parcel lockers, sorted from nearest to furthest, based on these coordinates.
  • If there are no parcel lockers within 30km, the carrier will not be listed in the Get Rates response, indicating that the carrier cannot manage shipping to the specified location.

1 Place Order
 To place a shipping order, you need to specify carrier code and parcel locker code, along with details like the sender's and receiver's addresses, parcel information, and other data mentioned in the example below.

  • The carrier code can be obtained in Get Rates request and stored in your system for future use.
  • Shipments from parcel lockers may require parcel locker code which can be obteined in Get Rates request or Get Parcel Lockers. We recomend to use Get Rates request to get parcel lockers, since it will return the closest parcel lockers based on address post code or coordinates.
  • The sender's address is still required even if you send from a parcel locker. The address serves as backup or return address option in case the parcel will be returned for any reason.
  • Even if you send from a parcel locker it is required to indicate a pickup_timestamp. Some carriers, such as YARD reuquire to know when the parcel will be placed in the parcel locker so the courier can quicker arrive and pick up the parcel. For other parcel lockers carriers,  If you do not know when you will place the parcel insisde the locker, just specify a same day 23:59 in a timestamp format.
  • Once the order is placed, you receive an order reference in the response, which can be used for future purposes such as checking the status of the order.

Here is the full payload to order a shipment order from one address to another address:

POST https://api.sender.lv/api/sandbox/v1/orders
{
  • "carrier_code": "omniva-door-door", Specify the carrier code to order the service. This code can be obtained in the Get Rates request.
  • "from": { Container to specify the sender fields.
    • "firstname": "Inga", Sender's name as it appears in the passport, using only Latin characters.
    • "lastname": "Bārtule", Sender's last name as it appears in the passport, using only Latin characters.
    • "phone": "+37122654321", Sender's phone number with the country code, allowing only the '+' character and numbers.
    • "email": "[email protected]", Sender's email.
    • "country_iso": "LV", Sender's country in ISO format.
    • "city": "Rīga", Sender's city. Only Latin Extended-A characters allowed.
    • "postcode": "LV-1048", Sender's post code.
    • "address": "Slokas iela 28", Sender's address line 1 without city, postcode and country. Max 30 characters.
    • "address2": "" Optional Sender's address line 2 without city, postcode and country. Max 30 characters.
    } ,
  • "to": { Container to specify the destintation fields.
    • "parcel_locker_code": "9279", Only required for parcel locker shipments / if the parcel will be sent from a specified parcel locker. If parcel locker code is specified, address fields are served as backup/return address.
    • "firstname": "Mikhail", Receiver's name exactly as it is shown in the passport, using only Latin characters.
    • "lastname": "Tal", Receiver's surnam exactly as it is shown in the passport, using only Latin characters.
    • "phone": "+37122654321", Receiver's phone number with the country code, allowing only the '+' character and numbers.
    • "email": "[email protected]", Receiver's email.
    • "country_iso": "LV", Receivers's country in ISO format.
    • "city": "Rīga", Destination city. Only Latin Extended-A characters allowed.
    • "postcode": "LV-1013", Destination post code.
    • "address": "Duntes iela 6", Destination address line 1 without city, post code and country. Max 30 characters.
    • "address2": "" Optional Destination address line 2 without city, post code and country. Max 30 characters.
    } ,
  • "shipment_contents": "Dyson Airwrap 20mm Long Barrel Black Purple (970736-01)", Specify what's inside your package as precisely as possible.
  • "shipment_total_value": "31", Total cost of the items being shipped. Indicates carrier's maximum liability for a package that is lost or damaged.
  • "shipment_total_value_currency": "EUR", Currency for total cost of the items being shipped.
  • "package_type": "1", package type: 1 - Documents. 2 - Box/package. 3 - Pallet.
  • "packages": [ Packages container to specify each box or package individually.
    • { first package container
      • "weight": "0.250", Total weight of the package in KG
      • "width": "10", Total width of the package in CM
      • "height": "10", Total height of the package in CM
      • "depth": "5" Total depth of the package in CM
      }
    ] ,
  • "pickup_timestamp": "1744728512", Required only for pickup shipments, from specified address. We recommend obtaining valid pickup values for each carrier using the Get Rates request. This field not required for shipments from Parcel Locker.
  • "callback_urls": { Container for callback / hooks urls.
    • "success": "https://webhook.site/e3338662-625f-49e4-84ae-bba06d8d4b36", Our server will send a response to this callback URL once the order has been processed successfully.
    • "fail": "https://webhook.site/e3338662-625f-49e4-84ae-bba06d8d4b36" Our server will send a response to this callback URL if the order processing will be failed.
    }
}

Callback Optionally, you can set up a callback to your server.

  • When our team processes the order you will get a POST to your callback URL from our server.
  • Some orders are processed almost instantly, while others may take longer (up to 20 minutes).
  • If an order cannot be processed for any reason, it will be canceled, and you will receive a callback response indicating that the order placement has failed. 
  • The Payload of the callback requst is the same as you get in response in Get Order request.
  • At present, our system will only send a callback request to your server a single time (whether the order was accepted on not). It will not send any further callbacks regarding updates to the order. If you require updates on your order status, you will need to manually make a Get Order Request. Details are provided below.

2 Get Order If you can't process callbacks or you just want to validate the status of your order,  you may need to manually make Get Order request  to ensure whether it was accepted or canceled, as well as to obtain a shipping label for your parcel.

  • Check for Shipping Labels. Be aware that certain carriers require shipping labels on parcels. However when you send parcels from Parcel Locker  the label can be printed in parcel locker's integrated printer.
  • Check Status. If your order status is 'processed,' it means your order has been accepted, and you can expect the carrier to pick up your parcel.
  • Update Order Status. You can periodically repeat the get order request to update your parcel's shipping status or other information later.


Please log in and add your sandbox to play this scenario in real-time