Create delivery request

You will notice this request parameters and the Check eligibility ones are the same.

WARNING

Calling this route immediately creates a valid delivery in our system and available for all shoppers. If you need to validate a delivery without creating it, use the eligibility route.

Any updates on the created delivery will be done by our Customer Service.

To cancel a delivery, please refer to the next part of this document.

The country field will become mandatory in summer 2023.

Authentification

TIP

  • api_key and partner_id in header
  • api_key and partner in body

Routes

Routesurl
Testshttps://partners-api-preprod.shopopop.com/deliveriesopen in new window
Prodhttps://partners-api.shopopop.com/deliveriesopen in new window

Method

VerbPOST

Headers

Headertype
api_keystring
partner_idstring

Will be given when testing phase is ready

Payload

{
  "api_key": "string",
  "partner_id": "string",
  "data": {
    "drive": {
      "id": "string", // Unique reference which allows to identify the pickup location (drive) in the partners information system.
      "name": "string", // Drive name displayed for the customer or deliveryman/woman
      "street": "string", // (ex: 34 rue des tulipes)
      "zip_code": "string", // to avoid the loss of leading zeros
      "city": "string", // The complete address must be known by Google Maps or a valid long/lat is given
      "country": "string", // alpha 2: FR
      "telephone": "string",
      "latitude": "number",
      "longitude": "number",
      "additional_info": "string", // Additional informations about the pickup location (drive)
      "contact": {
        // Contact informations about the manager of the pickup location
        "first_name": "string",
        "last_name": "string",
        "telephone": "string",
        "email": "string"
      }
    }
    "client": {
      "first_name": "string",
      "last_name": "string",
      "email": "string",
      "telephone": "string"
    },
    "address": {
      "id": "string",
      "first_name": "string",
      "last_name": "string",
      "street": "string", // (ex: 34 rue des tulipes)
      "zip_code": "string", // to avoid the loss of leading zeros
      "city": "string", // The complete address must be known by Google Maps or a valid long/lat is given.
      "other": "string", // Additional information about the address.
      "latitude": "number",
      "longitude": "number",
      "telephone": "string",
      "telephone_other": "string",
      "type": "number", // 0: Undefined | 1: Apartment | 2: House
      "digicode": "string",
      "floor": "number", // Warning: 0 = GFL (ground floor). Max : 40. Is given to the delivery man/woman.
      "elevator": "boolean", 
      "comment": "string", // comment for the delivery man/woman.
    },
    "delivery": {
      "reference": "string", // Will be the unique reference number which will be display to the delivery man/woman (order number)
      "trip_id": "string", // Partners’ intern number if different from the reference number
      "amount": "number",
      "delivery_date": "string", // format DD/MM/YYYY
      "start_hour": "string", // format HH:mm
      "end_hour": "string", // format HH:mm
      "has_fresh_food": "boolean", // has fresh frozen goods Warning: default = false, if unsure set to true
      "quantity": "number", // total number of products
      "liquid_volume": "number", // in liters – order total liquid volume
      "volume": "number", // in liters – order overall volume
      "weight": "number", // in kg – order total weight
      "additional_infos": "string", // additional informations about the order
      "order_detail": [
        {
          "title": "string",
          "quantity": "number"
        },
        ...
      ]

    }
  }
}

Response

HTTP STATUS 204

void

HTTP STATUS 404

{
  "error": true,
  "errorDesc: ["X_NOT_FOUND"] // the X entity cannot be found (Drive, Delivery, Address, Client). Only if specific restrictions exist for you, else see below.
}

HTTP STATUS 403

Access not authorized, the api_key and/or the partner_id are incorrect.

HTTP STATUS 502

{
  "error": true,
  "errorDesc: ["UNKNOWN_ADDRESS"] // the address is unknown or Google APIs failed to determine the GPS coordinates.
}

HTTP STATUS 400

{
  "error": true,
  "errorDesc: ["DELIVERY_DATE_TOO_CLOSE"] // the date/time required for the delivery is too close (at least 2 hours before the beginning of the delivery timeslot).
}

HTTP STATUS 400

{
  "error": true,
  "errorDesc: ["DELIVERY_DISTANCE_TOO_LONG"] // distance between customer address and pickup location (drive) is too far.
}

HTTP STATUS 400

{
  "fields": {
    "request.data.delivery.trip_id": {
      "message": "Max length exceeded",
      "value": "tripId000000000000000000000000000000000000000000002"
    }
  }
}

HTTP STATUS 500

{
  "error": true,
  "errorDesc: ["INTERNAL_ERROR"] // internal error, contact us.
}