Cart Creation API

What is the Cart Creation API?

The Cart Creation API allows you to create a cart. Preparing a cart is a 2 step approach. First, cart items need to be created. Then these cart items need to be added to a cart. These 2 actions are done through 2 separate APIs: the Cart Item Creation API and Cart Creation API. The split up is done to allow maximum flexibility in the creation of a cart. However, one cannot used without the other one.

Who Should Use this API?

The Cart Creation API is for users that have an application or website that generates 3D models. The 3D models can be uploaded or retrieved by our server. You either want to add a 3D print service to your application as an option, or you want to make models 3D printing the core of your business. The Cart Creation API can be used for the following business flows:

Try it Out

Do you have questions about how your server should create cart with cart items? Visiting our demo page will help you out.

We’ve developed a sandbox server, which is an isolated server (not hooked up to a payment system or production environment, allowing you to test the service without getting billed) to try out your code and integration with us. As the sandbox server is an isolated server, it requires different credentials than the production site.

The demo page of Cart Creation API on sandbox server:

https://imatsandbox.materialise.net/api/demo/cart-creation-api.htm

The sandbox and production server contain API demo pages which send well-formed API requests to our site.

The demo page of Cart Creation API on production server:

https://i.materialise.com/api/demo/cart-creation-api.htm

How Does it Work?

The Cart Creation API works by posting data to our service.

You can use either XML or JSON formats for posting. The HTTP encoding type of a particular request depends on the type of API you are going to use. This will be described in the corresponding section of this page.

To specify the exact content type which your client can accept and parse, the Accept header in your request has to be set to one of the following encoding types:

• text/json
• application/json
• text/xml
• application/xml

To create cart through the Cart Creation API, POST a well-structured request via “HTTPS” to this URL:

https://i.materialise.com/web-api/cart/post

To use APIs of the sandbox, the POST needs to be submitted to:

https://imatsandbox.materialise.net/web-api/cart/post

The server will return a structured response in XML or JSON which your application can parse.

All requests to the Cart Creation API should be made through a secure connection (e.g. SSL). Cart and cart items will stay valid for a period of 15 days.

Documentation

In order to register a cart you need to provide the set of valid cart item IDs that were the result of the cart item registrations.

A cart registration consists of following data:

• A list of cart item IDs to add to the cart
• URL information
• Shipping info to prepare checkout of the cart and get a shipment cost estimation
• Billing info to prepare checkout of the cart

Structure of the Request

Requested Parameters

Parameter Type Required? Explanation
myCartReference String (100) Yes Your reference
currency String (3) Yes Currency of the cart.

Following currencies are supported: EUR/USD/JPY/GBP.

languageCode String (3) No Language of the site pages:

en/de/fr

Default is EN.

iFrameTheme String (100) No Link to the embedded i.materialise page in the requested them (not yet operational)
returnUrl String (100) No Link will be used to redirect customer when he presses “Back” button on Cart/Shipping Info pages.
orderConfirmationUrl String (100) No Link will be used to redirect customer when he has paid for the order
failureUrl String (100) No Link will be used to redirect the customer when failure occurs (not yet operational)
promoCode String No Promocode to be used for this cart
cartItems List of parameters Yes Under this parameters all IDs of the cart items to be added to the cart should to be listed
cartItems>cartItemID String (36) Yes Cart item ID returned when cart items were created. At least one ID should be specified.
shippingInfo List of parameters No List of parameters for the shipping info.

In case the Cart Checkout API will be used for ordering the cart, these fields need to be filled in.

In case of rerouting your customer to i.materialise, the fields are not required. However, when provided in the request, the address will be prefilled for your customer in the shipping form on our website.
billingInfo List of parameters No List of parameters for the billing info.

In case the Cart Checkout API will be used for ordering the cart, these fields need to be filled in.

In case of rerouting your customer to i.materialise, the fields are not required. However, when provided in the request, the address will be prefilled for your customer in the shipping form on our website.

