> For the complete documentation index, see [llms.txt](https://docs.shippify.co/developers/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.shippify.co/developers/en/shippify-api/deliveries/delivery-creation.md).

# Delivery creation

With this endpoint, you can create up to a maximum of 100 deliveries per request and 100 requests per minute.

## Delivery creation

> Create up to 100 deliveries within Shippify

```json
{"openapi":"3.0.0","info":{"title":"Shippify Api","version":"1.0.0"},"servers":[{"url":"https://api.shippify.co","description":"Development server"}],"security":[{"Basic_Auth":[]}],"components":{"securitySchemes":{"Basic_Auth":{"type":"http","scheme":"basic"}},"schemas":{"createDelivery":{"successfulResponse":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"payload":{"type":"array","items":{"type":"object","description":"Information of the created delivery","properties":{"index":{"description":"Position of the delivery in the request array","type":"integer","minimum":0},"id":{"type":"string","description":"Shippify delivery identifier"},"price":{"description":"Delivery price","type":"number","minimum":0},"currencyCode":{"type":"string","description":"Currency of the delivery price"},"distance":{"description":"Distance between pickup and delivery points","type":"number","minimum":0},"cityId":{"description":"Pickup city identifier","type":"integer","minimum":1},"destinationCityId":{"description":"Delivery city identifier","type":"integer","minimum":1},"insurance":{"description":"Delivery insurance","type":"number","minimum":0},"statusDelivery":{"type":"string","description":"Current status of the delivery"},"vehicleCapacity":{"description":"Delivery capacity","type":"integer","minimum":1,"maximum":5},"deliveryDate":{"type":"string","description":"Estimated delivery date","format":"date-time"},"trackLink":{"type":"string","description":"Tracking link"},"referenceId":{"type":"string","description":"External identifier of the delivery, can be the order number"}}}}}},"request":{"type":"object","required":["deliveries"],"properties":{"companyId":{"description":"Company identifier where the delivery will be created","type":"integer","minimum":1},"type":{"description":"Delivery type","type":"string","enum":["flex","express","slot"],"default":"slot"},"deliveries":{"type":"array","items":{"$ref":"#/components/schemas/createDelivery/delivery"}}}},"delivery":{"type":"object","required":["pickup","dropoff","packages"],"properties":{"pickup":{"description":"Pickup information","$ref":"#/components/schemas/delivery/place"},"dropoff":{"description":"Delivery information","$ref":"#/components/schemas/delivery/place"},"packages":{"description":"Package information.","type":"array","items":{"$ref":"#/components/schemas/delivery/package"}},"referenceId":{"description":"External identifier of the delivery, can be the order number","type":"string","maxLength":40},"tags":{"description":"Names of digital tags","type":"array","items":{"description":"Name of digital tag","type":"string","maxLength":50}},"extraData":{"description":"Extra delivery data","type":"array","items":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string","description":"Name of the extra information"},"value":{"type":"string","description":"Value of the extra information"}}}},"cod":{"description":"Cash on delivery","type":"number","minimum":0}}}},"Unauthenticated":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"},"delivery":{"place":{"type":"object","required":["contact","location"],"properties":{"contact":{"$ref":"#/components/schemas/delivery/contact"},"location":{"$ref":"#/components/schemas/delivery/location"}}},"contact":{"description":"Contact information of the person responsible for delivering the packages at the pickup warehouse.","type":"object","required":["name","email"],"properties":{"name":{"description":"Name of the responsible person.","type":"string"},"email":{"description":"Email of the responsible person.","type":"string","format":"email"},"phonenumber":{"description":"Phone number of the responsible person.","type":"string"}}},"location":{"description":"Address information of the pickup location of the delivery packages.","type":"object","required":["address"],"properties":{"address":{"description":"Delivery address.","type":"string"},"instructions":{"description":"Extra information about the address.","type":"string"},"lat":{"description":"Latitude of the pickup point.","type":"string"},"lng":{"description":"Longitude of the pickup point.","type":"string"}}},"package":{"type":"object","required":["name","qty","size"],"properties":{"id":{"type":"string","description":"Package identifier"},"name":{"type":"string","description":"Package name"},"qty":{"description":"Number of packages in the order (not the number of products inside the package).","type":"integer","minimum":0},"weight":{"description":"Unit weight * quantity in Kg","type":"number","minimum":0},"size":{"description":"Package size","type":"string","enum":["xs","s","m","l","xl"]},"price":{"description":"Unit price * quantity in the currency of the company","type":"number","minimum":0}}}}}},"paths":{"/v1/deliveries":{"post":{"tags":["Deliveries"],"summary":"Delivery creation","description":"Create up to 100 deliveries within Shippify","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createDelivery/successfulResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthenticated"}}}}},"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createDelivery/request"}}}}}}}}
```

## Use cases

<details>

<summary>Delivery Creation with Reference ID</summary>

This is the most basic payload you can use with the API; however, the task may be created with a pending review status if the address cannot be geolocated.

<pre class="language-json"><code class="lang-json"><strong>{
</strong>    "deliveries": [
        {
            "pickup": {
                "contact": {
                    "phonenumber": "0976565643",
                    "email": "example@test.com",
                    "name": "Juan Perez"
                },
                "location": {
                    "address": "Av. Francisco de Orellana 8, Guayaquil 090502, Ecuador",
                    "instructions": "Apartamento 203"
                }
            },
            "dropoff": {
                "contact": {
                    "name": "Carlos Perez",
                    "email": "test-1998@hotmail.com"
                },
                "location": {
                    "address": "Malecón 2000, Simon Bolivar Palacios, Guayaquil 090313, Ecuador",
                    "instructions": "Local 890"
                }
            },
            "packages": [
                {
                    "name": "Box of pencils",
                    "qty": 1,
                    "size": 1
                }
            ],
            "referenceId": "FACT-000123"
        }
    ]
}
</code></pre>

</details>

<details>

<summary>Delivery Creation with Latitude and Longitude Address</summary>

With this payload, you can create deliveries with precise pickup and delivery points, ensuring that the task is always created with a "processing" status.

```json
{
    "deliveries": [
        {
            "pickup": {
                "contact": {
                    "name": "Juan Perez",
                    "phonenumber": "0999999999"
                },
                "location": {
                    "address": "Av. Echeñique 8861, 7860169 La Reina, Región Metropolitana, Chile",
                    "lat": "-33.44299381045172",
                    "lng": "-70.53898694556675"
                }
            },
            "dropoff": {
                "contact": {
                    "name": "Carlos Perez",
                    "email": "example@shippify.cl",
                    "phonenumber": "09999999999"
                },
                "location": {
                    "address": "Los Castaños 11989, 8010277 Santiago, El Bosque, Región Metropolitana, Chile",
                    "lat": "-33.56751",
                    "lng": "-70.67549"
                }
            },
            "packages": [
                {
                    "name": "149123156552",
                    "size": "XS",
                    "qty": "1"
                }
            ]
        }
    ]
}
```

</details>

<details>

<summary>Delivery creation with address by components</summary>

With this payload, you can create deliveries with a slightly more precise pickup or delivery point, reducing the likelihood of it being created as pending review. It involves breaking down the address into country, city, street, and zip code.

```json
{
    "deliveries": [
        {
            "pickup": {
                "contact": {
                    "name": "Juan Perez",
                    "phonenumber": "0999999999"
                },
                "location": {
                    "address": "R. Dona Claudina, 401 - Méier, Rio de Janeiro - RJ, 20725-060, Brasil",
                    "lat": -22.906846699999996,
                    "lng": -43.28275978125001
                }
            },
            "dropoff": {
                "contact": {
                    "name": "Carlos Perez",
                    "email": "example@shippify.cl",
                    "phonenumber": "09999999999"
                },
                "location": {
                    "address": {
                        "zipcode": "60348450",
                        "neighborhood": "VILA VELHA",
                        "streetName": "RUA 24,656",
                        "state": "CE",
                        "country": "Brazil",
                        "city": "FORTALEZA"
                    },
                    "instructions": "CONJ DOS BANCARIOS - REF.ENDERECO: PROX A UPA"
                }
            },
            "packages": [
                {
                    "name": "149123156552",
                    "size": "XS",
                    "qty": "1"
                }
            ]
        }
    ]
}
```

</details>

<details>

<summary>Delivery Creation from or to a Configured Warehouse</summary>

With this payload, you can create deliveries with a collection point previously saved in the "Pickup Locations" [section](https://dash.shippify.co/login?fwd=https://dash.shippify.co/places).&#x20;

```json
{
    "deliveries": [
        {
            "pickup": {
                "contact": {
                    "name": "Juan Perez",
                    "phonenumber": "099999999999"
                },
                "location": {
                    "warehouse": 9
                }
            },
            "dropoff": {
                "contact": {
                    "name": "Carlos Perez",
                    "email": "example@shippify.cl",
                    "phonenumber": "099999999999"
                },
                "location": {
                    "address": {
                        "zipcode": "60348450",
                        "neighborhood": "VILA VELHA",
                        "streetName": "RUA 24,656",
                        "state": "CE",
                        "country": "Brazil",
                        "city": "FORTALEZA"
                    },
                    "instructions": "CONJ DOS BANCARIOS - REF.ENDERECO: PROX A UPA"
                }
            },
            "packages": [
                {
                    "name": "149123156552",
                    "size": "XS",
                    "qty": "1"
                }
            ]
        }
    ]
}
```

</details>

<details>

<summary>Delivery creation with tags and extra data</summary>

With digital tags, you can add additional features to the task to later filter by them, for example: fragile.&#x20;

With extra data, you can link additional information to the delivery.

```json
{
    "deliveries": [
        {
            "pickup": {
                "contact": {
                    "phonenumber": "099999999999",
                    "email": "example@test.com",
                    "name": "Juan Perez"
                },
                "location": {
                    "address": "Av. Francisco de Orellana 8, Guayaquil 090502, Ecuador",
                    "instructions": "Apartamento 203"
                }
            },
            "dropoff": {
                "contact": {
                    "name": "Carlos Perez",
                    "email": "example@hotmail.com"
                },
                "location": {
                    "address": "Malecón 2000, Simon Bolivar Palacios, Guayaquil 090313, Ecuador",
                    "instructions": "Local 890"
                }
            },
            "packages": [
                {
                    "name": "Caja de colores",
                    "qty": 1,
                    "size": 1
                }
            ],
            "tags" : [ 
                "fragil"
            ],
             "extraData": [
                {
                    "name": "GUIA DE REMISION",
                    "value": "0001-000344-2233",
                    "searchable": true
                }
            ],
            "referenceId": "FACT-000123"
        }
    ]
}
```

</details>

<details>

<summary>Delivery creation for a child company</summary>

With this payload, you can create deliveries for a child company with authorization from the parent company.

<pre class="language-json"><code class="lang-json">{
    <a data-footnote-ref href="#user-content-fn-1">"companyId":2,</a>
    "deliveries": [
        {
            "pickup": {
                "contact": {
                    "phonenumber": "09999999999",
                    "email": "example@test.com",
                    "name": "Juan Perez"
                },
                "location": {
                    "address": "Av. Francisco de Orellana 8, Guayaquil 090502, Ecuador",
                    "instructions": "Apartamento 203"
                }
            },
            "dropoff": {
                "contact": {
                    "name": "Carlos Perez",
                    "email": "example@hotmail.com"
                },
                "location": {
                    "address": "Malecón 2000, Simon Bolivar Palacios, Guayaquil 090313, Ecuador",
                    "instructions": "Local 890"
                }
            },
            "packages": [
                {
                    "name": "Caja de colores",
                    "qty": 1,
                    "size": 1
                }
            ],
            "referenceId": "FACT-000123"
        }
    ]
}
</code></pre>

</details>

[^1]: Identificador de la compañía hija
