Payment creation. 'Post Period' cannot be empty.","exceptionType"

  • 13 February 2021
  • 7 replies
  • 708 views

Userlevel 1
Badge

Hello Team,

Could you help me with the following question?

I try to create a payment.
But receive the following error:

Response: {"message":"The request is invalid.","modelState":{"entity":["The Entity field is required."]}}
An error has occurred.","exceptionMessage":"Inserting  'CA Transaction' record raised at least one error. Please review the errors.\nFinPeriodID: 'Post Period' cannot be empty.","exceptionType"

Could you provide a correct example of the request?


7 replies

Userlevel 7
Badge +17

Andrew,

Can you check with this?

 

  "ApplicationPeriod": {
            "value": "8-2021"
        },

Userlevel 1
Badge

Maybe like this?

 

{
    "entity": {},
    "parameters": {
         
        "OrderNbr": {
            "value": "OrderNbr"
        },
        "OrderType": {
            "value": "OrderType"
        },
        "PaymentMethod": {
            "value": "PaymentMethod"
        },
        "BranchID": {
            "value": "BranchID"
        },
        "PaymentRefNbr": {
            "value": "PaymentRefNbr"
        },
        "PaymentTotal": {
            "value": "100"
        },

        "ApplicationHistory": {
            "PostPeriod": {
               "value": 02/2021
        }
        },     

    }
}

Userlevel 1
Badge

Or should the PostPeriod value embed somehow differently?

Userlevel 1
Badge

As I understood I should add to this request the Post Period.
An the request should have the following view:

 

Method: PUT

 https: //InstanceURl/entity/EndpointName/EndpointVersion/CreatePayments/createPayment

Request:

{
    "entity": {},
    "parameters": {
         
        "OrderNbr": {
            "value": "OrderNbr"
        },
        "OrderType": {
            "value": "OrderType"
        },
        "PaymentMethod": {
            "value": "PaymentMethod"
        },
        "BranchID": {
            "value": "BranchID"
        },
        "PaymentRefNbr": {
            "value": "PaymentRefNbr"
        },
        "PaymentTotal": {
            "value": "100"
        },

       "PostPeriod": {
            "value": "02/2021"
        },

    }
}

Is it correct?

Userlevel 7
Badge +17

Andrew,

Below is the simple REST API JSON to create a payment for an order and it is working as expected. I’m NOT sure about the above issue, which you are getting. 

Please cross verify and do changes if required.

 

Method: PUT

 https: //InstanceURl/entity/EndpointName/EndpointVersion/CreatePayments/createPayment

Request:

{
    "entity": {},
    "parameters": {
         
        "OrderNbr": {
            "value": "OrderNbr"
        },
        "OrderType": {
            "value": "OrderType"
        },
        "PaymentMethod": {
            "value": "PaymentMethod"
        },
        "BranchID": {
            "value": "BranchID"
        },
        "PaymentRefNbr": {
            "value": "PaymentRefNbr"
        },
        "PaymentTotal": {
            "value": "100"
        }
    }
}

 

Hope this helps!!

Userlevel 1
Badge

Naveen,

Currently, I cannot share. I should ask my dev team to provide an example.
It is not fast. I received only an example of the error.
Maybe you could provide an example of how correctly send a request to create a payment?

Thank you!

Userlevel 7
Badge +17

Hi Andrew,

Can you please share the REST API json, which you are using for payment creation?

 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved