The API is always telling me that I'm missing a Collection Date, the exact error:
$params = [
"ServiceID" => "9991",
"ClientReference" => "123",
"CollectionDate" => "2021-04-01",
"Parcels" => [
[
"Weight" => 5,
"Length" => 5,
"Width" => 5,
"Height" => 5,
"Contents" => "Box",
"Value" => "9",
],[
"Weight" => 5,
"Length" => 5,
"Width" => 5,
"Height" => 5,
"Contents" => "Box",
"Value" => "9",
]
],
"RecipientAddress" => [
"RecipientName" => "Michael Griffiths",
"RecipientAddress" => [
"Street" => "Redacted",
"Locality" => "Redacted",
"TownCity" => "Redacted",
"County" => "Redacted",
"PostalCode" => "Redacted Redacted",
"CountryCode" => "GB",
"RecipientPhone" => "07Redacted",
],
"RecipientEmail" => 'Redacted@Redacted.com',
]
];
return $this->client->AddShipment($params);
I'm using a demo account.
The API is always telling me that I'm missing a Collection Date, the exact error:
This is my code:
The date I'm passing (tomorrow) is available in the returned array from
GetAvailableCollectionDatesusing the same address. I have tried other dates also in theGetAvailableCollectionDatesarray but no matter what I try I get the same error. The ServiceID is from theGetAvailableServicesmethod.I'm using a demo account.
What am I missing?