Skip to main content

Operation Definitions

The endpoints, data models, and sample code for Partner Relay API.

Endpoints

POST /api/product/get-on-hand

Summary

Get stock on hand information.

Request Parameters

In

Field Name

Type

Required

Description

header

CONTENT-TYPE

string

Yes

application/json

header

AUTHORIZATION

string

Yes

Site token or access token and integrator token with StockLevel.CurrentSite.View permission or StockLevel.OtherSites.View permission

header

X-COMPANY-ID

string

Yes

The unique identifier (UID) for the company provided by us

body

body

product_post_body_1

Yes

The JSON formatted request

Responses

Code

Description

Schema

200

Success

product_post_response_1

400

Bad request. For more information, look at the body error.

401

Unauthorized error

403

Forbidden error

404

Not Found

422

Unprocessable error

500

Internal Server Error

POST /api/shipment

Summary

Create a shipment.

Request Parameters

In

Field Name

Type

Required

Description

header

CONTENT-TYPE

string

Yes

application/json

header

AUTHORIZATION

string

Yes

The integrator token created previously. Supports site and integrator tokens only.

header

X-COMPANY-ID

string

Yes

The unique identifier (UID) for the company provided by us

header

X-SITE-ID

string

Yes

The unique site ID. Only one site ID per request.

body

body

shipment_post_body_1

Yes

The JSON formatted request

Responses

Code

Description

Schema

200

Success

shipment_post_response_1

400

Bad request. For more information, look at the body error.

401

Unauthorized error

403

Forbidden error

404

Not Found

422

Unprocessable error

500

Internal Server Error

POST /api/shipment/address

Summary

Create and validate a shipping address.

Request Parameters

In

Field Name

Type

Required

Description

header

CONTENT-TYPE

string

Yes

application/json

header

AUTHORIZATION

string

Yes

The integrator token created previously. Supports site and integrator tokens only.

header

X-COMPANY-ID

string

Yes

The unique identifier (UID) for the company provided by us

header

X-SITE-ID

string

Yes

The unique site ID. Only one site ID per request.

body

body

shipment_post_body_2

Yes

The JSON formatted request

Responses

Code

Description

Schema

201

Success

shipment_post_response_2

400

Bad request. For more information, look at the body error.

401

Unauthorized error

403

Forbidden error

404

Not Found

422

Unprocessable error

500

Internal Server Error

PATCH /api/shipment/[id]/buy

Summary

Request to buy a shipment by the shipment identifier (ID).

Request Parameters

In

Field Name

Type

Required

Description

header

CONTENT-TYPE

string

Yes

application/json

header

AUTHORIZATION

string

Yes

The integrator token created previously. Supports site and integrator tokens only.

header

X-COMPANY-ID

string

Yes

The unique identifier (UID) for the company provided by us

path

id

string

Yes

The shipment's ID

body

body

shipment_patch_body_3

Yes

The JSON formatted request

Responses

Code

Description

Schema

201

Success

shipment_patch_response_3

400

Bad request. For more information, look at the body error.

401

Unauthorized error

403

Forbidden error

404

Not Found

422

Unprocessable error

500

Internal Server Error

GET /api/shipment/[id]

Summary

Get shipment details by shipment identifier (ID).

Request Parameters

In

Field Name

Type

Required

Description

header

CONTENT-TYPE

string

Yes

application/json

header

AUTHORIZATION

string

Yes

The integrator token created previously. Supports site and integrator tokens only.

header

X-COMPANY-ID

string

Yes

The unique identifier (UID) for the company provided by us

path

id

string

Yes

The shipment's ID

Responses

Code

Description

Schema

200

Success

shipment_get_response_4

400

Bad request. For more information, look at the body error.

401

Unauthorized error

403

Forbidden error

404

Not Found

422

Unprocessable error

500

Internal Server Error

PATCH /api/shipment/[id]/refund

Summary

Request to refund a shipment by the shipment identifier (ID).

Request Parameters

In

Field Name

Type

Required

Description

header

CONTENT-TYPE

string

Yes

application/json

header

AUTHORIZATION

string

Yes

The integrator token created previously. Supports site and integrator tokens only.

header

X-COMPANY-ID

string

Yes

The unique identifier (UID) for the company provided by us

path

id

string

Yes

The shipment's ID

Responses

Code

Description

Schema

200

Success

shipment_patch_response_5

400

Bad request. For more information, look at the body error.

401

Unauthorized error

403

Forbidden error

