跳至主要內容

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.

還有問題嗎?