Ir para o conteúdo principal

PostOrder API payload and Version

SSJ-1973
Pôster original

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

}

Participar da conversa

Você precisa estar conectado para responder a esta publicação e participar das discussões da Comunidade Geotab.

3 Respostas

EishiFUN
Administrador da Comunidade

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
Administrador da Comunidade

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
Pôster original

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.

Ainda tem dúvidas?