Shipping Information Section of the Request

Parameter Type Required? Explanation
firstName String (128) Yes First name of the recipient
lastName String (128) Yes Last name of the recipient
email String (128) Yes Recipient’s email address
phone String (15) Yes Recipient’s phone number
company String (35) No Name of receiving company
line1 String (35) Yes Shipping address, fist line
line2 String (35) No Shipping address, second line
countryCode String (2) Yes Country code.
stateCode String (2) Yes State code.

For Japan ISO state codes should be used. For instance, “stateCode”: “09” for Totigi. For US according to ISO it should look like “stateCode”: “MI” fot state Michigan.

zipCode String (9) Yes Zip code
city String (30) Yes Name of the city

Billing Information Section of the Request

Parameter Type Required? Explanation
firstName String (128) Yes First name
lastName String (128) Yes Last name
email String (128) Yes Email address
phone String (64) Yes Phone number.

Regular expression i.materialise uses for validation:
const int PHONE_MIN_LENGHT = 6;
const int PHONE_MAX_LENGHT = 20;
const string PHONE_PATTERN = @"&^\s*\+?\s*\d+\s*((\d*)|(\(\s*\d+\s*\)))\s*(\-?\s*\d+\s*)+$"; 
company String (128) No Name of the company
vatNumber String (64) No VAT number. Should be specified in pair with company parameter
line1 String (128) Yes Address, fist line
line2 String (128) No Address, second line
countryCode String (2) Yes Country code
stateCode String (2) Yes State code.

For Japan ISO state codes should be used. For instance, “stateCode”: “09” for Totigi. For US according to ISO it should look like “stateCode”: “MI” fot state Michigan.

zipCode String (64) Yes Zip code
city String (128) Yes Name of the city

Request examples

Example of request in JSON

{
    "MyCartReference": "My cart",
    "Currency": "USD",
    "LanguageCode": "de",
    "ReturnUrl": "http://mysite.com/success.html",
    "OrderConfirmationUrl": "http://mysite.com/confirm.html",
    "FailureUrl": "http://mysite.com/failure.html",
    "CartItems":[
       { 
          "CartItemID": "1bcc76b0-c437-46de-9c3f-93ec919f8234"
          
       },
       { 
          "CartItemID": "059a45de-6185-4cf9-b694-8b6f3c57c4f2"
          
       },
],
    "ShippingInfo": {
      "FirstName": "John",
      "LastName": "Smith",
      "Email": "demo@demo.com",
      "Phone": "1234567",
      "Company": "No company",
      "Line1": "North Street",
      "CountryCode": "US",
      "StateCode":"NY",
      "ZipCode": "10001",
      "City": "New York"
    },
    "BillingInfo": {
      "FirstName": "John",
      "LastName": "Smith",
      "Email": "demo@demo.com",
      "Phone": "1234567",
      "Company": "No company",
      "Line1": "North Street",
      "CountryCode": "BE",
      "ZipCode": "1020",
      "City": "Brussels",
      "VatNumber": "BE0999999922"
    }
}

