Spring Global (Spring Omni) Error: The property phone_number is required

Error in the response:

The property phone_number is required while registering the shipment.

Solution:

This error is occurring when recipient’s phone_number parameter is not sent in the Shipment API https://api.myparcel.com/shipments

According to the Spring Omni documentation, phone_number is an optional parameter:

Spring Omni documentation

We raised ticket on Spring Omni and they replied: The shipment is failing to be created due to recipient phone number not being populated. Although, the schema shows this as optional but Spring require the phone number so the carriers can send notifications to the recipient (if they offer that service…)
So phone_number is a required parameter and need to be sent in shipment API.

For more Related Blogs, Please visit here:

Spring Global (Spring Omni) Error: Shipment is not being Registered

Spring Omni Manifest

Spring Global (Spring Omni): Billing Concept

Spring Global (Spring Omni) Error: Resource Not Found

Spring Global (Spring Omni) Error: Getting Blank Response While Fetching Label

Spring Global (Spring Omni) Error: Resource Not Found

While creating a shipment using Spring Omni, you might get an error in response such as mentioned below:

[status] => 404
[code] => 10002
[title] => Resource Not Found
[detail] => One or more of the regions resource could not be found.

We got this error while sending the following request to create the shipment:

'{
  "data": {
    "type": "shipments",
    "attributes": {
      "recipient_address": {
        "street_1": "4363 N 55TH ST",
        "street_2": "Marylebone",
        "street_number": 221,
        "postal_code": "53216-1201",
        "city": "MILWAUKEE",
        "region_code": "WI",
        "country_code": "US",
        "first_name": "Sherlock",
        "last_name": "Holmes",
        "company": "Attn",
        "email": "Aparajita.singh@abc.com",
        "phone_number": "1234567890"
      },
      "return_address": {
        "street_1": "Baker Street",
        "street_2": "Marylebone",
        "street_number": 221,
        "street_number_suffix": "B",
        "postal_code": "NW1 6XE",
        "city": "London",
        "region_code": "ENG",
        "country_code": "GB",
        "first_name": "Sherlock",
        "last_name": "Holmes",
        "company": "Holmes Investigations",
        "email": "Aparajita.singh@abc.com",
        "phone_number": ""
      },
      "sender_address": {
        "street_1": "Baker Street",
        "street_2": "Marylebone",
        "street_number": 221,
        "street_number_suffix": "B",
        "postal_code": "NW1 6XE",
        "city": "London",
        "region_code": "ENG",
        "country_code": "GB",
        "first_name": "Sherlock",
        "last_name": "Holmes",
        "company": "Holmes Investigations",
        "email": "Aparajita.singh@abc.com",
        "phone_number": ""
      },
      "description": "Order #8008135",
      "physical_properties": {
        "height": 150,
        "width": 300,
        "length": 500,
        "volume": 22.5,
        "weight": 100
      },
      "items": [
        {
          "sku": "123456789",
          "description": "OnePlus X",
          "item_value": {
            "amount": 995,
            "currency": "EUR"
          },
          "quantity": 2,
          "hs_code": "8517.12.00",
          "origin_country_code": "GB",
          "item_weight": 135
        }
      ],
      "customs": {
        "content_type": "merchandise",
        "invoice_number": "9000",
        "non_delivery": "return",
        "incoterm": "DAP",
        "license_number": "218532158",
        "certificate_number": "12122121"
      },
      "register_at": 0
    },
    "relationships": {
      "shop": {
        "data": {
          "type": "shops",
          "id": "1a9414f0-24ef-4008-b6ad-9a75e27a879e"
        }
      },
      "service": {
        "data": {
          "type": "services",
          "id": "05aeb5e9-90be-4ec7-94c9-1a0949262577"
        }
      }
    }
  }
}'

When we asked Spring Global for the reason of this error, they replied that the problem here is “The region which is not recognized as they do not have regions for the USA set up yet”. Simply omitting the region should fix this problem.

The below JSON should work:

'{
  "data": {
    "type": "shipments",
    "attributes": {
      "recipient_address": {
        "street_1": "4363 N 55TH ST",
        "street_2": "Marylebone",
        "street_number": 221,
        "postal_code": "53216-1201",
        "city": "MILWAUKEE",
        "country_code": "US",
        "first_name": "Sherlock",
        "last_name": "Holmes",
        "company": "Attn",
        "email": "Aparajita.singh@abc.com",
        "phone_number": "1234567890"
      },
      "return_address": {
        "street_1": "Baker Street",
        "street_2": "Marylebone",
        "street_number": 221,
        "street_number_suffix": "B",
        "postal_code": "NW1 6XE",
        "city": "London",
        "region_code": "ENG",
        "country_code": "GB",
        "first_name": "Sherlock",
        "last_name": "Holmes",
        "company": "Holmes Investigations",
        "email": "Aparajita.singh@abc.com",
        "phone_number": ""
      },
      "sender_address": {
        "street_1": "Baker Street",
        "street_2": "Marylebone",
        "street_number": 221,
        "street_number_suffix": "B",
        "postal_code": "NW1 6XE",
        "city": "London",
        "region_code": "ENG",
        "country_code": "GB",
        "first_name": "Sherlock",
        "last_name": "Holmes",
        "company": "Holmes Investigations",
        "email": "Aparajita.singh@abc.com",
        "phone_number": ""
      },
      "description": "Order #8008135",
      "physical_properties": {
        "height": 150,
        "width": 300,
        "length": 500,
        "volume": 22.5,
        "weight": 100
      },
      "items": [
        {
          "sku": "123456789",
          "description": "OnePlus X",
          "item_value": {
            "amount": 995,
            "currency": "EUR"
          },
          "quantity": 2,
          "hs_code": "8517.12.00",
          "origin_country_code": "GB",
          "item_weight": 135
        }
      ],
      "customs": {
        "content_type": "merchandise",
        "invoice_number": "9000",
        "non_delivery": "return",
        "incoterm": "DAP",
        "license_number": "218532158",
        "certificate_number": "12122121"
      },
      "register_at": 0
    },
    "relationships": {
      "shop": {
        "data": {
          "type": "shops",
          "id": "1a9414f0-24ef-4008-b6ad-9a75e27a879e"
        }
      },
      "service": {
        "data": {
          "type": "services",
          "id": "05aeb5e9-90be-4ec7-94c9-1a0949262577"
        }
      }
    }
  }
}'

Please visit here for related information:

Spring Global (Spring Omni) Error: The property phone_number is required

Spring Omni Manifest

Spring Global (Spring Omni) Error: Shipment is not being Registered

Spring Global (Spring Omni): Billing Concept

Spring Global (Spring Omni) Error: Getting Blank Response While Fetching Label