404

Not Found

422

Unprocessable error

500

Internal Server Error

Data Models

product_post_body_1

Field Name

Type

Description

site_ids

array

products

product_post_body_1_products

product_post_body_1_products

Field Name

Type

Required

Description

product_id

string

Yes

The product identifier (ID)

external_id

string

No

imported_from

string

No

product_post_response_1

Field Name

Type

Description

items

product_post_response_1_items

product_post_response_1_items

Field Name

Type

Description

name

string

The product name

product_id

string

The stock keeping unit (SKU). Also, the product identifier (ID) for our system

on_hand

product_post_response_1_items_on_hand

The information about the product items on hand

product_post_response_1_items_on_hand

Field Name

Type

Description

site_id

string

The site identifier (ID) for our system

quantity

number

The stock amount of the product

uom

string

The measure of the product

shipment_post_body_1

Field Name

Type

Required

Description

to_address_id

string

No

The shipment recipient's address ID

from_address_id

string

No

The shipment sender's address ID

from_address

shipment_post_body_1_from_address

No

The shipment recipient's address information

to_address

shipment_post_body_1_to_address

No

The shipment sender's address information

parcel

shipment_post_body_1_parcel

Yes

The parcel's dimensions and weight

invoice_number

string

Yes

The order ID in the point of sale (POS)

delivery_confirmation

string

No

Indicates if a delivery confirmation is required. For example, ADULT_SIGNATURE.

is_fragile

boolean

No

A flag that indicates if the parcel is fragile

comment

string

No

A field to add delivery instructions

is_return

boolean

No

A flag that indicates if the parcel is a return from the original recipient

shipment_post_body_1_from_address

Field Name

Type

Required

Description

name

string

Yes

The shipment sender's name

company

string

No

The shipment sender's company name

street1

string

Yes

The street number and name of the shipment sender

street2

string

No

The additional street address information for the shipment sender

city

string

Yes

The city name for the shipment sender

state

string

Yes

The state abbreviation for the shipment sender

zip

string

Yes

The zip code for the shipment sender

country

string

Yes

The ISO 3166 country code for the shipment sender

phone

string

No

The telephone number for the shipment sender

email

string

No

The email address for the shipment sender

shipment_post_body_1_to_address

Field Name

Type

Required

Description

name

string

No

The shipment recipient's name

company

string

No

The shipment recipient's company name

street1

string

Yes

The street number and name for the shipment recipient

street2

string

No

The additional street address information for the shipment recipient

city

string

Yes

The city name for the shipment recipient

state

string

Yes

The state abbreviation for the shipment recipient

zip

string

Yes

The zip code for the shipment recipient

country

string

Yes

The ISO 3166 country code for the shipment recipient

phone

string

No

The telephone number for the shipment recipient

email

string

No

The email address for the shipment recipient

shipment_post_body_1_parcel

Field Name

Type

Required

Description

length

number

Yes

The length of the parcel

width

number

Yes

The width of the parcel

height

number

Yes

The height of the parcel

weight

number

Yes

The weight of the parcel

shipment_post_response_1

Field Name

Type

Description

id

string

The shipment's identifier (ID)

created_at

string

The date and time the shipment was created

updated_at

string

The date and time the shipment record was updated

options

object

All of the options applied to the shipment

status

string

The current status of the shipment

refund_status

string

The current status of the shipment refund process

from_address

shipment_post_response_1_from_address

The origin address

to_address

shipment_post_response_1_to_address

The destination address

return_address

shipment_post_response_1_return_address

The shipper's address. Defaults to from_address.

buyer_address

shipment_post_response_1_buyer_address

The buyer's address. Defaults to to_address.

usps_zone

number

The USPS zone of the shipment, if purchased with USPS

is_return

boolean

A flag that indicates if it is a return shipment

parcel

object

The dimensions and weight of the package

postage_label

object

The associated PostageLabel object

selected_rate

string

The specific rate purchased for the shipment, or null if not purchased or purchased through another mechanism

rates

array

All associated rate objects

tracking_code

string

The tracking code provided by the carrier

tracker

object

Contains all of the tracking information for the package

insurance

string

The associated insurance amount

fees

array

A list of the charges billed to the user's account

mode

string

The current environment, test or production

shipment_post_response_1_from_address

Field Name

Type

Description

id

string

The shipment address identifier (ID)

created_at

string

The time and date the shipment address was created

updated_at

string

The time and date the shipment address was updated

name

string

