These docs are for v1.0. Click to read the latest docs for v2024.09.

Discussions

Ask a Question
Back to All

Cant create shipment/labels

Im getting 202 status when creating shipment. I dont know whats wrong
Here is the request:

curl --request POST \
     --url https://api.easyship.com/2023-01/shipments \
     --header 'accept: application/json' \
     --header 'authorization: Bearer sand_J5npdkxmky4nI1QaBBxBqkP6rmx2/keamYsjtCY6Gg4=' \
     --header 'content-type: application/json' \
     --data '
{
  "origin_address": {
    "line_1": "12540 SW Leveton Dr.,# H0476",
    "line_2": "Block 3",
    "state": "OG",
    "city": "Tualatin ",
    "postal_code": "97062",
    "country_alpha2": "US",
    "contact_name": "Timothy Baloukjy",
    "company_name": "Test Plc.",
    "contact_phone": "+852-3008-5678",
    "contact_email": "[email protected]"
  },
  "destination_address": {
    "line_1": "4409 SE 24th Ave Unit 2635​",
    "state": "OG",
    "city": "Portland",
    "postal_code": "97202",
    "country_alpha2": "US",
    "contact_name": "Max Cashman",
    "company_name": "Test Plc.",
    "contact_phone": "+852-3008-5678",
    "contact_email": "[email protected]"
  },
  "incoterms": "DDP",
  "insurance": {
    "is_insured": true,
    "insured_amount": 100,
    "insured_currency": "USD"
  },
  "courier_selection": {
    "allow_courier_fallback": true,
    "apply_shipping_rules": true,
    "selected_courier_id": "099093f7-c54f-4772-a054-8df6e5ea0eeb",
    "list_unavailable_couriers": true
  },
  "shipping_settings": {
    "additional_services": {
      "qr_code": "none"
    },
    "units": {
      "weight": "kg",
      "dimensions": "cm"
    },
    "buy_label": true,
    "buy_label_synchronous": true,
    "printing_options": {
      "format": "png",
      "label": "4x6",
      "commercial_invoice": "A4",
      "packing_slip": "4x6"
    }
  },
  "parcels": [
    {
      "total_actual_weight": 10,
      "box": {
        "length": 5,
        "width": 5,
        "height": 10
      },
      "items": [
        {
          "dimensions": {
            "length": 1,
            "width": 2,
            "height": 3
          },
          "description": "item",
          "category": null,
          "hs_code": "8471.30",
          "origin_country_alpha2": "US",
          "quantity": 1,
          "declared_currency": "USD",
          "declared_customs_value": 99
        }
      ]
    }
  ]
}
'

here is the response:

{
  "shipment": {
    "easyship_shipment_id": "ESUS10130308",
    "consignee_tax_id": null,
    "courier": null,
    "created_at": "2023-08-11T16:33:37Z",
    "currency": "USD",
    "delivery_state": "not_created",
    "destination_address": {
      "city": "Portland",
      "company_name": "Test Plc.",
      "contact_email": "[email protected]",
      "contact_name": "Max Cashman",
      "contact_phone": "+85230085678",
      "country_alpha2": "US",
      "line_1": "4409 SE 24th Ave Unit 2635​",
      "line_2": null,
      "postal_code": "97202",
      "state": "OG"
    },
    "eei_reference": null,
    "incoterms": null,
    "insurance": {
      "is_insured": true,
      "insured_amount": 0,
      "insured_currency": "USD"
    },
    "label_generated_at": null,
    "label_paid_at": null,
    "label_state": "not_created",
    "last_failure_http_response_messages": [],
    "metadata": {},
    "order_created_at": null,
    "order_data": {
      "platform_name": null,
      "platform_order_number": null,
      "order_tag_list": [],
      "seller_notes": null,
      "buyer_notes": null
    },
    "origin_address": {
      "city": "Tualatin ",
      "company_name": "Test Plc.",
      "contact_email": "[email protected]",
      "contact_name": "Timothy Baloukjy",
      "contact_phone": "+852-3008-5678",
      "country_alpha2": "US",
      "line_1": "12540 SW Leveton Dr.,# H0476",
      "line_2": "Block 3",
      "postal_code": "97062",
      "state": "OG"
    },
    "parcels": [
      {
        "box": {
          "id": null,
          "name": null,
          "outer_dimensions": {
            "length": 5,
            "width": 5,
            "height": 10
          },
          "slug": null,
          "type": "box",
          "weight": 0
        },
        "items": [
          {
            "actual_weight": 0,
            "category": null,
            "contains_battery_pi966": null,
            "contains_battery_pi967": null,
            "contains_liquids": null,
            "declared_currency": "USD",
            "declared_customs_value": 99,
            "description": "item",
            "dimensions": {
              "length": 1,
              "width": 2,
              "height": 3
            },
            "hs_code": "84713000",
            "origin_country_alpha2": "US",
            "origin_currency": "USD",
            "origin_customs_value": 99,
            "quantity": 1,
            "sku": null
          }
        ],
        "total_actual_weight": 10
      }
    ],
    "pickup_state": "not_requested",
    "rates": [],
    "regulatory_identifiers": {
      "eori": null,
      "ioss": null,
      "vat_number": null
    },
    "return": false,
    "return_address": {
      "city": "Tualatin ",
      "company_name": "Test Plc.",
      "contact_email": "[email protected]",
      "contact_name": "Timothy Baloukjy",
      "contact_phone": "+852-3008-5678",
      "country_alpha2": "US",
      "line_1": "12540 SW Leveton Dr.,# H0476",
      "line_2": "Block 3",
      "postal_code": "97062",
      "state": "OG"
    },
    "sender_address": {
      "city": "Tualatin ",
      "company_name": "Test Plc.",
      "contact_email": "[email protected]",
      "contact_name": "Timothy Baloukjy",
      "contact_phone": "+852-3008-5678",
      "country_alpha2": "US",
      "line_1": "12540 SW Leveton Dr.,# H0476",
      "line_2": "Block 3",
      "postal_code": "97062",
      "state": "OG"
    },
    "set_as_residential": false,
    "shipment_state": "created",
    "shipping_documents": [],
    "tracking_page_url": "https://www.trackmyshipment.co/shipment-tracking/ESUS10130308",
    "trackings": [],
    "updated_at": "2023-08-11T16:33:38Z",
    "warehouse_state": "none"
  },
  "meta": {
    "status": "partial_success",
    "errors": [
      "No shipping solutions available based on the information provided"
    ],
    "unavailable_couriers": []
  }
}

"delivery_state": "not_created",

"label_state": "not_created",

"errors": [
"No shipping solutions available based on the information provided"
],

How do I fix this?