create a manifest for one or many shipments

Request

Endpoints

keyvalue
endpointplatform.packaly.com/api/v1/shipmetns/manifests
methodPOST

Headers

namevaluerequired
API-Keythe keyyes
Correlation-Iduuid v4no

Body

a JSON array of shipments:

nametypedescriptionrequired
reference_idstringunique delivery id (barcode)yes
dropoff.namestringrecipient nameyes
dropoff.emailstringrecipient emailyes
dropoff.location.countrystringdestination country alpha 2 code ISO 3166yes
dropoff.location.citystringdestination cityyes
dropoff.location.postal_codestringdestination postal code as PC6 (DDDD LL)yes
dropoff.location.streetstringdestination streetyes
dropoff.location.housestringdestination house numberyes
package.heightintparcel height in centimetresyes
package.widthintparcel width in centimetresyes
package.lengthintparcel length in centimetresyes
package.weightintparcel weight in gramsyes

example of a JSON request body

[
    {
        "reference_id": "53",
        "dropoff": {
            "name": "name",
            "email": "[email protected]",
            "location": {
                "country": "NL",
                "city": "city",
                "postal_code": "postal_code",
                "street": "street",
                "house": "house"
            }
        },
        "package": {
            "height": 1,
            "width": 1,
            "length": 1,
            "weight": 1
        }
    }
]

whole request as CURL:

curl --location '0.0.0.0:80/api/v1/shipments/manifests' \
--header 'API-Key: pactest_***_***' \
--header 'Correlation-Id: c2067b12-f6c3-47cf-9f98-14ea1d126100' \
--header 'Content-Type: application/json' \
--data-raw '[
    {
        "reference_id": "53",
        "dropoff": {
            "name": "name",
            "email": "[email protected]",
            "location": {
                "country": "NL",
                "city": "city",
                "postal_code": "postal_code",
                "street": "street",
                "house": "house"
            }
        },
        "package": {
            "height": 1,
            "width": 1,
            "length": 1,
            "weight": 1
        }
    }
]'

Response

On Success

HTTP codeHTTP statusHTTP body
201CREATED

next step is to wait from us for a webhook update with the shipment status.

On Failure

Body

a JSON error object

nametypedescriptionrequired
codeenumerror codeyes
descriptionstringhuman readable error descriptionyes

possible error codes:

namedescription
authentication_errorrequest authentication failed, check error description for details.
bad_requestrequest body is malformed or does not contain a valid JSON (an array of shipments).
internal_server_errorwe work hard to make sure that this error is never seen. But in case it is - please retry the request.

example of an error response:

{
    "code": "authentication_error",
    "description": "provided API key is not in the correct format or has been tampered with"
}

error status codes:

status codeerror codeadvice
401 Unauthorisedauthentication_erroris request header 'API-Key' sent?
is correct api key is used?
was api key revoked?
does api provide sufficient authorisation level?
400 Bad Requestbad_requestis request body sent?
is request body a valid JSON (and array of shipments)?
500 Internal Server Errorinternal_server_errorsorry, please retry.