The shipment sender's name

company

string

The shipment sender's company name

street1

string

The street number and name of the shipment sender

street2

string

The additional street address information for the shipment sender

city

string

The city name for the shipment sender

state

string

The state abbreviation for the shipment sender

zip

string

The zip code for the shipment sender

country

string

The ISO 3166 country code for the shipment sender

phone

string

The telephone number for the shipment sender

email

string

The email address for the shipment sender

mode

string

The current environment, test or production

shipment_post_response_1_to_address

Field Name

Type

Description

id

string

The shipment address identifier (ID)

created_at

string

The time and date the shipment address was created

updated_at

string

The time and date the shipment address was updated

name

string

The shipment recipient's name

company

string

The shipment recipient's company name

street1

string

The street number and name for the shipment recipient

street2

string

The additional street address information for the shipment recipient

city

string

The city name for the shipment recipient

state

string

The state abbreviation for the shipment recipient

zip

string

The zip code for the shipment recipient

country

string

The ISO 3166 country code for the shipment recipient

phone

string

The telephone number for the shipment recipient

email

string

The email address for the shipment recipient

mode

string

The current environment, test or production

shipment_post_response_1_return_address

Field Name

Type

Description

id

string

The shipment address identifier (ID)

created_at

string

The time and date the shipment address was created

updated_at

string

The time and date the shipment address was updated

name

string

The shipment returner's name

company

string

The shipment returner's company name

street1

string

The street number and name for the shipment returner

street2

string

The additional street address information for the shipment returner

city

string

The city name for the shipment returner

state

string

The state abbreviation for the shipment returner

zip

string

The zip code for the shipment returner

country

string

The ISO 3166 country code for the shipment returner

phone

string

The telephone number for the shipment returner

email

string

The email address for the shipment returner

mode

string

The current environment, test or production

shipment_post_response_1_buyer_address

Field Name

Type

Description

id

string

The shipment address identifier (ID)

created_at

string

The time and date the shipment address was created

updated_at

string

The time and date the shipment address was updated

name

string

The shipment buyer's name

company

string

The shipment buyer's company name

street1

string

The street number and name for the shipment buyer

street2

string

The additional street address information for the shipment buyer

city

string

The city name for the shipment buyer

state

string

The state abbreviation for the shipment buyer

zip

string

The zip code for the shipment buyer

country

string

The ISO 3166 country code for the shipment buyer

phone

string

The telephone number for the shipment buyer

email

string

The email address for the shipment buyer

mode

string

The current environment, test or production

shipment_post_body_2

Field Name

Type

Required

Description

name

string

No

The shipment recipient's name

company

string

No

The shipment recipient's company name

street1

string

Yes

The street number and name for the shipment recipient

street2

string

No

The additional street address information for the shipment recipient

city

string

Yes

The city name for the shipment recipient

state

string

Yes

The state abbreviation for the shipment recipient

zip

string

Yes

The zip code for the shipment recipient

country

string

Yes

The ISO 3166 country code for the shipment recipient

phone

string

No

The telephone number for the shipment recipient

email

string

No

The email address for the shipment recipient

shipment_post_response_2

Field Name

Type

Description

id

string

The shipment address identifier (ID)

created_at

string

The time and date the shipment address was created

updated_at

string

The time and date the shipment address was updated

name

string

The shipment recipient's name

company

string

The shipment recipient's company name

street1

string

The street number and name for the shipment recipient

street2

string

The additional street address information for the shipment recipient

city

string

The city name for the shipment recipient

state

string

The state abbreviation for the shipment recipient

zip

string

The zip code for the shipment recipient

country

string

The ISO 3166 country code for the shipment recipient

phone

string

The telephone number for the shipment recipient

email

string

The email address for the shipment recipient

mode

string

The current environment, test or production

shipment_patch_body_3

Field Name

Type

Required

Description

rate_id

string

Yes

The rate's identifier (ID)

insurance

string

No

The shipment's insurance

shipment_patch_response_3

Field Name

Type

Description

id

string

The shipment's identifier (ID)

created_at

string

The date and time the shipment was created

updated_at

string

The date and time the shipment record was updated

options

object

All of the options applied to the shipment

status

string

The current status of the shipment

refund_status

string

The current status of the shipment refund process

from_address

shipment_patch_response_3_from_address

The origin address

to_address

shipment_patch_response_3_to_address

The destination address

return_address

shipment_patch_response_3_return_address

The shipper's address. Defaults to from_address.