Example of request in XML

 
<CartRegistrationRequest>
  <MyCartReference>My cart</MyCartReference>
  <Currency>USD</Currency>
  <LanguageCode>fr</LanguageCode>
  <IframeTheme />
  <ReturnUrl>http://mysite.com/success.html</ReturnUrl>
 <OrderConfirmationUrl>http://mysite.com/confirm.html</OrderConfirmationUrl>
  <FailureUrl>http://mysite.com/failure.html</FailureUrl>
  <CartItems>
    <CartItem>
      <CartItemID>77c51365-e732-4d52-84a9-2d4e7777a52b</CartItemID>
    </CartItem>
    <CartItem>
      <CartItemID>36590f9e-5c2e-4a46-af63-2299a0f6b87b</CartItemID>
    </CartItem>
  </CartItems>
  <ShippingInfo>
    <FirstName>John</FirstName>
    <LastName>Smith</LastName>
    <Email>demo@demo.com</Email>
    <Phone>1234567</Phone>
    <Company>No company</Company>
    <Line1>North Street</Line1>
    <Line2 />
    <CountryCode>US</CountryCode>
    <StateCode />
    <ZipCode>10001</ZipCode>
    <City>New York</City>
  </ShippingInfo>
  <BillingInfo>
    <FirstName>John</FirstName>
    <LastName>Smith</LastName>
    <Email>demo@demo.com</Email>
    <Phone>1234567</Phone>
    <Company>No company</Company>
    <Line1>North Street</Line1>
    <Line2 />
    <CountryCode>BE</CountryCode>
    <ZipCode>1020</ZipCode>
    <City>Brussels</City>
    <VatNumber>BE0999999922</VatNumber>
  </BillingInfo>
</CartRegistrationRequest>

Structure of the Response

General Section of the Response

Parameter Type Always shown? Description
cartID String (36) Yes The ID of created cart
cartReference String Yes Reference to the cart on i.materialise site
currency String Yes Currency of the cart.

Following currencies are supported: EUR/USD/JPY/GBP.

iMatCartPageUrl String Yes Cart page URL you can use to redirect your users to the cart page of the i.materialise site
iMatShipmentPageUrl String Yes You can use the shipment page URL to redirect your users to the shipment page of the i.materialise site
iMatEmbededCartPageUrl String Yes You can use the cart page URL to redirect your users to the i.materialise site. By default, pages will be styled with the i.materialise branding. If you have a registered theme, the site will be styled in your theme.
iMatEmbededShipmentPageUrl String Yes You can use the shipment info page URL to redirect your users to the i.materialise site. By default, pages will be styled with the i.materialise branding. If you have a registered theme, the site will be styled in your theme.
discount Decimal, separated by a period Yes Discount value customer gets after applying a provided promo code. If no discount, zero is shown.
subTotalPrice Decimal, separated by a period Yes Totals sum of all items in the cart (excl. discount)
vatTaxPercentage Decimal, separated by a period Yes VAT or any tax value for this cart
validUntil Date Yes Cart expiration date
expectedShipmentDate Date Yes Estimated shipment date of order
shipmentDateComment String Yes Comment to expected shipment date
requestNumber String Yes Quotation number you can use for further reference
requestError List of parameters No Shown only in case of request error. See details in “Error Section” on this page.
shipmentCost List of parameters No Available if shipping info was provided
cartItems List of parameters Yes List of cart items details for cart items which are included to the cart.
shippingInfo List of parameters Yes Info you have posted in the request
billingInfo List of parameters Yes Info you have posted in the request

Request Error Section of the Response

Parameter Type Always shown? Description
code Integer No Error code
message String (100) No Error message

Shipment Cost Section of the Response

Parameter Type Always shown? Description
shipmentError>code Integer No Shipping cost calculation error code
shipmentError>message String (100) No Shipping cost calculation error message
services List of parameters Yes List of available shipping services. Shown if no error.
services>name String Yes Shipping service name
services>value Decimal, separated by a period Yes Shipping cost
services>daysInTransit Integer Yes Number of shipment days

Cart Items Section of the Response

Parameter Type Always shown? Description
myCartItemReference String Yes Reference you have posted when you registered a cart item
cartItemID String (36) Yes ID of cart item from the request
toolID String (36) Yes Tool ID by using which model was uploaded
modelID String (36) Yes Model ID from request
modelFileName String Yes Model file name
materialID String (36) Yes Material ID
materialName String Yes Name of the material
finishID String (36) Yes Finishing ID
finishName String Yes Finish name
quantity Integer Yes Number of pieces
xDimMm Decimal, separated by a period No Calculated X dimension size in mm
yDimMm Decimal, separated by a period Yes Calculated Y dimension size in mm
zDimMm Decimal, separated by a period Yes Calculated Z dimension size in mm
volumeCm3 Decimal, separated by a period No Calculated model volume in cm³
surfaceCm2 Decimal, separated by a period Yes Calculated model surface area in cm²
mySalesPrice Decimal, separated by a period Yes Parameter is taken from the request of Cart Item Creation API
imatPrice Decimal, separated by a period Yes The same as in response of Cart Item Creation API
mySalesUnitPrice Decimal, separated by a period Yes The same as in response of Cart Item Creation API
cartItemError List of parameters No The same as in response of Cart Item Creation API
cartItemError>Code Integer Yes The same as in response of Cart Item Creation API
cartItemError>Message String (100) Yes The same as in response of Cart Item Creation API

Shipping Info Section of the Response

Parameter Type Always shown? Description
firstName String (100) Yes First name of the recipient
lastName String (100) Yes Last name of the recipient
email String (255) Yes Recipient’s email address
phone String (15) Yes Recipient’s phone number
company String (35) No Name of receiving company
line1 String (35) Yes Shipping address, fist line
line2 String (35) No Shipping address, second line
countryCode String (2) Yes Country code
stateCode String (2) Yes State code
zipCode String (9) Yes Zip code
city String (30) Yes Name of the city
shippingInfoError List of parameters No Shown only in case shipping info error occurs. See details in “Error” section of this Documentation.
shippingInfoError>code Integer Yes Shipping info error code. See details in “Error” section of this Documentation.
shippingInfoError>message String (100) Yes Shipping info error message. See details in “Error” section of this Documentation.

Billing Info Section of the Response

Parameter Type Always shown? Description
firstName String (100) Yes First name
lastName String (100) Yes Last name
email String (255) Yes Email address
phone String (100) Yes Phone number
company String (100) No Name of the company
line1 String (100) Yes Address, fist line
line2 String (100) No Address, second line
countryCode String (2) Yes Country code
stateCode String (2) Yes State code
zipCode String (100) Yes Zip code
city String (100) Yes Name of the city
vatNumber String (100) No Shown only when Company parameter is specified.
billingInfoError List of parameters No Shown only in case billing info error occurs. See details in Errors section of this Documentation.
billingInfoError.Code Integer Yes Billing info error code. See details in “Errors” section of this Documentation.
billingInfoError.Message String (255) Yes Billing info error message. See details in “Errors” section of this Documentation.

Response Examples

Example of Response in XML

<CartRegistrationResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <CartID>d7964c2c-0645-4b55-acb5-8b40fdf5b312</CartID>
  <CartReference>My cart</CartReference>
  <Currency>USD</Currency>
  <IMatCartPageUrl>https://i.materialise.com/de/cart/quotation/d7964c2c-0645-4b55-acb5-8b40fdf5b312</IMatCartPageUrl>
  <IMatShipmentPageUrl>https://i.materialise.com/de/ordering/quotation/d7964c2c-0645-4b55-acb5-8b40fdf5b312</IMatShipmentPageUrl>
  <IMatEmbededCartPageUrl>https://i.materialise.com/embeded/general/de/cart/quotation/d7964c2c-0645-4b55-acb5-8b40fdf5b312</IMatEmbededCartPageUrl>
  <IMatEmbededShipmentPageUrl>https://i.materialise.com/embeded/general/de/ordering/quotation/d7964c2c-0645-4b55-acb5-8b40fdf5b312</IMatEmbededShipmentPageUrl>
  <Discount>0.0000</Discount>
  <SubTotalPrice>64.90</SubTotalPrice>
  <VatTaxPercentage>0.00</VatTaxPercentage>
  <ValidUntil>2014-12-24T00:00:00+01:00</ValidUntil>
  <ExpectedShipmentDate>2014-12-23T00:00:00+01:00</ExpectedShipmentDate>
  <ShipmentDateComment>If ordered today, 90% certainty that it is shipped before or at this date.</ShipmentDateComment>
  <RequestNumber>REQ582082</RequestNumber>
  <ShipmentCost>
    <Services>
      <Service>
        <Name>Ground</Name>
        <Value>10.94</Value>
        <DaysInTransit>3</DaysInTransit>
      </Service>
      <Service>
        <Name>SecondDayAir</Name>
        <Value>15.91</Value>
        <DaysInTransit>2</DaysInTransit>
      </Service>
      <Service>
        <Name>NextDayAirSaver</Name>
        <Value>33.88</Value>
        <DaysInTransit>1</DaysInTransit>
      </Service>
    </Services>
  </ShipmentCost>
  <CartItems>
    <CartItemResponseDto>
      <MyCartItemReference>some reference</MyCartItemReference>
      <CartItemID>77c51365-e732-4d52-84a9-2d4e7777a52b</CartItemID>
      <ToolID>2054608d-b469-4cab-adeb-cf1c0569e7a1</ToolID>
      <ModelID>6a24345b-42ff-4d6c-8c0b-4037c4205b88</ModelID>
      <ModelFileName>Box.stl</ModelFileName>
      <MaterialID>035f4772-da8a-400b-8be4-2dd344b28ddb</MaterialID>
      <FinishID>bba2bebb-8895-4049-aeb0-ab651cee2597</FinishID>
      <Quantity>1</Quantity>
      <XDimMm>10.00000000000000000000</XDimMm>
      <YDimMm>10.00000000000000000000</YDimMm>
      <ZDimMm>10.00000000000000000000</ZDimMm>
      <VolumeCm3>1.0000000000</VolumeCm3>
      <SurfaceCm2>6.0000000000</SurfaceCm2>
      <MySalesPrice>32.45</MySalesPrice>
      <IMatPrice>18.72</IMatPrice>
      <MySalesUnitPrice>32.45</MySalesUnitPrice>
    </CartItemResponseDto>
    <CartItemResponseDto>
      <MyCartItemReference>some reference</MyCartItemReference>
      <CartItemID>36590f9e-5c2e-4a46-af63-2299a0f6b87b</CartItemID>
      <ToolID>2054608d-b469-4cab-adeb-cf1c0569e7a1</ToolID>
      <ModelID>6a24345b-42ff-4d6c-8c0b-4037c4205b88</ModelID>
      <ModelFileName>Box.stl</ModelFileName>
      <MaterialID>035f4772-da8a-400b-8be4-2dd344b28ddb</MaterialID>
      <FinishID>bba2bebb-8895-4049-aeb0-ab651cee2597</FinishID>
      <Quantity>1</Quantity>
      <XDimMm>10.00000000000000000000</XDimMm>
      <YDimMm>10.00000000000000000000</YDimMm>
      <ZDimMm>10.00000000000000000000</ZDimMm>
      <VolumeCm3>1.0000000000</VolumeCm3>
      <SurfaceCm2>6.0000000000</SurfaceCm2>
      <MySalesPrice>32.45</MySalesPrice>
      <IMatPrice>18.72</IMatPrice>
      <MySalesUnitPrice>32.45</MySalesUnitPrice>
    </CartItemResponseDto>
  </CartItems>
  <ShippingInfo>
    <FirstName>John</FirstName>
    <LastName>Smith</LastName>
    <Email>demo@demo.com</Email>
    <Phone>1234567</Phone>
    <Company>No company</Company>
    <Line1>North Street</Line1>
    <Line2 />
    <CountryCode>US</CountryCode>
    <StateCode />
    <ZipCode>10001</ZipCode>
    <City>New York</City>
  </ShippingInfo>
  <BillingInfo>
    <FirstName>John</FirstName>
    <LastName>Smith</LastName>
    <Email>demo@demo.com</Email>
    <Phone>1234567</Phone>
    <Company>No company</Company>
    <VatNumber>BE0999999922</VatNumber>
    <Line1>North Street</Line1>
    <Line2 />
    <CountryCode>BE</CountryCode>
    <StateCode />
    <ZipCode>1020</ZipCode>
    <City>Brussels</City>
  </BillingInfo>
</CartRegistrationResponse>

Example of Response in JSON

{
    "cartID":"a1b27d90-4a3a-4a25-be1f-71a62eb0e78e",
    "cartReference":"My cart",
    "currency":"USD",
    "iMatCartPageUrl":"https://i.materialise.com/fr/cart/quotation/a1b27d90-4a3a-4a25-be1f-71a62eb0e78e",
    "iMatShipmentPageUrl":"https://i.materialise.com/fr/ordering/quotation/a1b27d90-4a3a-4a25-be1f-71a62eb0e78e",
    "iMatEmbededCartPageUrl":"https:/i.materialise.com/embeded/general/fr/cart/quotation/a1b27d90-4a3a-4a25-be1f-71a62eb0e78e",
    "iMatEmbededShipmentPageUrl":"https://i.materialise.com/embeded/general/fr/ordering/quotation/a1b27d90-4a3a-4a25-be1f-71a62eb0e78e",
    "discount":0.0000,
    "subTotalPrice":64.90,
    "vatTaxPercentage":0.00,
    "validUntil":"2014-12-24T00:00:00+01:00",
    "expectedShipmentDate":"2014-12-23T00:00:00+01:00",
    "shipmentDateComment":"If ordered today,
     90% certainty that it is shipped before or at this date.",
    "requestNumber":"REQ209809",
    "shipmentCost":{
        "services":[
            {
                "name":"Ground",
                "value":10.94,
                "daysInTransit":3
            },
            {
                "name":"SecondDayAir",
                "value":15.91,
                "daysInTransit":2
            },
            {
                "name":"NextDayAirSaver",
                "value":33.88,
                "daysInTransit":1
            }
        ]
    },
    "cartItems":[
        {
            "myCartItemReference":"some reference",
            "cartItemID":"1bcc76b0-c437-46de-9c3f-93ec919f8234",
            "toolID":"2054608d-b469-4cab-adeb-cf1c0569e7a1",
            "modelID":"6a24345b-42ff-4d6c-8c0b-4037c4205b88",
            "modelFileName":"Box.stl",
            "materialID":"035f4772-da8a-400b-8be4-2dd344b28ddb",
            "finishID":"bba2bebb-8895-4049-aeb0-ab651cee2597",
            "quantity":1,
            "xDimMm":10.00000000000000000000,
            "yDimMm":10.00000000000000000000,
            "zDimMm":10.00000000000000000000,
            "volumeCm3":1.0000000000,
            "surfaceCm2":6.0000000000,
            "mySalesPrice":32.45,
            "iMatPrice":18.72,
            "mySalesUnitPrice":32.45
        },
        {
            "myCartItemReference":"some reference",
            "cartItemID":"059a45de-6185-4cf9-b694-8b6f3c57c4f2",
            "toolID":"2054608d-b469-4cab-adeb-cf1c0569e7a1",
            "modelID":"6a24345b-42ff-4d6c-8c0b-4037c4205b88",
            "modelFileName":"Box.stl",
            "materialID":"035f4772-da8a-400b-8be4-2dd344b28ddb",
            "finishID":"bba2bebb-8895-4049-aeb0-ab651cee2597",
            "quantity":1,
            "xDimMm":10.00000000000000000000,
            "yDimMm":10.00000000000000000000,
            "zDimMm":10.00000000000000000000,
            "volumeCm3":1.0000000000,
            "surfaceCm2":6.0000000000,
            "mySalesPrice":32.45,
            "iMatPrice":18.72,
            "mySalesUnitPrice":32.45
        }
    ],
    "shippingInfo":{
        "firstName":"John",
        "lastName":"Smith",
        "email":"demo@demo.com",
        "phone":"1234567",
        "company":"No company",
        "line1":"North Street",
        "line2":"",
        "countryCode":"US",
        "stateCode":"NY",
        "zipCode":"10001",
        "city":"New York"
    },
    "billingInfo":{
        "firstName":"John",
        "lastName":"Smith",
        "email":"demo@demo.com",
        "phone":"1234567",
        "company":"No company",
        "vatNumber":"BE0999999922",
        "line1":"North Street",
        "line2":"",
        "countryCode":"BE",
        "stateCode":"",
        "zipCode":"1020",
        "city":"Brussels"
    }
}

