• Germanized
  • REST API

Packing Slips

Use this endpoint to query packing slips.

List packing slips

GET: /wp-json/sab/v1/packing_slips/

Properties

context string

Scope under which the request is made; determines fields present in response. Options: view, edit Default is view

page integer

Current page of the collection. Default is 1

per_page integer

Maximum number of items to be returned in result set. Default is 10

search string

Limit results to those matching a string.

after string

Limit response to resources published after a given ISO8601 compliant date.

before string

Limit response to resources published before a given ISO8601 compliant date.

exclude array

Ensure result set excludes specific IDs.

include array

Limit result set to specific ids.

offset integer

Offset the result set by a specific number of items.

order string

Order sort attribute ascending or descending. Options: asc, desc Default is desc

orderby string

Sort collection by object attribute. Options: date, id Default is date

status array

Limit result set to documents which have specific statuses. Default is any

reference_id number

Limit result set to documents which have a specific reference id.

reference_type string

Limit result set to documents which have a specific reference type.

order_id integer

Limit result set to packing slips belonging to a certain order.

exclude properties
exclude item integer

exclude item.

include properties
include item integer

include item.

status properties
status item string

status item. Options: any, draft, closed, archived

Example

This is an example request which retrieves packing slips associated with a certain shipment.

curl https://example.com/wp-json/sab/v1/packing_slips/?reference_id=<shipment_id>

Manage packing slips

Retrieve, update or delete a packing slip.

GET|POST|PUT|PATCH|DELETE: /wp-json/sab/v1/packing_slips/<id>

Properties

id integer readonly

Unique identifier for the resource.

parent_id integer

Parent document ID.

reference_id integer

The reference id linked to the document.

reference_type string

The reference type linked to the document.

reference_number string

The reference formatted number linked to the document.

number string readonly

The document number.

formatted_number string readonly

The formatted document number.

created_via string readonly

Shows where the document was created.

status string

The current document status. Options: draft, closed, archived Default is closed

date_created string readonly

The date the document was created, in the site’s timezone.

date_created_gmt string readonly

The date the document was created, as GMT.

date_modified string readonly

The date the document was last modified, in the site’s timezone.

date_modified_gmt string readonly

The date the document was last modified, as GMT.

date_sent string

The date the document was sent, in the site’s timezone.

date_sent_gmt string

The date the document was sent, as GMT.

customer_id integer

User ID linked to the document. 0 for guests.

author_id integer

Author ID linked to the document.

relative_path string readonly

Relative path to PDF file.

path string readonly

Absolute path to PDF file.

journal_type string

The journal type for numbering purposes.

version string

The document version.

country string

The document country.

formatted_address string readonly

Formatted address data.

address object

Address data.

Attachments.

meta_data array

Meta data.

address properties
first_name string

First name.

last_name string

Last name.

company string

Company name.

address_1 string

Address line 1.

address_2 string

Address line 2.

city string

City name.

state string

ISO code or name of the state, province or district.

postcode string

Postal code.

country string

Country code in ISO 3166-1 alpha-2 format.

email string

Email address.

phone string

Phone number.

vat_id string

Address VAT ID.

attachments properties
id string readonly

Unique identifier for the resource.

type string

The attachment type, e.g. einvoice.

name string

The attachment name.

title string readonly

The attachment title.

extension string

The attachment file extension.

date_created string readonly

The date the attachment was created, in the site’s timezone.

date_created_gmt string readonly

The date the attachment was created, as GMT.

document_id string

The attachment document id.

relative_path string readonly

Relative path to attachment file.

path string readonly

Absolute path to attachment file.

filename string readonly

The filename.

meta_data array

Meta data.

meta_data properties
id integer readonly

Meta ID.

key string

Meta key.

value string null

Meta value.

Example

Create a packing slip by syncing it with an existing shipment.

curl -L 'https://example.com/wp-json/sab/v1/packing_slips/' \
-F 'shipment_id="1631"' \
-F 'sync="true"'

Download PDF

Download the packing slip PDF.

GET: /wp-json/sab/v1/packing_slips/<id>/pdf

Properties

file binary readonly

The file data (base64 encoded).

path string readonly

Local path to file in case it exists.

filename string readonly

The filename.

is_preview boolean readonly

Whether it is a preview or the file is persisted.