Methods
Entity Properties
- Shipment
- Shipment Item
- Package
- Shipment Track (deprecated)
shipment.search
shipment.search(null|object $filters, array $options = [], null|string|object $fields = [])
Retrieve list of shipments by filters. Shipment data can be customized by specifying properties to retrieve.
Parameters
null
- Retrieve list of all shipments.object
- Retrieve list of shipments using specified Search Filters. Allowed properties for filtering: “shipment_id”, “warehouse_id”, “order_unique_id”, “order_ref”, “order_id”, “store_code”, “created_at”, “updated_at”, “packed_at”, “status”, “shipment_type”.
null
- No options will be applied.object
- Apply specified Search Options.
null
- Retrieve only “shipment_id”, “order_unique_id”, and “order_ref” properties.string '*'
- Retrieve all properties excluding “shipping_address”, “items”, “packages”, “tracking_numbers”, and “serial_number_data”.object
- List of properties to retrieve in addition to “shipment_id”, “order_unique_id”, and “order_ref”. List may include ’*’. Example:
Return Value
An array of objects. Each object will contain the specified (or default if no fields parameter was given) Shipment Properties.Error Codes
code | message |
---|---|
101 | Invalid filters given. Details in error message. |
shipment.info
shipment.info(string $shipment)
Retrieve all shipment information.
Parameters
Shipment ID. Can be retrieved from the order “shipments” property.
Return Value
Shipment information.Example Request
Request
Example Response
Response
Error Codes
code | message |
---|---|
100 | Requested shipment does not exist. |
shipment.update
shipment.update (string $shipment, object $shipmentData, object $customFields)
Update shipment information.
Parameters
Shipment ID. Can be retrieved from the order “shipments” property.
Shipment data.
Allowed properties: source.
Shipment Custom Field Operations (see Shipment Custom Field Operations).
Shipment Custom Field Operations
An object with an operation name as the key and an object containing the Shipment Custom Field) data for all operations except theremove
operation. The remove
operation only requires a list of custom field codes.
Allowed operations: set
, add
, remove
, add_option
, remove_option
.
set
- Replace all values.add
- Add new fields to existing, replace old values.remove
- Remove only fields specified.add_option
- Multi-selects only. Add an option without unsetting existing options.remove_option
- Multi-selects only. Remove an option without unsetting other options not listed.
Return Value
true
if shipment was successfully updated.
Example Request
Request
Example Response
Response
Error Codes
code | message |
---|---|
100 | Requested shipment does not exist. |
102 | Invalid data given. Details in error message. |
Entity Properties
Shipment Properties
Shipment Item Properties
Package Properties
Shipment Track Properties
Serial Number Properties
Shipment Custom Field
An object with a Custom Field code as the key and the Custom Field data as the value. The value format depends on the Custom Field input type."custom_fields": { ... }
To find out what fields are available see Shipment Custom Fields — shipment_custom_field.list