Errors Section of the Response

Code Message Description
1 Unknown error
501 Wrong request body. Check if all parameters are set correctly.
502 This currency is not supported, please specify EUR/USD/JPY/GBP.

Following currencies are supported: EUR/USD/JPY/GBP.

503 List of CartItems is empty. Please, specify CartItems.
504 Some CartItems cannot be registered. Some cart items cannot be parsed
505 Promo code can not be found.
506 Rubber-like cannot be distributed in the US. Please remove the designs in this material from the cart or change the country of delivery.
508 Cart reference cannot be empty or more than 100 symbols.
509 It’s not allowed to combine models in polyamide priority with models in other materials due to the big difference in production time. You can either remove all priority models or remove the non-priority models.
512 This language code is not supported. Please indicate one of the following:

en/de/fr

Warning
601 CartItemId is not valid. Incorrect format of ID. It should be GUID 00000000-0000-0000-0000-000000000000
602 Wrong CartItemId has been applied. Cart item was not found or belongs to someone else
603 CartItem validity period expired on «DateTime»
701 FirstName cannot be empty or contain more than 128 symbols.
702 LastName cannot be empty or more than 128 symbols.
703 Email cannot be empty or more than 128 symbols.
704 Wrong Email format.
705 Phone cannot be empty or longer than 15 symbols.
706 Wrong Phone format.
707 Company cannot be more than 35 symbols.
708 Line1 cannot be empty or contain more than 35 symbols.
709 Line2 cannot contain more than 35 symbols.
710 CountryCode is required. Please use an international country code (e.g.: BE for Belgium).
711 Wrong CountryCode. Please use an international country code (e.g.: BE for Belgium).
712 StateCode is required for requested country. Please use an international state code (e.g.: MI for Michigan).
713 Wrong StateCode is required for the requested country. Please use an international state code (e.g.: MI for Michigan).
714 City cannot be empty or longer than 30 symbols.
715 ZipCode cannot be empty or longer than 9 symbols.
716 Shipping service is not provided for this country. Please specify different shipping country.
719 Invalid characters. Please use Latin symbols only. Only Latin symbols are allowed in Shipping Info Address and Name fields
801 FirstName cannot be empty or more than 128 symbols.
802 LastName cannot be empty or more than 128 symbols.
803 Email cannot be empty or longer than 128 symbols.
804 Wrong Email format.
805 Phone cannot be empty or longer than 64 symbols.
806 Wrong Phone format.
807 Company cannot be more than 128 symbols.
808 VAT-number is incorrect for the selected country.
809 For EU countries you need to specify both Company and VatNumber or leave them both empty.
810 For EU countries you need to specify both Company and VatNumber or leave them both empty.
811 Line1 cannot be empty or more than 128 symbols.
812 Line2 cannot be more than 128 symbols.
813 CountryCode is required. Please use an international country code (e.g.: BE for Belgium).
814 Wrong CountryCode. Please use an international country code (e.g.: BE for Belgium).
815 StateCode is required for the requested country. Please use an international state code (e.g.: MI for Michigan).
816 Wrong StateCode is required for the requested country. Please use an international state code (e.g.: MI for Michigan).
817 City is required.
818 ZipCode is required.
819 Invalid characters. Please use Latin symbols only. Only Latin symbols are allowed in Billing Info Address and Name fields
901 «message» Shipment cost calculation failure

