Cannot POST AWB using the API

Hello, I am trying to post an AWB using the following JSON UTF8 encoded data: {"SenderClientId":0,"Sender":{"LocationId":201122306},"Recipient":{"LocationId":0,"Name":"Mihai","CountyId":3,"LocalityId":8873409,"StreetId":0,"StreetName":null,"BuildingNumber":null,"AddressText":"STR. Iancului, NR. 2","ContactPerson":"Mihai","PhoneNumber":"0000000000","Email":"mihai@ed.ro"},"Parcels":0,"Envelopes":1,"TotalWeight":0.1,"DeclaredValue":0,"CashRepayment":0,"BankRepayment":0,"OtherRepayment":null,"OpenPackage":true,"PriceTableId":31182,"ShipmentPayer":1,"SaturdayDelivery":true,"Observations":null,"PackageContent":null,"CustomString":null} to https://urgentcargus.azure-api.net/api/Awbs but I get the a 400 Bad Request response. Am I missing something in my JSON request?

Comments

  •  
    Hello again. I thought the error was due to the mising CountryId element, so I added it to JSON content, like this: {"SenderClientId":0,"Sender":{"LocationId":201122306},"Recipient":{"LocationId":0,"Name":"Mihai","CountryId":1,"CountyId":3,"LocalityId":8873409,"StreetId":0,"StreetName":null,"BuildingNumber":null,"AddressText":"STR. Iancului, NR. 2","ContactPerson":"Mihai","PhoneNumber":"0000000000","Email":"mihai@ed.ro"},"Parcels":0,"Envelopes":1,"TotalWeight":0.1,"DeclaredValue":0,"CashRepayment":0,"BankRepayment":0,"OtherRepayment":null,"OpenPackage":true,"PriceTableId":31182,"ShipmentPayer":1,"SaturdayDelivery":true,"Observations":null,"PackageContent":null,"CustomString":null} But I get the same error: Bad request. Would you be so kind and help me with this?
    Posted by Hidden Wed, 20 Jan 2016 16:10:46 GMT
  •  
    Hello again. Never mind. I read the response from the sever after getting the Bad request error and it said that SenderClientId has to be null or different from 0. So I set it to null and it worked.
    Posted by Hidden Wed, 20 Jan 2016 16:18:07 GMT


You're not signed in. Please sign-in to report an issue or post a comment.