Create Order
The first step is to create an order via server-side call to Nemuru's Order API. Make sure to get an access token before calling the POST Create Order, as this request requires authentication.
This step should be done after the customer adds their product(s) to the cart and proceeds to the checkout.
POST
Create Order
Request
Depending on the sector, there are different article attributes that might be relevant for the lender's credit decisioning. Highlighted lines in the following code blocks point out the main differences between one type of article and another.
POST /order/
Authorization: Bearer access_token
Content-Type: application/json
Check the API Reference for all the details about this request / response.
- Online product
- Service
- Accommodation
- Flight
- Travel
- Automobile
{
"product": "instalments",
"merchant": {
"order_reference_1": "7QuHQ5WVQQqyWVPW",
"order_reference_2": "14-922-1039",
"notification_url": "https://nemuru.free.beeceptor.com/callback",
"notification_auth": {
"authorization_header": "Basic bG9sOnNlY3VyZQ==",
"content_type": "application/json"
},
"notification_additional_payload": {
"cart": "h12837hg="
}
},
"customer": {
"first_name": "Alba",
"last_name": "Martinez Laguna",
"title": "ms",
"email": "alba.martinez@gmail.com",
"phone_number": "+34659723349",
"document_number": "55593310X",
"document_expiration_date": "2024-02-27T12:00:00+01:00",
"birth_date": "1982-11-03T12:00:00+01:00",
"nationality": "ESP",
"logged_in": false,
"locale": "es-ES",
"ip_address": "192.0.2.146",
"user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
},
"cart": {
"reference": "76t7y7sau8y398y",
"total_price_with_tax": 1500,
"currency": "EUR",
"items": [
{
"article": {
"name": "KIVIK 3-seat sofa",
"type": "product",
"category": "physical",
"reference": "4912345678904",
"unit_price_with_tax": 875,
"description": "3-seat sofa, with chaise longue/Hillared anthracite",
"brand": "the-ikea-brand",
"mpn": "AD6654412-334.22",
"url": "https://www.ikea.com/ie/en/p/kivik-3-seat-sofa-with-chaise-longue-hillared-anthracite-s89193665/",
"image_url": "https://www.ikea.com/ie/en/p/kivik-3-seat-sofa-with-chaise-longue-hillared-anthracite-s89193665/"
},
"units": 1,
"total_discount": 0,
"total_price_with_tax": 875,
"auto_shipping": true
},
{
"article": {
"name": "EKEDALEN / EKEDALEN Bar table and 4 bar stools",
"type": "product",
"category": "physical",
"reference": "5930423178914",
"unit_price_with_tax": 625,
"description": "Bar table and 4 bar stools, white/Ramna light grey120 cm"
},
"units": 1,
"total_discount": 0,
"total_price_with_tax": 625
}
]
},
"shipping": {
"name": "SEUR24",
"method": "home",
"first_name": "Alba",
"last_name": "Martinez",
"company": "EL DON TRESILLO CATALAN SL",
"email": "alba.martinez@gmail.com",
"phone_number": "+34659723349",
"address": {
"street_address": "Pl. de Pau Vila, 1",
"street_address_2": "Planta 1A",
"postal_code": "08003",
"city": "Barcelona",
"country": "ESP"
}
},
"billing": {
"first_name": "Alba",
"last_name": "Martinez",
"email": "alba.martinez@gmail.com",
"phone_number": "+34659723349",
"company": "EL DON TRESILLO CATALAN SL",
"corporate_id_number": "A35628221",
"address": {
"street_address": "Pl. de Pau Vila, 1",
"street_address_2": "Planta 1A",
"postal_code": "08003",
"city": "Barcelona",
"country": "ESP"
}
}
}
{
"product": "split_pay",
"merchant": {
"order_reference_1": "d2e45d83-b2f1-40ae-9587-fa4222587ecf",
"order_reference_2": "14-922-1039",
"notification_url": "https://nemuru.free.beeceptor.com/callback",
"notification_auth": {
"authorization_header": "Basic bG9sOnNlY3VyZQ==",
"content_type": "application/json"
},
"notification_additional_payload": {
"cart": "h12837hg="
}
},
"customer": {
"first_name": "Alberto",
"last_name": "Pérez Ortiz",
"title": "mr",
"email": "alberto.perez@gmail.com",
"phone_number": "+34659723349",
"document_number": "43918281B",
"document_expiration_date": "2025-02-27T12:00:00+01:00",
"birth_date": "1990-11-03T12:00:00+01:00",
"nationality": "ESP",
"logged_in": false,
"locale": "es-ES",
"ip_address": "192.0.2.146",
"user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
},
"cart": {
"reference": "75019830hh1i2h38",
"total_price_with_tax": 875.0,
"currency": "EUR",
"items": [
{
"article": {
"name": "Programming bootcamp – Machine Learning with Python",
"type": "service",
"category": "digital",
"reference": "DB-ML-101",
"unit_price_with_tax": 875.0,
"description": "This course covers the basics of machine learning, including supervised and unsupervised learning. Topics include linear regression, decision trees, and neural networks. The course uses Python programming language and machine learning libraries such as scikit-learn and TensorFlow."
"start_date": "2024-02-01T12:00:00+01:00",
"end_date": "2024-07-04T12:00:00+01:00",
"url": "https://www.datascience-bootcamp.com/ml-with-python",
"image_url": "https://www.datascience-bootcamp.com/ml-with-python"
},
"units": 1,
"total_discount": 0,
"total_price_with_tax": 875.0,
"auto_shipping": true
}
]
}
}
{
"product": "split_pay",
"merchant": {
"order_reference_1": "d2e45d83-b2f1-40ae-9587-fa4222587ecf",
"order_reference_2": "14-922-1039",
"notification_url": "https://nemuru.free.beeceptor.com/callback",
"notification_auth": {
"authorization_header": "Basic bG9sOnNlY3VyZQ==",
"content_type": "application/json"
},
"notification_additional_payload": {
"cart": "h12837hg="
}
},
"customer": {
"first_name": "Alberto",
"last_name": "Pérez Ortiz",
"title": "mr",
"email": "alberto.perez@gmail.com",
"phone_number": "+34659723349",
"document_number": "43918281B",
"document_expiration_date": "2025-02-27T12:00:00+01:00",
"birth_date": "1990-11-03T12:00:00+01:00",
"nationality": "ESP",
"logged_in": false,
"locale": "es-ES",
"ip_address": "192.0.2.146",
"user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
},
"cart": {
"reference": "75019830hh1i2h38",
"total_price_with_tax": 420.0,
"currency": "EUR",
"items": [
{
"article": {
"name": "Sol Port Cambrils",
"type": "accommodation",
"category": "physical",
"reference": "591234557679812",
"unit_price_with_tax": 420.0,
"description": "Sol Port Cambrils - 1x HABITACIÓN STANDARD (3 noches, 2 adultos)",
"checkin_date": "2022-05-01T12:00:00+00:00",
"checkout_date": "2022-05-04T12:00:00+00:00",
"establishment_name": "Sol Port Cambrils",
"address": {
"street_address": "Rambla Regueral, 11",
"street_address_2": null,
"postal_code": "43850",
"city": "Cambrils",
"country": "ESP"
},
"guests": 2,
"url": "https://www.melia.com/es/hoteles/espana/cambrils/sol-port-cambrils/habitacion-tryp.htm",
"image_url": "https://www.melia.com/dam/jcr:a96dbc18-d758-41e0-a…6d/11atrypportcambrils-tryproomdouble1600x785.jpg"
},
"units": 1,
"total_discount": 0,
"total_price_with_tax": 420.0,
"auto_shipping": true
}
]
}
}
{
"product": "split_pay",
"merchant": {
"order_reference_1": "fcfd5fd2-f07b-11ec-8ea0-0242ac120002",
"order_reference_2": "9479598725",
"notification_url": "https://nemuru.free.beeceptor.com/callback",
"notification_auth": {
"authorization_header": "Basic bG9sOnNlY3VyZQ==",
"content_type": "application/json"
}
},
"customer": {
"first_name": "Marina",
"last_name": "Montero Espejo",
"title": "ms",
"email": "marinamos12@gmail.com",
"phone_number": "+34659123199",
"document_number": "52870315P",
"document_expiration_date": "2025-03-01T00:00:00+01:00",
"birth_date": "1995-12-23T12:00:00+01:00",
"nationality": "ESP",
"logged_in": false,
"locale": "es-ES",
"ip_address": "192.0.2.146",
"user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
},
"cart": {
"reference": "947959872517391",
"total_price_with_tax": 325.0,
"currency": "EUR",
"items": [
{
"article": {
"name": "Barcelona to Amsterdam – VY8304",
"type": "flight",
"category": "digital",
"reference": "9479598725",
"unit_price_with_tax": 325.0,
"description": "Vueling BCN Barcelona - AMS Ámsterdam Schiphol (VY8304)",
"departure_date": "2022-06-25T14:25:00+01:00",
"destination_date": "2022-06-25T16:45:00+01:00",
"passengers": [
{
"first_name": "Marina",
"last_name": "Montero Espejo",
"nationality": "ESP",
"document_number": "52870315P",
"document_type": "nif",
"birth_date": "1995-12-23T12:00:00+01:00",
"gender": "F"
}
],
"iata_carrier_code": "VY",
"iata_departure_code": "BCN",
"iata_destination_code": "AMS",
"country_departure_code": "ESP",
"country_destination_code": "NLD",
"segments": [
{
"iata_carrier_code": "VY",
"iata_departure_code": "BCN",
"iata_destination_code": "AMS",
"iata_flight_code": "VY8304",
"departure_time": "2022-06-25T14:25:00+01:00",
"destination_time": "2022-06-25T16:45:00+01:00",
"cabin_class": "priority",
"rbd": "A",
"fare_basis": "ADNOU3Z1",
"ancillaries": true
}
],
"customer_travel_insurance": true,
"customer_loyalty_card": "94859034",
"customer_card_level": "gold",
"customer_member_since": "2002-12-23T12:00:00+01:00",
"url": "https://tickets.vueling.com/CampaignPage.aspx?flow=SB&step=select&culture=es-ES&adt=2&chd=0&infant=0&Currency=EUR&marketstructure=RoundTrip&marketorigin1=BCN&marketdestination1=AMS&marketday1=25&marketmonth1=2022-06&marketorigin2=AMS&marketdestination2=BCN&marketday2=2&marketmonth2=2022-07&ofn=VY8304"
},
"units": 1,
"total_discount": 0,
"total_price_with_tax": 325.0,
"auto_shipping": true
}
]
}
}
{
"product": "split_pay",
"merchant": {
"order_reference_1": "d2e45d83-b2f1-40ae-9587-fa4222587ecf",
"order_reference_2": "14-922-1039",
"notification_url": "https://nemuru.free.beeceptor.com/callback",
"notification_auth": {
"authorization_header": "Basic bG9sOnNlY3VyZQ==",
"content_type": "application/json"
},
"notification_additional_payload": {
"cart": "h12837hg="
}
},
"customer": {
"first_name": "Alberto",
"last_name": "Pérez Ortiz",
"title": "mr",
"email": "alberto.perez@gmail.com",
"phone_number": "+34659723349",
"document_number": "43918281B",
"document_expiration_date": "2025-02-27T12:00:00+01:00",
"birth_date": "1990-11-03T12:00:00+01:00",
"nationality": "ESP",
"logged_in": false,
"locale": "es-ES",
"ip_address": "192.0.2.146",
"user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
},
"cart": {
"reference": "75019830hh1i2h38",
"total_price_with_tax": 1480.0,
"currency": "EUR",
"items": [
{
"article": {
"name": "COMBINADO SAN JOSÉ Y MANUEL ANTONIO PREMIUM VIP CHARTER",
"type": "travel",
"category": "physical",
"reference": "591234557679812",
"unit_price_with_tax": 1480.0,
"description": "COMBINADO SAN JOSÉ Y MANUEL ANTONIO PREMIUM VIP CHARTER",
"travel_category": "circuits",
"start_date": "2025-05-01T12:00:00+00:00",
"end_date": "2025-05-04T12:00:00+00:00",
"destination": "Costa Rica",
"travellers": 2,
"url": "https://www.melia.com/es/hoteles/espana/cambrils/sol-port-cambrils/habitacion-tryp.htm",
"image_url": "https://www.melia.com/dam/jcr:a96dbc18-d758-41e0-a…6d/11atrypportcambrils-tryproomdouble1600x785.jpg"
},
"units": 1,
"total_discount": 0,
"total_price_with_tax": 420.0,
"auto_shipping": true
}
]
}
}
{
"product": "instalments",
"merchant": {
"order_reference_1": "d2e45d83-b2f1-40ae-9587-fa4222587ecf",
"order_reference_2": "14-922-1039",
"notification_url": "https://nemuru.free.beeceptor.com/callback",
"notification_auth": {
"authorization_header": "Basic bG9sOnNlY3VyZQ==",
"content_type": "application/json"
}
},
"customer": {
"first_name": "Alba",
"last_name": "Pérez Ortiz",
"title": "mr",
"email": "alberto.perez@gmail.com",
"phone_number": "+34659723349",
"document_number": "43918281B",
"document_expiration_date": "2025-02-27T12:00:00+01:00",
"birth_date": "1990-11-03T12:00:00+01:00",
"nationality": "ESP",
"logged_in": false,
"locale": "es-ES",
"ip_address": "192.0.2.146",
"user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
},
"cart": {
"reference": "75019830hh1i2h38",
"total_price_with_tax": 10900.0,
"currency": "EUR",
"items": [
{
"article": {
"name": "VOLKSWAGEN Golf Sport 2.0 TDI 150CV BMT",
"type": "automobile",
"category": "physical",
"reference": "6581a949-fc39-40d3-9a88-1008711a5316",
"unit_price_with_tax": 10900.0,
"description": "VOLKSWAGEN Golf Sport 2.0 TDI 150CV BMT",
"brand": "Volkswagen",
"model": "Golf",
"version": "Sport 2.0 TDI 150CV BMT",
"auto_category": "car",
"is_new_vehicle": false,
"specs": {
"body_type": "hatchback",
"fuel_type": "diesel",
"gear": "automatic",
"power": 150,
"engine": 1968,
"imported": false,
"registration_date": "2011-05-12T20:01:40+00:00",
"identification_number": "89138XGYG72DJ",
"nat_code": "71829"
},
"usage": {
"plate_number": "1629FGT",
"odometer_value": 189000
},
"url": "https://cars.com/volkswagen/golf/2011/volkswagen-golf-sport-20-tdi-150cv-bmt-5p-2011-2011"
},
"units": 1,
"total_discount": 0,
"total_price_with_tax": 10900.0,
"auto_shipping": true
}
]
}
}
Response
Response Headers
Date: Thu, 24 Mar 2022 18:20:46 GMT
Content-Type: application/json
...
Id: 41c325c0-161c-43d6-bb4f-65f6b50b9ba0
It is important to save the order id returned within the header of a successful response (key Id
). This order id should be used in subsequent requests to link them to this particular order; this id will also be included in the notifications that Nemuru sends to your system (notification_url
) for order status changes, etc.