Example of Response with error in JSON

{
    "cartID":"109b9f82-d425-4ebb-8b11-4c85611508eb",
    "cartReference":"My cart",
    "currency":"USD",
    "iMatCartPageUrl":"https://i.materialise.com/en/cart/quotation/109b9f82-d425-4ebb-8b11-4c85611508eb",
    "iMatShipmentPageUrl":"https://i.materialise.com/en/ordering/quotation/109b9f82-d425-4ebb-8b11-4c85611508eb",
    "iMatEmbededCartPageUrl":"https://i.materialise.com/embeded/general/en/cart/quotation/109b9f82-d425-4ebb-8b11-4c85611508eb",
    "iMatEmbededShipmentPageUrl":"https://i.materialise.com/embeded/general/en/ordering/quotation/109b9f82-d425-4ebb-8b11-4c85611508eb",
    "discount":0.0000,
    "subTotalPrice":32.56,
    "vatTaxPercentage":0.00,
    "validUntil":"2014-11-29T00:00:00+02:00",
    "expectedShipmentDate":"2014-11-28T00:00:00+02:00",
    "shipmentDateComment":"If ordered today,
     90% certainty that it is shipped before or at this date.",
    "requestNumber":"REQ220207",
    "cartItems":[
        {
            "myCartItemReference":"some reference",
            "cartItemID":"01ebe0b0-caf4-4f1e-9ad5-abd28f141944",
            "toolID":"2054608d-b469-4cab-adeb-cf1c0569e7a1",
            "modelID":"489eb85e-4c64-457c-a1fe-83187b8e52d8",
            "modelFileName":"Box.stl",
            "materialID":"035f4772-da8a-400b-8be4-2dd344b28ddb",
            "finishID":"bba2bebb-8895-4049-aeb0-ab651cee2597",
            "quantity":2,
            "xDimMm":10.00000000000000000000,
            "yDimMm":10.00000000000000000000,
            "zDimMm":10.00000000000000000000,
            "volumeCm3":1.0000000000,
            "surfaceCm2":6.0000000000,
            "mySalesPrice":32.56,
            "iMatPrice":26.30,
            "mySalesUnitPrice":16.28
        }
    ],
    "shippingInfo":{
        "shippingInfoError":{
            "message":"ZipCode cannot be empty or longer than 9 symbols.",
            "code":715
        },
        "firstName":"John",
        "lastName":"Smith",
        "email":"test@test.com",
        "phone":"1234567",
        "company":"No company",
        "line1":"North Street",
        "line2":"",
        "countryCode":"US",
        "stateCode":"NY",
        "zipCode":"",
        "city":"New York"
    },
    "billingInfo":{
        "billingInfoError":{
            "message":"Wrong Email format.",
            "code":804
        },
        "firstName":"John",
        "lastName":"Smith",
        "email":"test@test.com",
        "phone":"1234567",
        "company":"No company",
        "vatNumber":"BE0999999922",
        "line1":"North Street",
        "line2":"",
        "countryCode":"BE",
        "stateCode":"",
        "zipCode":"1020",
        "city":"Brussels"
    }
}

Example of Response with error in XML

<CartRegistrationResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <CartID>00000000-0000-0000-0000-000000000000</CartID>
  <Discount>0</Discount>
  <SubTotalPrice>0</SubTotalPrice>
  <VatTaxPercentage>0</VatTaxPercentage>
  <ValidUntil>0001-01-01T00:00:00</ValidUntil>
  <ExpectedShipmentDate xsi:nil="true" />
  <RequestError>
    <Message>Cart reference cannot be empty or more than 100 symbols.</Message>
    <Code>508</Code>
  </RequestError>
  <CartItems />
  <ShippingInfo />
  <BillingInfo />
</CartRegistrationResponse>