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/flightoffers/v3/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.

ERROR CODES

HTTP status

Type

500

INTERNAL_SERVER_ERROR

SAMPLE RESPONSE

{

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

    "_links": {

        "ancillaryshops": {

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

        },

        "orderapi": {

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

        }

    },

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

}

}

Docs Navigation