POST /shopping-carts

POST /shopping-carts

The ShoppingCarts endpoint creates a shopping cart for a specific flight product to be able to proceed to checkout.

HOW TO USE?

Use case flow can be followed by the consumer by requesting the POST method supplied as HATEOAS link in the response body of AvailableOffers & UpsellOffers.

HEADERS TO USE FOR REQUESTS

Parameter

Value

Authorization 

Bearer {{token}}

Content-Type 

application/json

Accept 

application/hal+json;charset=utf8

Accept-Language 

{{language}}-{{country}}

AFKL-TRAVEL-Host 

KL or AF

AFKL-TRAVEL-Country

Country (overrides Accept-Language country)

POST

POST https://api.klm.com/opendata/offers/v1/flight-products/{id}/shopping-carts

QUERY PARAMETERS

n/a (use HATEOAS link)

POST PARAMETERS

n/a

RESPONSE PARAMETERS

Name

Type

Multiplicity

Description

id

String

1

Id of the shopping cart created.

resourceStoreId

String

1 Resource Store Id of the shopping cart created.
…._links Object 1 Container for all HATEOAS links
……ancillaryshops HATEOAS link  
1

Represents a HATEOAS link related to the anscillary shop.

Supports the use case where the anscillaries want to be proposed to the customer.
……orderapi HATEOAS link 
1 Represents a HATEOAS link related to the orderapi.
warning Object 0-99 Warning details
.code Number 1 Functional warning codes (1000-1999)
.name String 1

Name of the warning. Ex :OFA/FUNCTIONAL/INVALID_VALUE

- logger/Typology/name

.description String 1

Description of the warning

..errorinInputPath String 1 Description of the input Path where the warning occurred
errors Object 0-1
Error details
.code Number 1 Functional error codes (1000-1999)
Technical error codes (2000-2999)
Internal error codes (3000-3999)
.name String 1

Name of the error . Ex :OFA/TECHNICAL/INVALID_VALUE

- logger/Typology/name

.description String 1 Description of the error.
..errorinInputPath String 1 Description of the input Path where the error occurred

HTTP STATUS CODE

HTTP status

Type

200 OK

500

INTERNAL_SERVER_ERROR

SAMPLE RESPONSE

{

    "resourceStoreId": "27ff770f-9066-4494-a1a2-c7a7ab0a3156",

    "_links": {

        "ancillaryshops": {

            "href": "https://api.ute1.klm.com/travel/ancillaryshops/27ff770f-9066-4494-a1a2-c7a7ab0a3156"

        },

        "orderapi": {

            "href": "https://api.ute1.klm.com/travel/orders?conversationStateId=27ff770f-9066-4494-a1a2-c7a7ab0a3156"

        }

    },

    "id": "27ff770f-9066-4494-a1a2-c7a7ab0a3156"

}

}

Docs Navigation