cj logo

Create Shipment

https://os.clearjet.com/version-test/api/1.1/wf/shipmentfusce donec et.

Copied!
copy

This HTTP POST request is used to create a shipment and generate a Final Mile Carrier label. The request body should contain shipment details such as addresses, items, instructions, pickup time, service name, and label format. pellentesque eget.

Request Body

Authorization

Token   <token>

Body

raw (json)
json
Copied!
copy
{
    "shipment": {
        "to_address": {
            "name": "John Doe",
            "street1": "7000 Coliseum Way",
            "street2": "",
            "city": "Oakland",
            "state": "CA",
            "zip": "94621",
            "country": "US",
            "phone": "5555551234",
            "email": "example@email.com"
        },
        "from_address": {
            "name": "Shipping Company Name",
            "street1": "1253 W 66th St",
            "street2": "",
            "city": "Los Angeles",
            "state": "CA",
            "zip": "90044",
            "country": "US",
            "phone": "5555551234",
            "email": "example@email.com"
        },
        "item": {
            "piece_count": 1,
            "package_weight": 30,
            "weight_unit": "kg",
            "length": 5,
            "width": 5,
            "height": 5,
            "description": "Clothing"
        }
    },
    "instructions": "Leave at front door",
    "airport_code": "AUS",
    "pickup_at": "2024-03-30T17:30:30Z",
    "service_name": "ClearJet Express",
    "label_format": "PDF",
    "Reference1": "Reference1",
    "Reference2": "Reference2",
    "Reference3": "Reference3",
    "Reference4": "Reference4"
}

Example Request

curl
Copied!
copy
curl --location 'https://os.clearjet.com/version-test/api/1.1/wf/shipment' \
--data-raw '{
    "shipment": {
        "to_address": {
            "name": "John Doe",
            "street1": "7000 Coliseum Way",
            "street2": "",
            "city": "Oakland",
            "state": "CA",
            "zip": "94621",
            "country": "US",
            "phone": "5555551234",
            "email": "example@email.com"
        },
        "from_address": {
            "name": "Shipping Company Name",
            "street1": "1253 W 66th St",
            "street2": "",
            "city": "Los Angeles",
            "state": "CA",
            "zip": "90044",
            "country": "US",
            "phone": "5555551234",
            "email": "example@email.com"
        },
        "item": {
            "piece_count": 1,
            "package_weight": 30,
            "weight_unit": "lb",
            "length": 5,
            "width": 5,
            "height": 5,
            "description": "Clothing"
        }
    },
    "instructions": "Leave at front door",
    "pickup_at": "2024-03-30T17:30:30Z",
    "service_name": "ClearJet Express",
    "label_format": "ZPL",
    "Reference1": "Optional Text",
    "Reference2": "Optional Text",
    "Reference3": "Optional Text",
    "Reference4": "Optional Text"
}'

Example Response

json
Copied!
copy
{
  "tracking_id": "CJ70442703",
  "tracking_url": "https://cleartrk.com/version-test?tracking_id=CJ70442703",
  "tracking_code": "EZ01BCC3S00000417590",
  "rate": {
    "carrier": "ClearJet",
    "service": "ClearJet Express",
    "amount": "13.37"
  },
  "shipping_label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20240809/e8660edd9d00cf40ccb94c7c439cddeb8c.zpl",
  "shipping_label_base64": "XlhBXkxSTl5QT0leQ0kyOF5GTzYyMCwxMF5BVU4sMTAwLDgwXkZER0xTXkZTXkZPNjIwLDEyMF5HQjE4MCwsMTAwXkZTXkZPNjIwLDExMF5BVU4sMTAwLDgwXkZSXkZEQ1BTXkZTXkZPNjIwLDIzMF5BVU4sNDUsMjBeRkRTMTA1NTJCIF5GU15GTzI0MCwxMjBeQTBOLDMwLDMwXkZEMTEzODU5XkZTXkZPMzAsMzBeQTBOLDE4LDE4XkZEQ09MRFdBVEVSIENSRUVLXkZTXkZPMzAsNTBeQTBOLDE4LDE4XkZEV09STEQgV0FZXkZTXkZPMzAsNzBeQTBOLDE4LDE4XkZEMV5GU15GTzMwLDkwXkEwTiwxOCwxOF5GRExPUyBBTkdFTEVTIENBIDkwMDQ1XkZTXkZPMzAsMTIwXkFQTiwzMCwyNV5GRFNISVAgVE9eRlNeRk8zNSwxNjVeQTBOLDIyLDIyXkZESk9ITiBET0VeRlNeRk8zNSwyMDBeQTBOLDIyLDIyXkZEXkZTXkZPMzUsMjM1XkEwTiwyMiwyMl5GRDcwMDAgQ09MSVNFVU0gV0FZXkZTXkZPMzUsMjY1XkEwTiwyMiwyMl5GRF5GU15GTzM1LDMwMF5BME4sNTAsNDVeRkRPQUtMQU5EIENBIDk0NjIxXkZTIF5GTzIwLDM1MF5HQjgwMCwwL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ection

keep-alive

x-powered-by

Express

access-control-allow-origin

*

x-bubble-perf

{"total":2256.4,"percents":{"top":{"bubble_cpu":19.1,"block":81.1,"capacity_rl":0,"other_pause":0,"pre_fiber":0},"sub":{"pp_userdb":2.8,"pp_wait_userdb":0,"http_request":70.5,"serverjson":6.6,"appserver_cache_misses_time":0,"redis":17,"fiber_queue":0.2,"capacity_wait":0}},"counts":{"pp_userdb":24,"http_request":4,"derived_build":0,"derived_cache_attempts":3,"derived_cache_memory_misses":3,"serverjson":174,"appserver_cache_attempts":3,"appserver_mem_cache_hits":0,"appserver_cache_hits":3,"appserver_cache_misses":0,"redis":211,"fiber_queue":243,"blocks":242},"misc":{"userdb_results":35,"userdb_data":19420,"spent_time":85595353}}

x-bubble-capacity-used

1.317 unit-seconds used

x-bubble-capacity-limit

0 ms slower

vary

Accept-Encoding

Content-Encoding

gzip

CF-Cache-Status

DYNAMIC

Server

cloudflare

CF-RAY

8b0826007c21c98c-IAD

alt-svc

h3=":443"; ma=86400