Checkout - Orders

Create an order from a checkout

Endpoint

POST /v1/checkouts/:new_checkout_uuid/orders

Request

curl "https://capi.storyblok.com/v1/checkouts/5f8c9524-faf9-4bb8-b340-c41e2742943f/orders" -d '' -X POST \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
	-H "Authorization: Token token=439c2d60d7e3790800fcd37d6e288a1c" \

Response

{
  "order_number": "153072340558",
  "status": "Open",
  "total": 115.0,
  "payment_methods": {
    "stripe": {
      "public_key": "pk_test_czc1vklmggYnAhc9hsucfzB2"
    }
  },
  "order_items": [
    {
      "id": 14917,
      "sku": "STRAW",
      "url": "https://0387bdac.me.storyblok.com/products/strawberry",
      "product_id": 0,
      "order_id": 10346,
      "quantity": 1,
      "value": 10.5,
      "meta_data": null,
      "contents": {
        "ean": "8884652088399"
      },
      "total_value": 10.5,
      "image": null,
      "parent_item_id": null,
      "total_price": "EUR 10,50",
      "price": "EUR 10,50",
      "item_status": "Open",
      "package_id": null,
      "discount": null,
      "translated_item_status": "Open"
    },
    {
      "id": 14918,
      "sku": "STRAW",
      "url": "https://0387bdac.me.storyblok.com/products/strawberry",
      "product_id": 0,
      "order_id": 10346,
      "quantity": 1,
      "value": 10.5,
      "meta_data": null,
      "contents": {
        "ean": "8884652088399"
      },
      "total_value": 10.5,
      "image": null,
      "parent_item_id": null,
      "total_price": "EUR 10,50",
      "price": "EUR 10,50",
      "item_status": "Open",
      "package_id": null,
      "discount": null,
      "translated_item_status": "Open"
    },
    {
      "id": 14919,
      "sku": "STRAW",
      "url": "https://0387bdac.me.storyblok.com/products/strawberry",
      "product_id": 0,
      "order_id": 10346,
      "quantity": 1,
      "value": 10.5,
      "meta_data": null,
      "contents": {
        "ean": "8884652088399"
      },
      "total_value": 10.5,
      "image": null,
      "parent_item_id": null,
      "total_price": "EUR 10,50",
      "price": "EUR 10,50",
      "item_status": "Open",
      "package_id": null,
      "discount": null,
      "translated_item_status": "Open"
    },
    {
      "id": 14920,
      "sku": "STRAW",
      "url": "https://0387bdac.me.storyblok.com/products/strawberry",
      "product_id": 0,
      "order_id": 10346,
      "quantity": 1,
      "value": 10.5,
      "meta_data": null,
      "contents": {
        "ean": "8884652088399"
      },
      "total_value": 10.5,
      "image": null,
      "parent_item_id": null,
      "total_price": "EUR 10,50",
      "price": "EUR 10,50",
      "item_status": "Open",
      "package_id": null,
      "discount": null,
      "translated_item_status": "Open"
    },
    {
      "id": 14921,
      "sku": "STRAW",
      "url": "https://0387bdac.me.storyblok.com/products/strawberry",
      "product_id": 0,
      "order_id": 10346,
      "quantity": 1,
      "value": 10.5,
      "meta_data": null,
      "contents": {
        "ean": "8884652088399"
      },
      "total_value": 10.5,
      "image": null,
      "parent_item_id": null,
      "total_price": "EUR 10,50",
      "price": "EUR 10,50",
      "item_status": "Open",
      "package_id": null,
      "discount": null,
      "translated_item_status": "Open"
    },
    {
      "id": 14922,
      "sku": "STRAW",
      "url": "https://0387bdac.me.storyblok.com/products/strawberry",
      "product_id": 0,
      "order_id": 10346,
      "quantity": 1,
      "value": 10.5,
      "meta_data": null,
      "contents": {
        "ean": "8884652088399"
      },
      "total_value": 10.5,
      "image": null,
      "parent_item_id": null,
      "total_price": "EUR 10,50",
      "price": "EUR 10,50",
      "item_status": "Open",
      "package_id": null,
      "discount": null,
      "translated_item_status": "Open"
    },
    {
      "id": 14923,
      "sku": "STRAW",
      "url": "https://0387bdac.me.storyblok.com/products/strawberry",
      "product_id": 0,
      "order_id": 10346,
      "quantity": 1,
      "value": 10.5,
      "meta_data": null,
      "contents": {
        "ean": "8884652088399"
      },
      "total_value": 10.5,
      "image": null,
      "parent_item_id": null,
      "total_price": "EUR 10,50",
      "price": "EUR 10,50",
      "item_status": "Open",
      "package_id": null,
      "discount": null,
      "translated_item_status": "Open"
    },
    {
      "id": 14924,
      "sku": "STRAW",
      "url": "https://0387bdac.me.storyblok.com/products/strawberry",
      "product_id": 0,
      "order_id": 10346,
      "quantity": 1,
      "value": 10.5,
      "meta_data": null,
      "contents": {
        "ean": "8884652088399"
      },
      "total_value": 10.5,
      "image": null,
      "parent_item_id": null,
      "total_price": "EUR 10,50",
      "price": "EUR 10,50",
      "item_status": "Open",
      "package_id": null,
      "discount": null,
      "translated_item_status": "Open"
    },
    {
      "id": 14925,
      "sku": "STRAW",
      "url": "https://0387bdac.me.storyblok.com/products/strawberry",
      "product_id": 0,
      "order_id": 10346,
      "quantity": 1,
      "value": 10.5,
      "meta_data": null,
      "contents": {
        "ean": "8884652088399"
      },
      "total_value": 10.5,
      "image": null,
      "parent_item_id": null,
      "total_price": "EUR 10,50",
      "price": "EUR 10,50",
      "item_status": "Open",
      "package_id": null,
      "discount": null,
      "translated_item_status": "Open"
    },
    {
      "id": 14926,
      "sku": "STRAW",
      "url": "https://0387bdac.me.storyblok.com/products/strawberry",
      "product_id": 0,
      "order_id": 10346,
      "quantity": 1,
      "value": 10.5,
      "meta_data": null,
      "contents": {
        "ean": "8884652088399"
      },
      "total_value": 10.5,
      "image": null,
      "parent_item_id": null,
      "total_price": "EUR 10,50",
      "price": "EUR 10,50",
      "item_status": "Open",
      "package_id": null,
      "discount": null,
      "translated_item_status": "Open"
    }
  ]
}

Getting a list of orders for this checkout

Endpoint

GET /v1/checkouts/:uuid/orders

Request

curl "https://capi.storyblok.com/v1/checkouts/d594a554-21a9-4751-86e8-81045c21daa7/orders" -X GET \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
	-H "Authorization: Token token=d5d7d53679ccfdf70ea4ba4feaf6bd48" \

Response

[

]

Getting a order

Endpoint

GET /v1/checkouts/:uuid/orders/:order_number

Request

curl "https://capi.storyblok.com/v1/checkouts/f3095fc4-a786-4db9-a35b-5a4f2bc54c24/orders/153072340586" -X GET \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
	-H "Authorization: Token token=70ed0a860129e49372a197530c840272" \

Response

{
  "order_number": "153072340586",
  "status": "Open",
  "total": 0.0,
  "payment_methods": {
    "stripe": {
      "public_key": "pk_test_czc1vklmggYnAhc9hsucfzB2"
    }
  },
  "order_items": [

  ]
}