Create Shipment from Rate Quote

Create Shipment from Rate Quote

POST/v1/open-api/label
LabelRequiredDescription
Api-KeyApi Key, please log in to the system and find it in My Profile
Api-SecretApi Secret, please log in to the system and find it in My Profile

Entity Types

The address recognition API is currently designed to recognize the following types of entities:

ParameterTypeRequiredDescription
rate_id[string]Service unique id.
custom_order_num[string]
shipment[object]
﹂service_code[string]Indicate the carrier service type used for this shipment.Click here to see Service Types
Example:ups_ground
﹂ship_from[object]-
﹂﹂uuid[array]Address unique id.If you want to improve the accuracy of the ship from address, you can choose to send only uuid.
Click to see how to get uuid.
Example:22d953b7-24c4-4ae9-afb4-111cc227b01e
﹂﹂postal_code[string]Format [xxxxx] or [xxxxx-xxxx]
Example:90045-6275
﹂﹂country_code[string]This is the two-letter country code.
Example:US
﹂﹂state_province_code[string]This is the two-letter state code.
Example:CA
﹂﹂is_residential[boolean]Indicate whether this address is residential (as opposed to commercial).
Example:false
﹂﹂addresses[array]This is the combination of number, street name, etc. Maximum length per line is 35.Note:At least one line is required.
Example:5353 W ImperialHay unit 900
﹂﹂city[string]City Name.
Example:LOS ANGELES
﹂﹂name[string]Specify the shipper name.Maximum length is 35 characters.
Example:Amazon
﹂﹂phone[string]Specify the shipper phone number. At least 10 digits.
Example:1000000000
﹂﹂attention[string]Note.Maximum length is 35 characters.
Example:Ann
﹂ship_to[object]-
﹂﹂addresses[array]This is the combination of number, street name, etc. Maximum length per line is 35.Note:At least one line is required.
Example:5353 W ImperialHay unit 900
﹂﹂city[string]City Name.
Example: PENFIELD
﹂﹂state_province_code[string]This is the two-letter state code.
Example:NY
﹂﹂postal_code[string]Format :[xxxxx] or [xxxxx-xxxx]
Example:14526
﹂﹂country_code[string]This is the two-letter country code.
Example:US
﹂﹂name[string]Specify the recipient name.Maximum length is 35 characters.
Example:Ann
﹂﹂phone[string]Specify the recipient phone number. At least 10 digits.
Example:(999)-999-9999
﹂﹂phone.ext[string]Maximum length is 4 characters.
Example:1234
﹂﹂is_residential[boolean]Indicate whether this address is residential (as opposed to commercial)
Example:false
﹂﹂attention[string]Note.Maximum length is 35 characters.
Example:Ann
﹂packages[array]
﹂﹂dimension[object]Indicate the dimensions of the package.
Note: The maximum/minimum dimension values varies based on the services and the packaging types.
﹂﹂﹂width[number]Indicate the width of the package.
This value allows 2 explicit decimal position.
Example:20.01
﹂﹂﹂height[number]Indicate the height of the package.
This value allows 2 explicit decimal position.
Example:20.01
﹂﹂﹂length[number]Indicate the length of the package.
This value allows 2 explicit decimal position.
Example:20.01
﹂﹂﹂code[string]Indicate the Unit of measure for the provided dimensions.
Valid Values are:in/cm
Example:in
﹂﹂weight[object]Indicate the weight of the package.
﹂﹂﹂code[string]This is the package weight unit.
Valid Values are:lb/oz/g/kg
Example:lb
﹂﹂﹂value[number]This value allows 2 explicit decimal position.
Example:68.25
﹂﹂insurance[object]Indicate the insurance
﹂﹂﹂code[string]This is the currency code for the amount.
Example:USD
﹂﹂﹂value[number]This value allows 2 explicit decimal position.
Example:300.01
﹂﹂confirmation[string]Indicate the Signature Type.Click here to see the confirmation supported by the service provider.
Example:Adult
﹂﹂quantity[number]Package quantity
Example:1
﹂﹂reference_numbers[array]Reference information
﹂﹂﹂code[string]This is a customer reference type. Click here to see the reference type supported by the service provider.
Example:INVOICE
﹂﹂﹂value[object]Maximum length for all customer references is 40 characters.
Example:P84746-KMD
﹂package_type[object]Specify the packaging used.Click here to see Package Types.
﹂﹂type[string]Example:common
﹂﹂name[string]Example:Package
﹂pickup_date[string]This is the shipment date. Format :[yyyymmdd]
Example:20221001
curl -X POST  \
  'https://api.sandbox.shipber.com/v1/open-api/label' \
  -H 'Content-Type:application/json' \
  -H 'Api-Key:2cn1wgmfidytin3jef3b' \
  -H 'Api-Secret:qRBYybjRch7BdTxO5NTyGUd6mBvowNbsjahnAnpdI-BXc5sCrRt15XGr-hc9oY7C' \
  -d '{
    "rate_id": "eyJjaGFpbklkIjo0MTksInNlcnZpY2VDb2RlIjoiZmVkZXhfZ3JvdW5kIiwicGFja2FnZVR5cGUiOiJQYWNrYWdlIn0",
    "custom_order_num": "cimy-977885",
    "shipment": {
        "ship_from": {
            "uuid": "7b572b8d-08a3-4cc7-a711-1aae28e9ffcf"
        },
        "ship_to": {
            "city": "Los Angeles",
            "name": "Test Company",
            "addresses": [
                "5353 W Imperial Hwy Unit 900"
            ],
            "postal_code": "90045",
            "country_code": "US",
            "state_province_code": "CA",
            "phone": "0123456789"
        },
        "packages": [
            {
                "dimension": {
                    "width": 7,
                    "height": 13,
                    "length": 4,
                    "code": "IN"
                },
                "weight": {
                    "code": "lb",
                    "value": 6
                },
                "confirmation": "None",
                "quantity": 1,
                "reference_numbers": [
                    {
                        "code": "reference #1",
                        "value": "1"
                    }
                ]
            }
        ],
        "package_type": {
            "type": "common",
            "name": "Package"
        },
        "pickup_date": "20211010"
    }
}'
{
    "data": {
        "status": "Printing",
        "order_num": "ST161853120081597000",
        "shipment": {
            "ship_from": {
                "city": "Los Angeles",
                "name": "Test Company",
                "email": "[email protected]",
                "addresses": ["5353 W Imperial Hwy Unit 900"],
                "postal_code": "90045",
                "country_code": "US",
                "is_residential": true,
                "state_province_code": "CA",
                "attention": "",
                "phone": "0123456789"
            },
            "ship_to": {
                "country_code": "US",
                "phone": "8888888888",
                "name": "Test Company",
                "addresses": ["3326 HEMLOCK WAY"],
                "city": "WINNABOW ",
                "state_province_code": "NC",
                "postal_code": "28479",
                "attention": ""
            },
            "packages": [{
                "dimension": {
                    "width": 7,
                    "height": 13,
                    "length": 4,
                    "code": "IN"
                },
                "weight": {
                    "code": "LBS",
                    "value": 6
                },
                "confirmation": "Delivery",
                "insurance": {
                    "code": "USD",
                    "value": 20
                },
                "quantity": 1
            }],
            "package_type": {
                "type": "common",
                "name": "Package"
            },
            "pickup_date": "20210416",
            "service_code": "fedex_ground"
        },
        "created_at": "2021-04-16T04:30:28.632Z",
        "custom_order_num": "cimy-15913"
    }
}

