+1 vote
in REST API basic functionality by (300 points)

We are trying to save a payment in AMCS via the endpoint POST accounting/payments, but it fails with the message "Expected null or object as zoned date/time value".

Are the date-format not correct in the request? (see under)

Request:

{
"RelatedCustomerGuid": "d1213672-afee-4d23-a3a3-b276fbc94729",
"PaymentTypeListItem": {"Guid": "c4bf3d5b-d1de-439b-b7b6-6fd1d9d5352e"},
"PaymentPointListItem": {"Guid": "b6375156-5b65-eb11-9889-2818783df058"},
"Amount": 14,
"DateInput": "2022-04-01T00:00:00+0200",
"DateReceived": "2022-04-02T00:00:00+0200",
"Allocations": [{

"Amount": 14,
"RelatedInvoiceGuid": "82ef96de-2437-4edf-88ad-ae6a0082ddeb"

}],
}

Response:

500 {"message":"Expected null or object as zoned date/time value"}

1 Answer

+1 vote
by (160 points)

A correct date format to get the payment created
"DateProcessed": {

        "DateTime": "2021-03-23T00:00:00-07:00",
        "TimeZone": "America/Los_Angeles"
    }
Welcome to AMCS PLATFORM REST API Q&A, where you can ask questions and receive answers from other members of the community.
...