Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create a shipment - missing Collection Date #2

Open
mikemike opened this issue Mar 31, 2021 · 0 comments
Open

Unable to create a shipment - missing Collection Date #2

mikemike opened this issue Mar 31, 2021 · 0 comments

Comments

@mikemike
Copy link

The API is always telling me that I'm missing a Collection Date, the exact error:

SoapFault
Missing Collection Date

This is my code:

$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);

The date I'm passing (tomorrow) is available in the returned array from GetAvailableCollectionDates using the same address. I have tried other dates also in the GetAvailableCollectionDates array but no matter what I try I get the same error. The ServiceID is from the GetAvailableServices method.

I'm using a demo account.

What am I missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant