본문으로 바로가기

PostOrder API payload and Version

SSJ-1973
원글 작성자

Hi, can anyone share the Postorder API request payload with all required values. I am currently using the below one. It complains about apiOrderHeader -  "message": "MyAdminException: 'apiOrderHeader' was not in the correct format"

 

{

    "method": "PostOrder",

    "params": {

        "apiKey": "{{apiKey}}",

        "sessionId": "{{sessionId}}",

        "apiOrderHeader": {

            "devicePlanLevel": "Pro",

            "forAccount": "{{accountId}}",

            "orderItems": [

                {

                    "productCode": "ATT-GO9LTE",

                    "quantity": 1

                }

            ],

            "purchaseOrderNumber": "ERIC-SAMPLE-10001",

            "shipToId": {

                "id": 54601

            },

            "shippingFeeId": {

                "code": "SHIP-STD",

                "id": "1"

            },

            "warrantyOptionId": "12345"

        }

    },

    "id": -1

}

대화에 참여하기

You need to be logged in to reply to this post and participate in the Geotab Community discussions.

답글 3개

EishiFUN
커뮤니티 관리자

Hello @SSJ-1973​ 

 

Thank you for asking your question in our community. I have contacted our SDK team for their help answering this question. I will let you know as soon as I hear back from them.

 

Thank you for your patience while we look into this. Feel free to reach out with any other questions you have in the meantime. We are happy to help.

 

Have a great day!

Eishi FUN

EishiFUN
커뮤니티 관리자

I heard back from our team and they told me: Per the document MyAdmin API Reference, the data type for 'devicePlanLevel', 'shipToId', 'warrantyOptionId' is Number, but they use it as String. Details for the properties of apiOrderHeader - https://developers.geotab.com/myAdmin/apiReference/objects/ApiOrderHeader.

 

Let me know if you have any other questions or run into any issues. I will pull in one of our developers here if needed.

SSJ-1973
원글 작성자

Hi, Thank you for reaching out. That will help, for if i get a sample request for the postOrder API and confirm if the payload is correct, other than the above mentioned corrections.

여전히 궁금한 점이 있으신가요?