buyer_address

shipment_patch_response_3_buyer_address

The buyer's address. Defaults to to_address.

usps_zone

number

The USPS zone of the shipment, if purchased with USPS

is_return

boolean

A flag that indicates if it is a return shipment

parcel

object

The dimensions and weight of the package

postage_label

object

The associated PostageLabel object

selected_rate

string

The specific rate purchased for the shipment, or null if not purchased or purchased through another mechanism

rates

array

All associated rate objects

tracking_code

string

The tracking code provided by the carrier

tracker

object

Contains all of the tracking information for the package

insurance

string

The associated insurance amount

fees

array

A list of the charges billed to the user's account

mode

string

The current environment, test or production

shipment_patch_response_3_from_address

Field Name

Type

Description

id

string

The shipment address identifier (ID)

created_at

string

The time and date the shipment address was created

updated_at

string

The time and date the shipment address was updated

name

string

The shipment sender's name

company

string

The shipment sender's company name

street1

string

The street number and name of the shipment sender

street2

string

The additional street address information for the shipment sender

city

string

The city name for the shipment sender

state

string

The state abbreviation for the shipment sender

zip

string

The zip code for the shipment sender

country

string

The ISO 3166 country code for the shipment sender

phone

string

The telephone number for the shipment sender

email

string

The email address for the shipment sender

mode

string

The current environment, test or production

shipment_patch_response_3_to_address

Field Name

Type

Description

id

string

The shipment address identifier (ID)

created_at

string

The time and date the shipment address was created

updated_at

string

The time and date the shipment address was updated

name

string

The shipment recipient's name

company

string

The shipment recipient's company name

street1

string

The street number and name for the shipment recipient

street2

string

The additional street address information for the shipment recipient

city

string

The city name for the shipment recipient

state

string

The state abbreviation for the shipment recipient

zip

string

The zip code for the shipment recipient

country

string

The ISO 3166 country code for the shipment recipient

phone

string

The telephone number for the shipment recipient

email

string

The email address for the shipment recipient

mode

string

The current environment, test or production

shipment_patch_response_3_return_address

Field Name

Type

Description

id

string

The shipment address identifier (ID)

created_at

string

The time and date the shipment address was created

updated_at

string

The time and date the shipment address was updated

name

string

The shipment returner's name

company

string

The shipment returner's company name

street1

string

The street number and name for the shipment returner

street2

string

The additional street address information for the shipment returner

city

string

The city name for the shipment returner

state

string

The state abbreviation for the shipment returner

zip

string

The zip code for the shipment returner

country

string

The ISO 3166 country code for the shipment returner

phone

string

The telephone number for the shipment returner

email

string

The email address for the shipment returner

mode

string

The current environment, test or production

shipment_patch_response_3_buyer_address

Field Name

Type

Description

id

string

The shipment address identifier (ID)

created_at

string

The time and date the shipment address was created

updated_at

string

The time and date the shipment address was updated

name

string

The shipment buyer's name

company

string

The shipment buyer's company name

street1

string

The street number and name for the shipment buyer

street2

string

The additional street address information for the shipment buyer

city

string

The city name for the shipment buyer

state

string

The state abbreviation for the shipment buyer

zip

string

The zip code for the shipment buyer

country

string

The ISO 3166 country code for the shipment buyer

phone

string

The telephone number for the shipment buyer

email

string

The email address for the shipment buyer

mode

string

The current environment, test or production

shipment_get_response_4

Field Name

Type

Description

id

string

The shipment's identifier (ID)

created_at

string

The date and time the shipment was created

updated_at

string

The date and time the shipment record was updated

options

object

All of the options applied to the shipment

status

string

The current status of the shipment

refund_status

string

The current status of the shipment refund process

from_address

shipment_get_response_4_from_address

The origin address

to_address

shipment_get_response_4_to_address

The destination address

return_address

shipment_get_response_4_return_address

The shipper's address. Defaults to from_address.

buyer_address

shipment_get_response_4_buyer_address

The buyer's address. Defaults to to_address.

usps_zone

number

The USPS zone of the shipment, if purchased with USPS

is_return

boolean

A flag that indicates if it is a return shipment

parcel

object

The dimensions and weight of the package

postage_label

object

The associated PostageLabel object

selected_rate

string

The specific rate purchased for the shipment, or null if not purchased or purchased through another mechanism

rates

array

All associated rate objects

tracking_code

string

The tracking code provided by the carrier

tracker

