Cart Checkout API

Hi, I am finishing an integration of a web application with your API and I find the following problem.

In https://github.com/imaterialise/api-sdk-php I have found models with which to be able to mount the application, but to make the confirmation of a shopping cart after having created it I do not find any model in github or in your documentation of the API.

Can you help me with this? Thank you !!

Best regards,
Miquel

Hi Miquel,

The cartOrderingAPI model is the equivalent of the Cart Checkout: github.com/imaterialise/api-sdk-php/blob/master/cartOrderingAPI.php

Is this what you’re looking for?

Hi Dmitriy,
In the documentation referring to the Cart Checkout API there is no reference to the list of items or the shipping or payment information of the order. I have done tests using cartOrdering but the results I get do not seem correct. https://github.com/imaterialise/api-sdk-php/blob/master/cartOrderingAPI.php

I receive the following error:

{“cartID”: “00000000-0000-0000-0000-0000-0000-000000000000”, “discount”: 0.0, “subTotalPrice”: 0.0, “vatTaxPercentage”: 0.0, “validUntil”: “0001-01-01T00: 00: 00” , “requestError”: {“message”: “List of CartItems is empty. Please, specify CartItems.”, “code”: 503}, “cartItems”: [], “shippingInfo”: {}, “billingInfo”: { }}

I don’t know if the instructions for using cartOrdering are the same on the page https://i.materialise.com/api/docs/cart-checkout-api

Best regards,
Miquel

Hey Miquel,

Thing is that the ordering process is divided into several steps.

First, you create a cart item with the Cart Item Creation API. On this step, you submit a 3D model file or an ID of the previously uploaded model, material and finish, quantity, scale factor, etc. In response, you receive a cart item ID.

Then, you need to create a cart and fill it with cart items. This is done with the Cart Creation API. You provide the cart item ID, shipping and billing addresses. In response, you receive a cart ID and a list of available shipping services.

Finally, you order the created cart using the Cart Checkout API. You specify the cart ID and the shipping service. In response, you receive an order ID and can use it later on to check the order status with the Order Status API.

Order payment is not part of the API and is done offline.

Does this explain the workflow?

1 Like

Yes, I know a bit after several months working with the API these steps but the issue is that after all steps and have the car set up as comets me. I try to confirm the order but I don’t get a positive response.

Attached order code created that is ready to confirm and to reach you.

4582d430-7315-4032-aab8-46f89c1fef87

Greetings,
Miquel

Try sending the checkout request in this demo page:
https://imatsandbox.materialise.net/api/demo/cart-checkout-api.htm

I was able to successfully order the cart ID you indicated with the following request:

(insert your API code at the top)

{
   "cartID":"4582d430-7315-4032-aab8-46f89c1fef87",
   "myOrderReference":"",
   "directMailingAllowed":"false",
   "shipmentService":"Standard",
   "myInvoiceLink":"",
   "myDeliveryNoteLink":"",
   "remarks":"",
   "languageCode":"en"
}

Opening the url and changing the data for those of my order as you indicate the order is activated.

I currently make the request to the url: https://imatsandbox.materialise.net/web-api/cart/post

If the change for which you indicate me, https: //imatsandbox.materialise.net/api/demo/cart-checkout-api.htm I do not receive a response to my request.

I rest for your indications to be able to integrate the activation of the order in the application completely.

I can attach error responses if necessary.

Best regards,
Miquel

Sorry, Miquel, I’m not quite following you.
If you attach the code and error responses we’ll take a look at them, but we don’t provide development support.

After some changes it seems that I have managed to activate an order

link to the order: https://imatsandbox.materialise.net/en/Ordering/OrderDetails/98687b3a-e51d-44ff-8579-ab1c0c0a91fb

Could you confirm it for me? Thank you

Hi Miquel,

Yes, the order has been placed successfully. Good job!

1 Like