How to insert a new order via the Jasmin API (POST Order)?

1

I tried to create an order from the Jasmin application and everything went well, but when I went to see the api method documentation I could not create an order from that method.

My big question is: what order do I have to put the attributes on the link, so I can create the order, via api? And also what format should each of these elements have? In Jasmin application I can perfectly insert the articles in the order, as well as the quantities and prices, however, via api I am not able to achieve this.

    
asked by anonymous 05.04.2018 / 22:12

1 answer

1

Well in parts. Before you start using the application you need to register our APP on the link portal, after registering. On this page you will see the Account and Alias.

ThisinformationshouldthenbeplacedintheorderURLforordercreationashttps://my.jasminsoftware.com/api/10001/10001-0324/sales/orders.Theendpoityou'reusingisforaddingrowstoafind.

Nextanexampletouseinpostmantovalidatetherequest.

{"BuyerCustomerParty": "0002",
"documentType" : "ECL",
"paymentTerm" : "00",
"company": "<A vossa empresa>",
"documentLines": [
    {
        "salesItem": "0002",
        "quantity":"1",
        "unitPrice" : {
            "amount" : "320",
            "symbol": "€"
        }
    },
    {
        "salesItem": "0002",
        "quantity":"1",
        "unitPrice" : {
            "amount" : "320",
            "symbol": "€"
        }
    }
]
}

Do not forget to put the token in the order header.

    
06.04.2018 / 11:12