object

Contains all of the tracking information for the package

insurance

string

The associated insurance amount

fees

array

A list of the charges billed to the user's account

mode

string

The current environment, test or production

shipment_get_response_4_from_address

Field Name

Type

Description

id

string

The shipment address identifier (ID)

created_at

string

The time and date the shipment address was created

updated_at

string

The time and date the shipment address was updated

name

string

The shipment sender's name

street1

string

The street number and name of the shipment sender

street2

string

The additional street address information for the shipment sender

city

string

The city name for the shipment sender

state

string

The state abbreviation for the shipment sender

zip

string

The zip code for the shipment sender

country

string

The ISO 3166 country code for the shipment sender

phone

string

The telephone number for the shipment sender

email

string

The email address for the shipment sender

mode

string

The current environment, test or production

shipment_get_response_4_to_address

Field Name

Type

Description

id

string

The shipment address identifier (ID)

created_at

string

The time and date the shipment address was created

updated_at

string

The time and date the shipment address was updated

name

string

The shipment recipient's name

company

string

The shipment recipient's company name

street1

string

The street number and name for the shipment recipient

street2

string

The additional street address information for the shipment recipient

city

string

The city name for the shipment recipient

state

string

The state abbreviation for the shipment recipient

zip

string

The zip code for the shipment recipient

country

string

The ISO 3166 country code for the shipment recipient

phone

string

The telephone number for the shipment recipient

email

string

The email address for the shipment recipient

mode

string

The current environment, test or production

shipment_get_response_4_return_address

Field Name

Type

Description

id

string

The shipment address identifier (ID)

created_at

string

The time and date the shipment address was created

updated_at

string

The time and date the shipment address was updated

name

string

The shipment returner's name

company

string

The shipment returner's company name

street1

string

The street number and name for the shipment returner

street2

string

The additional street address information for the shipment returner

city

string

The city name for the shipment returner

state

string

The state abbreviation for the shipment returner

zip

string

The zip code for the shipment returner

country

string

The ISO 3166 country code for the shipment returner

phone

string

The telephone number for the shipment returner

email

string

The email address for the shipment returner

mode

string

The current environment, test or production

shipment_get_response_4_buyer_address

Field Name

Type

Description

id

string

The shipment address identifier (ID)

created_at

string

The time and date the shipment address was created

updated_at

string

The time and date the shipment address was updated

name

string

The shipment buyer's name

company

string

The shipment buyer's company name

street1

string

The street number and name for the shipment buyer

street2

string

The additional street address information for the shipment buyer

city

string

The city name for the shipment buyer

state

string

The state abbreviation for the shipment buyer

zip

string

The zip code for the shipment buyer

country

string

The ISO 3166 country code for the shipment buyer

phone

string

The telephone number for the shipment buyer

email

string

The email address for the shipment buyer

mode

string

The current environment, test or production

shipment_patch_response_5

Field Name

Type

Description

id

string

The shipment's identifier (ID)

created_at

string

The date and time the shipment was created

updated_at

string

The date and time the shipment record was updated

options

object

All of the options applied to the shipment

status

string

The current status of the shipment

refund_status

string

The current status of the shipment refund process

from_address

shipment_patch_response_5_from_address

The origin address

to_address

shipment_patch_response_5_to_address

The destination address

return_address

shipment_patch_response_5_return_address

The shipper's address. Defaults to from_address.

buyer_address

shipment_patch_response_5_buyer_address

The buyer's address. Defaults to to_address.

usps_zone

number

The USPS zone of the shipment, if purchased with USPS

is_return

boolean

A flag that indicates if it is a return shipment

parcel

object

The dimensions and weight of the package

postage_label

object

The associated PostageLabel object

selected_rate

string

The specific rate purchased for the shipment, or null if not purchased or purchased through another mechanism

rates

array

All associated rate objects

tracking_code

string

The tracking code provided by the carrier

tracker

object

Contains all of the tracking information for the package

insurance

string

The associated insurance amount

fees

array

A list of the charges billed to the user's account

mode

string

The current environment, test or production

shipment_patch_response_5_from_address

Field Name

Type

Description

id

string

The shipment address identifier (ID)

created_at

string

The time and date the shipment address was created

updated_at

string

The time and date the shipment address was updated

name

string

The shipment sender's name

company

string

The shipment sender's company name

street1

string

The street number and name of the shipment sender

street2

string

The additional street address information for the shipment sender

city

string

The city name for the shipment sender

state

string

The state abbreviation for the shipment sender

zip

string

The zip code for the shipment sender

country

string

The ISO 3166 country code for the shipment sender

phone

string

The telephone number for the shipment sender

email

string

The email address for the shipment sender

mode

string

The current environment, test or production

shipment_patch_response_5_to_address

Field Name

Type

Description

id

string

The shipment address identifier (ID)

created_at

string

The time and date the shipment address was created

updated_at

string

The time and date the shipment address was updated

name

string

The shipment recipient's name

company

string

The shipment recipient's company name

street1

string

The street number and name for the shipment recipient

street2

string

The additional street address information for the shipment recipient

city

string

The city name for the shipment recipient

state

string

The state abbreviation for the shipment recipient

zip

string

The zip code for the shipment recipient

country

string

The ISO 3166 country code for the shipment recipient

phone

string

The telephone number for the shipment recipient

email

string

The email address for the shipment recipient

mode

string

The current environment, test or production

shipment_patch_response_5_return_address

Field Name

Type

Description

id

string

The shipment address identifier (ID)

created_at

string

The time and date the shipment address was created

updated_at

string

The time and date the shipment address was updated

name

string

The shipment returner's name

company

string

The shipment returner's company name

street1

string

The street number and name for the shipment returner

street2

string

The additional street address information for the shipment returner

city

string

The city name for the shipment returner

state

string

The state abbreviation for the shipment returner

zip

string

The zip code for the shipment returner

country

string

The ISO 3166 country code for the shipment returner

phone

string

The telephone number for the shipment returner

email

string

The email address for the shipment returner

mode

string

The current environment, test or production

shipment_patch_response_5_buyer_address

Field Name

Type

Description

id

string

The shipment address identifier (ID)

created_at

string

The time and date the shipment address was created

updated_at

string

The time and date the shipment address was updated

name

string

The shipment buyer's name

company

string

The shipment buyer's company name

street1

string

The street number and name for the shipment buyer

street2

string

The additional street address information for the shipment buyer

city

string

The city name for the shipment buyer

state

string

The state abbreviation for the shipment buyer

zip

string

The zip code for the shipment buyer

country

string

The ISO 3166 country code for the shipment buyer

phone

string

The telephone number for the shipment buyer

email

string

The email address for the shipment buyer

mode

string

The current environment, test or production

Sample Code

Create a Shipment

Sample Request Body with Address Identifiers (IDs)

{
    "to_address_id": "adr_4b9b22e19c1311efa2a3ac1f6bc53342", // required
    "from_address_id": "adr_2a5d32ab9c1311efa57d3cecef1b359e", // required
    "parcel": {
        "length": 20.2, // required
        "width": 10.9, // required
        "height": 5, // required
        "weight": 65.9 // required
    }, // the parcel field is required
    "invoice_number": "672acf7cde645549c56fb596", // required, Order Id in POS
    "delivery_confirmation": "ADULT_SIGNATURE", // optional
    "is_fragile": true, // optional
    "comment": "Take care with the goods" // optional
}

Sample Request Body with Completed Addresses

{
    "to_address": {
        "name": "John Smith",
        "street1": "123 Main St",
        "city": "Redondo Beach",
        "state": "CA",
        "zip": "90277",
        "country": "US",
        "phone": "8575555756",
        "email": "john.smith@email.com"
    }, // the "to_address" is required
    "from_address": {
        "name": "ABC Company",
        "street1": "123 1st Street",
        "street2": "5th Floor",
        "city": "San Francisco",
        "state": "CA",
        "zip": "94104",
	"country": "US",
        "phone": "4155554445",
        "email": "support@email.com"
    }, // the "from_address" is required
    "parcel": {
        "length": 20.2,
        "width": 10.9,
        "height": 5,
        "weight": 65.9
    }, // required
    "invoice_number": "672acf7cde645549c56fb596", // required, Order Id in POS
    "delivery_confirmation": "ADULT_SIGNATURE", // optional
    "is_fragile": true, // optional
    "comment": "Take care with the goods", // optional
    "is_return": true  // optional, if try to create return for a shipment, 
please add "is_return": "true" 
}

Sample Response Body