Create Return Label with Outgoing Label

You can create return labels by setting is_return_label to true.

curl -X POST  \
  'https://api.sandbox.shipber.com/v1/open-api/label' \
  -H 'Content-Type:application/json' \
  -H 'Api-Key:2cn1wgmfidytin3jef3b' \
  -H 'Api-Secret:qRBYybjRch7BdTxO5NTyGUd6mBvowNbsjahnAnpdI-BXc5sCrRt15XGr-hc9oY7C' \
  -d '{
    "is_return_label":true,
    "rma_number": "123",
    "rma_reason": "Other",
    "rate_id": "eyJjaGFpbklkIjo0MTksInNlcnZpY2VDb2RlIjoiZmVkZXhfZ3JvdW5kIiwicGFja2FnZVR5cGUiOiJQYWNrYWdlIn0",
    "custom_order_num": "cimy-977885",
    "shipment": {
        "ship_from": {
            "city": "Los Angeles",
            "name": "Test Company",
            "addresses": [
                "5353 W Imperial Hwy Unit 900"
            ],
            "postal_code": "90045",
            "country_code": "US",
            "state_province_code": "CA",
            "phone": "0123456789"
        },
        "ship_to": {
            "uuid": "7b572b8d-08a3-4cc7-a711-1aae28e9ffcf"
        },
        "packages": [
            {
                "dimension": {
                    "width": 7,
                    "height": 13,
                    "length": 4,
                    "code": "IN"
                },
                "weight": {
                    "code": "lb",
                    "value": 6
                },
                "confirmation": "None",
                "quantity": 1,
                "reference_numbers": [
                    {
                        "code": "reference #1",
                        "value": "1"
                    }
                ]
            }
        ],
        "package_type": {
            "type": "common",
            "name": "Package"
        },
        "pickup_date": "20211010"
    }
}'
{
    "data": {
        "status": "Printing",
        "order_num": "ST161853120081597000",
        "shipment": {
            "ship_from": {
                "country_code": "US",
                "phone": "8888888888",
                "name": "Test Company",
                "addresses": ["3326 HEMLOCK WAY"],
                "city": "WINNABOW ",
                "state_province_code": "NC",
                "postal_code": "28479",
                "attention": ""
            },
            "ship_to": {
                "city": "Los Angeles",
                "name": "Test Company",
                "email": "[email protected]",
                "addresses": ["5353 W Imperial Hwy Unit 900"],
                "postal_code": "90045",
                "country_code": "US",
                "is_residential": true,
                "state_province_code": "CA",
                "attention": "",
                "phone": "0123456789"
            },
            "packages": [{
                "dimension": {
                    "width": 7,
                    "height": 13,
                    "length": 4,
                    "code": "IN"
                },
                "weight": {
                    "code": "LBS",
                    "value": 6
                },
                "confirmation": "Delivery",
                "insurance": {
                    "code": "USD",
                    "value": 20
                },
                "quantity": 1
            }],
            "package_type": {
                "type": "common",
                "name": "Package"
            },
            "pickup_date": "20210416",
            "service_code": "fedex_ground"
        },
        "created_at": "2021-04-16T04:30:28.632Z",
        "custom_order_num": "cimy-15913"
    }
}