API DocumentationShipments
Create a shipment
POST
Creates a PREPARED courier or collection shipment on the order. Courier shipments require a destination address snapshot. Pass release=true to release immediately after create.
Phasio API Bearer Tokenheader
AuthorizationBearer <token>orderId*integerID of the order to attach the shipment to
Format
int64release?booleanIf true, the shipment is created in RELEASED status
Default
falseapplication/json- body
Collection shipment with no destination address or tracking
id?stringFormat
uuidtype*stringValue in
"COURIER""COLLECTION"status?stringValue in
"PREPARED""RELEASED""FULFILLED"incoterm?stringValue in
"EXW""FCA""CPT""CIP""DAP""DPU""DDP""FAS""FOB""CFR""CIF"fromAddress*Address snapshot stored on the shipment. Do not send an address-book ID.
parcels*array<>preparedAt?stringFormat
date-timepreparedBy?releasedAt?stringFormat
date-timereleasedBy?fulfilledAt?stringFormat
date-timefulfilledBy?documents*array<>Shipment created successfully
application/json- response
A concrete shipment on an order. Discriminated by type.
id?stringFormat
uuidtype*stringValue in
"COURIER""COLLECTION"status?stringValue in
"PREPARED""RELEASED""FULFILLED"incoterm?stringValue in
"EXW""FCA""CPT""CIP""DAP""DPU""DDP""FAS""FOB""CFR""CIF"fromAddress*Address snapshot stored on the shipment. Do not send an address-book ID.
parcels*array<>preparedAt?stringFormat
date-timepreparedBy?releasedAt?stringFormat
date-timereleasedBy?fulfilledAt?stringFormat
date-timefulfilledBy?documents*array<>curl -X POST 'https://m-api.eu.phas.io/api/manufacturer/v1/order/1/shipments' \ -H 'Content-Type: application/json' \ -d '{ "type": "COURIER", "fromAddress": { "street1": "string", "street2": "string", "city": "string", "country": "string", "zip": "string", "name": "string", "phone": "string", "email": "string", "residential": true }, "parcels": [ { "grossWeightGrams": 0, "netWeightGrams": 0, "value": 0, "width": 0, "height": 0, "length": 0, "allocations": [ { "requisitionId": 0, "quantity": 0 } ] } ], "documents": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "contentType": "string", "size": 0, "uploadedBy": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "firstName": "string", "lastName": "string" }, "createdAt": "2019-08-24T14:15:22Z" } ]}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "type": "COURIER", "status": "PREPARED", "incoterm": "EXW", "fromAddress": { "street1": "string", "street2": "string", "city": "string", "state": "string", "country": "string", "zip": "string", "name": "string", "company": "string", "phone": "string", "email": "string", "jurisdictionIsoCode": "string", "residential": true, "taxId": "string" }, "parcels": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "grossWeightGrams": 0, "netWeightGrams": 0, "value": 0, "width": 0, "height": 0, "length": 0, "allocations": [ { "requisitionId": 0, "quantity": 0 } ] } ], "preparedAt": "2019-08-24T14:15:22Z", "preparedBy": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "firstName": "string", "lastName": "string", "displayName": "string" }, "releasedAt": "2019-08-24T14:15:22Z", "releasedBy": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "firstName": "string", "lastName": "string", "displayName": "string" }, "fulfilledAt": "2019-08-24T14:15:22Z", "fulfilledBy": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "firstName": "string", "lastName": "string", "displayName": "string" }, "documents": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "contentType": "string", "size": 0, "uploadedBy": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "firstName": "string", "lastName": "string", "displayName": "string" }, "createdAt": "2019-08-24T14:15:22Z" } ]}