{
    "id": "shp_f63ace3d7e1f48beb3bfc78a55132f97",
    "created_at": "2024-11-06T08:53:37Z",
    "is_return": false,
    "messages": [],
    "mode": "test",
    "options": {
        "invoice_number": "672acf7cde645549c56fb596",
        "delivery_confirmation": "ADULT_SIGNATURE",
        "print_custom_1": "Fragile",
        "currency": "USD",
        "print_custom": [
            {
                "value": "Fragile"
            }
        ],
        "payment": {
            "type": "SENDER"
        },
	"date_advance": 0
    },
    "reference": null,
    "status": "unknown",
    "tracking_code": null,
    "updated_at": "2024-11-06T08:53:37Z",
    "batch_id": null,
    "batch_status": null,
    "batch_message": null,
    "customs_info": null,
    "from_address": {
        "id": "adr_2a5d32ab9c1311efa57d3cecef1b359e",
        "object": "Address",
        "created_at": "2024-11-06T07:46:00+00:00",
        "updated_at": "2024-11-06T07:46:00+00:00",
        "name": "ABC COMPANY",
        "company": null,
	"street1": "123 1ST ST # 5",
        "street2": null,
        "city": "SAN FRANCISCO",
        "state": "CA",
        "zip": "94104-1129",
        "country": "US",
        "phone": "4155554445",
        "email": "SUPPORT@EMAIL.COM",
        "mode": "test",
        "carrier_facility": null,
        "residential": false,
        "federal_tax_id": null,
        "state_tax_id": null,
        "verifications": {
            "zip4": {
                "success": true,
		"errors": [],
                "details": null
            },
            "delivery": {
                "success": true,
                "errors": [],
                "details": {
                    "latitude": 37.79342,
                    "longitude": -122.40288,
                    "time_zone": "America/Los_Angeles"
                }
            }
        }
    },
    "insurance": null,
    "order_id": null,
    "parcel": {
        "id": "prcl_2c54b14009eb4890b66c6a8a7206778d",
        "object": "Parcel",
        "created_at": "2024-11-06T08:53:37Z",
        "updated_at": "2024-11-06T08:53:37Z",
	"length": 20.2,
        "width": 10.9,
        "height": 5.0,
        "predefined_package": null,
        "weight": 65.9,
        "mode": "test"
    },
    "postage_label": null,
    "rates": [
        {
            "id": "rate_bea35bae39924682bf451b04e2a96c1c",
            "object": "Rate",
            "created_at": "2024-11-06T08:53:37Z",
            "updated_at": "2024-11-06T08:53:37Z",
            "mode": "test",
            "service": "Express",
            "carrier": "USPS",
	    "rate": "60.45",
            "currency": "USD",
            "retail_rate": "68.75",
            "retail_currency": "USD",
            "list_rate": "60.45",
            "list_currency": "USD",
            "billing_type": "easypost",
            "delivery_days": 1,
            "delivery_date": null,
            "delivery_date_guaranteed": false,
            "est_delivery_days": 1,
            "shipment_id": "shp_f63ace3d7e1f48beb3bfc78a55132f97",
            "carrier_account_id": "ca_6d792591ca07448ba461521db68cff62"
        },
        {
            "id": "rate_87bba9efbd014b5ab8e7f7847f98c66e",
            "object": "Rate",
	    "created_at": "2024-11-06T08:53:37Z",
            "updated_at": "2024-11-06T08:53:37Z",
            "mode": "test",
            "service": "Priority",
            "carrier": "USPS",
            "rate": "19.96",
            "currency": "USD",
            "retail_rate": "25.10",
            "retail_currency": "USD",
            "list_rate": "20.69",
            "list_currency": "USD",
            "billing_type": "easypost",
            "delivery_days": 2,
            "delivery_date": null,
            "delivery_date_guaranteed": false,
            "est_delivery_days": 2,
            "shipment_id": "shp_f63ace3d7e1f48beb3bfc78a55132f97",
            "carrier_account_id": "ca_6d792591ca07448ba461521db68cff62"
        },
        {
            "id": "rate_7b85005ab1f74ba5bcafba1674085899",
	     "object": "Rate",
            "created_at": "2024-11-06T08:53:37Z",
            "updated_at": "2024-11-06T08:53:37Z",
            "mode": "test",
            "service": "GroundAdvantage",
            "carrier": "USPS",
            "rate": "17.49",
            "currency": "USD",
            "retail_rate": "23.05",
            "retail_currency": "USD",
            "list_rate": "19.21",
            "list_currency": "USD",
            "billing_type": "easypost",
            "delivery_days": 3,
            "delivery_date": null,
            "delivery_date_guaranteed": false,
            "est_delivery_days": 3,
            "shipment_id": "shp_f63ace3d7e1f48beb3bfc78a55132f97",
            "carrier_account_id": "ca_6d792591ca07448ba461521db68cff62"
        }
    ],
    "refund_status": null,
    "scan_form": null,
    "selected_rate": null,
    "tracker": null,
    "to_address": {
        "id": "adr_4b9b22e19c1311efa2a3ac1f6bc53342",
        "object": "Address",
        "created_at": "2024-11-06T07:46:55+00:00",
        "updated_at": "2024-11-06T07:46:55+00:00",
        "name": "JOHN SMITH",
        "company": null,
        "street1": "123 MAIN ST",
        "street2": null,
        "city": "REDONDO BEACH",
        "state": "CA",
        "zip": "90277-2506",
        "country": "US",
        "phone": "8575555756",
        "email": "JOHN.SMITH@EMAIL.COM",
        "mode": "test",
	"carrier_facility": null,
        "residential": false,
        "federal_tax_id": null,
        "state_tax_id": null,
        "verifications": {
            "zip4": {
                "success": true,
                "errors": [],
                "details": null
            },
            "delivery": {
                "success": true,
                "errors": [],
                "details": {
                    "latitude": 33.8436,
                    "longitude": -118.39177,
                    "time_zone": "America/Los_Angeles"
                }
            }
        }
    },
    "usps_zone": 4,
    "return_address": {
        "id": "adr_2a5d32ab9c1311efa57d3cecef1b359e",
        "object": "Address",
        "created_at": "2024-11-06T07:46:00+00:00",
        "updated_at": "2024-11-06T07:46:00+00:00",
        "name": "ABC COMPANY",
        "company": null,
        "street1": "123 1ST ST # 5",
        "street2": null,
        "city": "SAN FRANCISCO",
        "state": "CA",
        "zip": "94104-1129",
        "country": "US",
        "phone": "4155554445",
        "email": "SUPPORT@EMAIL.COM",
        "mode": "test",
        "carrier_facility": null,
        "residential": false,
        "federal_tax_id": null,
        "state_tax_id": null,
	"verifications": {
            "zip4": {
                "success": true,
                "errors": [],
                "details": null
            },
            "delivery": {
                "success": true,
                "errors": [],
                "details": {
                    "latitude": 37.79342,
                    "longitude": -122.40288,
                    "time_zone": "America/Los_Angeles"
                }
            }
        }
    },
    "buyer_address": {
        "id": "adr_4b9b22e19c1311efa2a3ac1f6bc53342",
        "object": "Address",
        "created_at": "2024-11-06T07:46:55+00:00",
	"updated_at": "2024-11-06T07:46:55+00:00",
        "name": "JOHN SMITH",
        "company": null,
        "street1": "123 MAIN ST",
        "street2": null,
        "city": "REDONDO BEACH",
        "state": "CA",
        "zip": "90277-2506",
        "country": "US",
        "phone": "8575555756",
        "email": "JOHN.SMITH@EMAIL.COM",
        "mode": "test",
        "carrier_facility": null,
        "residential": false,
        "federal_tax_id": null,
        "state_tax_id": null,
        "verifications": {
            "zip4": {
                "success": true,
                "errors": [],
                "details": null
	    },
            "delivery": {
                "success": true,
                "errors": [],
                "details": {
                    "latitude": 33.8436,
                    "longitude": -118.39177,
                    "time_zone": "America/Los_Angeles"
                }
            }
        }
    },
    "forms": [],
    "fees": [],
    "object": "Shipment"
}

Create a Shipment Address

Sample Request Body

{
        "name": "John Smith", // optional
        "company": "ABC Company", // optional
        "street1": "123 Main Street", // required
        "street2": "5th Floor", // optional
        "city": "San Francisco", // required
        "state": "CA", // required
        "zip": "94104", // required
        "country": "US", // required
        "phone": "4155554445", // optional
        "email": "support@email.com" // optional
}

Sample Response Body

{   
    "id": "adr_220bdc9e9c1911efbcc13cecef1b359e",
    "name": "John Smith",
    "company": "ABC Company",
    "street1": "123 Main Street",
    "street2": "5th Floor",
    "city": "San Francisco",
    "state": "CA",
    "zip": "94104",
    "country": "US",
    "phone": "4155554445",
    "mode": "test",
    "email": "support@email.com",
    "created_at": "2024-11-06T08:28:43+00:00",
    "updated_at": "2024-11-06T08:28:43+00:00"

}