t3rminus / canada-post

Wrapper for the Canada Post API
MIT License
19 stars 10 forks source link

"Contract Number is a required field" error while createNonContractShipment function call. #15

Open Aaqib925 opened 2 years ago

Aaqib925 commented 2 years ago

Getting this error when calling the createNonContractShipment function from the package.

{
    "code": "2206",
    "originalMessages": [
        {
            "code": "2206",
            "description": "Contract Number is a required field."
        }
    ]
}

My POST request,

{
  requestedShippingPoint: 'M1R0E9',
  deliverySpec: {
    serviceCode: 'DOM.EP',
    sender: {
      company: 'Test Sender',
      contactPhone: '555-555-1234',
      addressDetails: [Object]
    },
    destination: { name: 'Client', addressDetails: [Object] },
    parcelCharacteristics: { weight: 1, document: false, dimensions: [Object] },
    preferences: { showPackingInstructions: true }
  }
}